OpenJAUS Software Development Kit  4.3.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
openjaus::core::services::Transport Class Reference

Provides static methods for the Transport service. More...

#include <Transport.h>

Inherits openjaus::core::TransportInterface.

Inherited by openjaus::core::services::Events [virtual], and openjaus::core::Transport [virtual].

Public Member Functions

 Transport ()
 
virtual ~Transport ()
 
virtual bool enqueue (model::Trigger *trigger)
 Convert the destination address into an unsigned integer such that the ComponentID maps to the least significant byte, NodeID to the next least significant byte and SubsystemID maps onto the remaining two bytes of the integer. More...
 
virtual bool broadcastLocalEnqueue (model::Trigger *trigger)
 Package the message as specified by the transport layer specification and send it to all endpoints in the local subsystem. More...
 
virtual bool broadcastGlobalEnqueue (model::Trigger *trigger)
 Package the message as specified by the transport layer specification and send it to all endpoints on all subsystems. More...
 
virtual bool sendMessage (model::Trigger *trigger)
 SendMessage action with input SendMessage. More...
 
virtual bool broadcastToNode (model::Trigger *trigger)
 Broadcasts message to all components within the local node Broadcasts message to all components within the local node. More...
 
virtual bool broadcastToSubsystem (model::Trigger *trigger)
 Broadcasts a given message to all nodes in the local subsystem (equivalent to broadcast local enqueue) Broadcasts a given message to all nodes in the local subsystem (equivalent to broadcast local enqueue) More...
 
virtual bool broadcastToSystem (model::Trigger *trigger)
 Broadcasts the message to all subsystems on the JAUS network (equivalent to broadcast global enqueue) Broadcasts the message to all subsystems on the JAUS network (equivalent to broadcast global enqueue) More...
 
virtual bool checkTransportPolicy (model::Trigger *trigger)
 CheckTransportPolicy action with input CheckTransportPolicy. More...
 
virtual ReportTransportPolicy getReportTransportPolicy (QueryTransportPolicy *queryTransportPolicy)
 Send action for ReportTransportPolicy with input message QueryTransportPolicy. More...
 
virtual bool storeTransportPolicy (ReportTransportPolicy *reportTransportPolicy)
 StoreTransportPolicy action with input ReportTransportPolicy. More...
 
model::StategetCurrentState ()
 
void addAckNakCallback (void(*callback)(const transport::AckNakEventArgs &args))
 Adds a static callback that will execute when an ACK/NAK events occurs on the JUDP Interface. More...
 
void addAckNakCallback (void(*callback)(void *object, const transport::AckNakEventArgs &args), void *object)
 Adds a class callback that will execute when an ACK/NAK events occurs on the JUDP Interface. More...
 
template<class MessageType , class CallbackClass >
void addMessageCallback (bool(CallbackClass::*callback)(MessageType &messageRef), CallbackClass *object)
 
template<class CallbackClass >
void addMessageCallback (bool(CallbackClass::*callback)(model::Trigger *trigger), CallbackClass *object)
 
template<class MessageType >
void addMessageCallback (bool(*callback)(MessageType &messageRef))
 
- Public Member Functions inherited from openjaus::core::TransportInterface
virtual ~TransportInterface ()
 

Static Public Member Functions

static const char * uri ()
 The URI for the Service. More...
 
static model::Servicecreate ()
 Builds a default instance of the Transport Service and populates the URI and Version numbers. More...
 
- Static Public Member Functions inherited from openjaus::core::TransportInterface
static OPENJAUS_DEPRECATED model::Service TransportService ()
 Builds a default instance of the Transport Service and populates the URI and Version numbers. More...
 
static OPENJAUS_DEPRECATED std::string TransportUri ()
 Static accessor for Service URI. More...
 

Protected Member Functions

void configure (services::TransportSettingsInterface *settings)
 
void setComponentAddress (transport::Address *address)
 
void setReceiveQueue (system::PriorityQueue *queue)
 
void setSubsInterface (transport::Interface *interface)
 
void setNodeInterface (transport::Interface *interface)
 
void setComponentInterface (transport::Interface *interface)
 
void setJtcpInterface (transport::AS5669::JtcpInterface *interface)
 
void fireEvent (model::InternalEvent *event)
 
void sendToSelf (transport::Wrapper *wrapper)
 
transport::Address *& getComponentAddress ()
 

Protected Attributes

model::StateMachine receive
 
model::State receivingState
 

Private Member Functions

bool isBroadcastAddress (const transport::Address &address)
 
bool shouldSendUsingTcp (TransportSettingsInterface *const settings, const model::Message *const message)
 
bool sendJausMessage (model::Message *const message)
 
bool sendConfigurationMessage (model::Message *const message)
 
void toWrapper (transport::Wrapper *const wrapper, model::Message *const message)
 
bool sendWrapper (transport::Wrapper *const wrapper)
 
bool sendOnTcpInterface (model::Message *const message)
 
bool sendOnUdpInterface (model::Message *const message)
 
transport::PolicygetTransportPolicy (const model::Message *const message)
 

Private Attributes

PolicyLoop policyLoop
 
TransportSettingsInterfacesettings
 
transport::AddresscomponentAddress
 
system::PriorityQueuereceiveQueue
 
transport::InterfacesubsInterface
 
transport::InterfacenodeInterface
 
transport::InterfacecmptInterface
 
transport::AS5669::JtcpInterfacetcpInterface
 
std::map< uint64_t, transport::Policy *> policyMap
 

Detailed Description

Constructor & Destructor Documentation

§ Transport()

openjaus::core::services::Transport::Transport ( )

§ ~Transport()

openjaus::core::services::Transport::~Transport ( )
virtual

Reimplemented in openjaus::core::Transport.

Member Function Documentation

§ addAckNakCallback() [1/2]

void openjaus::core::services::Transport::addAckNakCallback ( void(*)(const transport::AckNakEventArgs &args)  callback)

§ addAckNakCallback() [2/2]

void openjaus::core::services::Transport::addAckNakCallback ( void(*)(void *object, const transport::AckNakEventArgs &args)  callback,
void *  object 
)

§ addMessageCallback() [1/3]

template<class MessageType , class CallbackClass >
void openjaus::core::services::Transport::addMessageCallback ( bool(CallbackClass::*)(MessageType &messageRef)  callback,
CallbackClass *  object 
)
inline

§ addMessageCallback() [2/3]

template<class CallbackClass >
void openjaus::core::services::Transport::addMessageCallback ( bool(CallbackClass::*)(model::Trigger *trigger)  callback,
CallbackClass *  object 
)
inline

§ addMessageCallback() [3/3]

template<class MessageType >
void openjaus::core::services::Transport::addMessageCallback ( bool(*)(MessageType &messageRef)  callback)
inline

§ broadcastGlobalEnqueue()

bool openjaus::core::services::Transport::broadcastGlobalEnqueue ( model::Trigger trigger)
virtual

Package the message as specified by the transport layer specification and send it to all endpoints on all subsystems.

Parameters
[in]trigger- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::TransportInterface.

§ broadcastLocalEnqueue()

bool openjaus::core::services::Transport::broadcastLocalEnqueue ( model::Trigger trigger)
virtual

Package the message as specified by the transport layer specification and send it to all endpoints in the local subsystem.

Parameters
[in]trigger- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::TransportInterface.

§ broadcastToNode()

bool openjaus::core::services::Transport::broadcastToNode ( model::Trigger trigger)
virtual
Parameters
[in]trigger- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::TransportInterface.

§ broadcastToSubsystem()

bool openjaus::core::services::Transport::broadcastToSubsystem ( model::Trigger trigger)
virtual
Parameters
[in]trigger- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::TransportInterface.

§ broadcastToSystem()

bool openjaus::core::services::Transport::broadcastToSystem ( model::Trigger trigger)
virtual
Parameters
[in]trigger- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::TransportInterface.

§ checkTransportPolicy()

bool openjaus::core::services::Transport::checkTransportPolicy ( model::Trigger trigger)
virtual

CheckTransportPolicy action with input CheckTransportPolicy.

Parameters
[in]trigger- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::TransportInterface.

§ configure()

void openjaus::core::services::Transport::configure ( services::TransportSettingsInterface settings)
protected

§ create()

model::Service * openjaus::core::services::Transport::create ( )
static
Returns
model::Service - The populated service.

§ enqueue()

bool openjaus::core::services::Transport::enqueue ( model::Trigger trigger)
virtual

Package the message as specified by the transport layer specification and send it to its destination as per the specified priority. Convert the destination address into an unsigned integer such that the ComponentID maps to the least significant byte, NodeID to the next least significant byte and SubsystemID maps onto the remaining two bytes of the integer. Package the message as specified by the transport layer specification and send it to its destination as per the specified priority.

Parameters
[in]trigger- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::TransportInterface.

§ fireEvent()

void openjaus::core::services::Transport::fireEvent ( model::InternalEvent event)
protected

§ getComponentAddress()

transport::Address *& openjaus::core::services::Transport::getComponentAddress ( )
protected

§ getCurrentState()

model::State * openjaus::core::services::Transport::getCurrentState ( )

§ getReportTransportPolicy()

core::ReportTransportPolicy openjaus::core::services::Transport::getReportTransportPolicy ( QueryTransportPolicy queryTransportPolicy)
virtual

Send action for ReportTransportPolicy with input message QueryTransportPolicy.

Parameters
[in]queryTransportPolicy- Input Trigger.
Returns
ReportTransportPolicy Output Message.

Implements openjaus::core::TransportInterface.

§ getTransportPolicy()

transport::Policy * openjaus::core::services::Transport::getTransportPolicy ( const model::Message *const  message)
private

§ isBroadcastAddress()

bool openjaus::core::services::Transport::isBroadcastAddress ( const transport::Address address)
private

§ sendConfigurationMessage()

bool openjaus::core::services::Transport::sendConfigurationMessage ( model::Message *const  message)
private

§ sendJausMessage()

bool openjaus::core::services::Transport::sendJausMessage ( model::Message *const  message)
private

§ sendMessage()

bool openjaus::core::services::Transport::sendMessage ( model::Trigger trigger)
virtual

SendMessage action with input SendMessage.

Parameters
[in]trigger- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::TransportInterface.

§ sendOnTcpInterface()

bool openjaus::core::services::Transport::sendOnTcpInterface ( model::Message *const  message)
private

§ sendOnUdpInterface()

bool openjaus::core::services::Transport::sendOnUdpInterface ( model::Message *const  message)
private

§ sendToSelf()

void openjaus::core::services::Transport::sendToSelf ( transport::Wrapper wrapper)
protected

§ sendWrapper()

bool openjaus::core::services::Transport::sendWrapper ( transport::Wrapper *const  wrapper)
private

§ setComponentAddress()

void openjaus::core::services::Transport::setComponentAddress ( transport::Address address)
protected

§ setComponentInterface()

void openjaus::core::services::Transport::setComponentInterface ( transport::Interface interface)
protected

§ setJtcpInterface()

void openjaus::core::services::Transport::setJtcpInterface ( transport::AS5669::JtcpInterface interface)
protected

§ setNodeInterface()

void openjaus::core::services::Transport::setNodeInterface ( transport::Interface interface)
protected

§ setReceiveQueue()

void openjaus::core::services::Transport::setReceiveQueue ( system::PriorityQueue queue)
protected

§ setSubsInterface()

void openjaus::core::services::Transport::setSubsInterface ( transport::Interface interface)
protected

§ shouldSendUsingTcp()

bool openjaus::core::services::Transport::shouldSendUsingTcp ( TransportSettingsInterface *const  settings,
const model::Message *const  message 
)
private

§ storeTransportPolicy()

bool openjaus::core::services::Transport::storeTransportPolicy ( ReportTransportPolicy reportTransportPolicy)
virtual

StoreTransportPolicy action with input ReportTransportPolicy.

Parameters
[in]reportTransportPolicy- Input Trigger.
Returns
Whether the message was properly processed by this action.

Implements openjaus::core::TransportInterface.

§ toWrapper()

void openjaus::core::services::Transport::toWrapper ( transport::Wrapper *const  wrapper,
model::Message *const  message 
)
private

§ uri()

const char * openjaus::core::services::Transport::uri ( )
static
Returns
const char* - The URI.

Member Data Documentation

§ cmptInterface

transport::Interface* openjaus::core::services::Transport::cmptInterface
private

§ componentAddress

transport::Address* openjaus::core::services::Transport::componentAddress
private

§ nodeInterface

transport::Interface* openjaus::core::services::Transport::nodeInterface
private

§ policyLoop

PolicyLoop openjaus::core::services::Transport::policyLoop
private

§ policyMap

std::map< uint64_t, transport::Policy * > openjaus::core::services::Transport::policyMap
private

§ receive

model::StateMachine openjaus::core::services::Transport::receive
protected

§ receiveQueue

system::PriorityQueue* openjaus::core::services::Transport::receiveQueue
private

§ receivingState

model::State openjaus::core::services::Transport::receivingState
protected

§ settings

TransportSettingsInterface* openjaus::core::services::Transport::settings
private

§ subsInterface

transport::Interface* openjaus::core::services::Transport::subsInterface
private

§ tcpInterface

transport::AS5669::JtcpInterface* openjaus::core::services::Transport::tcpInterface
private

The documentation for this class was generated from the following files: