}
/**
+ * @brief Get a pointer to the underlying array.
+ *
+ * @return a pointer to the array encapsulated by this class.
+ */
+uint8_t* MessagePayload::get() const
+{
+ return Payload.get();
+}
+
+/**
* @brief Retrieve 16 bits from the payload buffer.
*
* @param left_byte the index of the left byte
//-----------------------------------------------------------------------------
/**
- * @brief This class represents the contents of a network message. It provides
- * means to encode and to decode data to network format (i.e. deal with
- * endianness), and also can be treated like an ordinary array.
+ * @brief This class represents the contents of a network message.
+ *
+ * It provides means to encode and to decode data to network format (i.e. deal
+ * with endianness), and also can be treated like an ordinary array.
*/
class MessagePayload
{
const uint8_t& operator[]( std::size_t offset ) const;
uint8_t& operator[]( std::size_t offset );
+ uint8_t* get() const;
+
uint16_t decode16(
const int left_byte,
const int right_byte