Public Member Functions | Protected Member Functions | Protected Attributes

openjaus::core::Base Class Reference

Base Component implements the urn:jaus:jss:core:Discovery, urn:jaus:jss:core:Liveness, urn:openjaus:core:Configuration, urn:jaus:jss:core:AccessControl services. More...

#include <Base.h>

Inherits openjaus::core::Events, openjaus::core::DiscoveryInterface, openjaus::core::LivenessInterface, openjaus::core::ConfigurationInterface, and openjaus::core::AccessControlInterface.

Inherited by openjaus::core::Managed, openjaus::mobility::GlobalPoseSensor, and openjaus::mobility::LocalPoseSensor.

List of all members.

Public Member Functions

 Base ()
virtual ~Base ()
virtual bool publishServices (RegisterServices *registerServices)
 PublishServices action with input RegisterServices.
virtual bool storeIdentification (ReportIdentification *reportIdentification)
 Processes incoming report identification message and saves the name in the system tree Processes incoming report identification message and saves the name in the system tree.
virtual bool storeServiceList (ReportServiceList *reportServiceList)
 Processes incoming report service list message and saves the contents in the system tree Processes incoming report service list message and saves the contents in the system tree.
virtual bool storeConfiguration (ReportConfiguration *reportConfiguration)
 Processes incoming report configuration message and saves the contents in the system tree Processes incoming report configuration message and saves the contents in the system tree.
virtual bool queryConfiguration (ReportIdentification *reportIdentification)
 Takes a report identification message and determines if a Query Configuration message should be generated as a response.
virtual core::ReportIdentification getReportIdentification (QueryIdentification *queryIdentification)
 Send a Report Identification message to the component that sent the query.
virtual core::ReportConfiguration getReportConfiguration (QueryConfiguration *queryConfiguration)
 Send a Report Configuration message to the component that sent the query.
virtual core::ReportSubsystemList getReportSubsystemList (QuerySubsystemList *querySubsystemList)
 Send a Report Subsystems List message to the component that sent the query.
virtual core::ReportServices getReportServices (QueryServices *queryServices)
 Send a Report Services message to the component that sent the query.
virtual core::ReportServiceList getReportServiceList (QueryServiceList *queryServiceList)
 Send a Report Service List message to the component that sent the query Send a Report Service List message to the component that sent the query.
virtual core::RegisterServices getRegisterServices (ReportIdentification *reportIdentification)
 Send a Register Services message to newly identified component.
virtual core::QueryServiceList getQueryServiceList (ReportConfiguration *reportConfiguration)
 Send a Query Service List message to newly identified components.
virtual core::ReportHeartbeatPulse getReportHeartbeatPulse (QueryHeartbeatPulse *queryHeartbeatPulse)
 Send a Report Heartbeat Pulse message to the component that sent the query Send a Report Heartbeat Pulse message to the component that sent the query.
virtual bool sendJausAddress (QueryJausAddress *queryJausAddress)
 SendJausAddress action with input QueryJausAddress.
virtual bool setThisJausAddress (ReportJausAddress *reportJausAddress)
 SetThisJausAddress action with input ReportJausAddress.
virtual void sendRejectControlReleased ()
virtual void init ()
virtual core::ReportControl getReportControl (QueryControl *queryControl)
 Send a Report Control message with the specified control value Send a Report Control message with the specified control value.
virtual core::ReportAuthority getReportAuthority (QueryAuthority *queryAuthority)
 Send a Report Authority message to querying client reporting the current authority value of this service Send a Report Authority message to querying client reporting the current authority value of this service.
virtual core::ReportTimeout getReportTimeout (model::Trigger *trigger)
 Send action for ReportTimeout with input message SendReportTimeout.
virtual bool setAuthority (RequestControl *requestControl)
 Set the current authority value of this service to the specified authority Set the current authority value of this service to the specified authority.
virtual bool setAuthority (SetAuthority *setAuthority)
 Set the current authority value of this service to the specified authority Set the current authority value of this service to the specified authority.
virtual bool resetTimer (RequestControl *requestControl)
 Reset the timer Reset the timer.
virtual bool sendConfirmControlNotAvailable (RequestControl *requestControl)
 Send a confirm control message with the specified response code to requesting client Send a confirm control message with the specified response code to requesting client.
virtual bool sendConfirmControlInsufficientAuthority (RequestControl *requestControl)
 Send a confirm control message with the specified response code to requesting client Send a confirm control message with the specified response code to requesting client.
virtual bool sendConfirmControlAccepted (RequestControl *requestControl)
 Send a confirm control message with the specified response code to requesting client Send a confirm control message with the specified response code to requesting client.
virtual bool sendRejectControlToController (RequestControl *requestControl)
 SendRejectControlToController action with input RequestControl.
virtual bool sendRejectControlNotAvailable (ReleaseControl *releaseControl)
 SendRejectControlNotAvailable action with input ReleaseControl.
virtual bool sendRejectControlReleased (ReleaseControl *releaseControl)
 SendRejectControlReleased action with input ReleaseControl.
virtual bool storeAddress (RequestControl *requestControl)
 StoreAddress action with input RequestControl.
virtual bool updateControlledList (ConfirmControl *confirmControl)
 Modifies list of controlled components based on confirm or reject messages Modifies list of controlled components based on confirm or reject messages.
virtual bool updateControlledList (RejectControl *rejectControl)
 Modifies list of controlled components based on confirm or reject messages Modifies list of controlled components based on confirm or reject messages.
virtual bool isDefaultAuthorityGreater (RequestControl *requestControl)
 True if the default authority code of this service is greater than the authority code of the client service that triggered the corresponding transition True if the default authority code of this service is greater than the authority code of the client service that triggered the corresponding transition.
virtual bool isCurrentAuthorityLess (RequestControl *requestControl)
 True if the current authority value of this service is less than the authority code of the client service that triggered the corresponding transition True if the current authority value of this service is less than the authority code of the client service that triggered the corresponding transition.
virtual bool isAuthorityValid (SetAuthority *setAuthority)
 True if the value of the authority code received from the client is less than or equal to the current authority value of this service, but greater than or equal to the receiving component’s default authority True if the value of the authority code received from the client is less than or equal to the current authority value of this service, but greater than or equal to the receiving component’s default authority.
virtual bool isControllingClient (RequestControl *requestControl)
 True if the message that triggered the transition is received from the client that is in control of this service True if the message that triggered the transition is received from the client that is in control of this service.
virtual bool isControllingClient (SetAuthority *setAuthority)
 True if the message that triggered the transition is received from the client that is in control of this service True if the message that triggered the transition is received from the client that is in control of this service.
virtual bool isControllingClient (ReleaseControl *releaseControl)
 True if the message that triggered the transition is received from the client that is in control of this service True if the message that triggered the transition is received from the client that is in control of this service.
void setComponentId (system::Timer *timer)
void setNodeId (system::Timer *timer)
void setSubsystemId (system::Timer *timer)
void sendQueryIdentifications (system::Timer *timer)
void run ()
void stop ()
void requestControl (transport::Address destination, void(*responseCallback)(const model::ControlResponse &response)=NULL)
void releaseControl (transport::Address destination, void(*responseCallback)(const model::ControlResponse &response)=NULL)

Protected Member Functions

void * configurationThreadMethod ()
core::RSLSubsystemRecord reportServiceListGetSubsystem (core::QSLSubsystemRecord &querySubsRec)
core::ServicesNodeRecord reportServiceListGetNode (uint16 subsId, core::QSLNodeRecord &queryNodeRec)
core::ServicesComponentRecord reportServiceListGetComponent (uint16 subsId, uint8 nodeId, core::QSLComponentRecord &queryCmptRec)

Protected Attributes

DiscoveryLoopback discoveryLoopback
HeartbeatLoop heartbeatLoop
DefaultConfigurationLoop defaultConfigurationLoop
NotControlledLoopback notControlledLoopback
AcceptControlTransition acceptControlTransition
ControlledLoopback controlledLoopback
ReleaseControlTransition releaseControlTransition
DefaultStateLoop defaultStateLoop
model::State notControlled
model::State controlled
model::StateMachine accessStateMachine
transport::Address controllerAddress
uint8_t controllerAuthority
uint8_t defaultAuthority
std::vector< transport::AddresscontrolledComponents
std::map< int, void(*)(const
model::ControlResponse
&response) > 
controlResponseCallbacks
system::Timertimer

Detailed Description

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

Discovery Service

The process of discovery is conducted at both the node level and the subsystem level. service supports the discovery of both legacy components defined in the JAUS Reference Architecture versions 3.2+, and new components. The Component IDs of legacy components were fixed at specification time (Primitive Driver = 33 for example) and could contain only one service beyond the core service support. New components may use any component ID that is outside the range of IDs that have been allocated to legacy component definitions. New components can also contain two or more services beyond the core service support.

URI: urn:jaus:jss:core:Discovery

Version: 1.0

Inherits From:
urn:jaus:jss:core:Events
Liveness Service

This service provides a means to maintain connection liveness between communicating components.

URI: urn:jaus:jss:core:Liveness

Version: 1.0

Inherits From:
urn:jaus:jss:core:Events
Configuration Service

The Configuration Service provides runtime configuration of JAUS addresses using a discovery process which uses non-JAUS messages sent over JUDP.

URI: urn:openjaus:core:Configuration

Version: 1.0

Inherits From:
urn:jaus:jss:core:Events
AccessControl Service

The Access Control service offers a basic interface for acquiring preemptable exclusive control to one or more related services that utilize this function. Once the exclusive control is established, the related services shall only execute commands originating from the controlling component. The authority code parameter of this service is used for preemption and is to be set equal to that of its controlling client. This service always grants control to the highest authority client that is requesting exclusive control. Commands from all other clients are ignored unless from a client with higher authority. service maintains two values, a default value and a current value of a field called authority code. The default value is the value that the service is pre-configured with. Access is provided to clients based on the value of their authority code in comparison to the current value of this service. transitions between the Available and NotAvailable nested states are behaviors that are deferred to service definitions that derive from this service.

URI: urn:jaus:jss:core:AccessControl

Version: 1.1

Inherits From:
urn:jaus:jss:core:Events

Constructor & Destructor Documentation

openjaus::core::Base::Base (  ) 
openjaus::core::Base::~Base (  )  [virtual]

Member Function Documentation

void* openjaus::core::Base::configurationThreadMethod (  )  [protected]
core::QueryServiceList openjaus::core::Base::getQueryServiceList ( ReportConfiguration reportConfiguration  )  [virtual]

Send a Query Service List message to newly identified components.

Parameters:
[in] reportConfiguration - Input Trigger.
Returns:
QueryServiceList Output Message.
core::RegisterServices openjaus::core::Base::getRegisterServices ( ReportIdentification reportIdentification  )  [virtual]

Send a Register Services message to newly identified component.

Parameters:
[in] reportIdentification - Input Trigger.
Returns:
RegisterServices Output Message.
core::ReportAuthority openjaus::core::Base::getReportAuthority ( QueryAuthority queryAuthority  )  [virtual]
Parameters:
[in] queryAuthority - Input Trigger.
Returns:
ReportAuthority Output Message.

Implements openjaus::core::AccessControlInterface.

core::ReportConfiguration openjaus::core::Base::getReportConfiguration ( QueryConfiguration queryConfiguration  )  [virtual]

Send a Report Configuration message to the component that sent the query.

Parameters:
[in] queryConfiguration - Input Trigger.
Returns:
ReportConfiguration Output Message.
core::ReportControl openjaus::core::Base::getReportControl ( QueryControl queryControl  )  [virtual]
Parameters:
[in] queryControl - Input Trigger.
Returns:
ReportControl Output Message.

Implements openjaus::core::AccessControlInterface.

core::ReportHeartbeatPulse openjaus::core::Base::getReportHeartbeatPulse ( QueryHeartbeatPulse queryHeartbeatPulse  )  [virtual]
Parameters:
[in] queryHeartbeatPulse - Input Trigger.
Returns:
ReportHeartbeatPulse Output Message.
core::ReportIdentification openjaus::core::Base::getReportIdentification ( QueryIdentification queryIdentification  )  [virtual]

Send a Report Identification message to the component that sent the query.

Parameters:
[in] queryIdentification - Input Trigger.
Returns:
ReportIdentification Output Message.
core::ReportServiceList openjaus::core::Base::getReportServiceList ( QueryServiceList queryServiceList  )  [virtual]
Parameters:
[in] queryServiceList - Input Trigger.
Returns:
ReportServiceList Output Message.
core::ReportServices openjaus::core::Base::getReportServices ( QueryServices queryServices  )  [virtual]

Send a Report Services message to the component that sent the query.

Parameters:
[in] queryServices - Input Trigger.
Returns:
ReportServices Output Message.
core::ReportSubsystemList openjaus::core::Base::getReportSubsystemList ( QuerySubsystemList querySubsystemList  )  [virtual]

Send a Report Subsystems List message to the component that sent the query.

Parameters:
[in] querySubsystemList - Input Trigger.
Returns:
ReportSubsystemList Output Message.
core::ReportTimeout openjaus::core::Base::getReportTimeout ( model::Trigger trigger  )  [virtual]

Send a Report Timeout message specifying the timeout period of this service Send a Report Timeout message specifying the timeout period of this service

Parameters:
[in] sendReportTimeout - Input Trigger.
Returns:
ReportTimeout Output Message.
Parameters:
[in] sendReportTimeout - <describe this>="">
Returns:
core::ReportTimeout - <describe this>="">

Implements openjaus::core::AccessControlInterface.

void openjaus::core::Base::init (  )  [virtual]
bool openjaus::core::Base::isAuthorityValid ( SetAuthority setAuthority  )  [virtual]
Parameters:
[in] setAuthority - Input Trigger.
Returns:
Whether the condition is true.

Implements openjaus::core::AccessControlInterface.

bool openjaus::core::Base::isControllingClient ( RequestControl requestControl  )  [virtual]
Parameters:
[in] requestControl - Input Trigger.
Returns:
Whether the condition is true.

Implements openjaus::core::AccessControlInterface.

bool openjaus::core::Base::isControllingClient ( SetAuthority setAuthority  )  [virtual]
Parameters:
[in] setAuthority - Input Trigger.
Returns:
Whether the condition is true.

Implements openjaus::core::AccessControlInterface.

bool openjaus::core::Base::isControllingClient ( ReleaseControl releaseControl  )  [virtual]
Parameters:
[in] releaseControl - Input Trigger.
Returns:
Whether the condition is true.

Implements openjaus::core::AccessControlInterface.

bool openjaus::core::Base::isCurrentAuthorityLess ( RequestControl requestControl  )  [virtual]
Parameters:
[in] requestControl - Input Trigger.
Returns:
Whether the condition is true.

Implements openjaus::core::AccessControlInterface.

bool openjaus::core::Base::isDefaultAuthorityGreater ( RequestControl requestControl  )  [virtual]
Parameters:
[in] requestControl - Input Trigger.
Returns:
Whether the condition is true.

Implements openjaus::core::AccessControlInterface.

bool openjaus::core::Base::publishServices ( RegisterServices registerServices  )  [virtual]

PublishServices action with input RegisterServices.

Parameters:
[in] registerServices - Input Trigger.
Returns:
Whether the message was properly processed by this action.
bool openjaus::core::Base::queryConfiguration ( ReportIdentification reportIdentification  )  [virtual]

Sends the response if needed. Takes a report identification message and determines if a Query Configuration message should be generated as a response. Sends the response if needed.

Parameters:
[in] reportIdentification - Input Trigger.
Returns:
Whether the message was properly processed by this action.
void openjaus::core::Base::releaseControl ( transport::Address  destination,
void(*)(const model::ControlResponse &response)  responseCallback = NULL 
)
core::ServicesComponentRecord openjaus::core::Base::reportServiceListGetComponent ( uint16  subsId,
uint8  nodeId,
core::QSLComponentRecord queryCmptRec 
) [protected]
core::ServicesNodeRecord openjaus::core::Base::reportServiceListGetNode ( uint16  subsId,
core::QSLNodeRecord queryNodeRec 
) [protected]
core::RSLSubsystemRecord openjaus::core::Base::reportServiceListGetSubsystem ( core::QSLSubsystemRecord querySubsRec  )  [protected]
void openjaus::core::Base::requestControl ( transport::Address  destination,
void(*)(const model::ControlResponse &response)  responseCallback = NULL 
)
bool openjaus::core::Base::resetTimer ( RequestControl requestControl  )  [virtual]
Parameters:
[in] requestControl - Input Trigger.
Returns:
Whether the message was properly processed by this action.

Implements openjaus::core::AccessControlInterface.

void openjaus::core::Base::run (  ) 
bool openjaus::core::Base::sendConfirmControlAccepted ( RequestControl requestControl  )  [virtual]
Parameters:
[in] requestControl - Input Trigger.
Returns:
Whether the message was properly processed by this action.

Implements openjaus::core::AccessControlInterface.

bool openjaus::core::Base::sendConfirmControlInsufficientAuthority ( RequestControl requestControl  )  [virtual]
Parameters:
[in] requestControl - Input Trigger.
Returns:
Whether the message was properly processed by this action.

Implements openjaus::core::AccessControlInterface.

bool openjaus::core::Base::sendConfirmControlNotAvailable ( RequestControl requestControl  )  [virtual]
Parameters:
[in] requestControl - Input Trigger.
Returns:
Whether the message was properly processed by this action.

Implements openjaus::core::AccessControlInterface.

bool openjaus::core::Base::sendJausAddress ( QueryJausAddress queryJausAddress  )  [virtual]

SendJausAddress action with input QueryJausAddress.

Parameters:
[in] queryJausAddress - Input Trigger.
Returns:
Whether the message was properly processed by this action.
void openjaus::core::Base::sendQueryIdentifications ( system::Timer timer  ) 
bool openjaus::core::Base::sendRejectControlNotAvailable ( ReleaseControl releaseControl  )  [virtual]

SendRejectControlNotAvailable action with input ReleaseControl.

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

Implements openjaus::core::AccessControlInterface.

void openjaus::core::Base::sendRejectControlReleased (  )  [virtual]
bool openjaus::core::Base::sendRejectControlReleased ( ReleaseControl releaseControl  )  [virtual]

SendRejectControlReleased action with input ReleaseControl.

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

Implements openjaus::core::AccessControlInterface.

bool openjaus::core::Base::sendRejectControlToController ( RequestControl requestControl  )  [virtual]

SendRejectControlToController action with input RequestControl.

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

Implements openjaus::core::AccessControlInterface.

bool openjaus::core::Base::setAuthority ( RequestControl requestControl  )  [virtual]
Parameters:
[in] requestControl - Input Trigger.
Returns:
Whether the message was properly processed by this action.

Implements openjaus::core::AccessControlInterface.

bool openjaus::core::Base::setAuthority ( SetAuthority setAuthority  )  [virtual]
Parameters:
[in] setAuthority - Input Trigger.
Returns:
Whether the message was properly processed by this action.

Implements openjaus::core::AccessControlInterface.

void openjaus::core::Base::setComponentId ( system::Timer timer  ) 
void openjaus::core::Base::setNodeId ( system::Timer timer  ) 
void openjaus::core::Base::setSubsystemId ( system::Timer timer  ) 
bool openjaus::core::Base::setThisJausAddress ( ReportJausAddress reportJausAddress  )  [virtual]

SetThisJausAddress action with input ReportJausAddress.

Parameters:
[in] reportJausAddress - Input Trigger.
Returns:
Whether the message was properly processed by this action.
void openjaus::core::Base::stop (  ) 
bool openjaus::core::Base::storeAddress ( RequestControl requestControl  )  [virtual]

StoreAddress action with input RequestControl.

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

Implements openjaus::core::AccessControlInterface.

bool openjaus::core::Base::storeConfiguration ( ReportConfiguration reportConfiguration  )  [virtual]
Parameters:
[in] reportConfiguration - Input Trigger.
Returns:
Whether the message was properly processed by this action.
bool openjaus::core::Base::storeIdentification ( ReportIdentification reportIdentification  )  [virtual]
Parameters:
[in] reportIdentification - Input Trigger.
Returns:
Whether the message was properly processed by this action.
bool openjaus::core::Base::storeServiceList ( ReportServiceList reportServiceList  )  [virtual]
Parameters:
[in] reportServiceList - Input Trigger.
Returns:
Whether the message was properly processed by this action.
bool openjaus::core::Base::updateControlledList ( RejectControl rejectControl  )  [virtual]
Parameters:
[in] rejectControl - Input Trigger.
Returns:
Whether the message was properly processed by this action.

Implements openjaus::core::AccessControlInterface.

bool openjaus::core::Base::updateControlledList ( ConfirmControl confirmControl  )  [virtual]
Parameters:
[in] confirmControl - Input Trigger.
Returns:
Whether the message was properly processed by this action.

Implements openjaus::core::AccessControlInterface.


Member Data Documentation

std::map<int, void (*)(const model::ControlResponse& response) > openjaus::core::Base::controlResponseCallbacks [protected]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines