1 #ifndef WREPORT_BUFFERS_BUFR_H
2 #define WREPORT_BUFFERS_BUFR_H
5 #include <wreport/var.h>
76 void append_binary(
const unsigned char* val,
unsigned len_bits);
BufrOutput(std::string &out)
Wrap a string into a BufrOutput.
void append_var(Varinfo info, const Var &var)
Append var encoded according to info.
uint8_t pbyte
Byte to which we are appending bits to encode.
Definition: bufr.h:24
int pbyte_len
Number of bits already encoded in pbyte.
Definition: bufr.h:27
void flush()
Write all bits left to the buffer, padding the last partial byte with zeros if needed to make it even...
void add_bits(uint32_t val, int n)
Append n bits from 'val'.
Binary buffer with bit-level append operations.
Definition: bufr.h:18
std::string & out
Output buffer to which we append encoded data.
Definition: bufr.h:21
const typedef _Varinfo * Varinfo
Varinfo reference.
Definition: fwd.h:9
A physical variable.
Definition: var.h:24
void raw_append(const char *str, int len)
Append a string len bits long to the output buffer as it is, ignoring partially encoded bits.
Definition: bufr.h:46
void append_string(const Var &var, unsigned len_bits)
Append a string variable.
void append_short(unsigned short val)
Append a 16 bits integer.
Definition: bufr.h:52
void append_binary(const unsigned char *val, unsigned len_bits)
Append a binary value len_bits bits long.
void append_missing(unsigned len_bits)
Append a missing value len_bits long.
Definition: bufr.h:64
String functions.
Definition: benchmark.h:13
void append_byte(unsigned char val)
Append an 8 bits integer.
Definition: bufr.h:58