25 #ifndef LIBS_ACN_BASEINFLATOR_H_
26 #define LIBS_ACN_BASEINFLATOR_H_
30 #include "libs/acn/HeaderSet.h"
31 #include "libs/acn/PDU.h"
36 class BaseInflatorTest;
49 virtual uint32_t Id()
const = 0;
54 virtual unsigned int InflatePDUBlock(
HeaderSet *headers,
56 unsigned int len) = 0;
64 friend class BaseInflatorTest;
67 explicit BaseInflator(PDU::vector_size v_size = PDU::FOUR_BYTES);
83 virtual unsigned int InflatePDUBlock(
HeaderSet *headers,
89 static const uint8_t LFLAG_MASK = 0x80;
91 static const uint8_t LENGTH_MASK = 0x0F;
94 uint32_t m_last_vector;
96 PDU::vector_size m_vector_size;
98 std::map<uint32_t, InflatorInterface*> m_proto_map;
101 virtual void ResetPDUFields();
102 virtual void ResetHeaderField() = 0;
105 bool DecodeLength(
const uint8_t *data,
106 unsigned int data_length,
107 unsigned int *pdu_length,
108 unsigned int *bytes_used)
const;
111 bool DecodeVector(uint8_t flags,
115 unsigned int *bytes_used);
118 virtual bool DecodeHeader(
HeaderSet *headers,
121 unsigned int *bytes_used) = 0;
127 unsigned int pdu_len);
130 virtual bool PostHeader(uint32_t vector,
const HeaderSet &headers);
133 virtual bool HandlePDUData(uint32_t vector,
136 unsigned int pdu_len);
140 #endif // LIBS_ACN_BASEINFLATOR_H_
Definition: BaseInflator.h:42
Definition: BaseInflator.h:63
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44