|
CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
|
Typed "observation" records extracted from DataMessages: location, dimension, integer, float, time and string observations. More...
Go to the source code of this file.
Classes | |
| struct | cmlabs::ObsEntry |
| Declarative description of one observation source: name, observation type, trigger expression and field-name mappings. More... | |
| struct | cmlabs::cmpObsEntry |
| Comparator matching ObsEntry records by name only (used for de-duplication in containers). More... | |
| struct | cmlabs::ObsHeader |
| Fixed-size header preceding every observation payload: sizes/ids, provenance (creator, object, topic), type tag, name and confidence/consensus scores. More... | |
| struct | cmlabs::ObsLocation |
| 6-DOF pose observation: position (x,y,z), orientation (pitch,roll,yaw), size and owning map id. More... | |
| struct | cmlabs::ObsDimension |
| Extent observation (w,h,d). More... | |
| struct | cmlabs::ObsInteger |
| Scalar integer observation. More... | |
| struct | cmlabs::ObsFloat |
| Scalar float observation. More... | |
| struct | cmlabs::ObsTime |
| Timestamp observation (ms epoch). More... | |
| struct | cmlabs::ObsString |
| Fixed-buffer (1023 chars + NUL) string observation; comparisons are case-insensitive lexicographic. More... | |
| class | cmlabs::GenericObservation< T > |
| Header + typed payload wrapper for one observation, serializable to/from DataMessage and raw memory. More... | |
Namespaces | |
| namespace | cmlabs |
Macros | |
| #define | OBSID_LOC 1 |
| #define | OBSID_DIM 2 |
| #define | OBSID_INT 3 |
| #define | OBSID_FLOAT 4 |
| #define | OBSID_TIME 5 |
| #define | OBSID_STRING 6 |
| #define | OBSID_COUNT 6 |
| Number of defined observation type ids (OBSID_LOC..OBSID_STRING). | |
Functions | |
| int64 | cmlabs::ExtractIntFromMessage (const char *name, DataMessage *msg, std::map< std::string, std::string > &mappings, bool &ok) |
Read an integer field from a message, translating name through mappings first. | |
| float64 | cmlabs::ExtractFloatFromMessage (const char *name, DataMessage *msg, std::map< std::string, std::string > &mappings, bool &ok) |
| Float variant of ExtractIntFromMessage(); same mapping semantics. | |
| uint64 | cmlabs::ExtractTimeFromMessage (const char *name, DataMessage *msg, std::map< std::string, std::string > &mappings, bool &ok) |
| Timestamp variant of ExtractIntFromMessage(); same mapping semantics. | |
| std::string | cmlabs::ExtractStringFromMessage (const char *name, DataMessage *msg, std::map< std::string, std::string > &mappings, bool &ok) |
| String variant of ExtractIntFromMessage(); same mapping semantics. | |
| uint32 | cmlabs::GetObsTypeFromRawData (const char *data, uint32 size) |
| Inspect a raw observation blob and return its OBSID_* type tag from the embedded ObsHeader. | |
| bool | cmlabs::Observations_UnitTest () |
| Unit test for the Observations module. | |
| void | cmlabs::Register_Observations_Tests () |
| Register the Observations tests with the unit test framework. | |
Typed "observation" records extracted from DataMessages: location, dimension, integer, float, time and string observations.
An observation is a small POD payload (Obs* struct) plus an ObsHeader with identity, provenance and confidence, wrapped by GenericObservation<T>. Field-name mappings let heterogeneous sensor messages populate the same observation type: the Extract*FromMessage() helpers first look the logical field name up in the mapping table, then read the mapped field from the message. Range queries are supported via extractRangeFrom()/extractRangeTo() and isBetween(). Template bodies live in Observations.tpl.h.
Definition in file Observations.h.
| #define OBSID_COUNT 6 |
Number of defined observation type ids (OBSID_LOC..OBSID_STRING).
Definition at line 339 of file Observations.h.
| #define OBSID_DIM 2 |
Definition at line 138 of file Observations.h.
Referenced by cmlabs::ObsDimension::getType().
| #define OBSID_FLOAT 4 |
Definition at line 229 of file Observations.h.
Referenced by cmlabs::ObsFloat::getType(), and cmlabs::Observations_UnitTest().
| #define OBSID_INT 3 |
Definition at line 197 of file Observations.h.
Referenced by cmlabs::ObsInteger::getType(), and cmlabs::Observations_UnitTest().
| #define OBSID_LOC 1 |
Definition at line 59 of file Observations.h.
Referenced by cmlabs::ObsLocation::getType(), and cmlabs::Observations_UnitTest().
| #define OBSID_STRING 6 |
Definition at line 293 of file Observations.h.
Referenced by cmlabs::ObsString::getType().
| #define OBSID_TIME 5 |
Definition at line 261 of file Observations.h.
Referenced by cmlabs::ObsTime::getType().