Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
|
|
4.1.99 |
COBS encoding and decoding functions with custom delimiter support More...
Functions | |
static size_t | cobs_max_encoded_len (size_t decoded_size, uint32_t flags) |
Calculate maximum encoded buffer size. | |
int | cobs_encode (struct net_buf *src, struct net_buf *dst, uint32_t flags) |
Standard COBS encoding. | |
int | cobs_decode (struct net_buf *src, struct net_buf *dst, uint32_t flags) |
Standard COBS decoding. | |
COBS encoding and decoding functions with custom delimiter support
Provides functions for COBS encoding/decoding with configurable delimiters. The implementation handles both standard zero-delimited COBS and custom delimiter variants.
#include <zephyr/data/cobs.h>
Standard COBS decoding.
src | Source buffer to decode |
dst | Destination buffer for decoded data |
flags | Decoding flags (reserved) |
0 | Success |
-ENOMEM | Insufficient destination space |
-EINVAL | Invalid COBS structure or parameters |
#include <zephyr/data/cobs.h>
Standard COBS encoding.
src | Source buffer to decode |
dst | Destination buffer for decoded data |
flags | Decoding flags (reserved) |
0 | Success |
-ENOMEM | Insufficient destination space |
-EINVAL | Invalid COBS structure or parameters |
#include <zephyr/data/cobs.h>
Calculate maximum encoded buffer size.
decoded_size | Size of input data to be encoded |
flags | COBS_FLAG_TRAILING_DELIMITER to include termination byte in calculation |