From e1f0836a5509854d719fe1455665e16481da66f9 Mon Sep 17 00:00:00 2001 From: Kevin Matz Date: Tue, 2 May 2023 13:00:57 -0400 Subject: [PATCH] additional documentation --- protocol/esta/rdm/message.h | 5 +++-- protocol/esta/rdm/status.h | 27 ++++++++++++++++----------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/protocol/esta/rdm/message.h b/protocol/esta/rdm/message.h index 7faf549..493bb15 100644 --- a/protocol/esta/rdm/message.h +++ b/protocol/esta/rdm/message.h @@ -32,9 +32,10 @@ namespace RDM { -struct Message; //!< \cite RDM 6 Message Structure +struct Message; //!< \cite RDM 6 Message Structure -using MsgPtr = std::shared_ptr; //!< Managed RDM Message pointer. +using MsgPtr = std::shared_ptr; //!< Managed RDM Message pointer. +using MsgPair = std::pair; //!< Call/Response message pair. /** * @brief \cite RDM 6.2 Packet Format diff --git a/protocol/esta/rdm/status.h b/protocol/esta/rdm/status.h index a03cd07..20805dc 100644 --- a/protocol/esta/rdm/status.h +++ b/protocol/esta/rdm/status.h @@ -29,26 +29,31 @@ namespace RDM { /** - * @brief The Status struct + * @brief \cite RDM 10.3.2 Status Messages + * + * The Status Type of STATUS_NONE shall be used when a controller wants to establish whether + * a device is present on the network without retrieving any Status Message data from the device. + * + * The Status Type STATUS_GET_LAST_MESSAGE shall be used by the Controller to request the + * retransmission of the last sent Status Message or Queued Message. */ struct Status { + /// Each status message shall be a fixed length of 9 bytes. union { - uint8_t bytes[9]; + uint8_t bytes[9] = {0}; struct { - uint16_t subdevice_id; //!< sub-device ID - uint8_t status_type; //!< status type - uint16_t status_message; //!< status message - int16_t data1; //!< data field 1 - int16_t data2; //!< data field 2 + uint16_t subdevice_id; //!< 10.3.2.1 Sub-Device ID + uint8_t status_type; //!< 10.3.2.2 Status Type + uint16_t status_message_id; //!< 10.3.2.3 Status Message ID + int16_t data1; //!< 10.3.2.4 Data Value 1 + int16_t data2; //!< 10.3.2.4 Data Value 2 } __attribute__ ((packed)); }; }; // struct Status -/** - * @brief a valid status - */ -using StatusPtr = std::shared_ptr; + +using StatusPtr = std::shared_ptr; //!< A memory managed Status pointer } // namespace RDM