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

Specification of a <triggergroup> declarative join (T1.6). More...

#include <Subscriptions.h>

Public Member Functions

bool reset (uint32 s=0)
 Zero the header and stamp size/cid.
GroupMemberSpecgetMemberSpec (uint32 n)
GroupMemberSpecgetMemberSpec (const char *name)

Public Attributes

uint32 size
 Total block size in bytes including the member tail.
uint32 cid
 Object id, TRIGGERGROUPDATA when valid.
uint32 id
 Unique id of this group (also used as the group tag key).
uint32 componentID
 Id of the component owning the group.
uint16 crankID
 Crank to run when the group fires.
char name [MAXKEYNAMELEN+1]
 Group name (unique within the module).
uint32 maxage
 REQUIRED.
uint32 count
 Completion count: 0 = all (TRIGGERGROUP_COUNT_ALL), else any-N.
uint32 minCount
 min= : fire at N then re-fire as more of the tag-set arrive (0 = unset).
uint32 within
 within= : max spread of member POST times, ms (0 = unset).
uint32 timeWindow
 time= : max spread of member CONTENT times, ms (see hasTimeWindow).
uint32 debounce
 debounce= : fire at most once per N ms with the latest set (0 = unset).
uint32 timeout
 timeout= : incomplete-set expiry in ms (0 = unset, falls back to maxage).
uint8 hasTimeWindow
 1 = time= was specified (so timeWindow==0 means "identical content time").
uint8 mode
 TriggerGroupMode (normal/snapshot).
uint8 slide
 1 = sliding-window correlation: re-emit on each member update in-window.
uint8 dup
 TriggerGroupDup (latest/keep).
uint8 order
 TriggerGroupOrder (none/strict).
uint8 ontimeout
 TriggerGroupOnTimeout (fire/discard).
uint16 memberCount
 Number of GroupMemberSpecs in the tail.

Detailed Description

Specification of a <triggergroup> declarative join (T1.6).

Packed, size-prefixed struct. Member GroupMemberSpecs live in the tail after sizeof(TriggerGroupSpec), reached by byte-offset via getMemberSpec(). Synced across processes/nodes via shared memory / CMSDK networking — do NOT add heap pointers or std:: containers to the on-wire layout.

Definition at line 594 of file Subscriptions.h.

Member Function Documentation

◆ getMemberSpec() [1/2]

GroupMemberSpec * cmlabs::TriggerGroupSpec::getMemberSpec ( const char * name)
inline
Parameters
namemember name.
Returns
the GroupMemberSpec with this name, or NULL.

Definition at line 608 of file Subscriptions.h.

References getMemberSpec(), memberCount, cmlabs::GroupMemberSpec::name, name, and stricmp.

◆ getMemberSpec() [2/2]

GroupMemberSpec * cmlabs::TriggerGroupSpec::getMemberSpec ( uint32 n)
inline
Parameters
nmember index.
Returns
pointer to the n'th GroupMemberSpec in the tail, or NULL if out of range.

Definition at line 603 of file Subscriptions.h.

References memberCount.

Referenced by getMemberSpec().

◆ reset()

bool cmlabs::TriggerGroupSpec::reset ( uint32 s = 0)
inline

Zero the header and stamp size/cid.

Parameters
stotal block size (0 = just sizeof).
Returns
true

Definition at line 596 of file Subscriptions.h.

References cid, size, and TRIGGERGROUPDATA.

Member Data Documentation

◆ cid

uint32 cmlabs::TriggerGroupSpec::cid

Object id, TRIGGERGROUPDATA when valid.

Definition at line 617 of file Subscriptions.h.

Referenced by reset().

◆ componentID

uint32 cmlabs::TriggerGroupSpec::componentID

Id of the component owning the group.

Definition at line 619 of file Subscriptions.h.

◆ count

uint32 cmlabs::TriggerGroupSpec::count

Completion count: 0 = all (TRIGGERGROUP_COUNT_ALL), else any-N.

Definition at line 624 of file Subscriptions.h.

◆ crankID

uint16 cmlabs::TriggerGroupSpec::crankID

Crank to run when the group fires.

Definition at line 620 of file Subscriptions.h.

◆ debounce

uint32 cmlabs::TriggerGroupSpec::debounce

debounce= : fire at most once per N ms with the latest set (0 = unset).

Definition at line 628 of file Subscriptions.h.

◆ dup

uint8 cmlabs::TriggerGroupSpec::dup

TriggerGroupDup (latest/keep).

Definition at line 633 of file Subscriptions.h.

◆ hasTimeWindow

uint8 cmlabs::TriggerGroupSpec::hasTimeWindow

1 = time= was specified (so timeWindow==0 means "identical content time").

Definition at line 630 of file Subscriptions.h.

◆ id

uint32 cmlabs::TriggerGroupSpec::id

Unique id of this group (also used as the group tag key).

Definition at line 618 of file Subscriptions.h.

◆ maxage

uint32 cmlabs::TriggerGroupSpec::maxage

REQUIRED.

Whole partial set evicted if older than this (ms).

Definition at line 623 of file Subscriptions.h.

◆ memberCount

uint16 cmlabs::TriggerGroupSpec::memberCount

Number of GroupMemberSpecs in the tail.

Definition at line 636 of file Subscriptions.h.

Referenced by getMemberSpec(), and getMemberSpec().

◆ minCount

uint32 cmlabs::TriggerGroupSpec::minCount

min= : fire at N then re-fire as more of the tag-set arrive (0 = unset).

Definition at line 625 of file Subscriptions.h.

◆ mode

uint8 cmlabs::TriggerGroupSpec::mode

TriggerGroupMode (normal/snapshot).

Definition at line 631 of file Subscriptions.h.

◆ name

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

Group name (unique within the module).

Definition at line 621 of file Subscriptions.h.

Referenced by getMemberSpec().

◆ ontimeout

uint8 cmlabs::TriggerGroupSpec::ontimeout

TriggerGroupOnTimeout (fire/discard).

Definition at line 635 of file Subscriptions.h.

◆ order

uint8 cmlabs::TriggerGroupSpec::order

TriggerGroupOrder (none/strict).

Definition at line 634 of file Subscriptions.h.

◆ size

uint32 cmlabs::TriggerGroupSpec::size

Total block size in bytes including the member tail.

Definition at line 616 of file Subscriptions.h.

Referenced by reset().

◆ slide

uint8 cmlabs::TriggerGroupSpec::slide

1 = sliding-window correlation: re-emit on each member update in-window.

Definition at line 632 of file Subscriptions.h.

◆ timeout

uint32 cmlabs::TriggerGroupSpec::timeout

timeout= : incomplete-set expiry in ms (0 = unset, falls back to maxage).

Definition at line 629 of file Subscriptions.h.

◆ timeWindow

uint32 cmlabs::TriggerGroupSpec::timeWindow

time= : max spread of member CONTENT times, ms (see hasTimeWindow).

Definition at line 627 of file Subscriptions.h.

◆ within

uint32 cmlabs::TriggerGroupSpec::within

within= : max spread of member POST times, ms (0 = unset).

Definition at line 626 of file Subscriptions.h.


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