FirmataControl

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 QByteArraytoBytes() const override
Serialize the data to a byte array.
FirmataControlfromMemory(const void * memory, size_t size)

Public Attributes

Name
FirmataCommandKindcommand
uint8_tpinId
QStringpinName
boolisOutput
boolisPullUp
uint16_tvalue

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.

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