blob: b5773e73b58988939d272095be2be598e4fcc562 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#include "commands.h"
#include <QIODevice>
namespace Commands
{
void write(QIODevice *device, int commandId, flatbuffers::FlatBufferBuilder &fbb)
{
const int dataSize = fbb.GetSize();
device->write((const char*)&commandId, sizeof(int));
device->write((const char*)&dataSize, sizeof(int));
device->write((const char*)fbb.GetBufferPointer(), dataSize);
}
}
|