45 explicit Byte(
const uint8_t *value);
64 static std::string
byte_to_hex(
const uint8_t value);
72 static std::string
byte_to_hex(
const uint32_t value);
99 bool is_bit_1(
const int32_t pos)
const;
131 void set_value(
const uint8_t value,
const int32_t start_pos,
132 const int32_t length);
159 uint8_t
get_byte(
const int32_t start_pos,
const int32_t length)
const;
The class of one byte, which is 8 bits.
void set_bit_1(const int32_t pos)
Set the bit on a specified position to one.
static std::string byte_to_binary(const uint8_t value)
Transform an integer with the size of one byte to its binary represented by a string.
uint8_t get_byte_low_4_bits() const
Get a one-byte unsigned integer representing the lower 4 bits.
std::string to_hex_string() const
Transform to its hexadecimal represented by a string.
void set_value_low_4_bits(const uint8_t value)
Reset the lower 4 bits as the lower 4 bits of a specified one-byte unsigned integer.
bool is_bit_1(const int32_t pos) const
Check if the bit on a specified position is one.
void set_bit_0(const int32_t pos)
Set the bit on a specified position to zero.
uint8_t get_byte_high_4_bits() const
Get a one-byte unsigned integer representing the higher 4 bits.
void set_value_high_4_bits(const uint8_t value)
Reset the higher 4 bits as the higher 4 bits of a specified one-byte unsigned integer.
std::string to_binary_string() const
Transform to its binary represented by a string.
void set_value(const uint8_t value)
Reset this Byte by a specified one-byte unsigned integer.
~Byte()=default
Desctructor.
static std::string byte_to_hex(const uint8_t value)
Transform an integer with the size of one byte to its hexadecimal represented by a string.
uint8_t get_byte() const
Get the one-byte unsigned integer.