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

Transport Component implements the urn:jaus:jss:core:Transport services. More...

#include <Transport.h>

Inherits openjaus::core::services::Transport, and openjaus::model::Component.

Inherited by openjaus::core::Events.

Public Member Functions

OPENJAUS_DEPRECATED Transport ()
 
 Transport (const std::string &name)
 
virtual ~Transport ()
 
- Public Member Functions inherited from openjaus::core::services::Transport
 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 ()
 
- Public Member Functions inherited from openjaus::model::Component
virtual ~Component ()
 
 Component (const std::string &name)
 
 Component (const Component &copy)
 
std::string getName () const
 Accessor to get the value of name. More...
 
uint8_t getAuthority () const
 Accessor to get the value of authority. More...
 
bool setAuthority (uint8_t authority)
 Accessor to set value of authority. More...
 
const std::vector< StateMachineRunner *> & getRunners () const
 Accessor to get the value of runners. More...
 
bool setRunners (const StateMachineRunner &runners)
 Accessor to set value of runners. More...
 
const std::vector< transport::Interface *> & getInterfaces () const
 Accessor to get the value of interfaces. More...
 
bool setInterfaces (const transport::Interface &interfaces)
 Accessor to set value of interfaces. More...
 
SystemTreegetSystemTree () const
 Accessor to get the value of systemTree. More...
 
bool setSystemTree (SystemTree *systemTree)
 Accessor to set value of systemTree. More...
 
std::vector< Service *> * getImplements () const
 Accessor to get the value of implements. More...
 
bool setImplements (Service *implements)
 Accessor to set value of implements. More...
 
ComponentgetInheritsFrom () const
 Accessor to get the value of inheritsFrom. More...
 
bool setInheritsFrom (Component *inheritsFrom)
 Accessor to set value of inheritsFrom. More...
 
const ComponentInfogetInfo () const
 Accessor to get the value of info. More...
 
const transport::AddressgetAddress () const
 Accessor to get the value of address. More...
 
void run ()
 Operation run. More...
 
void stop ()
 Operation stop. More...
 
virtual std::string toString () const
 
OPENJAUS_DEPRECATED Component ()
 
OPENJAUS_DEPRECATED bool setName (std::string name)
 
std::string toXml (unsigned char level=0) const
 

Protected Member Functions

transport::InterfacegetSubsystemJudpInterface ()
 
transport::InterfacegetNodeJudpInterface ()
 
transport::InterfacegetComponentJudpInterface ()
 
bool isSubsInterfaceEnabled ()
 
bool isNodeInterfaceEnabled ()
 
system::PriorityQueue *const getReceiveQueue ()
 
virtual core::services::TransportSettingsInterfaceloadTransportSettings ()
 
virtual transport::AS5669::JudpSettingsInterfaceloadJudpSettings ()
 
virtual transport::InterfacecreateSubsystemJudpInterface ()
 
virtual transport::InterfacecreateNodeJudpInterface ()
 
virtual transport::InterfacecreateComponentJudpInterface ()
 
- Protected Member Functions inherited from openjaus::core::services::Transport
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 Member Functions inherited from openjaus::model::Component
virtual void configureServices ()
 
virtual void startServices ()
 
virtual void stopServices ()
 

Private Types

enum  InterfaceLevel { SUBSYSTEM, NODE, COMPONENT }
 

Private Member Functions

void configureTransportService ()
 
void setupSubsystemJudpInterface (system::PriorityQueue *queue)
 
void setupNodeJudpInterface (system::PriorityQueue *queue)
 
void setupComponentJudpInterface (system::PriorityQueue *queue)
 
void addInterface (InterfaceLevel level, transport::Interface *const interface)
 
void setupJtcpInterface (services::TransportSettingsInterface *settings, system::PriorityQueue *queue)
 

Private Attributes

model::StateMachineRunner receiveThread
 
std::map< InterfaceLevel, transport::Interface * > judpInterfaces
 
transport::AS5669::JtcpInterfacetcpInterface
 
core::services::TransportSettingsInterfacetransportSettings
 

Additional Inherited Members

- Static Public Member Functions inherited from openjaus::core::services::Transport
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...
 
- Static Public Attributes inherited from openjaus::model::Component
static const uint8_t DEFAULT_AUTHORITY = 127
 
- Protected Attributes inherited from openjaus::core::services::Transport
model::StateMachine receive
 
model::State receivingState
 
- Protected Attributes inherited from openjaus::model::Component
uint8_t authority
 
std::vector< StateMachineRunner *> runners
 
std::vector< transport::Interface *> interfaces
 
SystemTreesystemTree
 
std::vector< Service *> * implements
 
ComponentinheritsFrom
 

Detailed Description

The Transport component provides an implementation of the following service(s). This component can be extended for customized functionality or used via instantiation.

Transport Service

The transport service acts as an interface to the JAUS transport layer. It models an abstract bi-directional communication channel (input queue and output queue) whose primary function is to provide the capability of sending messages to a single destination endpoint or broadcasting messages to all endpoints in the system, and to receive a message from any source endpoint. It also provides the capability to prioritize the delivery of sent messages. service establishes a communication endpoint whose address is defined by a triple {SubsystemID, NodeID, ComponentID} as specified by the Send and Receive internal events. Other services that need to utilize the communication channel provided by the transport service must inherit from the transport service.



URI: urn:jaus:jss:core:Transport

Version: 1.0

Inherits From:

Member Enumeration Documentation

§ InterfaceLevel

Enumerator
SUBSYSTEM 
NODE 
COMPONENT 

Constructor & Destructor Documentation

§ Transport() [1/2]

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

§ Transport() [2/2]

openjaus::core::Transport::Transport ( const std::string &  name)

§ ~Transport()

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

Member Function Documentation

§ addInterface()

void openjaus::core::Transport::addInterface ( InterfaceLevel  level,
transport::Interface *const  interface 
)
private

§ configureTransportService()

void openjaus::core::Transport::configureTransportService ( )
private

§ createComponentJudpInterface()

transport::Interface * openjaus::core::Transport::createComponentJudpInterface ( )
protectedvirtual

§ createNodeJudpInterface()

transport::Interface * openjaus::core::Transport::createNodeJudpInterface ( )
protectedvirtual

§ createSubsystemJudpInterface()

transport::Interface * openjaus::core::Transport::createSubsystemJudpInterface ( )
protectedvirtual

§ getComponentJudpInterface()

transport::Interface * openjaus::core::Transport::getComponentJudpInterface ( )
protected

§ getNodeJudpInterface()

transport::Interface * openjaus::core::Transport::getNodeJudpInterface ( )
protected

§ getReceiveQueue()

system::PriorityQueue *const openjaus::core::Transport::getReceiveQueue ( )
protected

§ getSubsystemJudpInterface()

transport::Interface * openjaus::core::Transport::getSubsystemJudpInterface ( )
protected

§ isNodeInterfaceEnabled()

bool openjaus::core::Transport::isNodeInterfaceEnabled ( )
protected

§ isSubsInterfaceEnabled()

bool openjaus::core::Transport::isSubsInterfaceEnabled ( )
protected

§ loadJudpSettings()

transport::AS5669::JudpSettingsInterface * openjaus::core::Transport::loadJudpSettings ( )
protectedvirtual

§ loadTransportSettings()

core::services::TransportSettingsInterface * openjaus::core::Transport::loadTransportSettings ( )
protectedvirtual

§ setupComponentJudpInterface()

void openjaus::core::Transport::setupComponentJudpInterface ( system::PriorityQueue queue)
private

§ setupJtcpInterface()

void openjaus::core::Transport::setupJtcpInterface ( services::TransportSettingsInterface settings,
system::PriorityQueue queue 
)
private

§ setupNodeJudpInterface()

void openjaus::core::Transport::setupNodeJudpInterface ( system::PriorityQueue queue)
private

§ setupSubsystemJudpInterface()

void openjaus::core::Transport::setupSubsystemJudpInterface ( system::PriorityQueue queue)
private

Member Data Documentation

§ judpInterfaces

std::map<InterfaceLevel, transport::Interface*> openjaus::core::Transport::judpInterfaces
private

§ receiveThread

model::StateMachineRunner openjaus::core::Transport::receiveThread
private

§ tcpInterface

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

§ transportSettings

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

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