From 1975d8ac55ad24ae040fcb22253fcc11e79becd2 Mon Sep 17 00:00:00 2001 From: Thomas Kunze Date: Mon, 24 Jun 2019 23:39:43 +0200 Subject: [PATCH] document APDU --- src/knx/apdu.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/knx/apdu.h b/src/knx/apdu.h index 9a02e99..61dd3e8 100644 --- a/src/knx/apdu.h +++ b/src/knx/apdu.h @@ -5,16 +5,43 @@ class CemiFrame; +/** + * This class represents an Application Protocol Data Unit. It is part of a CemiFrame. + */ class APDU { friend class CemiFrame; 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); + /** + * Get the type of the APDU. + */ ApduType type(); + /** + * Set the type of the APDU. + */ void type(ApduType atype); + /** + * Get a pointer to the data. + */ uint8_t* data(); + /** + * Get the CemiFrame this APDU is part of. + */ CemiFrame& frame(); + /** + * Get the length of the APDU. (This is actually the octet count of the NPDU.) + */ uint8_t length() const; + /** + * Print the contents of the APDU to console. + */ void printPDU(); private: uint8_t* _data;