I am beginning to question the need for a marshaller.
[aesalon.git] / include / comm / Packet.h
blob344debd324792433271b9bdb2a0d4c9a2158e4cb
1 /** Aesalon, a tool to visualize program behaviour in real time.
2 Copyright (C) 2009-2011, Aesalon development team.
4 Aesalon is distributed under the terms of the GNU GPLv3. See
5 the included file LICENSE for more information.
7 @file include/comm/Packet.h
8 */
10 #ifndef AesalonComm_Packet_H
11 #define AesalonComm_Packet_H
13 #include "PacketHeader.h"
15 namespace Comm {
17 class Packet {
18 private:
19 PacketHeader m_header;
20 uint8_t *m_data;
21 public:
22 Packet(PacketHeader header, uint8_t *data)
23 : m_header(header), m_data(data) {}
25 const PacketHeader &header() const { return m_header; }
26 void setDataSize(uint32_t newSize) { m_header.dataSize = newSize; }
27 uint8_t *data() const { return m_data; }
30 } // namespace Comm
32 #endif