CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
Loading...
Searching...
No Matches
cmlabs::ReplayIndexEntry Struct Reference

Fixed-size on-disk index record describing one recorded message. More...

#include <MessagePlayer.h>

Collaboration diagram for cmlabs::ReplayIndexEntry:
[legend]

Public Member Functions

bool reset ()
 Zero the entry and stamp it with DATAMESSAGEINFOID.
bool isValid ()

Public Attributes

uint32 cid
 Object id, DATAMESSAGEINFOID when valid.
uint64 serial
 Sequence number of the message within the recording.
uint64 msgTime
 Original message time in microseconds (drives replay timing).
uint32 size
 Binary size of the recorded message block in bytes.
char msgTriggerName [128]
 Name of the trigger that produced the message.
DataMessagemsg
 In-memory pointer to the loaded message; not valid on disk.

Detailed Description

Fixed-size on-disk index record describing one recorded message.

The index file is an array of these entries, memory-mapped/loaded verbatim, so the layout is a binary contract with existing recordings.

Note
PLATFORM DIFFERENCE: on 32-bit builds (ARCH_32) a dummy pointer pads the struct so that its size matches the 64-bit layout, keeping recordings interchangeable between 32- and 64-bit builds. The msg pointer is only meaningful in memory, never on disk.

Definition at line 30 of file MessagePlayer.h.

Member Function Documentation

◆ isValid()

bool cmlabs::ReplayIndexEntry::isValid ( )
inline
Returns
true if the entry carries the expected object id.

Definition at line 47 of file MessagePlayer.h.

References cid, and DATAMESSAGEINFOID.

Referenced by _wrap_ReplayIndexEntry_isValid(), _wrap_ReplayIndexEntry_isValid(), cmlabs::MessagePlayer::initRead(), and Java_com_cmlabs_cmsdk_cmsdkJNI_ReplayIndexEntry_1isValid().

◆ reset()

bool cmlabs::ReplayIndexEntry::reset ( )
inline

Member Data Documentation

◆ cid

uint32 cmlabs::ReplayIndexEntry::cid

Object id, DATAMESSAGEINFOID when valid.

Definition at line 31 of file MessagePlayer.h.

Referenced by isValid(), and reset().

◆ msg

DataMessage* cmlabs::ReplayIndexEntry::msg

In-memory pointer to the loaded message; not valid on disk.

Definition at line 36 of file MessagePlayer.h.

Referenced by cmlabs::MessagePlayer::addMessage().

◆ msgTime

uint64 cmlabs::ReplayIndexEntry::msgTime

Original message time in microseconds (drives replay timing).

Definition at line 33 of file MessagePlayer.h.

Referenced by cmlabs::MessagePlayer::addMessage(), cmlabs::MessagePlayer::printAllString(), and cmlabs::MessagePlayer::waitForNextMessage().

◆ msgTriggerName

◆ serial

uint64 cmlabs::ReplayIndexEntry::serial

◆ size

uint32 cmlabs::ReplayIndexEntry::size

The documentation for this struct was generated from the following file: