EduArt Sensor Ring Library 4.0.0
Loading...
Searching...
No Matches
eduart::sensorring::CommitHash Struct Reference

32-bit commit hash (e.g. from firmware) with byte-wise construction and string output. More...

#include <EnumerationInformation.hpp>

Public Member Functions

std::string toString () const
 Format hash as hex string.
bool operator== (const CommitHash &other) const noexcept
 Compare two commit hashes for equality.
bool operator= (const std::uint32_t &other) noexcept
 Assign commit hash from a 32-bit integer.

Public Attributes

std::uint32_t hash = 0
 32-bit hash value.

Friends

std::ostream & operator<< (std::ostream &os, const CommitHash &ch) noexcept
 Stream hash as hex string.

Detailed Description

32-bit commit hash (e.g. from firmware) with byte-wise construction and string output.

Member Function Documentation

◆ operator=()

bool eduart::sensorring::CommitHash::operator= ( const std::uint32_t & other)
noexcept

Assign commit hash from a 32-bit integer.

Parameters
[in]other32-bit integer representing the commit hash.
Returns
true if equal.

◆ operator==()

bool eduart::sensorring::CommitHash::operator== ( const CommitHash & other) const
noexcept

Compare two commit hashes for equality.

Parameters
[in]otherCommitHash to compare with.
Returns
true if equal.

◆ toString()

std::string eduart::sensorring::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
[in]osOutput stream.
[in]chCommitHash to print.
Returns
Reference to os.

The documentation for this struct was generated from the following file: