knx
ETS configurable knx-stack
tpdu.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "stdint.h"
4 #include "knx_types.h"
5 class CemiFrame;
6 class APDU;
7 
8 class TPDU
9 {
10  friend class CemiFrame;
11 
12  public:
13  TpduType type() const;
14  void type(TpduType type);
15 
16  bool numbered() const;
17  void numbered(bool value);
18 
19  bool control() const;
20  void control(bool value);
21 
22  uint8_t sequenceNumber() const;
23  void sequenceNumber(uint8_t value);
24 
25  APDU& apdu();
26 
27  CemiFrame& frame();
28  void printPDU();
29 
30  protected:
31  TPDU(uint8_t* data, CemiFrame& frame);
32 
33  private:
34  uint8_t* _data = 0;
35  CemiFrame& _frame;
36 };
This class represents an Application Protocol Data Unit.
Definition: apdu.h:12
uint8_t * data()
Definition: cemi_frame.cpp:195
Definition: tpdu.h:9
TpduType type() const
Definition: tpdu.cpp:8
bool numbered() const
Definition: tpdu.cpp:74
bool control() const
Definition: tpdu.cpp:87
void printPDU()
Definition: tpdu.cpp:121
uint8_t sequenceNumber() const
Definition: tpdu.cpp:100
TPDU(uint8_t *data, CemiFrame &frame)
Definition: tpdu.cpp:4
APDU & apdu()
Definition: tpdu.cpp:111
CemiFrame & frame()
Definition: tpdu.cpp:116
TpduType
Definition: knx_types.h:130