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

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

#include <DiscoveryClient.h>

Inherits openjaus::core::DiscoveryClientInterface, and openjaus::core::services::Events.

Inherited by openjaus::core::EventsBase [virtual].

Public Member Functions

 DiscoveryClient ()
 
virtual ~DiscoveryClient ()
 
virtual bool processReportIdentification (ReportIdentification *reportIdentification)
 Executed when a ReportIdentification message is received. More...
 
virtual bool processReportConfiguration (ReportConfiguration *reportConfiguration)
 Executed when a ReportConfiguration message is received. More...
 
virtual bool processReportSubsystemList (ReportSubsystemList *reportSubsystemList)
 Executed when a ReportSubsystemList message is received. More...
 
virtual bool processReportServices (ReportServices *reportServices)
 Executed when a ReportServices message is received. More...
 
virtual bool processReportServiceList (ReportServiceList *reportServiceList)
 Executed when a ReportServicesList message is received. More...
 
bool broadcastQueryIdentificationToNode (SystemLevelEnumeration::SystemLevelEnum queryType)
 
bool broadcastQueryIdentificationToSubsystem (SystemLevelEnumeration::SystemLevelEnum queryType)
 
bool broadcastQueryIdentificationToSystem (SystemLevelEnumeration::SystemLevelEnum queryType)
 
bool queryIdentification (const openjaus::transport::Address &address, openjaus::core::SystemLevelEnumeration::SystemLevelEnum queryType)
 
bool queryConfiguration (const openjaus::transport::Address &address, openjaus::core::SystemLevelEnumeration::SystemLevelEnum queryType)
 
bool queryServiceListAllServices (const openjaus::transport::Address &address)
 
bool queryServiceList (const openjaus::transport::Address &address, openjaus::core::QSLSubsystemList &subsystemList)
 
bool registerServices (const openjaus::transport::Address &address)
 
- Public Member Functions inherited from openjaus::core::DiscoveryClientInterface
virtual ~DiscoveryClientInterface ()
 
- Public Member Functions inherited from openjaus::core::EventsInterface
virtual ~EventsInterface ()
 
- Public Member Functions inherited from openjaus::core::TransportInterface
virtual ~TransportInterface ()
 
- Public Member Functions inherited from openjaus::core::services::Events
 Events ()
 
virtual ~Events ()
 
virtual bool createEvent (CreateEvent *createEvent)
 CreateEvent action with input CreateEvent. More...
 
virtual bool processEvent (ProcessEventRequest *processEventRequest)
 ProcessEvent action with input ProcessEventRequest. More...
 
virtual bool resetEventTimer (CreateEvent *createEvent)
 ResetEventTimer action with input CreateEvent. More...
 
virtual bool resetEventTimer (UpdateEvent *updateEvent)
 ResetEventTimer action with input UpdateEvent. More...
 
virtual bool updateEvent (CreateEvent *createEvent)
 UpdateEvent action with input CreateEvent. More...
 
virtual bool updateEvent (UpdateEvent *updateEvent)
 UpdateEvent action with input UpdateEvent. More...
 
virtual bool cancelEvent (CancelEvent *cancelEvent)
 CancelEvent action with input CancelEvent. More...
 
virtual bool stopEventTimer (CancelEvent *cancelEvent)
 StopEventTimer action with input CancelEvent. More...
 
virtual RejectEventRequest getRejectEventRequest (CreateEvent *createEvent)
 Send action for RejectEventRequest with input message CreateEvent. More...
 
virtual RejectEventRequest getRejectEventRequest (UpdateEvent *updateEvent)
 Send action for RejectEventRequest with input message UpdateEvent. More...
 
virtual RejectEventRequest getRejectEventRequest (CancelEvent *cancelEvent)
 Send action for RejectEventRequest with input message CancelEvent. More...
 
virtual ConfirmEventRequest getConfirmEventRequest (CreateEvent *createEvent)
 Send action for ConfirmEventRequest with input message CreateEvent. More...
 
virtual ConfirmEventRequest getConfirmEventRequest (UpdateEvent *updateEvent)
 Send action for ConfirmEventRequest with input message UpdateEvent. More...
 
virtual ConfirmEventRequest getConfirmEventRequest (CancelEvent *cancelEvent)
 Send action for ConfirmEventRequest with input message CancelEvent. More...
 
virtual ReportEvents getReportEvents (QueryEvents *queryEvents)
 Send action for ReportEvents with input message QueryEvents. More...
 
virtual ReportEventTimeout getReportEventTimeout (QueryEventTimeout *queryEventTimeout)
 Send action for ReportEventTimeout with input message QueryEventTimeout. More...
 
virtual bool confirmEvent (ConfirmEventRequest *confirmEventRequest)
 ConfirmEvent action with input ConfirmEventRequest. More...
 
virtual bool rejectEvent (RejectEventRequest *rejectEventRequest)
 RejectEvent action with input RejectEventRequest. More...
 
virtual bool handleIncomingEvent (Event *event)
 HandleIncomingEvent action with input Event. More...
 
virtual bool handleReportEvents (ReportEvents *reportEvents)
 HandleReportEvents action with input ReportEvents. More...
 
virtual bool isSupported (CreateEvent *createEvent)
 isSupported condition. More...
 
virtual bool isSupported (UpdateEvent *updateEvent)
 isSupported condition. More...
 
virtual bool eventExists (CreateEvent *createEvent)
 eventExists condition. More...
 
virtual bool eventExists (UpdateEvent *updateEvent)
 eventExists condition. More...
 
virtual bool eventExists (CancelEvent *cancelEvent)
 eventExists condition. More...
 
bool createOutgoingPeriodicEvent (uint8_t eventId, double rateHz, model::Message *query)
 
bool createOutgoingOnChangeEvent (uint8_t eventId, model::Message *query)
 
OPENJAUS_DEPRECATED bool publish (model::Message *message)
 
OPENJAUS_DEPRECATED bool unpublish (model::Message *message)
 
OPENJAUS_DEPRECATED bool publish (uint16 messageId)
 
bool publish (uint16 messageId, double maximumRate_Hz, model::ConnectionType type)
 
bool unpublish (uint16 messageId)
 
bool notifyChanged (uint16 messageId)
 
uint32_t subscribePeriodic (transport::Address &address, model::Message *query, double rate_Hz)
 
uint32_t subscribePeriodic (transport::Address &address, model::Message *query, double rate_Hz, void(*subscribeCallback)(const model::EventRequestResponseArgs &args))
 
uint32_t subscribePeriodic (transport::Address &address, model::Message *query, double rate_Hz, void(*subscribeCallback)(void *object, const model::EventRequestResponseArgs &args), void *object)
 
uint32_t subscribeOnChange (transport::Address &address, model::Message *query)
 
uint32_t subscribeOnChange (transport::Address &address, model::Message *query, void(*subscribeCallback)(const model::EventRequestResponseArgs &args))
 
uint32_t subscribeOnChange (transport::Address &address, model::Message *query, void(*subscribeCallback)(void *object, const model::EventRequestResponseArgs &args), void *object)
 
bool unsubscribe (uint32_t subscriptionId)
 
bool unsubscribe (uint32_t subscriptionId, void(*callback)(const model::EventRequestResponseArgs &args))
 
bool unsubscribe (uint32_t subscriptionId, void(*callback)(void *object, const model::EventRequestResponseArgs &args), void *object)
 
bool isActive (uint32 subscriptionId)
 
uint8 getEventId (uint32 subscriptionId)
 
double getConfirmedRate_Hz (uint32 subscriptionId)
 
bool updatePeriodic (uint32 subscriptionId, double rate_Hz)
 
- Public Member Functions inherited from openjaus::core::services::Transport
 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))
 

Static Public Member Functions

static const char * uri ()
 The URI for the Service. More...
 
static model::Servicecreate ()
 Builds a default instance of the DiscoveryClient Service and populates the URI and Version numbers. More...
 
- Static Public Member Functions inherited from openjaus::core::DiscoveryClientInterface
static OPENJAUS_DEPRECATED model::Service DiscoveryClientService ()
 Builds a default instance of the DiscoveryClient Service and populates the URI and Version numbers. More...
 
static OPENJAUS_DEPRECATED std::string DiscoveryClientUri ()
 Static accessor for Service URI. More...
 
- Static Public Member Functions inherited from openjaus::core::EventsInterface
static OPENJAUS_DEPRECATED model::Service EventsService ()
 Builds a default instance of the Events Service and populates the URI and Version numbers. More...
 
static OPENJAUS_DEPRECATED std::string EventsUri ()
 Static accessor for Service URI. 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 Member Functions inherited from openjaus::core::services::Events
static const char * uri ()
 The URI for the Service. More...
 
static model::Servicecreate ()
 Builds a default instance of the Events Service and populates the URI and Version numbers. More...
 
- 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...
 

Protected Member Functions

void startServiceInternal ()
 
void setSystemTree (model::SystemTree *systemTree)
 
void setServices (std::vector< model::Service *> *services)
 
void configure (DiscoveryClientSettingsInterface *settings)
 
void startService ()
 
void stopService ()
 
- Protected Member Functions inherited from openjaus::core::services::Events
void configure (EventsSettingsInterface *settings)
 
void startService ()
 
void stopService ()
 
- 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 ()
 

Private Member Functions

void broadcastQueryIdentificationMessages ()
 
bool sendQueryConfiguration (ReportIdentification *reportIdentification)
 
bool storeIdentification (ReportIdentification *reportIdentification)
 
bool storeServiceList (RSLSubsystemList &subsystemList)
 
void storeSubsystem (core::RSLSubsystemRecord &subsRec)
 
void storeNode (uint16_t &subsystemId, core::ServicesNodeRecord &nodeRec)
 
void storeComponent (uint16_t &subsystemId, uint8_t &nodeId, core::ServicesComponentRecord &cmptRec)
 
bool storeConfiguration (ReportConfiguration *reportConfiguration)
 
void populateRegisterServices (RegisterServices *const message)
 
void stopQueryIdentificationBroadcastIfEnabled ()
 
void startVerifyRegisterServicesIfEnabled (const transport::Address &address)
 
void stopVerifyRegisterServicesIfRegistered (RSLSubsystemList &subsystemList)
 
bool myServicesRegistered (RSLSubsystemList &subsystemList)
 
bool myServicesRegistered (ServicesNodeList &nodeList)
 
bool myServicesRegistered (ServicesComponentList &cmptList)
 
bool myServicesRegistered (ServicesServiceList &serviceList)
 
bool serviceIsListed (model::Service *service, ServicesServiceList &serviceList)
 
void handleLocalComponentAdd (const transport::Address &address)
 
void handleRegisterServicesBroadcastTimeout (system::Timer *timer)
 
void handleQueryIdentificationBroadcastTimeout (system::Timer *timer)
 
void handleVerifyRegisterServicesTimeout (system::Timer *timer)
 
void handleSystemTreeItemAdded (const transport::Address &address)
 
void discoverComponentIfUnknown (const transport::Address &address)
 

Private Attributes

DiscoveryClientLoopback discoveryClientLoopback
 
model::SystemTreesystemTree
 
DiscoveryClientSettingsInterfacesettings
 
std::vector< model::Service * > * myServices
 
transport::Address discoveryAddress
 
system::Timer registerServicesBroadcastTimer
 
system::Timer queryBroadcastTimer
 
system::Timer verifyRegisterServicesTimer
 
bool servicesRegistered
 

Additional Inherited Members

- Protected Attributes inherited from openjaus::core::services::Transport
model::StateMachine receive
 
model::State receivingState
 

Detailed Description

Constructor & Destructor Documentation

§ DiscoveryClient()

openjaus::core::services::DiscoveryClient::DiscoveryClient ( )

§ ~DiscoveryClient()

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

Member Function Documentation

§ broadcastQueryIdentificationMessages()

void openjaus::core::services::DiscoveryClient::broadcastQueryIdentificationMessages ( )
private

§ broadcastQueryIdentificationToNode()

bool openjaus::core::services::DiscoveryClient::broadcastQueryIdentificationToNode ( SystemLevelEnumeration::SystemLevelEnum  queryType)

§ broadcastQueryIdentificationToSubsystem()

bool openjaus::core::services::DiscoveryClient::broadcastQueryIdentificationToSubsystem ( SystemLevelEnumeration::SystemLevelEnum  queryType)

§ broadcastQueryIdentificationToSystem()

bool openjaus::core::services::DiscoveryClient::broadcastQueryIdentificationToSystem ( SystemLevelEnumeration::SystemLevelEnum  queryType)

§ configure()

void openjaus::core::services::DiscoveryClient::configure ( DiscoveryClientSettingsInterface settings)
protected

§ create()

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

§ discoverComponentIfUnknown()

void openjaus::core::services::DiscoveryClient::discoverComponentIfUnknown ( const transport::Address address)
private

§ handleLocalComponentAdd()

void openjaus::core::services::DiscoveryClient::handleLocalComponentAdd ( const transport::Address address)
private

§ handleQueryIdentificationBroadcastTimeout()

void openjaus::core::services::DiscoveryClient::handleQueryIdentificationBroadcastTimeout ( system::Timer timer)
private

§ handleRegisterServicesBroadcastTimeout()

void openjaus::core::services::DiscoveryClient::handleRegisterServicesBroadcastTimeout ( system::Timer timer)
private

§ handleSystemTreeItemAdded()

void openjaus::core::services::DiscoveryClient::handleSystemTreeItemAdded ( const transport::Address address)
private

§ handleVerifyRegisterServicesTimeout()

void openjaus::core::services::DiscoveryClient::handleVerifyRegisterServicesTimeout ( system::Timer timer)
private

§ myServicesRegistered() [1/4]

bool openjaus::core::services::DiscoveryClient::myServicesRegistered ( RSLSubsystemList subsystemList)
private

§ myServicesRegistered() [2/4]

bool openjaus::core::services::DiscoveryClient::myServicesRegistered ( ServicesNodeList nodeList)
private

§ myServicesRegistered() [3/4]

bool openjaus::core::services::DiscoveryClient::myServicesRegistered ( ServicesComponentList cmptList)
private

§ myServicesRegistered() [4/4]

bool openjaus::core::services::DiscoveryClient::myServicesRegistered ( ServicesServiceList serviceList)
private

§ populateRegisterServices()

void openjaus::core::services::DiscoveryClient::populateRegisterServices ( RegisterServices *const  message)
private

§ processReportConfiguration()

bool openjaus::core::services::DiscoveryClient::processReportConfiguration ( ReportConfiguration reportConfiguration)
virtual

Executed when a ReportConfiguration message is received.

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

Implements openjaus::core::DiscoveryClientInterface.

§ processReportIdentification()

bool openjaus::core::services::DiscoveryClient::processReportIdentification ( ReportIdentification reportIdentification)
virtual

Executed when a ReportIdentification message is received.

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

Implements openjaus::core::DiscoveryClientInterface.

§ processReportServiceList()

bool openjaus::core::services::DiscoveryClient::processReportServiceList ( ReportServiceList reportServiceList)
virtual

Executed when a ReportServicesList message is received.

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

Implements openjaus::core::DiscoveryClientInterface.

§ processReportServices()

bool openjaus::core::services::DiscoveryClient::processReportServices ( ReportServices reportServices)
virtual

Executed when a ReportServices message is received.

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

Implements openjaus::core::DiscoveryClientInterface.

§ processReportSubsystemList()

bool openjaus::core::services::DiscoveryClient::processReportSubsystemList ( ReportSubsystemList reportSubsystemList)
virtual

Executed when a ReportSubsystemList message is received.

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

Implements openjaus::core::DiscoveryClientInterface.

§ queryConfiguration()

bool openjaus::core::services::DiscoveryClient::queryConfiguration ( const openjaus::transport::Address address,
openjaus::core::SystemLevelEnumeration::SystemLevelEnum  queryType 
)

§ queryIdentification()

bool openjaus::core::services::DiscoveryClient::queryIdentification ( const openjaus::transport::Address address,
openjaus::core::SystemLevelEnumeration::SystemLevelEnum  queryType 
)

§ queryServiceList()

bool openjaus::core::services::DiscoveryClient::queryServiceList ( const openjaus::transport::Address address,
openjaus::core::QSLSubsystemList subsystemList 
)

§ queryServiceListAllServices()

bool openjaus::core::services::DiscoveryClient::queryServiceListAllServices ( const openjaus::transport::Address address)

§ registerServices()

bool openjaus::core::services::DiscoveryClient::registerServices ( const openjaus::transport::Address address)

§ sendQueryConfiguration()

bool openjaus::core::services::DiscoveryClient::sendQueryConfiguration ( ReportIdentification reportIdentification)
private

§ serviceIsListed()

bool openjaus::core::services::DiscoveryClient::serviceIsListed ( model::Service service,
ServicesServiceList serviceList 
)
private

§ setServices()

void openjaus::core::services::DiscoveryClient::setServices ( std::vector< model::Service *> *  services)
protected

§ setSystemTree()

void openjaus::core::services::DiscoveryClient::setSystemTree ( model::SystemTree systemTree)
protected

§ startService()

void openjaus::core::services::DiscoveryClient::startService ( )
protected

§ startServiceInternal()

void openjaus::core::services::DiscoveryClient::startServiceInternal ( )
protected

§ startVerifyRegisterServicesIfEnabled()

void openjaus::core::services::DiscoveryClient::startVerifyRegisterServicesIfEnabled ( const transport::Address address)
private

§ stopQueryIdentificationBroadcastIfEnabled()

void openjaus::core::services::DiscoveryClient::stopQueryIdentificationBroadcastIfEnabled ( )
private

§ stopService()

void openjaus::core::services::DiscoveryClient::stopService ( )
protected

§ stopVerifyRegisterServicesIfRegistered()

void openjaus::core::services::DiscoveryClient::stopVerifyRegisterServicesIfRegistered ( RSLSubsystemList subsystemList)
private

§ storeComponent()

void openjaus::core::services::DiscoveryClient::storeComponent ( uint16_t &  subsystemId,
uint8_t &  nodeId,
core::ServicesComponentRecord cmptRec 
)
private

§ storeConfiguration()

bool openjaus::core::services::DiscoveryClient::storeConfiguration ( ReportConfiguration reportConfiguration)
private

§ storeIdentification()

bool openjaus::core::services::DiscoveryClient::storeIdentification ( ReportIdentification reportIdentification)
private

§ storeNode()

void openjaus::core::services::DiscoveryClient::storeNode ( uint16_t &  subsystemId,
core::ServicesNodeRecord nodeRec 
)
private

§ storeServiceList()

bool openjaus::core::services::DiscoveryClient::storeServiceList ( RSLSubsystemList subsystemList)
private

§ storeSubsystem()

void openjaus::core::services::DiscoveryClient::storeSubsystem ( core::RSLSubsystemRecord subsRec)
private

§ uri()

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

Member Data Documentation

§ discoveryAddress

transport::Address openjaus::core::services::DiscoveryClient::discoveryAddress
private

§ discoveryClientLoopback

DiscoveryClientLoopback openjaus::core::services::DiscoveryClient::discoveryClientLoopback
private

§ myServices

std::vector<model::Service*>* openjaus::core::services::DiscoveryClient::myServices
private

§ queryBroadcastTimer

system::Timer openjaus::core::services::DiscoveryClient::queryBroadcastTimer
private

§ registerServicesBroadcastTimer

system::Timer openjaus::core::services::DiscoveryClient::registerServicesBroadcastTimer
private

§ servicesRegistered

bool openjaus::core::services::DiscoveryClient::servicesRegistered
private

§ settings

DiscoveryClientSettingsInterface* openjaus::core::services::DiscoveryClient::settings
private

§ systemTree

model::SystemTree* openjaus::core::services::DiscoveryClient::systemTree
private

§ verifyRegisterServicesTimer

system::Timer openjaus::core::services::DiscoveryClient::verifyRegisterServicesTimer
private

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