6 #ifndef RTBINARYMESSAGE_H_
7 #define RTBINARYMESSAGE_H_
9 #include "ocurvesconfig.h"
11 #include "rtmessage.h"
84 QStringList
headings()
const override;
89 unsigned populateValues(std::vector<double> &values)
const override;
96 void addField(
const QString &name,
FieldType type,
bool heading =
false,
const QVariant &value = QVariant());
129 uint writeField(QDataStream &stream,
const Field &field, uint pos);
136 int readField(QDataStream &stream, Field &field, uint pos);
138 QVector<Field> _fields;
139 unsigned _messageMinSize;
141 QStringList _headings;
147 #endif // RTBINARYMESSAGE_H_
static const unsigned TypeSizes[]
Sizes for various FieldType items (bytes).
Definition: rtbinarymessage.h:63
Padding. Integer value specifies how much.
Definition: rtbinarymessage.h:46
double fieldValueD(const QString &key) const
Requests a field value by name, converting to a double.
Base message handling for real time data plot communications.
Definition: rtmessage.h:29
FieldType
Fixed field types.
Definition: rtbinarymessage.h:44
QVariant fieldValueV(const QString &key) const
Requests a field value by name, returning a QVariant.
unsigned populateValues(std::vector< double > &values) const override
Request the most up to date field values.
QStringList headings() const override
Return the list of headings.
bool littleEndian() const
Does the message write little Endian?
Definition: rtbinarymessage.h:71
Represents a binary based message for real-time data plots.
Definition: rtbinarymessage.h:40
void addField(const QString &name, FieldType type, bool heading=false, const QVariant &value=QVariant())
Registers a field.
int fieldIndex(const QString &key) const
Query the index of a field named key.
int readMessage(const QByteArray &buffer) override
Read and update values from the buffer.
Pad out to the specified amount, but lookup a field for the amount.
Definition: rtbinarymessage.h:49
RTBinaryMessage(bool littleEndian=false)
Create a binary message.
Relative padding like Padding, but lookup a field for the amount.
Definition: rtbinarymessage.h:48
void setMessage(QByteArray &buffer) override
Writes the binary message to buffer.
Pad out to the specified amount.
Definition: rtbinarymessage.h:47