CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
Loading...
Searching...
No Matches
DataMessage.h File Reference

The binary DataMessage container — the central data-exchange object of Psyclone/CMSDK. More...

#include "Types.h"
#include "ObjectIDs.h"
#include "Utils.h"
Include dependency graph for DataMessage.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cmlabs::DataMessageEntryHeader
 Header preceding every user entry inside a DataMessage's flat memory block. More...
struct  cmlabs::DataMessageHeader_Old
 Legacy (pre-version-10) DataMessage wire header, kept only for format conversion. More...
struct  cmlabs::DataMessageHeader
 The current (version 10) DataMessage wire/shared-memory header. More...
class  cmlabs::DataMessage
 The central Psyclone data container: a self-contained binary message with typed, named user entries. More...

Namespaces

namespace  cmlabs

Macros

#define CURRENTDATAMESSAGEVERSION   10

Detailed Description

The binary DataMessage container — the central data-exchange object of Psyclone/CMSDK.

A DataMessage is a single contiguous block of memory holding a fixed-size header (DataMessageHeader) followed by a variable number of self-describing user entries (strings, integers, floats, times, raw binary blocks, attached messages, plus arrays and maps of these). Because the whole message lives in one flat allocation it can be copied verbatim into shared memory, sent over the network, or persisted to disk without any serialisation step — the in-memory layout IS the wire format. For that reason the header structs in this file must never change size or field order without bumping CURRENTDATAMESSAGEVERSION and adding a converter (see DataMessage::ConvertDataFromOlderMessageFormat()).

Note
All multi-byte fields are stored in native host byte order; nodes in a Psyclone system are assumed to share endianness (x86/ARM little-endian on Windows, Linux and macOS builds alike).

Definition in file DataMessage.h.

Macro Definition Documentation

◆ CURRENTDATAMESSAGEVERSION