blob: 6d4a348ce17e74f58119cb44b370492c41078702 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/**
* @file Xpl2Protocol.h
* @brief Wire framing for the XPL2 printhead protocol.
*/
#pragma once
#include <QByteArray>
#include <QVariantList>
namespace Xpl2Protocol
{
constexpr char Terminator = '\n';
struct ParsedMessage
{
QByteArray command;
QVariantList params;
bool valid = false;
};
QByteArray buildMessage (const QByteArray &command,
const QVariantList ¶ms = {});
ParsedMessage parseMessage (const QByteArray &raw);
} // namespace Xpl2Protocol
|