DTNMA Reference Tools v2.0.0 - 7.g88e232c
Delay-Tolerant Networking Management Architecture (DTNMA) Tool Suite
|
Handle AMP binary message encoding and decoding. More...
Functions | |
int | cace_amp_msg_encode (m_bstring_t msgbuf, const cace_ari_list_t items) |
Encode a single AMP message from a set of ARI items. | |
int | cace_amp_msg_decode (cace_ari_list_t items, const uint8_t *msgbuf_ptr, size_t msgbuf_len) |
Decode a single AMP message into a set of ARI items. | |
Handle AMP binary message encoding and decoding.
int cace_amp_msg_decode | ( | cace_ari_list_t | items, |
const uint8_t * | msgbuf_ptr, | ||
size_t | msgbuf_len | ||
) |
Decode a single AMP message into a set of ARI items.
[out] | items | The items list to decode into. This must be already initialized. |
[in] | msgbuf_ptr | The message buffer to decode from. |
msgbuf_len | The length of valid data at msgbuf_ptr . |
References cace_ari_cbor_decode(), cace_ari_deinit(), cace_ari_init(), cace_ari_text_encode(), cace_data_deinit(), cace_data_init_view(), CACE_FREE, CACE_LOG_DEBUG, CACE_LOG_ERR, cace_log_is_enabled_for(), and errm.
int cace_amp_msg_encode | ( | m_bstring_t | msgbuf, |
const cace_ari_list_t | items | ||
) |
Encode a single AMP message from a set of ARI items.
[out] | msgbuf | The message buffer to append to. This must be already initialized. |
[in] | items | The items to encode. |
References cace_ari_cbor_encode(), cace_ari_text_encode(), cace_data_deinit(), cace_data_init(), CACE_LOG_DEBUG, CACE_LOG_ERR, cace_log_is_enabled_for(), cace_data_t::len, and cace_data_t::ptr.