|
CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
|
Specification of a whiteboard retrieval attached to a TriggerSpec. More...
#include <Subscriptions.h>
Public Member Functions | |
| std::string | toXML () |
| Serialise as a <retrieve .../> XML element. | |
| bool | fromXML (const char *xml) |
| Parse from an XML string containing a <retrieve .../> element. | |
| bool | fromXML (XMLNode &node) |
| Parse from an already-parsed <retrieve> XML node. | |
Public Attributes | |
| uint32 | source |
| Component id of the whiteboard to retrieve from. | |
| uint32 | origin |
| Restrict to messages originating from this component id (0 = any). | |
| uint64 | maxage |
| Maximum message age in MICROSECONDS (XML gives ms; parser multiplies by 1000). | |
| uint32 | maxcount |
| Maximum number of messages to return (0 = unlimited). | |
| PsyType | type |
| Message type to match (wildcards allowed). | |
| PsyContext | context |
| Context to match. | |
| uint32 | tag |
| Tag to match (0 = any). | |
| char | name [MAXKEYNAMELEN+1] |
| Name of this retrieve, used to reference its results in the crank. | |
| char | key [MAXKEYNAMELEN+1] |
| Indexed user entry to range-query on (empty = time/type retrieval only). | |
| uint8 | keytype |
Interpretation of key: INDEX_TIME, INDEX_STRING, INDEX_INTEGER or INDEX_FLOAT. | |
| uint32 | from |
| Restrict to messages sent by this component id (0 = any). | |
| uint32 | to |
| Restrict to messages addressed to this component id (0 = any). | |
| uint64 | startTime |
| Range start when keytype == INDEX_TIME (microseconds). | |
| uint64 | endTime |
| Range end when keytype == INDEX_TIME (microseconds). | |
| int64 | startInt |
| Range start when keytype == INDEX_INTEGER. | |
| int64 | endInt |
| Range end when keytype == INDEX_INTEGER. | |
| float64 | startFloat |
| Range start when keytype == INDEX_FLOAT. | |
| float64 | endFloat |
| Range end when keytype == INDEX_FLOAT. | |
| char | startString [MAXVALUENAMELEN+1] |
| Range start when keytype == INDEX_STRING. | |
| char | endString [MAXVALUENAMELEN+1] |
| Range end when keytype == INDEX_STRING. | |
Specification of a whiteboard retrieval attached to a TriggerSpec.
When its trigger fires, the runtime retrieves matching messages from the whiteboard's MessageIndex — by type, context, tag, sender/addressee, age, and optionally a value/range condition on an indexed user entry (see keytype and the start/end pairs) — and hands them to the crank together with the trigger message. Fixed-size POD stored inside the TriggerSpec block.
Definition at line 193 of file Subscriptions.h.
|
inline |
Parse from an XML string containing a <retrieve .../> element.
| xml | XML text. |
Definition at line 222 of file Subscriptions.h.
References cmlabs::XMLResults::error, cmlabs::eXMLErrorNone, fromXML(), and cmlabs::XMLNode::isEmpty().
Referenced by fromXML(), and Java_com_cmlabs_cmsdk_cmsdkJNI_RetrieveSpec_1fromXML_1_1SWIG_10().
|
inline |
Parse from an already-parsed <retrieve> XML node.
| node | the XML node. |
Definition at line 232 of file Subscriptions.h.
References cmlabs::utils::Ascii2Float64(), cmlabs::utils::Ascii2Int64(), cmlabs::utils::Ascii2Uint32(), cmlabs::utils::Ascii2Uint64(), context, endFloat, endInt, endString, endTime, from, cmlabs::XMLNode::getAttribute(), key, keytype, maxage, maxcount, MAXKEYNAMELEN, MAXVALUENAMELEN, name, origin, source, startFloat, startInt, startString, startTime, cmlabs::utils::strcpyavail(), tag, to, and type.
|
inline |
Serialise as a <retrieve .../> XML element.
Definition at line 215 of file Subscriptions.h.
References context, endFloat, endInt, endString, endTime, from, key, keytype, maxage, maxcount, name, origin, source, startFloat, startInt, startString, startTime, cmlabs::utils::StringFormat(), tag, to, and type.
Referenced by cmlabs::TriggerSpec::toXML().
| PsyContext cmlabs::RetrieveSpec::context |
Context to match.
Definition at line 199 of file Subscriptions.h.
| float64 cmlabs::RetrieveSpec::endFloat |
Range end when keytype == INDEX_FLOAT.
Definition at line 211 of file Subscriptions.h.
Referenced by fromXML(), cmlabs::MessageIndex::queryMessages(), cmlabs::PsyAPI::retrieveFloatParam(), and toXML().
| int64 cmlabs::RetrieveSpec::endInt |
Range end when keytype == INDEX_INTEGER.
Definition at line 209 of file Subscriptions.h.
Referenced by fromXML(), cmlabs::MessageIndex::queryMessages(), cmlabs::PsyAPI::retrieveIntegerParam(), and toXML().
| char cmlabs::RetrieveSpec::endString[MAXVALUENAMELEN+1] |
Range end when keytype == INDEX_STRING.
Definition at line 213 of file Subscriptions.h.
Referenced by _wrap_RetrieveSpec_endString_set(), _wrap_RetrieveSpec_endString_set(), fromXML(), Java_com_cmlabs_cmsdk_cmsdkJNI_RetrieveSpec_1endString_1set(), cmlabs::MessageIndex::queryMessages(), cmlabs::PsyAPI::retrieveStringParam(), and toXML().
| uint64 cmlabs::RetrieveSpec::endTime |
Range end when keytype == INDEX_TIME (microseconds).
Definition at line 207 of file Subscriptions.h.
Referenced by fromXML(), cmlabs::MessageIndex::queryMessages(), cmlabs::PsyAPI::retrieveTimeParam(), and toXML().
| uint32 cmlabs::RetrieveSpec::from |
Restrict to messages sent by this component id (0 = any).
Definition at line 204 of file Subscriptions.h.
Referenced by fromXML(), cmlabs::MessageIndex::queryMessages(), and toXML().
| char cmlabs::RetrieveSpec::key[MAXKEYNAMELEN+1] |
Indexed user entry to range-query on (empty = time/type retrieval only).
Definition at line 202 of file Subscriptions.h.
Referenced by _wrap_RetrieveSpec_key_set(), _wrap_RetrieveSpec_key_set(), fromXML(), Java_com_cmlabs_cmsdk_cmsdkJNI_RetrieveSpec_1key_1set(), cmlabs::MessageIndex::queryMessages(), toXML(), and cmlabs::MessageIndex::UnitTest().
| uint8 cmlabs::RetrieveSpec::keytype |
Interpretation of key: INDEX_TIME, INDEX_STRING, INDEX_INTEGER or INDEX_FLOAT.
Definition at line 203 of file Subscriptions.h.
Referenced by fromXML(), cmlabs::MessageIndex::queryMessages(), toXML(), and cmlabs::MessageIndex::UnitTest().
| uint64 cmlabs::RetrieveSpec::maxage |
Maximum message age in MICROSECONDS (XML gives ms; parser multiplies by 1000).
Definition at line 196 of file Subscriptions.h.
Referenced by fromXML(), cmlabs::MessageIndex::queryMessages(), cmlabs::PsyAPI::retrieve(), cmlabs::PsyAPI::retrieveFloatParam(), cmlabs::PsyAPI::retrieveIntegerParam(), cmlabs::PsyAPI::retrieveStringParam(), cmlabs::PsyAPI::retrieveTimeParam(), toXML(), and cmlabs::MessageIndex::UnitTest().
| uint32 cmlabs::RetrieveSpec::maxcount |
Maximum number of messages to return (0 = unlimited).
Definition at line 197 of file Subscriptions.h.
Referenced by fromXML(), cmlabs::MessageIndex::queryMessages(), cmlabs::PsyAPI::retrieve(), cmlabs::PsyAPI::retrieveFloatParam(), cmlabs::PsyAPI::retrieveIntegerParam(), cmlabs::PsyAPI::retrieveStringParam(), cmlabs::PsyAPI::retrieveTimeParam(), toXML(), and cmlabs::MessageIndex::UnitTest().
| char cmlabs::RetrieveSpec::name[MAXKEYNAMELEN+1] |
Name of this retrieve, used to reference its results in the crank.
Definition at line 201 of file Subscriptions.h.
Referenced by _wrap_RetrieveSpec_name_set(), _wrap_RetrieveSpec_name_set(), fromXML(), cmlabs::TriggerSpec::getRetrieveSpec(), Java_com_cmlabs_cmsdk_cmsdkJNI_RetrieveSpec_1name_1set(), and toXML().
| uint32 cmlabs::RetrieveSpec::origin |
Restrict to messages originating from this component id (0 = any).
Definition at line 195 of file Subscriptions.h.
Referenced by fromXML(), cmlabs::PsyAPI::retrieve(), and toXML().
| uint32 cmlabs::RetrieveSpec::source |
Component id of the whiteboard to retrieve from.
Definition at line 194 of file Subscriptions.h.
Referenced by fromXML(), cmlabs::PsyAPI::retrieve(), and toXML().
| float64 cmlabs::RetrieveSpec::startFloat |
Range start when keytype == INDEX_FLOAT.
Definition at line 210 of file Subscriptions.h.
Referenced by fromXML(), cmlabs::MessageIndex::queryMessages(), cmlabs::PsyAPI::retrieveFloatParam(), and toXML().
| int64 cmlabs::RetrieveSpec::startInt |
Range start when keytype == INDEX_INTEGER.
Definition at line 208 of file Subscriptions.h.
Referenced by fromXML(), cmlabs::MessageIndex::queryMessages(), cmlabs::PsyAPI::retrieveIntegerParam(), and toXML().
| char cmlabs::RetrieveSpec::startString[MAXVALUENAMELEN+1] |
Range start when keytype == INDEX_STRING.
Definition at line 212 of file Subscriptions.h.
Referenced by _wrap_RetrieveSpec_startString_set(), _wrap_RetrieveSpec_startString_set(), fromXML(), Java_com_cmlabs_cmsdk_cmsdkJNI_RetrieveSpec_1startString_1set(), cmlabs::MessageIndex::queryMessages(), cmlabs::PsyAPI::retrieveStringParam(), and toXML().
| uint64 cmlabs::RetrieveSpec::startTime |
Range start when keytype == INDEX_TIME (microseconds).
Definition at line 206 of file Subscriptions.h.
Referenced by fromXML(), cmlabs::MessageIndex::queryMessages(), cmlabs::PsyAPI::retrieveTimeParam(), and toXML().
| uint32 cmlabs::RetrieveSpec::tag |
Tag to match (0 = any).
Definition at line 200 of file Subscriptions.h.
| uint32 cmlabs::RetrieveSpec::to |
Restrict to messages addressed to this component id (0 = any).
Definition at line 205 of file Subscriptions.h.
Referenced by fromXML(), cmlabs::MessageIndex::queryMessages(), and toXML().
| PsyType cmlabs::RetrieveSpec::type |
Message type to match (wildcards allowed).
Definition at line 198 of file Subscriptions.h.
Referenced by fromXML(), cmlabs::MessageIndex::queryMessages(), and toXML().