ControlCommand

ControlCommand

ControlCommand

Helper function to get the type ID of a data type. More…

#include <datatypes.h>

Inherits from BaseDataType

Public Functions

Name
ControlCommand()
Custom command name, if in custom mode.
ControlCommand(ControlCommandKind ckind)
voidsetDuration(ulong value)
ulonggetDurationAsInt() const
virtual QByteArraytoBytes() 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.
QStringcommand
Duration of the command before resetting to the previous state (zero for infinite)

Additional inherited members

Public Types inherited from BaseDataType

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

Public Functions inherited from BaseDataType

Name
QStringtypeIdToString(TypeId value)
QStringtypeIdToString(int value)
TypeIdtypeIdFromString(const QString & str)
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.

Detailed Description

template <typename T >
struct ControlCommand;

Helper function to get the type ID of a data type.

Convenience function to deserialize a data type from memory

The ControlCommandKind enum

Basic operations to control a module from another module.

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 QByteArray toBytes() const override

Serialize the data to a byte array.

Reimplements: 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

QString command;

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


Updated on 2024-11-06 at 17:10:29 +0000