|
enum | Error { ErrorNone = 0,
EntityTooLarge
} |
| An enum defining different kinds of errors that can occur during the block-wise operation.
|
|
M2MBlockMessage::M2MBlockMessage |
( |
| ) |
|
virtual M2MBlockMessage::~M2MBlockMessage |
( |
| ) |
|
|
virtual |
uint8_t* M2MBlockMessage::block_data |
( |
| ) |
const |
Returns the payload of the message.
- Returns
- The message payload.
uint32_t M2MBlockMessage::block_data_len |
( |
| ) |
const |
Returns the length of the payload.
- Returns
- The payload length.
uint16_t M2MBlockMessage::block_number |
( |
| ) |
const |
Returns the number of an incoming block.
- Returns
- Block number, starting from 0.
Error M2MBlockMessage::error_code |
( |
| ) |
const |
Returns an error code.
- Returns
- Error code.
bool M2MBlockMessage::is_block_message |
( |
| ) |
const |
Check if the message is a block message.
- Parameters
-
coap_header | The message to check. |
- Returns
- True if block message, else false.
bool M2MBlockMessage::is_last_block |
( |
| ) |
const |
Check if last block.
- Returns
- True if last block, else false.
void M2MBlockMessage::set_message_info |
( |
sn_coap_hdr_s * |
coap_header | ) |
|
Store the data from a CoAP message.
- Parameters
-
coap_header | The message to parse. |
void M2MBlockMessage::set_payload |
( |
const uint8_t * |
payload, |
|
|
const uint16_t |
payload_len, |
|
|
const uint16_t |
offset |
|
) |
| |
Store the payload data from a CoAP message.
- Parameters
-
*payload | Payload to be stored. |
payload_len | Length of the payload. |
offset | Offset where to copy the data. |
uint32_t M2MBlockMessage::total_message_size |
( |
| ) |
const |
Returns the total size of the message.
- Returns
- The total size in bytes.
The documentation for this class was generated from the following file: