|
rad
4.0.0
|
Namespaces | |
| cii | |
| core | |
| detail | |
| services | |
| utils | |
Classes | |
| class | ActionCallback |
| class | ActionGroup |
| class | ActionMgr |
| class | AnyEvent |
| class | CoroActivity |
| class | DbAdapter |
| class | DbAdapterRedis |
| class | ErrorCategory |
| struct | EventInfo |
| class | EventT |
| class | Exception |
| Base class for the exceptions thrown by RAD and its users. More... | |
| class | ExecutorActivity |
| class | GuardCallback |
| class | Helper |
| struct | IncorrectEventType |
| class | Logger |
| class | LogInitializer |
| class | MsgHandler |
| class | MsgReplier |
| class | MsgRequest |
| class | MsgRequestor |
| struct | MsgRequestor2 |
| class | MsgRequestorRaw |
| struct | MsgRequestorRaw2 |
| class | PthreadActivity |
| class | Signal |
| class | SMAdapter |
| class | SMEvent |
| class | SMRequestor |
| class | SMRequestorRaw |
| class | SMSubscriber |
| class | StopSource |
| class | StopToken |
| class | ThreadActivity |
| class | ThreadBaseActivity |
| class | Timer |
| class | TopicHandler |
| class | TopicPub |
| class | TopicSub |
| class | TrsHealth |
| Adapter for ptpmond's TRS Health status to the state machine. More... | |
| struct | TrsHealthBadEventTrait |
| struct | TrsHealthGoodEventTrait |
| class | Utils |
Typedefs | |
| using | SharedEvent = std::shared_ptr< const AnyEvent > |
| using | UniqueEvent = std::unique_ptr< AnyEvent > |
| typedef std::list< scxml4cpp::Action * > | ActionList |
| typedef std::list< rad::ActionGroup * > | ActionGroupList |
| typedef std::list< scxml4cpp::Activity * > | ActivityList |
| using | TrsHealthBadEvent = rad::EventT< TrsHealthBadEventTrait > |
| using | TrsHealthGoodEvent = rad::EventT< TrsHealthGoodEventTrait > |
Functions | |
| void | Assert (bool condition, const char *filename, const char *functionname, int linenumber) |
| std::ostream & | operator<< (std::ostream &os, const rad::Exception &e) |
| const ErrorCategory & | GetErrorCategory () |
| std::error_code | make_error_code (rad::ErrorCodes e) |
| std::map< std::string, std::string > | GetDefaultLogProperties (const std::string &logsink_filename, const std::string &log_level="ERROR") |
| log4cplus::Logger & | GetLogger () |
| log4cplus::Logger & | GetSmLogger () |
| void | LogInitialize () |
| void | LogConfigure (const std::string &filename="") |
| void | LogTraceFunction (const LogLevel level, const char *filename, const char *funcname, const int linenum) |
| void | LogFunction (const LogLevel level, const char *funcname, const std::string &a) |
| void | LogStateFunction (const std::string &a, const std::string &b) |
| void | LogEventFunction (const std::string &a) |
| template<typename EVENT > | |
| EVENT::payload_t & | GetPayload (AnyEvent &ev) |
| template<typename EVENT > | |
| EVENT::payload_t const & | GetPayload (AnyEvent const &ev) |
| template<typename EVENT > | |
| EVENT::payload_t * | GetPayloadNothrow (AnyEvent &ev) |
| template<typename EVENT > | |
| EVENT::payload_t const * | GetPayloadNothrow (AnyEvent const &ev) |
| template<typename EventType > | |
| EventType | ParseRequestAndCreateEvent (const std::string &identity, const std::string &request_name, const void *msg, size_t msg_size) |
| template<typename EventType > | |
| EventType | ParseTopicAndCreateEvent (const std::string &topic_name, const void *msg, size_t msg_size) |
| template<class T , class... Args> | |
| std::shared_ptr< T > | MakeSharedFromTuple (std::tuple< Args... > &args) |
| template<typename T > | |
| void | DefaultRequestRejectHandler (const rad::AnyEvent &event, const std::string &state) |
| template<typename EventType > | |
| std::function< void(const std::string &, const std::string &, const void *, size_t)> | ReqProcessEvent (SMAdapter &sm) |
| template<typename EventType > | |
| std::function< void(const std::string &, const void *, size_t)> | TopicProcessEvent (SMAdapter &sm) |
| template<typename EVENT > | |
| const EVENT & | GetLastEvent (scxml4cpp::Context *c) |
| const rad::AnyEvent & | GetLastAnyEvent (scxml4cpp::Context *c) |
| template<typename EVENT > | |
| EVENT::payload_t & | GetLastEventPayload (scxml4cpp::Context *c) |
| template<typename EVENT > | |
| EVENT::payload_t const * | GetLastEventPayloadNothrow (scxml4cpp::Context *c) |
Variables | |
| const std::string | LOGGER_NAME = "rad" |
| const std::string | SM_LOGGER_NAME = "rad.sm" |
| const int | LOG_MAX_LEVEL = LOG_LEVEL_TRACE |
| const int | LOG_MAX_LEN = 2048 |
| const int | LOG_TIMESTAMP_MAXLEN = 100 |
| typedef std::list<rad::ActionGroup*> rad::ActionGroupList |
| typedef std::list<scxml4cpp::Action*> rad::ActionList |
| typedef std::list<scxml4cpp::Activity*> rad::ActivityList |
| using rad::SharedEvent = typedef std::shared_ptr<const AnyEvent> |
| using rad::TrsHealthBadEvent = typedef rad::EventT<TrsHealthBadEventTrait> |
| using rad::TrsHealthGoodEvent = typedef rad::EventT<TrsHealthGoodEventTrait> |
| using rad::UniqueEvent = typedef std::unique_ptr<AnyEvent> |
|
strong |
| enum rad::LogLevel |
| void rad::Assert | ( | bool | condition, |
| const char * | filename, | ||
| const char * | functionname, | ||
| int | linenumber | ||
| ) |
This function logs a failed assertion when the condition parameter is false.
| [in] | condition | Condition to verify. |
| [in] | filename | Assertion's filename. |
| [in] | functionname | Assetions's function name. |
| [in] | linenumber | Assetions's line. |
| void rad::DefaultRequestRejectHandler | ( | const rad::AnyEvent & | event, |
| const std::string & | state | ||
| ) |
This function can be used to send a "reject" reply to the originator of a request that cannot be handled in the current state.
| event | Event related to the incoming request. |
| state | Current state retrieved from the SM engine. |
| std::map< std::string, std::string > rad::GetDefaultLogProperties | ( | const std::string & | logsink_filename, |
| const std::string & | log_level = "ERROR" |
||
| ) |
| logsink_filename | Filename for the logsink appender. |
| log_level | Log level for the root logger, default is "ERROR" (possible values are "TRACE", "DEBUG", "INFO", "WARN", "ERROR"). |
|
inline |
| const rad::AnyEvent & rad::GetLastAnyEvent | ( | scxml4cpp::Context * | c | ) |
| const EVENT& rad::GetLastEvent | ( | scxml4cpp::Context * | c | ) |
| EVENT::payload_t& rad::GetLastEventPayload | ( | scxml4cpp::Context * | c | ) |
| EVENT::payload_t const* rad::GetLastEventPayloadNothrow | ( | scxml4cpp::Context * | c | ) |
| log4cplus::Logger & rad::GetLogger | ( | ) |
| EVENT::payload_t& rad::GetPayload | ( | AnyEvent & | ev | ) |
Access the payload in a type-safe manner.
| IncorrectEventType | if EVENT does not match the contained event. |
Example:
auto ev = make_event<MyEvent>(new std::string("hello world"));
auto& payload = ev.getPayload<MyEvent>();
| EVENT::payload_t const& rad::GetPayload | ( | AnyEvent const & | ev | ) |
Const version of getPayload();
| EVENT::payload_t* rad::GetPayloadNothrow | ( | AnyEvent & | ev | ) |
Access the payload in a type-safe manner.
Example:
auto ev = make_event<MyEvent>(new std::string("hello world"));
auto payload = ev.GetPayload<MyEvent>();
| EVENT::payload_t const* rad::GetPayloadNothrow | ( | AnyEvent const & | ev | ) |
Const version of GetPayloadNothrow()
| log4cplus::Logger & rad::GetSmLogger | ( | ) |
| void rad::LogConfigure | ( | const std::string & | filename = "" | ) |
|
inline |
|
inline |
| void rad::LogInitialize | ( | ) |
|
inline |
|
inline |
|
inline |
Overload the global make_error_code() free function with our custom enum.
| std::shared_ptr<T> rad::MakeSharedFromTuple | ( | std::tuple< Args... > & | args | ) |
| std::ostream & rad::operator<< | ( | std::ostream & | os, |
| const rad::Exception & | e | ||
| ) |
| EventType rad::ParseRequestAndCreateEvent | ( | const std::string & | identity, |
| const std::string & | request_name, | ||
| const void * | msg, | ||
| size_t | msg_size | ||
| ) |
Parses a request and create the corresponding event.
| [in] | identity | Request identity. |
| [in] | request_name | Request name. |
| [in] | msg | Pointer to the payload. |
| [in] | msg_size | Size of the payload. |
| EventType rad::ParseTopicAndCreateEvent | ( | const std::string & | topic_name, |
| const void * | msg, | ||
| size_t | msg_size | ||
| ) |
Parses a topic and create the corresponding event.
| [in] | topic_name | Topic name. |
| [in] | msg | Pointer to the payload. |
| [in] | msg_size | Size of the payload. |
| std::function<void(const std::string&, const std::string&, const void*, size_t)> rad::ReqProcessEvent | ( | SMAdapter & | sm | ) |
Function that creates a request handler to forward events to the SM
| std::function<void(const std::string&, const void*, size_t)> rad::TopicProcessEvent | ( | SMAdapter & | sm | ) |
Function that creates a topic handler to forward events to the SM
| const int rad::LOG_MAX_LEN = 2048 |
| const int rad::LOG_MAX_LEVEL = LOG_LEVEL_TRACE |
| const int rad::LOG_TIMESTAMP_MAXLEN = 100 |
| const std::string rad::LOGGER_NAME = "rad" |
| const std::string rad::SM_LOGGER_NAME = "rad.sm" |