fwRPC
|
Functions | |
string | fwRPC_common_makeDpName (string dpt, string id) |
bool | fwRPC_common_isValidHdl (anytype rpcHandle) |
int | fwRPC_common_unpackMessage (string message, string &id, string &type, string &targetProject, string &targetName, string &buffer) |
string | fwRPC_common_cleanProjectName (string name) |
bool | fwRPC_dist_isClient (string name) |
bool | fwRPC_dist_isCore (string name) |
bool | fwRPC_dist_isWorker (string name) |
bool | fwRPC_dist_isBroker (string name) |
bool | fwRPC_dist_nameMatches (string name, string tag) |
string | fwRPC_dist_getIdFromName (string name) |
string | fwRPC_dist_buildClientName (bool local, string typeTag, string id) |
string | fwRPC_dist_buildMessage (string type, string project, string name, anytype payload) |
This library contains commonly used constants and helper functions.
string fwRPC_common_cleanProjectName | ( | string | name | ) |
Clean a project name, removing the final ':' char if present.
name | (IN, string) project name to clean |
nothing |
bool fwRPC_common_isValidHdl | ( | anytype | rpcHandle | ) |
Check if the given variable is a valid rpc handle or not.
rpcHandle | (IN, anytype) variable to check |
nothing |
string fwRPC_common_makeDpName | ( | string | dpt, |
string | id | ||
) |
build DP name from DPT and model ID. Does not check if the DPT exists.
dpt | (IN, string) DPT |
id | (IN, string) model id |
nothing |
int fwRPC_common_unpackMessage | ( | string | message, |
string & | id, | ||
string & | type, | ||
string & | targetProject, | ||
string & | targetName, | ||
string & | buffer | ||
) |
Unpack a packed message string.
message | (IN, string) message to unpack |
id | (OUT, string) message id |
type | (OUT, string) message type |
targetProject | (OUT, string) message targetProject |
targetName | (OUT, string) message targetName |
buffer | (OUT, string) message buffer |
nothing |
string fwRPC_dist_buildMessage | ( | string | type, |
string | project, | ||
string | name, | ||
anytype | payload | ||
) |
Build a message string to be sent by a client or broker module. Can be used for request or response messages.
Type must be one of the defined fwRPC_DISTMSG_TYPE_*
type | (IN, string) message type |
project | (IN, string) message project |
name | (IN, string) message name |
payload | (IN, anytype) payload |
nothing |
string fwRPC_dist_getIdFromName | ( | string | name | ) |
Strip the name string to just the unique identifier.
name | (IN) name to strip |
nothing |
bool fwRPC_dist_isBroker | ( | string | name | ) |
Check if a given name belongs to a broker.
name | (IN) name to check |
nothing |
bool fwRPC_dist_isClient | ( | string | name | ) |
Check if a given name belongs to a client.
name | (IN, string) name to check |
nothing |
bool fwRPC_dist_isCore | ( | string | name | ) |
Check if a given name belongs to a core.
name | (IN, string) name to check |
nothing |
bool fwRPC_dist_isWorker | ( | string | name | ) |
Check if a given name belongs to a worker.
name | (IN, string) name to check |
nothing |
bool fwRPC_dist_nameMatches | ( | string | name, |
string | tag | ||
) |
Check if a given name matches against a given tag.
name | (IN, string) name to check |
tag | (IN, string) tag to check |
nothing |
const string fwRPC_DIST_BRKR = "brokermodule" |
Messages targeted towards brokers should have this as dest. info.
const int fwRPC_DIST_NODE_NAME = 2 |
Endpoint node information
const int fwRPC_DIST_NODE_PROJECT = 1 |
Endpoint node information
const string fwRPC_DIST_TAG_CLIENT = "clnt" |
Possible client types
const string fwRPC_DIST_TAG_CORE = "core" |
Possible client types
const string fwRPC_DIST_TAG_LOCAL = "loc" |
Possible locality types
const string fwRPC_DIST_TAG_REMOTE = "rem" |
Possible locality types
const string fwRPC_DIST_TAG_WORKER = "work" |
Possible client types
const int fwRPC_DISTMSG_RECOVER_CALLBACK = 2 |
Recover message parameters
const int fwRPC_DISTMSG_RECOVER_HDL = 1 |
Recover message parameters
const int fwRPC_DISTMSG_REQUEST_FUNC = 2 |
Request message parameters
const int fwRPC_DISTMSG_REQUEST_HDL = 1 |
Request message parameters
const int fwRPC_DISTMSG_REQUEST_PARAMS = 3 |
Request message parameters
const int fwRPC_DISTMSG_REQUEST_TIMEOUT = 4 |
Request message parameters
const int fwRPC_DISTMSG_RESULT_HDL = 1 |
Result message parameters
const int fwRPC_DISTMSG_RESULT_OUTPUT = 3 |
Result message parameters
const int fwRPC_DISTMSG_RESULT_STATUS = 2 |
Result message parameters
const int fwRPC_DISTMSG_STATUS_CALLBACK = 3 |
Status message parameters
const int fwRPC_DISTMSG_STATUS_HDL = 1 |
Status message parameters
const int fwRPC_DISTMSG_STATUS_STATUS = 2 |
Status message parameters
const string fwRPC_DISTMSG_TYPE_ACKNOWLEDGE = "ACK" |
Valid message types
const string fwRPC_DISTMSG_TYPE_CANCEL = "CNCL" |
Valid message types
const string fwRPC_DISTMSG_TYPE_CONNECT = "ON" |
Valid message types
const string fwRPC_DISTMSG_TYPE_DISCONNECT = "OFF" |
Valid message types
const string fwRPC_DISTMSG_TYPE_GET_RESULT = "GRES" |
Valid message types
const string fwRPC_DISTMSG_TYPE_LISTSVC = "SVC" |
Valid message types
const string fwRPC_DISTMSG_TYPE_RECOVER = "RCVR" |
Valid message types
const string fwRPC_DISTMSG_TYPE_REGISTER = "REG" |
Valid message types
const string fwRPC_DISTMSG_TYPE_REQUEST = "REQ" |
Valid message types
const string fwRPC_DISTMSG_TYPE_SET_RESULT = "SRES" |
Valid message types
const string fwRPC_DISTMSG_TYPE_STATUS = "STAT" |
Valid message types
const string fwRPC_DISTMSG_TYPE_WORKER_HEARTBEAT = "W_HB" |
Valid message types
const string fwRPC_DISTMSG_TYPE_WORKER_STATE = "W_ST" |
Valid message types
const int fwRPC_DISTMSG_WORKER_STATE_ID = 1 |
Worker state message parameters
const int fwRPC_DISTMSG_WORKER_STATE_JOBS = 3 |
Worker state message parameters
const int fwRPC_DISTMSG_WORKER_STATE_LOCKED = 4 |
Worker state message parameters
const int fwRPC_DISTMSG_WORKER_STATE_STATUS = 2 |
Worker state message parameters
const string fwRPC_DP_SEPARATOR = "/" |
DP/DPE consts
const string fwRPC_DPE_NO_VALUE_STORAGE = ":_original.._last_value_storage_off" |
DP/DPE consts
const string fwRPC_DPE_VALUE = ":_original.._value" |
DP/DPE consts
const string fwRPC_RBMBX_DPT = "_FwRPC_RB_MBX" |
DP/DPE consts