16 #ifndef M2MBLOCKMESSAGE_H 17 #define M2MBLOCKMESSAGE_H 20 #include "sn_coap_header.h" 61 void set_payload(
const uint8_t *payload,
const uint16_t payload_len,
const uint16_t offset);
112 uint8_t *_block_data_ptr;
113 uint32_t _total_message_size;
114 uint16_t _block_data_len;
115 uint16_t _block_number;
118 bool _is_block_message;
121 #endif // M2MBLOCKMESSAGE_H uint32_t total_message_size() const
Returns the total size of the message.
void set_payload(const uint8_t *payload, const uint16_t payload_len, const uint16_t offset)
Store the payload data from a CoAP message.
bool is_block_message() const
Check if the message is a block message.
virtual ~M2MBlockMessage()
Error error_code() const
Returns an error code.
Definition: m2mblockmessage.h:26
void clear_values()
Clear values.
uint16_t block_number() const
Returns the number of an incoming block.
void set_message_info(sn_coap_hdr_s *coap_header)
Store the data from a CoAP message.
uint8_t * block_data() const
Returns the payload of the message.
bool is_last_block() const
Check if last block.
uint32_t block_data_len() const
Returns the length of the payload.
Error
An enum defining different kinds of errors that can occur during the block-wise operation.
Definition: m2mblockmessage.h:34