ot::Coap::Message::AppendOptionFromMessage() method
Appends a CoAP option reading Option value from another or potentially the same message.
Arguments
aNumber
The CoAP Option number.
aLength
The CoAP Option length.
aMessage
The message to read the CoAP Option value from (it can be the same as the current message).
aOffset
The offset in @p aMessage to start reading the CoAP Option value from (@p aLength bytes are used as Option value).
Return value
kErrorNone Successfully appended the option. kErrorInvalidArgs The option type is not equal or greater than the last option type. kErrorNoBufs The option length exceeds the buffer size. kErrorParse Not enough bytes in @p aMessage to read @p aLength bytes from @p aOffset.
ot::Coap::Message::AppendOptionFromMessage() calls 2 functions:
![]()
ot::Coap::Message::AppendOptionFromMessage()
ot::Coap::Message::AppendOptionFromMessage() reads 2 variables and writes 1 variable:
![]()
ot::Coap::Message::AppendOptionFromMessage()