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) | |
| void | setDuration(ulong value) |
| ulong | getDurationAsInt() const |
| virtual bool | toBytes(ByteVector & output) const override Serialize the data to a byte array. |
| virtual size_t | approxMemorySize() const override Approximate in-memory footprint of this item, in bytes. |
| ControlCommand | fromMemory(const void * memory, size_t size) |
Public Attributes
| Name | |
|---|---|
| ControlCommandKind | kind |
| milliseconds_t | duration The command type. |
| std::string | command Duration of the command before resetting to the previous state (zero for infinite) |
Additional inherited members
Public Types inherited from Syntalos::BaseDataType
| Name | |
|---|---|
| enum | TypeId { Unknown, ControlCommand, TableRow, Frame, LineCommand, LineReading, SignalBlockI32, SignalBlockU16, SignalBlockF32, Last} The TypeId enum. |
Public Functions inherited from Syntalos::BaseDataType
| Name | |
|---|---|
| virtual | ~BaseDataType() =default |
| virtual TypeId | typeId() const =0 |
| virtual ssize_t | memorySize() const Calculate the size of the data in memory. |
| virtual bool | writeToMemory(void * memory, ssize_t size =-1) const Write the data to a memory block. |
| bool | typeIdIsValid(int value) |
| std::string | typeIdToString(int value) |
| std::string | typeIdToString(TypeId value) |
| TypeId | typeIdFromString(const std::string & str) |
Protected Functions inherited from Syntalos::BaseDataType
| Name | |
|---|---|
| BaseDataType() =default | |
| BaseDataType(const BaseDataType & ) =default | |
| BaseDataType & | operator=(const BaseDataType & ) =default |
| BaseDataType(BaseDataType && ) =default | |
| BaseDataType & | operator=(BaseDataType && ) =default |
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() constfunction toBytes
inline virtual bool toBytes(
ByteVector & output
) const overrideSerialize the data to a byte array.
Reimplements: Syntalos::BaseDataType::toBytes
Serialize the data to a byte array for local transmission.
function approxMemorySize
inline virtual size_t approxMemorySize() const overrideApproximate in-memory footprint of this item, in bytes.
Reimplements: Syntalos::BaseDataType::approxMemorySize
Used purely for monitoring (e.g. estimating connection backlog memory pressure). Unlike memorySize() this is only an estimate and carries no allocation contract. Defaults to memorySize() when a type reports an exact size, otherwise returns a very small size.
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-06-22 at 03:54:46 +0000