This repository has been archived on 2019-06-21. You can view files and clone it, but cannot push or open issues or pull requests.
2017-03-01 21:44:31 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-03-02 13:07:58 +00:00
|
|
|
#include <Arduino.h>
|
|
|
|
|
|
|
|
|
2017-03-01 21:44:31 +00:00
|
|
|
struct PixelMessage
|
|
|
|
{
|
|
|
|
public:
|
2017-03-02 18:49:20 +00:00
|
|
|
PixelMessage();
|
|
|
|
PixelMessage(byte* rawMessage);
|
|
|
|
~PixelMessage();
|
2017-03-01 21:44:31 +00:00
|
|
|
|
2017-03-02 18:49:20 +00:00
|
|
|
/// <summary>
|
|
|
|
/// The length of the message header, in bytes.
|
|
|
|
/// The message header contains things like the protocol version, the payload length, and the message type.
|
|
|
|
/// </summary>
|
|
|
|
static const unsigned int MESSAGE_HEADER_LENGTH = 12;
|
2017-03-02 13:07:58 +00:00
|
|
|
|
2017-03-02 18:49:20 +00:00
|
|
|
// The protocol version associated with this message.
|
|
|
|
unsigned short ProtocolVersion = 1;
|
|
|
|
unsigned short MessageType = 1;
|
|
|
|
unsigned int MessageId = 0;
|
|
|
|
unsigned int MessageLength = 0;
|
|
|
|
|
|
|
|
//const byte* Payload;
|
|
|
|
|
2017-03-01 21:44:31 +00:00
|
|
|
private:
|
2017-03-02 18:49:20 +00:00
|
|
|
|
2017-03-02 13:07:58 +00:00
|
|
|
};
|