EVA ICS v4 C++ SDK
|
Namespaces | |
controller | |
log | |
vars | |
Classes | |
struct | CallParamsId |
struct | coreStatus |
class | Exception |
class | Frame |
class | OID |
struct | RawItemState |
struct | RawItemStatus |
class | RpcEvent |
class | RpcResult |
struct | ServiceInfo |
class | ServiceMethod |
struct | SvcMethod |
struct | SvcMethodParam |
Functions | |
stringstream | packStrings (vector< string > &strings) |
int32_t | svcOp (int16_t op_code) |
int32_t | svcOpSS (int16_t op_code, stringstream &ss) |
bool | active () |
void | c2e (int16_t code) |
void | subscribe (vector< string > &topics) |
void | subscribe (string topic) |
void | unsubscribe (vector< string > &topics) |
void | unsubscribe (string topic) |
template<typename T > | |
void | publish (string topic, T data) |
ostream & | operator<< (ostream &strm, const OID &o) |
size_t | rp () |
template<typename T > | |
vars::Initial< T > | unpackInitial (EvaFFIBuffer *buf) |
template<typename T > | |
RpcResult | rpcCall (string target, string method, T params) |
RpcResult | rpcCall (string target, string method) |
template<typename T > | |
int32_t | result (T payload) |
void | terminate () |
void | poc () |
void | poc (string message) |
void | poc (exception &e) |
void | poc (exception &e, string context) |
bool | coreActive () |
void | waitCore () |
void | waitCore (chrono::milliseconds timeout) |
Variables | |
const uint16_t | ABI_VERSION = 1 |
atomic< int32_t(*)(int16_t op_code, struct EvaFFIBuffer *payload)> | svc_op_fn (nullptr) |
thread_local stringstream | result_buf |
EVA ICS SDK namespace
bool eva::active | ( | ) |
Checks is the service active
void eva::c2e | ( | int16_t | code | ) |
Converts the operation result code into exception if error
code | operation result code |
Exception |
bool eva::coreActive | ( | ) |
Is the node core active
Exception |
void eva::poc | ( | ) |
Asks the launcher to panic (immediately terminate) the service on a critical error
void eva::poc | ( | exception & | e | ) |
Asks the launcher to panic (immediately terminate) the service on a critical error
e | exception to log |
void eva::poc | ( | exception & | e, |
string | context | ||
) |
Asks the launcher to panic (immediately terminate) the service on a critical error
e | exception to log |
context | error context |
void eva::poc | ( | string | message | ) |
Asks the launcher to panic (immediately terminate) the service on a critical error
message | message to send |
void eva::publish | ( | string | topic, |
T | data | ||
) |
Publishes data to a topic
T | must be MessagePack-serializable |
topic | topic to publish to |
data | payload to publish |
Exception |
int32_t eva::result | ( | T | payload | ) |
Packs local function result into FFI buffer
T | call payload kind, must be MessagePack-serializable |
payload | result payload |
Exception |
RpcResult eva::rpcCall | ( | string | target, |
string | method | ||
) |
RpcResult eva::rpcCall | ( | string | target, |
string | method, | ||
T | params | ||
) |
void eva::subscribe | ( | string | topic | ) |
void eva::subscribe | ( | vector< string > & | topics | ) |
int32_t eva::svcOp | ( | int16_t | op_code | ) |
Call a service operation (low-level)
op_code | operation code |
int32_t eva::svcOpSS | ( | int16_t | op_code, |
stringstream & | ss | ||
) |
Call a service operation (low-level)
op_code | operation code |
ss | payload string stream |
void eva::terminate | ( | ) |
Asks the launcher to terminate the service
Exception |
vars::Initial<T> eva::unpackInitial | ( | EvaFFIBuffer * | buf | ) |
Unpacks the initial payload
T | Service configuration structure |
buf | input FFI buffer |
MessagePack | exceptions |
void eva::unsubscribe | ( | string | topic | ) |
void eva::unsubscribe | ( | vector< string > & | topics | ) |
void eva::waitCore | ( | ) |
Waits until the node core become active
Exception |
void eva::waitCore | ( | chrono::milliseconds | timeout | ) |
Waits until the node core become active
timeout | max wait timeout (throws exception after) |
Exception |