EVA ICS v4 C++ SDK
Namespaces | Classes | Functions | Variables
eva Namespace Reference

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
 

Detailed Description

EVA ICS SDK namespace

Function Documentation

◆ active()

bool eva::active ( )

Checks is the service active

Returns
service active state

◆ c2e()

void eva::c2e ( int16_t  code)

Converts the operation result code into exception if error

Parameters
codeoperation result code
Exceptions
Exception

◆ coreActive()

bool eva::coreActive ( )

Is the node core active

Exceptions
Exception

◆ poc() [1/4]

void eva::poc ( )

Asks the launcher to panic (immediately terminate) the service on a critical error

◆ poc() [2/4]

void eva::poc ( exception &  e)

Asks the launcher to panic (immediately terminate) the service on a critical error

Parameters
eexception to log

◆ poc() [3/4]

void eva::poc ( exception &  e,
string  context 
)

Asks the launcher to panic (immediately terminate) the service on a critical error

Parameters
eexception to log
contexterror context

◆ poc() [4/4]

void eva::poc ( string  message)

Asks the launcher to panic (immediately terminate) the service on a critical error

Parameters
messagemessage to send

◆ publish()

template<typename T >
void eva::publish ( string  topic,
data 
)

Publishes data to a topic

Template Parameters
Tmust be MessagePack-serializable
Parameters
topictopic to publish to
datapayload to publish
Exceptions
Exception

◆ result()

template<typename T >
int32_t eva::result ( payload)

Packs local function result into FFI buffer

Template Parameters
Tcall payload kind, must be MessagePack-serializable
Parameters
payloadresult payload
Exceptions
Exception

◆ rpcCall() [1/2]

RpcResult eva::rpcCall ( string  target,
string  method 
)

Performs an outgoing RPC call

Parameters
targetcall target
methodcall method
Returns
RpcResult
Exceptions
Exception

◆ rpcCall() [2/2]

template<typename T >
RpcResult eva::rpcCall ( string  target,
string  method,
params 
)

Performs an outgoing RPC call

Template Parameters
Tcall payload kind, must be MessagePack-serializable
Parameters
targetcall target
methodcall method
paramscall parameters
Returns
RpcResult
Exceptions
Exception

◆ subscribe() [1/2]

void eva::subscribe ( string  topic)

Subscribes to a topic

Parameters
topictopic to subscribe
Exceptions
Exception

◆ subscribe() [2/2]

void eva::subscribe ( vector< string > &  topics)

Subscribes to topics

Parameters
topicstopics to subscribe
Exceptions
Exception

◆ svcOp()

int32_t eva::svcOp ( int16_t  op_code)

Call a service operation (low-level)

Parameters
op_codeoperation code

◆ svcOpSS()

int32_t eva::svcOpSS ( int16_t  op_code,
stringstream &  ss 
)

Call a service operation (low-level)

Parameters
op_codeoperation code
sspayload string stream

◆ terminate()

void eva::terminate ( )

Asks the launcher to terminate the service

Exceptions
Exception

◆ unpackInitial()

template<typename T >
vars::Initial<T> eva::unpackInitial ( EvaFFIBuffer *  buf)

Unpacks the initial payload

Template Parameters
TService configuration structure
Parameters
bufinput FFI buffer
Returns
the payload unpacked
Exceptions
MessagePackexceptions

◆ unsubscribe() [1/2]

void eva::unsubscribe ( string  topic)

Unsubscribes from a topic

Parameters
topictopic to unsubscribe
Exceptions
Exception

◆ unsubscribe() [2/2]

void eva::unsubscribe ( vector< string > &  topics)

Unsubscribes from topics

Parameters
topicstopics to unsubscribe
Exceptions
Exception

◆ waitCore() [1/2]

void eva::waitCore ( )

Waits until the node core become active

Exceptions
Exception

◆ waitCore() [2/2]

void eva::waitCore ( chrono::milliseconds  timeout)

Waits until the node core become active

Parameters
timeoutmax wait timeout (throws exception after)
Exceptions
Exception
The official SDK for EVA ICS
Technical documentation: https://info.bma.ai/en/actual/eva4/sdk/cpp/
© Bohemia Automation / Altertech