14#if !defined(_MEMORYREQUESTQUEUES_H_)
15#define _MEMORYREQUESTQUEUES_H_
24#define MEMORYREQUEST_ERROR 0
25#define MEMORYREQUEST_IDLE 1
26#define MEMORYREQUEST_INIT 2
27#define MEMORYREQUEST_SUBMITTED 3
28#define MEMORYREQUEST_RECEIVED 4
29#define MEMORYREQUEST_STARTED 5
30#define MEMORYREQUEST_COMPLETED 6
31#define MEMORYREQUEST_REPLIED 7
32#define MEMORYREQUEST_REPLYRECEIVED 8
33#define MEMORYREQUEST_FINISHED 9
84 static bool InitQueue(
char* data, uint32 size);
85 static bool CheckQueue(
char* data, uint32 size);
91 static uint64
AddNewRequest(
char* data, uint16 status, uint32 from, uint32 to);
93 static uint32
GetRequestStatus(
char* data, uint64
id, uint64& createdTime, uint64& lastUpdateTime);
The binary DataMessage container — the central data-exchange object of Psyclone/CMSDK.
CMSDK time: µs-resolution 64-bit timestamps and the Time Mapping Constant (TMC).
The central Psyclone data container: a self-contained binary message with typed, named user entries.
Static helpers for request queues and the request-status map (raw shared memory).
static bool InitRequestMap(char *data, uint32 count)
Initialise a status map for count requests.
static uint64 AddNewRequest(char *data, uint16 status, uint32 from, uint32 to)
Allocate a request slot.
static DataMessage * GetNextQueueMessage(char *data)
Pop the next message.
static bool AddToQueue(char *data, DataMessage *msg)
Append a copy of msg (caller keeps ownership).
static bool CloseRequest(char *data, uint64 id)
Release the request slot.
static bool SetRequestStatus(char *data, uint64 id, uint16 status)
Advance a request's MEMORYREQUEST_* status.
static uint32 GetRequestStatus(char *data, uint64 id, uint64 &createdTime, uint64 &lastUpdateTime)
static bool CheckQueue(char *data, uint32 size)
Validate an existing queue region.
static bool CheckRequestMap(char *data, uint32 count)
Validate an existing status map.
static bool InitQueue(char *data, uint32 size)
Initialise a queue region of size bytes.
One request transaction's status record.