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

Complete static setup for one component, as parsed from the system specification. More...

#include <Subscriptions.h>

Public Member Functions

bool reset ()
 Zero the struct and stamp size/cid.

Public Attributes

uint32 size
 Total struct size in bytes.
uint32 cid
 Object id, COMPONENTSETUPDATA when valid.
uint32 componentID
 Unique component id.
uint16 spaceID
 Id of the PsySpace the component runs in.
uint32 tag
 Default tag for the component.
uint8 type
 Component kind, one of the COMP_... defines.
char name [MAXKEYNAMELEN+1]
 Component name.
char logfile [MAXKEYNAMELEN+1]
 Log file name/path.
uint8 verbose
 Verbosity level.
uint8 debug
 Debug level.
uint8 migration
 Migration policy, COMP_MIGRATE_NO or COMP_MIGRATE_ALLOW.
uint8 priority
 Scheduling priority of the component.
char function [MAXKEYNAMELEN+1]
 Entry function name (for library-loaded modules).
char root [MAXKEYNAMELEN+1]
 Root dir or URL for the component's data.
bool rotate
 Rotate storage/playback when limits are reached.
uint8 consoleOutput
 Console output mode.
uint8 autoRestart
 Restart the component automatically if it dies.
char subdir [MAXKEYNAMELEN+1]
 Storage sub-directory.
char extension [MAXKEYNAMELEN+1]
 File extension / filetype for stored data.
char base [MAXKEYNAMELEN+1]
 Filename base for stored data.
char keys [MAXVALUENAMELEN+1]
 Index key definitions (component-specific format).
char value [MAXVALUENAMELEN+1]
 Default value parameter.
char operation [MAXKEYNAMELEN+1]
 Default operation verb.
uint32 timeout
 Operation timeout in ms.
uint32 maxcount
 Max number of messages to retain/record (0 = unlimited).
uint64 maxsize
 Max total bytes to retain/record (0 = unlimited).
uint32 interval
 Playback interval in ms (0 = use recorded timing).
char cmdline [MAXKEYNAMELEN+1]
 Command line for external executable components.
char setup [1024 *1024]
 Raw component-specific setup XML, 1 MB max.

Detailed Description

Complete static setup for one component, as parsed from the system specification.

A single flat POD block (COMPONENTSETUPDATA) carrying everything needed to instantiate a component: identity, type, logging, migration, storage locations, record/playback limits, an external command line, and the raw setup XML (up to 1 MB) for component-specific parameters.

Warning
Binary contract shared across processes — do not change layout. Note the 1 MB setup tail makes this struct large; allocate on the heap.

Definition at line 650 of file Subscriptions.h.

Member Function Documentation

◆ reset()

bool cmlabs::ComponentSetup::reset ( )
inline

Zero the struct and stamp size/cid.

Returns
true

Definition at line 652 of file Subscriptions.h.

References cid, COMPONENTSETUPDATA, and size.

Referenced by _wrap_ComponentSetup_reset(), _wrap_ComponentSetup_reset(), and Java_com_cmlabs_cmsdk_cmsdkJNI_ComponentSetup_1reset().

Member Data Documentation

◆ autoRestart

uint8 cmlabs::ComponentSetup::autoRestart

Restart the component automatically if it dies.

Definition at line 674 of file Subscriptions.h.

◆ base

char cmlabs::ComponentSetup::base[MAXKEYNAMELEN+1]

◆ cid

uint32 cmlabs::ComponentSetup::cid

Object id, COMPONENTSETUPDATA when valid.

Definition at line 659 of file Subscriptions.h.

Referenced by reset().

◆ cmdline

char cmlabs::ComponentSetup::cmdline[MAXKEYNAMELEN+1]

Command line for external executable components.

Definition at line 691 of file Subscriptions.h.

Referenced by _wrap_ComponentSetup_cmdline_set(), _wrap_ComponentSetup_cmdline_set(), and Java_com_cmlabs_cmsdk_cmsdkJNI_ComponentSetup_1cmdline_1set().

◆ componentID

uint32 cmlabs::ComponentSetup::componentID

Unique component id.

Definition at line 660 of file Subscriptions.h.

◆ consoleOutput

uint8 cmlabs::ComponentSetup::consoleOutput

Console output mode.

Definition at line 673 of file Subscriptions.h.

◆ debug

uint8 cmlabs::ComponentSetup::debug

Debug level.

Definition at line 667 of file Subscriptions.h.

◆ extension

char cmlabs::ComponentSetup::extension[MAXKEYNAMELEN+1]

◆ function

char cmlabs::ComponentSetup::function[MAXKEYNAMELEN+1]

Entry function name (for library-loaded modules).

Definition at line 670 of file Subscriptions.h.

Referenced by _wrap_ComponentSetup_function_set(), _wrap_ComponentSetup_function_set(), and Java_com_cmlabs_cmsdk_cmsdkJNI_ComponentSetup_1function_1set().

◆ interval

uint32 cmlabs::ComponentSetup::interval

Playback interval in ms (0 = use recorded timing).

Definition at line 688 of file Subscriptions.h.

◆ keys

char cmlabs::ComponentSetup::keys[MAXVALUENAMELEN+1]

Index key definitions (component-specific format).

Definition at line 680 of file Subscriptions.h.

Referenced by _wrap_ComponentSetup_keys_set(), _wrap_ComponentSetup_keys_set(), and Java_com_cmlabs_cmsdk_cmsdkJNI_ComponentSetup_1keys_1set().

◆ logfile

char cmlabs::ComponentSetup::logfile[MAXKEYNAMELEN+1]

◆ maxcount

uint32 cmlabs::ComponentSetup::maxcount

Max number of messages to retain/record (0 = unlimited).

Definition at line 686 of file Subscriptions.h.

◆ maxsize

uint64 cmlabs::ComponentSetup::maxsize

Max total bytes to retain/record (0 = unlimited).

Definition at line 687 of file Subscriptions.h.

◆ migration

uint8 cmlabs::ComponentSetup::migration

Migration policy, COMP_MIGRATE_NO or COMP_MIGRATE_ALLOW.

Definition at line 668 of file Subscriptions.h.

◆ name

char cmlabs::ComponentSetup::name[MAXKEYNAMELEN+1]

◆ operation

char cmlabs::ComponentSetup::operation[MAXKEYNAMELEN+1]

◆ priority

uint8 cmlabs::ComponentSetup::priority

Scheduling priority of the component.

Definition at line 669 of file Subscriptions.h.

◆ root

char cmlabs::ComponentSetup::root[MAXKEYNAMELEN+1]

Root dir or URL for the component's data.

Definition at line 671 of file Subscriptions.h.

Referenced by _wrap_ComponentSetup_root_set(), _wrap_ComponentSetup_root_set(), and Java_com_cmlabs_cmsdk_cmsdkJNI_ComponentSetup_1root_1set().

◆ rotate

bool cmlabs::ComponentSetup::rotate

Rotate storage/playback when limits are reached.

Definition at line 672 of file Subscriptions.h.

◆ setup

char cmlabs::ComponentSetup::setup[1024 *1024]

Raw component-specific setup XML, 1 MB max.

Definition at line 694 of file Subscriptions.h.

Referenced by _wrap_ComponentSetup_setup_set(), _wrap_ComponentSetup_setup_set(), and Java_com_cmlabs_cmsdk_cmsdkJNI_ComponentSetup_1setup_1set().

◆ size

uint32 cmlabs::ComponentSetup::size

Total struct size in bytes.

Definition at line 658 of file Subscriptions.h.

Referenced by reset().

◆ spaceID

uint16 cmlabs::ComponentSetup::spaceID

Id of the PsySpace the component runs in.

Definition at line 661 of file Subscriptions.h.

◆ subdir

char cmlabs::ComponentSetup::subdir[MAXKEYNAMELEN+1]

◆ tag

uint32 cmlabs::ComponentSetup::tag

Default tag for the component.

Definition at line 662 of file Subscriptions.h.

◆ timeout

uint32 cmlabs::ComponentSetup::timeout

Operation timeout in ms.

Definition at line 683 of file Subscriptions.h.

◆ type

uint8 cmlabs::ComponentSetup::type

Component kind, one of the COMP_... defines.

Definition at line 663 of file Subscriptions.h.

◆ value

char cmlabs::ComponentSetup::value[MAXVALUENAMELEN+1]

◆ verbose

uint8 cmlabs::ComponentSetup::verbose

Verbosity level.

Definition at line 666 of file Subscriptions.h.


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