OpenJAUS Software Development Kit
4.3.1
|
Provides static methods for the Events service. More...
#include <Events.h>
Inherits openjaus::core::EventsInterface, and openjaus::core::services::Transport.
Inherited by openjaus::core::Events [virtual]
, openjaus::core::services::AccessControl [virtual]
, openjaus::core::services::Configuration [virtual]
, openjaus::core::services::Discovery [virtual]
, openjaus::core::services::DiscoveryClient [virtual]
, openjaus::core::services::Liveness [virtual]
, openjaus::hmi::services::AnalogControl [virtual]
, openjaus::hmi::services::Drawing [virtual]
, openjaus::hmi::services::Keyboard [virtual]
, openjaus::hmi::services::PointingDevice [virtual]
, openjaus::manipulator::services::ManipulatorJointForceTorqueSensor [virtual]
, openjaus::manipulator::services::ManipulatorJointPositionSensor [virtual]
, openjaus::manipulator::services::ManipulatorJointVelocitySensor [virtual]
, openjaus::manipulator::services::PanTiltJointPositionSensor [virtual]
, openjaus::manipulator::services::PanTiltJointVelocitySensor [virtual]
, openjaus::mobility::services::AccelerationStateSensor [virtual]
, openjaus::mobility::services::VelocityStateSensor [virtual]
, and openjaus::ugv::services::PlatformSpecifications [virtual]
.
Classes | |
class | Callback |
struct | PublishedEventMetadata |
Public Member Functions | |
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::EventsInterface | |
virtual | ~EventsInterface () |
Public Member Functions inherited from openjaus::core::TransportInterface | |
virtual | ~TransportInterface () |
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::State * | getCurrentState () |
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::Service * | create () |
Builds a default instance of the Events Service and populates the URI and Version numbers. 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::Transport | |
static const char * | uri () |
The URI for the Service. More... | |
static model::Service * | create () |
Builds a default instance of the Transport Service and populates the URI and Version numbers. More... | |
Protected Member Functions | |
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 () |
Static Private Member Functions | |
static void | executeConnectionCallback (model::Connection *connection, std::map< uint32_t, Events::Callback *> &callbackMap, model::EventRequestResponseType responseType) |
static void | executeConnectionCallback (model::Connection *connection, std::map< uint32_t, Events::Callback *> &callbackMap, model::EventRequestResponseType responseType, std::string errorString) |
Private Attributes | |
EventsLoop | eventsLoop |
EventsSettingsInterface * | settings |
system::Mutex | mutex |
std::map< system::Timer *, model::Connection * > | periodicQueries |
std::map< uint16, uint16 > | messageIdMap |
std::vector< PublishedEventMetadata > | publishedEvents |
std::map< uint32_t, model::Connection * > | inConnections |
std::map< uint8_t, model::Connection * > | outConnections |
std::map< uint8_t, model::ConnectionRequestInfo > | requestMap |
uint32_t | localIdCount |
core::ResponseCodeEnumeration::ResponseCodeEnum | responseCode |
std::string | errorString |
std::map< uint32_t, Events::Callback * > | subscribeCallbackMap |
std::map< uint32_t, Events::Callback * > | unsubscribeCallbackMap |
Additional Inherited Members | |
Protected Attributes inherited from openjaus::core::services::Transport | |
model::StateMachine | receive |
model::State | receivingState |
openjaus::core::services::Events::Events | ( | ) |
|
virtual |
Reimplemented in openjaus::core::Events.
|
virtual |
CancelEvent action with input CancelEvent.
[in] | cancelEvent | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
private |
|
private |
|
private |
|
protected |
|
private |
|
virtual |
ConfirmEvent action with input ConfirmEventRequest.
[in] | confirmEventRequest | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
static |
|
virtual |
CreateEvent action with input CreateEvent.
[in] | createEvent | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
private |
bool openjaus::core::services::Events::createOutgoingOnChangeEvent | ( | uint8_t | eventId, |
model::Message * | query | ||
) |
bool openjaus::core::services::Events::createOutgoingPeriodicEvent | ( | uint8_t | eventId, |
double | rateHz, | ||
model::Message * | query | ||
) |
|
private |
|
private |
|
private |
This calls delete on each connection object
|
private |
|
virtual |
eventExists condition.
[in] | createEvent | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
virtual |
eventExists condition.
[in] | updateEvent | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
virtual |
eventExists condition.
[in] | cancelEvent | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
staticprivate |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
double openjaus::core::services::Events::getConfirmedRate_Hz | ( | uint32 | subscriptionId | ) |
|
virtual |
Send action for ConfirmEventRequest with input message CreateEvent.
[in] | createEvent | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
virtual |
Send action for ConfirmEventRequest with input message UpdateEvent.
[in] | updateEvent | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
virtual |
Send action for ConfirmEventRequest with input message CancelEvent.
[in] | cancelEvent | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
virtual |
Send action for RejectEventRequest with input message CreateEvent.
[in] | createEvent | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
virtual |
Send action for RejectEventRequest with input message UpdateEvent.
[in] | updateEvent | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
virtual |
Send action for RejectEventRequest with input message CancelEvent.
[in] | cancelEvent | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
virtual |
Send action for ReportEvents with input message QueryEvents.
[in] | queryEvents | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
virtual |
Send action for ReportEventTimeout with input message QueryEventTimeout.
[in] | queryEventTimeout | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
private |
|
private |
|
virtual |
HandleIncomingEvent action with input Event.
[in] | event | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
virtual |
HandleReportEvents action with input ReportEvents.
[in] | reportEvents | - Input Trigger. |
Implements openjaus::core::EventsInterface.
bool openjaus::core::services::Events::isActive | ( | uint32 | subscriptionId | ) |
|
virtual |
isSupported condition.
[in] | createEvent | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
virtual |
isSupported condition.
[in] | updateEvent | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
private |
bool openjaus::core::services::Events::notifyChanged | ( | uint16 | messageId | ) |
|
virtual |
ProcessEvent action with input ProcessEventRequest.
[in] | processEventRequest | - Input Trigger. |
Implements openjaus::core::EventsInterface.
bool openjaus::core::services::Events::publish | ( | model::Message * | message | ) |
bool openjaus::core::services::Events::publish | ( | uint16 | messageId | ) |
bool openjaus::core::services::Events::publish | ( | uint16 | messageId, |
double | maximumRate_Hz, | ||
model::ConnectionType | type | ||
) |
|
virtual |
RejectEvent action with input RejectEventRequest.
[in] | rejectEventRequest | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
private |
|
private |
|
virtual |
ResetEventTimer action with input CreateEvent.
[in] | createEvent | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
virtual |
ResetEventTimer action with input UpdateEvent.
[in] | updateEvent | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
private |
|
private |
|
protected |
|
virtual |
StopEventTimer action with input CancelEvent.
[in] | cancelEvent | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
protected |
|
private |
uint32_t openjaus::core::services::Events::subscribeOnChange | ( | transport::Address & | address, |
model::Message * | query | ||
) |
uint32_t openjaus::core::services::Events::subscribeOnChange | ( | transport::Address & | address, |
model::Message * | query, | ||
void(*)(const model::EventRequestResponseArgs &args) | subscribeCallback | ||
) |
uint32_t openjaus::core::services::Events::subscribeOnChange | ( | transport::Address & | address, |
model::Message * | query, | ||
void(*)(void *object, const model::EventRequestResponseArgs &args) | subscribeCallback, | ||
void * | object | ||
) |
uint32_t openjaus::core::services::Events::subscribePeriodic | ( | transport::Address & | address, |
model::Message * | query, | ||
double | rate_Hz | ||
) |
uint32_t openjaus::core::services::Events::subscribePeriodic | ( | transport::Address & | address, |
model::Message * | query, | ||
double | rate_Hz, | ||
void(*)(const model::EventRequestResponseArgs &args) | subscribeCallback | ||
) |
uint32_t openjaus::core::services::Events::subscribePeriodic | ( | transport::Address & | address, |
model::Message * | query, | ||
double | rate_Hz, | ||
void(*)(void *object, const model::EventRequestResponseArgs &args) | subscribeCallback, | ||
void * | object | ||
) |
|
private |
|
private |
|
private |
bool openjaus::core::services::Events::unpublish | ( | model::Message * | message | ) |
bool openjaus::core::services::Events::unpublish | ( | uint16 | messageId | ) |
bool openjaus::core::services::Events::unsubscribe | ( | uint32_t | subscriptionId | ) |
bool openjaus::core::services::Events::unsubscribe | ( | uint32_t | subscriptionId, |
void(*)(const model::EventRequestResponseArgs &args) | callback | ||
) |
bool openjaus::core::services::Events::unsubscribe | ( | uint32_t | subscriptionId, |
void(*)(void *object, const model::EventRequestResponseArgs &args) | callback, | ||
void * | object | ||
) |
|
private |
|
virtual |
UpdateEvent action with input CreateEvent.
[in] | createEvent | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
virtual |
UpdateEvent action with input UpdateEvent.
[in] | updateEvent | - Input Trigger. |
Implements openjaus::core::EventsInterface.
|
private |
bool openjaus::core::services::Events::updatePeriodic | ( | uint32 | subscriptionId, |
double | rate_Hz | ||
) |
|
static |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |