Chunk Signaling API - Lower Abstraction. More...
Go to the source code of this file.
Functions | |
| int | encodeChunkSignaling (const struct chunkID_set *h, const void *meta, int meta_len, uint8_t *buff, int buff_len) |
| Decode the bit streamEncode a sequence of information, filling the buffer with the corresponding bit stream. | |
| struct chunkID_set * | decodeChunkSignaling (void **meta, int *meta_len, const uint8_t *buff, int buff_len) |
| Decode the bit stream. | |
Chunk Signaling API - Lower Abstraction.
The Chunk Signaling LA provides a set of primitives which encode and decode the signaling messages for chunks' negotiation. The former encode the signaling message returning a bit stream which is essentially the packet that will be sent, while the latter decode the received packet returning the signaling message understandable by the protocol.
| struct chunkID_set* decodeChunkSignaling | ( | void ** | meta, | |
| int * | meta_len, | |||
| const uint8_t * | buff, | |||
| int | buff_len | |||
| ) | [read] |
Decode the bit stream.
Decode the bit stream contained int the buffer, filling the other parameters. This is the dual of the encode function.
| [in] | meta | pointer to the metadata associated to the ChunkID set |
| [in] | meta_len | length of the metadata |
| [in] | buff | Buffer which contain the bit stream to decode, filling the above parameters |
| [in] | buff_len | length of the buffer that contain the bit stream |
| int encodeChunkSignaling | ( | const struct chunkID_set * | h, | |
| const void * | meta, | |||
| int | meta_len, | |||
| uint8_t * | buff, | |||
| int | buff_len | |||
| ) |
Decode the bit streamEncode a sequence of information, filling the buffer with the corresponding bit stream.
Encode a sequence of information given as parameters and fills a buffer (given as parameter) with the corresponding bit stream. The main reason to encode and return the bit stream is the possibility to either send directly a packet with the encoded bit stream, or add this bit stream in piggybacking
| [in] | h | set of ChunkIDs |
| [in] | meta | metadata associated to the ChunkID set |
| [in] | meta_len | length of the metadata |
| [in] | buff | Buffer that will be filled with the bit stream obtained as a coding of the above parameters |
| [in] | buff_len | length of the buffer that will contain the bit stream |
1.6.3