Open Lighting Architecture  Latest Git
E133Inflator.h
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 2 of the License, or
5  * (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU Library General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
15  *
16  * E133Inflator.h
17  * Interface for the E133Inflator class.
18  * Copyright (C) 2011 Simon Newton
19  */
20 
21 #ifndef LIBS_ACN_E133INFLATOR_H_
22 #define LIBS_ACN_E133INFLATOR_H_
23 
24 #include "ola/acn/ACNVectors.h"
25 #include "libs/acn/BaseInflator.h"
26 #include "libs/acn/E133Header.h"
27 
28 namespace ola {
29 namespace acn {
30 
31 class E133Inflator: public BaseInflator {
32  friend class E133InflatorTest;
33 
34  public:
35  E133Inflator()
36  : BaseInflator(),
37  m_last_header_valid(false) {
38  }
39  ~E133Inflator() {}
40 
41  uint32_t Id() const { return ola::acn::VECTOR_ROOT_E133; }
42 
43  protected:
44  bool DecodeHeader(HeaderSet *headers,
45  const uint8_t *data,
46  unsigned int len,
47  unsigned int *bytes_used);
48 
49  void ResetHeaderField() {
50  m_last_header_valid = false;
51  }
52  private:
53  E133Header m_last_header;
54  bool m_last_header_valid;
55 };
56 } // namespace acn
57 } // namespace ola
58 #endif // LIBS_ACN_E133INFLATOR_H_
Definition: HeaderSet.h:35
An abstract PDU inflator.
Definition: BaseInflator.h:64
uint32_t Id() const
Definition: E133Inflator.h:41
ACN Vector values.
Definition: E133Inflator.h:31
Definition: E133Header.h:35
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
Definition: ACNVectors.h:48