 |
SWC-DB
v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
|
Go to the documentation of this file.
6 #ifndef swcdb_core_comm_Header_h
7 #define swcdb_core_comm_Header_h
15 namespace SWC {
namespace Comm {
33 Header(uint64_t cmd=0, uint32_t timeout=0) noexcept
42 id(init_from_req_header.id),
44 command(init_from_req_header.command),
52 void set(uint64_t cmd=0, uint32_t timeout=0) noexcept {
63 void decode(const uint8_t** bufp,
size_t* remainp);
69 void print(std::ostream& out) const;
119 uint8_t *base = *bufp;
141 "Header size " SWC_FMT_LU " is less than the fixed length %d",
150 const uint8_t *base = *bufp;
197 #ifdef SWC_IMPL_SOURCE
201 #endif // swcdb_core_comm_Header_h
SWC_CAN_INLINE void encode(uint8_t **bufp) const
SWC_CAN_INLINE void encode_i32(uint8_t **bufp, uint32_t val) noexcept
SWC_CAN_INLINE bool checksum_i32_chk(uint32_t checksum, const uint8_t *base, uint32_t len)
struct SWC::Comm::Header __attribute__((packed))
SWC_CAN_INLINE void encode_i16(uint8_t **bufp, uint16_t val) noexcept
constexpr SWC_CAN_INLINE void encode_i8(uint8_t **bufp, uint8_t val) noexcept
SWC_CAN_INLINE void reset() noexcept
uint32_t size
Buffer size.
SWC_CAN_INLINE uint16_t decode_i16(const uint8_t **bufp, size_t *remainp)
The SWC-DB C++ namespace 'SWC'.
#define SWC_THROWF(_code_, _fmt_,...)
SWC_CAN_INLINE void decode(const uint8_t **bufp, size_t *remainp)
SWC_CAN_INLINE uint8_t encoded_length() const noexcept
SWC_CAN_INLINE void checksum_i32(const uint8_t *start, size_t len, uint8_t **ptr) noexcept
@ COMM_HEADER_CHECKSUM_MISMATCH
constexpr SWC_CAN_INLINE uint8_t decode_i8(const uint8_t **bufp, size_t *remainp)
SWC_CAN_INLINE uint32_t decode_i32(const uint8_t **bufp, size_t *remainp)