DUNE: Uniform Navigational Environment  2.5.0
DUNE::IMC::Bus Class Reference

Public Member Functions

 Bus (void)
 
 ~Bus (void)
 
void registerRecipient (Tasks::AbstractTask *task, uint16_t id)
 
void unregisterRecipient (Tasks::AbstractTask *task, uint16_t id)
 
void dispatch (const Message *msg, Tasks::AbstractTask *task=NULL)
 
void pause (void)
 
void resume (void)
 
const std::vector
< TransportBindings * > 
getBindings (void)
 

Constructor & Destructor Documentation

DUNE::IMC::Bus::Bus ( void  )

Constructor.

DUNE::IMC::Bus::~Bus ( void  )

Destructor.

Member Function Documentation

void DUNE::IMC::Bus::dispatch ( const Message msg,
Tasks::AbstractTask task = NULL 
)

Dispatches a message to registered listeners.

Parameters
msgmessage to dispatch.
taskdo not deliver message to this task.

References DUNE::IMC::Message::getId().

Referenced by DUNE::Tasks::Task::dispatch(), and resume().

const std::vector< TransportBindings * > DUNE::IMC::Bus::getBindings ( void  )
void DUNE::IMC::Bus::pause ( void  )
inline
void DUNE::IMC::Bus::registerRecipient ( Tasks::AbstractTask task,
uint16_t  id 
)

Register a task as a recipient a given message identification number.

Parameters
tasktask object.
idmessage identification number.

References DUNE::IMC::TransportBindings::consumer, DUNE::Tasks::AbstractTask::getName(), DUNE::IMC::TransportBindings::message_id, DUNE::IMC::Message::setSourceEntity(), and DUNE::IMC::Message::setTimeStamp().

Referenced by DUNE::Tasks::Recipient::bind().

void DUNE::IMC::Bus::unregisterRecipient ( Tasks::AbstractTask task,
uint16_t  id 
)

Unregister a task as a recipient of a given message identification number.

Parameters
tasktask object.
idmessage identification number.

Referenced by DUNE::Tasks::Recipient::bind(), and DUNE::Tasks::Recipient::unbindAll().

Collaboration diagram for DUNE::IMC::Bus:
Collaboration graph