mirror of
https://github.com/thelsing/knx.git
synced 2024-12-18 19:08:18 +01:00
document APDU
This commit is contained in:
parent
da05a1d51b
commit
1975d8ac55
@ -5,16 +5,43 @@
|
|||||||
|
|
||||||
class CemiFrame;
|
class CemiFrame;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class represents an Application Protocol Data Unit. It is part of a CemiFrame.
|
||||||
|
*/
|
||||||
class APDU
|
class APDU
|
||||||
{
|
{
|
||||||
friend class CemiFrame;
|
friend class CemiFrame;
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* The constructor.
|
||||||
|
* @param data The data of the APDU. Encoding depends on the ::ApduType. The class doesn't
|
||||||
|
* take possession of this pointer.
|
||||||
|
* @param frame The CemiFrame this APDU is part of.
|
||||||
|
*/
|
||||||
APDU(uint8_t* data, CemiFrame& frame);
|
APDU(uint8_t* data, CemiFrame& frame);
|
||||||
|
/**
|
||||||
|
* Get the type of the APDU.
|
||||||
|
*/
|
||||||
ApduType type();
|
ApduType type();
|
||||||
|
/**
|
||||||
|
* Set the type of the APDU.
|
||||||
|
*/
|
||||||
void type(ApduType atype);
|
void type(ApduType atype);
|
||||||
|
/**
|
||||||
|
* Get a pointer to the data.
|
||||||
|
*/
|
||||||
uint8_t* data();
|
uint8_t* data();
|
||||||
|
/**
|
||||||
|
* Get the CemiFrame this APDU is part of.
|
||||||
|
*/
|
||||||
CemiFrame& frame();
|
CemiFrame& frame();
|
||||||
|
/**
|
||||||
|
* Get the length of the APDU. (This is actually the octet count of the NPDU.)
|
||||||
|
*/
|
||||||
uint8_t length() const;
|
uint8_t length() const;
|
||||||
|
/**
|
||||||
|
* Print the contents of the APDU to console.
|
||||||
|
*/
|
||||||
void printPDU();
|
void printPDU();
|
||||||
private:
|
private:
|
||||||
uint8_t* _data;
|
uint8_t* _data;
|
||||||
|
Loading…
Reference in New Issue
Block a user