32-bit commit hash (e.g. from firmware) with byte-wise construction and string output.
More...
#include <EnumerationInformation.hpp>
|
| std::string | toString () const |
| | Format hash as hex string.
|
| bool | operator== (const CommitHash &other) const noexcept |
| | Compare two commit hashes for equality.
|
|
| static CommitHash | fromBits (std::uint8_t a, std::uint8_t b, std::uint8_t c, std::uint8_t d) noexcept |
| | Build a CommitHash from four bytes (e.g. from enumeration response).
|
|
|
std::uint32_t | hash = 0 |
| | 32-bit hash value.
|
|
| std::ostream & | operator<< (std::ostream &os, const CommitHash &ch) noexcept |
| | Stream hash as hex string.
|
32-bit commit hash (e.g. from firmware) with byte-wise construction and string output.
◆ fromBits()
| CommitHash eduart::CommitHash::fromBits |
( |
std::uint8_t | a, |
|
|
std::uint8_t | b, |
|
|
std::uint8_t | c, |
|
|
std::uint8_t | d ) |
|
staticnoexcept |
Build a CommitHash from four bytes (e.g. from enumeration response).
- Parameters
-
| [in] | a | First byte. |
| [in] | b | Second byte. |
| [in] | c | Third byte. |
| [in] | d | Fourth byte. |
- Returns
- CommitHash with hash = (a<<24)|(b<<16)|(c<<8)|d.
◆ operator==()
| bool eduart::CommitHash::operator== |
( |
const CommitHash & | other | ) |
const |
|
noexcept |
Compare two commit hashes for equality.
- Parameters
-
- Returns
- true if equal.
◆ toString()
| std::string eduart::CommitHash::toString |
( |
| ) |
const |
Format hash as hex string.
- Returns
- Hex representation of hash.
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & | os, |
|
|
const CommitHash & | ch ) |
|
friend |
Stream hash as hex string.
- Parameters
-
- Returns
- Reference to os.
The documentation for this struct was generated from the following file: