rad
2.0.0
|
Namespaces | |
cii | |
core | |
detail | |
errorMsg | |
services | |
utils | |
Classes | |
class | ActionCallback |
class | ActionGroup |
class | ActionMgr |
class | ThreadBaseActivity |
class | ThreadActivity |
struct | IncorrectEventType |
struct | EventInfo |
class | AnyEvent |
class | EventT |
class | CoroActivity |
class | DbAdapter |
class | DbAdapterRedis |
class | ErrorCategory |
class | Event |
class | Event< EVENT, typename std::enable_if<!std::is_void< typename EVENT::payload_t >::value >::type > |
class | Exception |
class | RuntimeDbException |
class | InvalidOptionException |
class | GuardCallback |
class | Helper |
class | Logger |
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 | Timer |
class | TopicHandler |
class | TopicPub |
class | TopicSub |
class | Utils |
Typedefs | |
typedef std::list < scxml4cpp::Action * > | ActionList |
typedef std::list < rad::ActionGroup * > | ActionGroupList |
typedef std::list < scxml4cpp::Activity * > | ActivityList |
using | SharedEvent = std::shared_ptr< const AnyEvent > |
using | UniqueEvent = std::unique_ptr< AnyEvent > |
Functions | |
void | Assert (bool condition, const char *filename, const char *functionname, int linenumber) |
template<class T , class... Args> | |
std::shared_ptr< T > | MakeSharedFromTuple (std::tuple< Args...> &args) |
const ErrorCategory & | GetErrorCategory () |
std::error_code | make_error_code (rad::ErrorCodes e) |
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) |
void | LogInitialize () |
void | LogConfigure (const std::string &filename="") |
log4cplus::Logger & | GetLogger () |
log4cplus::Logger & | GetSmLogger () |
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 EventType > | |
EventType | ParseRequestAndCreateEvent (const std::string &identity, const std::string &request_name, const void *msg, size_t msg_size) |
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 EventType > | |
EventType | ParseTopicAndCreateEvent (const std::string &topic_name, const void *msg, size_t msg_size) |
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 |
typedef std::shared_ptr< const AnyEvent > rad::SharedEvent |
typedef std::unique_ptr< AnyEvent > rad::UniqueEvent |
|
strong |
|
strong |
|
strong |
enum rad::LogLevel |
enum rad::LogLevel |
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. |
|
inline |
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 | ) |
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" |