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;
50 virtual uint32_t
Id()
const = 0;
57 unsigned int len) = 0;
65 friend class BaseInflatorTest;
68 explicit BaseInflator(PDU::vector_size v_size = PDU::FOUR_BYTES);
91 static const uint8_t LFLAG_MASK = 0x80;
93 static const uint8_t LENGTH_MASK = 0x0F;
96 uint32_t m_last_vector;
98 PDU::vector_size m_vector_size;
100 std::map<uint32_t, InflatorInterface*> m_proto_map;
103 virtual void ResetPDUFields();
104 virtual void ResetHeaderField() = 0;
107 bool DecodeLength(
const uint8_t *data,
108 unsigned int data_length,
109 unsigned int *pdu_length,
110 unsigned int *bytes_used)
const;
113 bool DecodeVector(uint8_t flags,
117 unsigned int *bytes_used);
120 virtual bool DecodeHeader(
HeaderSet *headers,
123 unsigned int *bytes_used) = 0;
129 unsigned int pdu_len);
132 virtual bool PostHeader(uint32_t vector,
const HeaderSet &headers);
135 virtual bool HandlePDUData(uint32_t vector,
138 unsigned int pdu_len);
142 #endif // LIBS_ACN_BASEINFLATOR_H_
The inflator interface.
Definition: BaseInflator.h:42
An abstract PDU inflator.
Definition: BaseInflator.h:64
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
virtual unsigned int InflatePDUBlock(HeaderSet *headers, const uint8_t *data, unsigned int len)=0
Parse a block of PDU data.
virtual uint32_t Id() const =0