FirmataControl
FirmataControl
Commands to control Firmata output.
#include <datatypes.h>
Inherits from BaseDataType
Public Functions
Name | |
---|---|
FirmataControl() | |
FirmataControl(FirmataCommandKind cmd) | |
FirmataControl(FirmataCommandKind kind, int pinId, QString name =QString()) | |
FirmataControl(FirmataCommandKind kind, QString name) | |
virtual QByteArray | toBytes() const override Serialize the data to a byte array. |
FirmataControl | fromMemory(const void * memory, size_t size) |
Public Attributes
Name | |
---|---|
FirmataCommandKind | command |
uint8_t | pinId |
QString | pinName |
bool | isOutput |
bool | isPullUp |
uint16_t | value |
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. |
Public Functions Documentation
function FirmataControl
inline explicit FirmataControl()
function FirmataControl
inline explicit FirmataControl(
FirmataCommandKind cmd
)
function FirmataControl
inline FirmataControl(
FirmataCommandKind kind,
int pinId,
QString name =QString()
)
function FirmataControl
inline FirmataControl(
FirmataCommandKind kind,
QString name
)
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 FirmataControl fromMemory(
const void * memory,
size_t size
)
Public Attributes Documentation
variable command
FirmataCommandKind command;
variable pinId
uint8_t pinId {0};
variable pinName
QString pinName;
variable isOutput
bool isOutput {false};
variable isPullUp
bool isPullUp {false};
variable value
uint16_t value;
Updated on 2024-11-06 at 17:10:29 +0000