libuav original

Dependents:   UAVCAN UAVCAN_Subscriber

Embed: (wiki syntax)

« Back to documentation index

BitStream Class Reference

BitStream Class Reference

This class treats a chunk of memory as an array of bits. More...

#include <bit_stream.hpp>

Public Member Functions

int write (const uint8_t *bytes, const unsigned bitlen)
 Write/read calls interpret bytes as bit arrays, 8 bits per byte, where the most significant bits have lower index, i.e.

Detailed Description

This class treats a chunk of memory as an array of bits.

It is used by the bit codec for serialization/deserialization.

Definition at line 31 of file bit_stream.hpp.


Member Function Documentation

int write ( const uint8_t *  bytes,
const unsigned  bitlen 
)

Write/read calls interpret bytes as bit arrays, 8 bits per byte, where the most significant bits have lower index, i.e.

: Hex: 55 2d Bits: 01010101 00101101 Indices: 0 .. 7 8 .. 15 Return values: Negative - Error Zero - Out of buffer space Positive - OK

Definition at line 15 of file uc_bit_stream.cpp.