OpenDaVINCI  4.16.0
odcore::io::conference::UDPMultiCastContainerConference Class Reference

#include <UDPMultiCastContainerConference.h>

Inheritance diagram for odcore::io::conference::UDPMultiCastContainerConference:
Inheritance graph

Public Member Functions

virtual ~UDPMultiCastContainerConference ()
 
virtual void nextPacket (const odcore::data::Packet &p)
 
virtual void send (odcore::data::Container &container) const
 
virtual void setContainerListener (ContainerListener *cl)
 
ContainerListenergetContainerListener ()
 
void setSenderStamp (const uint32_t &senderStamp)
 
uint32_t getSenderStamp () const
 

Protected Member Functions

 UDPMultiCastContainerConference (const string &address, const uint32_t &port) throw (exceptions::ConferenceException)
 
void receive (odcore::data::Container &c)
 
bool hasContainerListener () const
 

Friends

class ContainerConferenceFactory
 

Detailed Description

This class encapsulates a conference about containers. Therefore, it uses UDP multicast sending and receiving for sending and receiving containers. Therefore, it implements a StringListener for getting informed about new strings from the UDPReceiver and informs any connected ContainerListener.

Constructor & Destructor Documentation

odcore::io::conference::UDPMultiCastContainerConference::UDPMultiCastContainerConference ( const string &  address,
const uint32_t &  port 
)
throw (exceptions::ConferenceException
)
protected

Constructor.

Parameters
addressUse address for joining.
portUse port for joining.
Exceptions
ConferenceExceptionif the conference could not be created.

References odcore::io::udp::UDPFactory::createUDPReceiver(), odcore::io::udp::UDPFactory::createUDPSender(), and OPENDAVINCI_CORE_THROW_EXCEPTION.

odcore::io::conference::UDPMultiCastContainerConference::~UDPMultiCastContainerConference ( )
virtual

Member Function Documentation

ContainerListener * odcore::io::conference::ContainerConference::getContainerListener ( )
inherited

This method returns the registered ContainerListener.

Returns
registered container listener or NULL.
uint32_t odcore::io::conference::ContainerConference::getSenderStamp ( ) const
inherited

This method returns the user-defined attribute used for stamping any container that is sent.

Returns
user-defined attribute used for stamping containers.

Referenced by odcontext::base::ControlledContainerConferenceForSystemUnderTest::send().

bool odcore::io::conference::ContainerConference::hasContainerListener ( ) const
protectedinherited

This method returns true if a ContainerListener is registered.

Returns
true, iff a ContainerListener is registered.
void odcore::io::conference::UDPMultiCastContainerConference::nextPacket ( const odcore::data::Packet &  p)
virtual

This method is called whenever a new packet occurs.

Parameters
pPacket that has been occurred.

Implements odcore::io::PacketListener.

References odcore::data::Container::setReceivedTimeStamp().

void odcore::io::conference::ContainerConference::receive ( odcore::data::Container c)
protectedinherited

This method can be called from any subclass to distribute a newly received container.

Parameters
cContainer to be distributed.

References odcore::io::conference::ContainerListener::nextContainer().

Referenced by odcontext::base::ControlledContainerConferenceForSystemUnderTest::nextContainer(), and odcore::base::module::ManagedClientModuleContainerConference::receiveFromLocal().

void odcore::io::conference::ContainerConference::setContainerListener ( ContainerListener cl)
virtualinherited

This method sets or unsets a container listener.

Parameters
clContainerListener to be set. If set to NULL, observing is suspended.

Implements odcore::io::conference::ContainerObserver.

void odcore::io::conference::ContainerConference::setSenderStamp ( const uint32_t &  senderStamp)
inherited

This method sets a user-defined attribute to be used for stamping any container that is sent.

Parameters
senderStampUser-defined attribute used for stamping containers.

Friends And Related Function Documentation

friend class ContainerConferenceFactory
friend