|
CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
|
Template implementations for GenericObservation<T> (declared in Observations.h). More...
#include "Utils.h"Go to the source code of this file.
Namespaces | |
| namespace | cmlabs |
Template implementations for GenericObservation<T> (declared in Observations.h).
Included at the bottom of Observations.h; not meant for direct inclusion. Serialization layout is the raw ObsHeader immediately followed by the T payload (memcpy of the POD structs), stored as "OBS" data entries in a DataMessage. This raw-memory format is only portable between hosts of the same endianness and struct packing.
The payload type T must be a POD struct providing: init(), getType(), getTypeName(), print(), toJSON(), isBetween(const T&, const T&) and extractDataFromMessage(DataMessage*, std::map<std::string,std::string>&). Because payloads are copied with memcpy, T must not contain pointers or non-trivial members.
Definition in file Observations.tpl.h.