13#if !defined(_COMPONENTDATA_H_)
14#define _COMPONENTDATA_H_
22#define PARAM_INTEGER 2
24#define PARAM_STRING_COLL 4
25#define PARAM_INTEGER_COLL 5
26#define PARAM_FLOAT_COLL 6
27#define PARAM_TYPE_COLL 3
159 static bool AddExistingComponent(uint32 cid, uint16 nodeID, uint16 procID,
char* oldData, uint32 dataSize);
167 bool resize(uint32 increase);
171 bool setPrivateData(
const char* name,
const char* data, uint32 size);
175 bool replacePrivateData(
const char* name,
const char* data, uint32 size, uint32 offset);
179 bool createParameter(
const char* name,
const char* val,
const char* defaultValue = NULL);
180 bool createParameter(
const char* name,
const char* val, uint32 count, uint32 defaultIndex);
181 bool createParameter(
const char* name, std::vector<std::string> values,
const char* defaultValue = NULL);
182 bool createParameter(
const char* name, int64* val, uint32 count, uint32 defaultIndex);
183 bool createParameter(
const char* name, std::vector<std::string> values, int64 defaultValue = 0);
184 bool createParameter(
const char* name, float64* val, uint32 count, uint32 defaultIndex);
185 bool createParameter(
const char* name, std::vector<std::string> values, float64 defaultValue = 0);
186 bool createParameter(
const char* name, int64 val, int64 min = 0, int64 max = 0, int64 interval = 0);
187 bool createParameter(
const char* name, float64 val, float64 min = 0, float64 max = 0, float64 interval = 0);
194 bool getParameter(
const char* name,
char* val, uint32 maxSize);
207 static bool UnlockComponentMap();
209 static bool InsertComponentPageID(uint32 cid, uint32 pageID, uint16 nodeID, uint16 procID,
const char* name);
210 static bool GetComponentPageID(uint32 cid, uint32& pageID);
211 static bool GetNextAvailableComponentID(uint32& cid);
212 static bool FreeComponentID(uint32 cid);
214 char* makeRoomForPrivateData(uint32 newSize);
215 char* makeRoomForParameter(uint32 newSize);
The binary DataMessage container — the central data-exchange object of Psyclone/CMSDK.
Central shared-memory manager for a Psyclone node: master segment, per-subsystem shared maps and the ...
static bool AddComponentStats(uint32 cid, uint64 userCPU, uint64 kernelCPU, DataMessage *inputMsg, DataMessage *outputMsg, uint32 runCount)
static bool SetComponentStats(uint32 cid, ComponentStats &stats)
static uint16 GetComponentNodeID(uint32 cid)
static ComponentData * CreateComponent(uint32 id, const char *name, uint32 size, uint16 nodeID, uint16 procID)
static bool IsComponentLocal(uint32 cid)
bool hasParameter(const char *name)
static bool UpdateRemoteComponent(uint32 cid, uint16 nodeID, uint16 procID, const char *name)
ComponentData(char *data)
Wrap an existing raw component record.
bool tweakParameter(const char *name, int32 tweak)
static uint16 GetComponentProcessID(uint32 cid)
static bool GetComponentID(const char *name, uint32 &cid)
static bool ReserveComponentID(uint32 id, const char *name)
bool createParameter(const char *name, const char *val, const char *defaultValue=NULL)
static bool IsComponentLocal(const char *name)
static bool GetComponentName(uint32 cid, char *name, uint32 maxNameLen)
bool getPrivateDataCopy(const char *name, char *data, uint32 maxSize)
uint32 getParameterValueSize(const char *name)
static bool RecordRemoteComponent(uint32 id, const char *name, uint16 nodeID, uint64 time)
bool setPrivateData(const char *name, const char *data, uint32 size)
static bool AddExistingComponent(uint32 cid, uint16 nodeID, uint16 procID, char *oldData, uint32 dataSize)
static ComponentStats GetComponentStats(uint32 cid)
bool deleteParameter(const char *name)
bool replacePrivateData(const char *name, const char *data, uint32 size)
uint32 getAvailableDataSize()
bool deletePrivateData(const char *name)
static char * GetAndRemoveComponent(uint32 cid, uint32 &dataSize)
static bool DestroyComponent(uint32 cid)
bool resetParameter(const char *name)
bool getParameter(const char *name, char *val, uint32 maxSize)
static bool UnitTest()
Self-test.
bool resize(uint32 increase)
uint8 getParameterDataType(const char *name)
static ComponentData * GetComponentData(uint32 cid)
bool setParameter(const char *name, const char *val)
uint32 getPrivateDataSize(const char *name)
The central Psyclone data container: a self-contained binary message with typed, named user entries.
Fixed header of a legacy component data record; followed by parameter and private-data areas.
One component's location record in the legacy component map.
char name[MAXKEYNAMELEN+1]
Legacy per-component throughput counters (DataMessageHeader-based rings).
uint64 msgInBytes
Total bytes received.
uint64 msgInCount
Total messages received.
uint64 time
Timestamp of the last update (µs).
uint64 runCount
Total runs.
uint64 msgOutBytes
Total bytes posted.
DataMessageHeader recentInMsg[10]
DataMessageHeader recentOutMsg[10]
uint64 msgOutCount
Total messages posted.
Legacy value block of a collection parameter; followed by the packed values.
Legacy value block of a float parameter.
Legacy size/type prefix of one parameter entry.
Legacy value block of an integer parameter.