encode.c File Reference
`#include <stdio.h>`
`#include "coap_config.h"`
`#include "encode.h"`
Include dependency graph for encode.c:

Go to the source code of this file.

## Functions

int | coap_fls (unsigned int i)
unsigned int | coap_decode_var_bytes (unsigned char *buf, unsigned int len)
| Decodes multiple-length byte sequences. More...
unsigned int | coap_encode_var_bytes (unsigned char *buf, unsigned int val)
| Encodes multiple-length byte sequences. More...

## Function Documentation

## coap_decode_var_bytes()

unsigned int coap_decode_var_bytes | ( | unsigned char * | buf,
|  | unsigned int | len
| ) |  |

Decodes multiple-length byte sequences.

buf points to an input byte sequence of length len. Returns the decoded value.

Definition at line 25 of file encode.c.

Here is the caller graph for this function:

## coap_encode_var_bytes()

unsigned int coap_encode_var_bytes | ( | unsigned char * | buf,
|  | unsigned int | val
| ) |  |

Encodes multiple-length byte sequences.

buf points to an output buffer of sufficient length to store the encoded bytes. val is the value to encode. Returns the number of bytes used to encode val or 0 on error.

Definition at line 34 of file encode.c.

Here is the caller graph for this function:

## coap_fls()

int coap_fls | ( | unsigned int | i | ) |

Definition at line 17 of file encode.c.

Here is the caller graph for this function: