13#if !defined(_MEMORYMAPS_H_)
28#define ID_COMPMAPPAGE 4
29#define ID_TYPEMAPPAGE 5
30#define ID_TOPICMAPPAGE 6
32#define ID_QUEUEMAPPAGE 7
33#define ID_PROCESSMAPPAGE 8
34#define ID_REQUESTMAPPAGE 9
35#define ID_CRANKMAPPAGE 10
36#define ID_CONTEXTMAPPAGE 11
37#define RESERVEDPAGECOUNT 12
234#define REQ_RECEIVED_LOCAL 2
235#define REQ_RECEIVED_REMOTE 3
236#define REQ_PROCESSING_LOCAL 4
237#define REQ_PROCESSING_REMOTE 5
238#define REQ_REPLY_READY 6
240#define REQ_FAILED_DATA 8
241#define REQ_FAILED_NODATA 9
242#define REQ_FAILED_DATA_EOL 10
243#define REQ_SUCCESS 11
244#define REQ_SUCCESS_DATA 12
245#define REQ_SUCCESS_NODATA 13
246#define REQ_SUCCESS_DATA_EOL 14
276 static bool GetTopicName(uint32
id,
char* name, uint32 maxSize);
277 static bool GetTopicID(
const char* name, uint32 &
id);
294 static bool CreateNewCrank(uint16
id,
const char* name,
const char* function,
const char* libraryFilename, uint64 time = 0);
295 static bool GetCrankName(uint16
id,
char* name, uint32 maxSize);
298 static bool GetCrankID(
const char* name, uint16 &
id);
299 static bool GetCrankScript(uint16
id,
char* script, uint32 maxSize);
367template <
typename T,
typename ID,
typename KEY>
Central shared-memory manager for a Psyclone node: master segment, per-subsystem shared maps and the ...
#define ID_TYPEMAPPAGE
Type map.
#define ID_CONTEXTMAPPAGE
Context map.
#define ID_PROCESSMAPPAGE
Process map.
#define ID_TOPICMAPPAGE
Topic map.
#define ID_QUEUEMAPPAGE
Queue map.
#define ID_REQUESTMAPPAGE
Request map.
#define ID_CRANKMAPPAGE
Crank map.
Template implementations of the GenericMemoryMap shared-map algorithms.
CMSDK time: µs-resolution 64-bit timestamps and the Time Mapping Constant (TMC).
#define MAXCOMMANDLINELEN
Static algorithms shared by all bitfield-indexed maps in the data-maps segment.
static uint32 GetCount(char *data)
static T * GetEntry(char *data, ID id)
static const char * GetEntryName(char *data, ID id, uint32 &size)
static T * CreateEntry(char *data, ID id, const char *name)
Reserve entry id.
static ID GetEntryID(char *data, const char *name)
static bool DeleteEntry(char *data, ID id)
Free the entry.
static uint64 GetEntryTime(char *data, ID id)
Legacy static facade over the page-based shared maps (types, contexts, topics, cranks).
static bool GetCrankID(const char *name, uint16 &id)
static bool CreateNewTypeLevel(uint16 id, const char *name, uint64 time=0)
static bool GetCrankScript(uint16 id, char *script, uint32 maxSize)
static uint64 GetCrankCreateTime(uint16 id)
static bool CreateNewTopic(uint8 id, const char *name)
static bool DeleteTopic(const char *name)
static uint64 GetTypeLevelCreateTime(uint16 id)
static bool GetTypeLevelID(const char *name, uint16 &id)
static bool GetTopicName(uint32 id, char *name, uint32 maxSize)
static bool CreateNewContextLevel(uint16 id, const char *name, uint64 time=0)
static bool GetCrankFunction(uint16 id, char *function, uint32 maxSize)
static bool DeleteTypeLevel(const char *name)
static bool GetContextLevelID(const char *name, uint16 &id)
static bool GetContextLevelName(uint16 id, char *name, uint32 maxSize)
static bool DeleteCrank(uint16 id)
static bool GetTopicID(const char *name, uint32 &id)
static bool GetCrankLibraryFilename(uint16 id, char *libraryFilename, uint32 maxSize)
static uint64 GetContextLevelCreateTime(uint16 id)
static bool SetCrankScript(uint16 id, const char *script)
static bool DeleteContextLevel(const char *name)
static bool GetTypeLevelName(uint16 id, char *name, uint32 maxSize)
static uint64 GetTopicCreateTime(uint32 id)
static bool GetCrankName(uint16 id, char *name, uint32 maxSize)
static bool CreateNewCrank(uint16 id, const char *name, const char *function, const char *libraryFilename, uint64 time=0)
uint16 TypePageID(TypeMapEntry *e)
Context-map entry: one registered psychological/system context name/id.
char name[MAXKEYNAMELEN+1]
Crank-map entry: one registered crank (user callback/script) with its function, library and inline sc...
char name[MAXKEYNAMELEN+1]
char function[MAXKEYNAMELEN+1]
char script[MAXSCRIPTLEN+1]
char libraryFilename[MAXKEYNAMELEN+1]
Legacy process-map entry with the ids of the process's five queues.
char commandline[MAXCOMMANDLINELEN+1]
char name[MAXKEYNAMELEN+1]
char name[MAXKEYNAMELEN+1]
Request-map entry tracking one cross-component request/reply transaction.
uint8 status
REQ_* lifecycle status.
uint64 time
Creation timestamp (µs).
char name[MAXKEYNAMELEN+1]
Internal use only, for named events.
uint32 id
Request id; corresponds to the index in the map.
uint64 dataMessageEOL
End-of-life of the reply message; after this the payload is gone (REQ_*_DATA_EOL).
uint64 dataMessageID
TemporalMemory id of the reply DataMessage (0 = none yet).
uint32 to
Id of the component processing the request.
uint32 from
Id of the component making the request.
char name[MAXKEYNAMELEN+1]
Type-map entry: one registered message type name/id.
char name[MAXKEYNAMELEN+1]