DUNE: Uniform Navigational Environment  2019.02.1
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.

Referenced by pause().

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::Entities::BasicEntity::dispatch(), DUNE::Tasks::Task::dispatch(), and resume().

const std::vector< TransportBindings * > DUNE::IMC::Bus::getBindings ( void  )

Referenced by pause().

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::unbindAll().

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