Go to the documentation of this file.
5 #ifndef UAVCAN_MARSHAL_BIT_STREAM_HPP_INCLUDED
6 #define UAVCAN_MARSHAL_BIT_STREAM_HPP_INCLUDED
33 static const unsigned MaxBytesPerRW = 16;
42 uint8_t* dst_org,
unsigned dst_offset)
44 bitarrayCopy(
reinterpret_cast<const unsigned char*
>(src_org), 0, src_len,
45 reinterpret_cast<unsigned char*
>(dst_org), dst_offset);
51 bitarrayCopy(
reinterpret_cast<const unsigned char*
>(src_org), src_offset, src_len,
52 reinterpret_cast<unsigned char*
>(dst_org), 0);
56 static const unsigned MaxBitsPerRW = MaxBytesPerRW * 8;
60 ResultOutOfBuffer = 0,
83 int write(
const uint8_t* bytes,
const unsigned bitlen);
84 int read(
uint8_t* bytes,
const unsigned bitlen);
93 #endif // UAVCAN_MARSHAL_BIT_STREAM_HPP_INCLUDED
void bitarrayCopy(const unsigned char *src_org, std::size_t src_offset, std::size_t src_len, unsigned char *dst_org, std::size_t dst_offset)
struct UAVCAN_EXPORT StaticAssert
BitStream(ITransferBuffer &buf)
static std::string toString(long x)
static unsigned bitlenToBytelen(unsigned bits)
static void copyBitArrayUnalignedToAligned(const uint8_t *src_org, unsigned src_offset, unsigned src_len, uint8_t *dst_org)
Item buf_[UAVCAN_LPC11C24_RX_QUEUE_LEN]
static void copyBitArrayAlignedToUnaligned(const uint8_t *src_org, unsigned src_len, uint8_t *dst_org, unsigned dst_offset)