13 using bytes = std::vector<uint8_t>;
19 explicit BytesView(
const uint8_t *first,
size_t count) noexcept : data_{first}, count_{count} {}
23 size_t size() const noexcept {
return count_; }
26 assert(index < count_);
31 assert(offset + count <= count_);
35 const uint8_t *
begin() const noexcept {
return data_; }
37 const uint8_t *
end() const noexcept {
return data_ + count_; }
40 const uint8_t *data_ =
nullptr;
61 std::string code_repr()
const;
69 std::vector<ObisInfo> get_obis_info();
size_t size() const noexcept
uint8_t operator[](size_t index) const noexcept
BytesView() noexcept=default
int64_t bytes_to_int(const BytesView &buffer)
std::string bytes_to_string(const BytesView &buffer)
BytesView subview(size_t offset, size_t count) const noexcept
BytesView(const uint8_t *first, size_t count) noexcept
BytesView(const bytes &bytes) noexcept
const uint8_t * begin() const noexcept
Implementation of SPI Controller mode.
std::vector< uint8_t > bytes
uint64_t bytes_to_uint(const BytesView &buffer)
const uint8_t * end() const noexcept
std::vector< SmlNode > messages
std::string bytes_repr(const BytesView &buffer)
std::vector< SmlNode > nodes