Syntalos::ControlCommand

Syntalos::ControlCommand

Syntalos::ControlCommand

A control command to a module. More…

#include <datatypes.h>

Inherits from Syntalos::BaseDataType

Public Functions

Name
ControlCommand()
Custom command name, if in custom mode.
ControlCommand(ControlCommandKind ckind)
voidsetDuration(ulong value)
ulonggetDurationAsInt() const
virtual booltoBytes(ByteVector & output) const override
Serialize the data to a byte array.
ControlCommandfromMemory(const void * memory, size_t size)

Public Attributes

Name
ControlCommandKindkind
milliseconds_tduration
The command type.
std::stringcommand
Duration of the command before resetting to the previous state (zero for infinite)

Additional inherited members

Public Types inherited from Syntalos::BaseDataType

Name
enumTypeId { Unknown, ControlCommand, TableRow, Frame, FirmataControl, FirmataData, IntSignalBlock, FloatSignalBlock, Last}
The TypeId enum.

Public Functions inherited from Syntalos::BaseDataType

Name
virtual~BaseDataType() =default
virtual TypeIdtypeId() const =0
virtual ssize_tmemorySize() const
Calculate the size of the data in memory.
virtual boolwriteToMemory(void * memory, ssize_t size =-1) const
Write the data to a memory block.
std::stringtypeIdToString(int value)
std::stringtypeIdToString(TypeId value)
TypeIdtypeIdFromString(const std::string & str)

Detailed Description

struct Syntalos::ControlCommand;

A control command to a module.

Generic data type to stream commands to other modules.

Public Functions Documentation

function ControlCommand

inline explicit ControlCommand()

Custom command name, if in custom mode.

function ControlCommand

inline explicit ControlCommand(
    ControlCommandKind ckind
)

function setDuration

inline void setDuration(
    ulong value
)

function getDurationAsInt

inline ulong getDurationAsInt() const

function toBytes

inline virtual bool toBytes(
    ByteVector & output
) const override

Serialize the data to a byte array.

Reimplements: Syntalos::BaseDataType::toBytes

Serialize the data to a byte array for local transmission.

function fromMemory

static inline ControlCommand fromMemory(
    const void * memory,
    size_t size
)

Public Attributes Documentation

variable kind

ControlCommandKind kind {ControlCommandKind::UNKNOWN};

variable duration

milliseconds_t duration;

The command type.

variable command

std::string command;

Duration of the command before resetting to the previous state (zero for infinite)


Updated on 2026-03-16 at 19:16:01 +0000