|
CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
|
One filter condition attached to a TriggerSpec: a test on a user entry of the candidate message. More...
#include <Subscriptions.h>
Public Member Functions | |
| std::string | toXML () |
| Serialise as a <filter .../> XML element. | |
| bool | fromXML (const char *xml) |
| Parse from an XML string containing a <filter .../> element. | |
| bool | fromXML (XMLNode &node) |
| Parse from an already-parsed <filter> XML node. | |
Public Attributes | |
| uint8 | filter |
| Filter operation, one of the TRIGGERFILTER_... codes. | |
| uint64 | time |
| Time operand in milliseconds (used by TRIGGERFILTER_MAXAGE). | |
| char | key [MAXKEYNAMELEN+1] |
| Name of the user entry to test. | |
| char | value [MAXVALUENAMELEN+1] |
| Comparison operand as text (parsed numerically for the numeric operations). | |
One filter condition attached to a TriggerSpec: a test on a user entry of the candidate message.
A trigger only fires when ALL of its filters pass. Stored as fixed-size POD directly after the TriggerSpec in the same memory block.
Definition at line 87 of file Subscriptions.h.
|
inline |
Parse from an XML string containing a <filter .../> element.
| xml | XML text. |
Definition at line 98 of file Subscriptions.h.
References cmlabs::XMLResults::error, cmlabs::eXMLErrorNone, fromXML(), and cmlabs::XMLNode::isEmpty().
Referenced by fromXML(), Java_com_cmlabs_cmsdk_cmsdkJNI_FilterSpec_1fromXML_1_1SWIG_10(), and cmlabs::TriggerSpec::UnitTest().
|
inline |
Parse from an already-parsed <filter> XML node.
| node | the XML node. |
Definition at line 108 of file Subscriptions.h.
References cmlabs::utils::Ascii2Uint32(), cmlabs::utils::Ascii2Uint64(), filter, cmlabs::XMLNode::getAttribute(), key, MAXKEYNAMELEN, MAXVALUENAMELEN, cmlabs::utils::strcpyavail(), time, and value.
|
inline |
Serialise as a <filter .../> XML element.
Definition at line 93 of file Subscriptions.h.
References filter, key, cmlabs::utils::StringFormat(), time, and value.
Referenced by cmlabs::TriggerSpec::UnitTest().
| uint8 cmlabs::FilterSpec::filter |
Filter operation, one of the TRIGGERFILTER_... codes.
Definition at line 88 of file Subscriptions.h.
Referenced by fromXML(), toXML(), and cmlabs::TriggerSpec::UnitTest().
| char cmlabs::FilterSpec::key[MAXKEYNAMELEN+1] |
Name of the user entry to test.
Definition at line 90 of file Subscriptions.h.
Referenced by _wrap_FilterSpec_key_set(), _wrap_FilterSpec_key_set(), fromXML(), Java_com_cmlabs_cmsdk_cmsdkJNI_FilterSpec_1key_1set(), toXML(), and cmlabs::TriggerSpec::UnitTest().
| uint64 cmlabs::FilterSpec::time |
Time operand in milliseconds (used by TRIGGERFILTER_MAXAGE).
Definition at line 89 of file Subscriptions.h.
Referenced by fromXML(), toXML(), and cmlabs::TriggerSpec::UnitTest().
| char cmlabs::FilterSpec::value[MAXVALUENAMELEN+1] |
Comparison operand as text (parsed numerically for the numeric operations).
Definition at line 91 of file Subscriptions.h.
Referenced by _wrap_FilterSpec_value_set(), _wrap_FilterSpec_value_set(), fromXML(), Java_com_cmlabs_cmsdk_cmsdkJNI_FilterSpec_1value_1set(), toXML(), and cmlabs::TriggerSpec::UnitTest().