Go to the documentation of this file.
23 tmp[0] = tmp[bytelen - 1] = 0;
28 const unsigned new_bit_offset =
bit_offset_ + bitlen;
46 if (
static_cast<unsigned>(write_res) < bytelen)
67 if (
static_cast<unsigned>(read_res) < bytelen)
84 for (
unsigned offset = 0;
true; offset++)
87 if (1 !=
buf_.
read(offset, &
byte, 1U))
91 for (
int i = 7; i >= 0; i--)
93 out += (
byte & (1 << i)) ?
'1' :
'0';
99 (void)out.erase(out.length() - 1, 1);
static const unsigned MaxBitsPerRW
virtual int write(unsigned offset, const uint8_t *data, unsigned len)=0
static std::string toString(long x)
static unsigned bitlenToBytelen(unsigned bits)
int read(uint8_t *bytes, const unsigned bitlen)
virtual int read(unsigned offset, uint8_t *data, unsigned len) const =0
static void copyBitArrayUnalignedToAligned(const uint8_t *src_org, unsigned src_offset, unsigned src_len, uint8_t *dst_org)
static const unsigned MaxBytesPerRW
UAVCAN_EXPORT void fill(ForwardIt first, ForwardIt last, const T &value)
static void copyBitArrayAlignedToUnaligned(const uint8_t *src_org, unsigned src_len, uint8_t *dst_org, unsigned dst_offset)
int write(const uint8_t *bytes, const unsigned bitlen)