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

One scripted post/signal action for the message-script player (Internal_MessageScript). More...

#include <PsyInternal.h>

Collaboration diagram for cmlabs::TrackPlayerMessage:
[legend]

Public Types

enum  PostType { MESSAGE , SIGNAL }
enum  TriggerType { TRIGGER , TIME , NONE }

Public Member Functions

bool addEntry (const char *key, const char *value, const char *keytype=NULL)
 Add an entry to the message.

Public Attributes

enum cmlabs::TrackPlayerMessage::PostType postType
 Send as a posted message or as a signal.
enum cmlabs::TrackPlayerMessage::TriggerType triggerType
 What causes the send: incoming trigger, timer, or nothing.
std::string postName
 Post/signal name to use.
uint32 delayMS
 Delay in ms before sending (after the trigger).
uint64 nextTime
 Next scheduled send time (PsyTime µs), maintained by the player.
uint32 timeMS
 Time offset in ms for time-triggered sends.
uint32 intervalMS
 Repeat interval in ms; 0 for one-shot.
std::map< std::string, TrackPlayerMessageEntryentryMap
 Entries copied into each generated message.

Detailed Description

One scripted post/signal action for the message-script player (Internal_MessageScript).

Describes what to send (post or signal, by name, with entries) and when (immediately on trigger, after a delay, or repeatedly on a timed interval).

Definition at line 31 of file PsyInternal.h.

Member Enumeration Documentation

◆ PostType

Enumerator
MESSAGE 
SIGNAL 

Definition at line 32 of file PsyInternal.h.

◆ TriggerType

Enumerator
TRIGGER 
TIME 
NONE 

Definition at line 33 of file PsyInternal.h.

Member Function Documentation

◆ addEntry()

bool cmlabs::TrackPlayerMessage::addEntry ( const char * key,
const char * value,
const char * keytype = NULL )

Add an entry to the message.

Parameters
keyEntry key.
valueEntry value (text form).
keytypeOptional type name ("text", "int", "float"); NULL defaults to text.
Returns
true if added.

Definition at line 481 of file PsyInternal.cpp.

References entryMap, cmlabs::TrackPlayerMessageEntry::entryType, cmlabs::TrackPlayerMessageEntry::FLOAT, cmlabs::TrackPlayerMessageEntry::INT, cmlabs::TrackPlayerMessageEntry::key, stricmp, cmlabs::TrackPlayerMessageEntry::TEXT, and cmlabs::TrackPlayerMessageEntry::value.

Referenced by cmlabs::Internal_MessageScript().

Member Data Documentation

◆ delayMS

uint32 cmlabs::TrackPlayerMessage::delayMS

Delay in ms before sending (after the trigger).

Definition at line 35 of file PsyInternal.h.

Referenced by cmlabs::Internal_MessageScript().

◆ entryMap

std::map<std::string, TrackPlayerMessageEntry> cmlabs::TrackPlayerMessage::entryMap

Entries copied into each generated message.

Definition at line 39 of file PsyInternal.h.

Referenced by addEntry(), and cmlabs::Internal_MessageScript().

◆ intervalMS

uint32 cmlabs::TrackPlayerMessage::intervalMS

Repeat interval in ms; 0 for one-shot.

Definition at line 38 of file PsyInternal.h.

Referenced by cmlabs::Internal_MessageScript().

◆ nextTime

uint64 cmlabs::TrackPlayerMessage::nextTime

Next scheduled send time (PsyTime µs), maintained by the player.

Definition at line 36 of file PsyInternal.h.

Referenced by cmlabs::Internal_MessageScript().

◆ postName

std::string cmlabs::TrackPlayerMessage::postName

Post/signal name to use.

Definition at line 34 of file PsyInternal.h.

Referenced by cmlabs::Internal_MessageScript().

◆ postType

enum cmlabs::TrackPlayerMessage::PostType cmlabs::TrackPlayerMessage::postType

Send as a posted message or as a signal.

Referenced by cmlabs::Internal_MessageScript().

◆ timeMS

uint32 cmlabs::TrackPlayerMessage::timeMS

Time offset in ms for time-triggered sends.

Definition at line 37 of file PsyInternal.h.

Referenced by cmlabs::Internal_MessageScript().

◆ triggerType

enum cmlabs::TrackPlayerMessage::TriggerType cmlabs::TrackPlayerMessage::triggerType

What causes the send: incoming trigger, timer, or nothing.

Referenced by cmlabs::Internal_MessageScript().


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