|
idfxx 1.0.0
Modern C++23 components for ESP-IDF
|
1-Wire device address. More...
Public Member Functions | |
| constexpr | address ()=default |
| Constructs an address with value 0 (equivalent to any()). | |
| constexpr | address (uint64_t raw) |
| Constructs an address from a raw 64-bit value. | |
| constexpr uint64_t | raw () const |
| Returns the underlying 64-bit ROM address. | |
| constexpr uint8_t | family () const |
| Extracts the family code from the address. | |
| constexpr bool | operator== (const address &) const noexcept=default |
| Compares two addresses for equality. | |
| constexpr auto | operator<=> (const address &) const noexcept=default |
| Default three-way comparison for ordering. | |
Static Public Member Functions | |
| static constexpr address | any () |
| Returns the wildcard address for single-device buses. | |
| static constexpr address | none () |
| Returns an invalid sentinel address indicating no device. | |
1-Wire device address.
Typed wrapper around a 64-bit 1-Wire ROM address. Each device on the bus has a unique address containing a family code (low byte), serial number, and CRC (high byte).
For single-device buses, address::any() can be used to skip ROM matching.
Definition at line 47 of file onewire.hpp.
|
constexprdefault |
Constructs an address with value 0 (equivalent to any()).
Constructs an address from a raw 64-bit value.
| raw | The 64-bit ROM address. |
Definition at line 56 of file onewire.hpp.
Returns the wildcard address for single-device buses.
When only one device is connected, this address can be used to skip ROM matching, simplifying communication.
Definition at line 67 of file onewire.hpp.
Extracts the family code from the address.
The family code is stored in the low byte of the ROM address and identifies the device type (e.g., 0x28 for DS18B20).
Definition at line 93 of file onewire.hpp.
Returns an invalid sentinel address indicating no device.
This address will never occur in a real device (CRC mismatch) and can be used as a "no-such-device" indicator.
Definition at line 77 of file onewire.hpp.
|
constexprdefaultnoexcept |
Default three-way comparison for ordering.
|
constexprdefaultnoexcept |
Compares two addresses for equality.
Returns the underlying 64-bit ROM address.
Definition at line 83 of file onewire.hpp.