32 m_PacketId = ((header >> 16) & 1023);
33 m_PacketFamily = (header >> 26);
36 Packet(uint32_t header, uint32_t length, std::unique_ptr<
unsigned char[]>& data)
39 , m_Data(
std::move(data))
41 m_PacketId = ((header >> 16) & 1023);
42 m_PacketFamily = (header >> 26);
44 if (length == 0 && m_Data !=
nullptr)
51 : m_Header(other.m_Header)
52 , m_PacketFamily(other.m_PacketFamily)
53 , m_PacketId(other.m_PacketId)
54 , m_Length(other.m_Length)
55 , m_Data(
std::move(other.m_Data))
58 other.m_PacketFamily = 0;
75 const unsigned char*
GetData()
const {
return m_Data.get(); }
77 bool IsEmpty() {
return m_Header == 0 && m_Length == 0; }
81 uint32_t m_PacketFamily;
84 std::unique_ptr<unsigned char[]> m_Data;
Packet(uint32_t header, uint32_t length, std::unique_ptr< unsigned char[]> &data)
uint32_t GetPacketClass() const
Packet & operator=(const Packet &)=delete
Copyright (c) 2020 ARM Limited.
uint32_t GetPacketFamily() const
uint32_t GetPacketType() const
uint32_t GetLength() const
uint32_t GetHeader() const
uint32_t GetPacketId() const
const unsigned char * GetData() const