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) | |
void | setDuration(ulong value) |
ulong | getDurationAsInt() const |
virtual QByteArray | toBytes() const override Serialize the data to a byte array. |
ControlCommand | fromMemory(const void * memory, size_t size) |
Public Attributes
Name | |
---|---|
ControlCommandKind | kind |
milliseconds_t | duration The command type. |
QString | command Duration of the command before resetting to the previous state (zero for infinite) |
Additional inherited members
Public Types inherited from BaseDataType
Name | |
---|---|
enum | TypeId { Unknown, ControlCommand, TableRow, Frame, FirmataControl, FirmataData, IntSignalBlock, FloatSignalBlock, Last} The TypeId enum. |
Public Functions inherited from BaseDataType
Name | |
---|---|
QString | typeIdToString(TypeId value) |
QString | typeIdToString(int value) |
TypeId | typeIdFromString(const QString & str) |
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. |
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