knx
ETS configurable knx-stack
apdu.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <stdint.h>
4 #include "knx_types.h"
5 
6 class CemiFrame;
7 
11 class APDU
12 {
13  friend class CemiFrame;
14 
15  public:
19  ApduType type();
23  void type(ApduType atype);
27  uint8_t* data();
31  CemiFrame& frame();
35  uint8_t length() const;
39  void printPDU();
40 
41  protected:
48  APDU(uint8_t* data, CemiFrame& frame);
49 
50  private:
51  uint8_t* _data = 0;
52  CemiFrame& _frame;
53 };
This class represents an Application Protocol Data Unit.
Definition: apdu.h:12
APDU(uint8_t *data, CemiFrame &frame)
The constructor.
Definition: apdu.cpp:5
void printPDU()
Print the contents of the APDU to console.
Definition: apdu.cpp:43
ApduType type()
Get the type of the APDU.
Definition: apdu.cpp:9
uint8_t * data()
Get a pointer to the data.
Definition: apdu.cpp:28
uint8_t length() const
Get the length of the APDU.
Definition: apdu.cpp:38
CemiFrame & frame()
Get the CemiFrame this APDU is part of.
Definition: apdu.cpp:33
ApduType
Definition: knx_types.h:142