OneWire Library for Arduino  version: 1.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
OneWire::RomId Class Reference

Standard container for a 1-Wire ROM ID. More...

#include <RomId.h>

Public Types

typedef array< uint8_t,
byteLen >::Buffer 
ByteBuffer
 Built-in array representation. More...
 

Public Member Functions

 RomId ()
 
 RomId (const RomId &romId)
 
 RomId (const ByteBuffer &romIdBytes)
 
const RomIdoperator= (const RomId &rhs)
 
bool operator== (const RomId &rhs) const
 
bool operator!= (const RomId &rhs) const
 
 operator ByteBuffer & ()
 Conversion to array reference. More...
 
 operator const ByteBuffer & () const
 Conversion to const array reference. More...
 
void reset ()
 Reset to the default starting value. More...
 
uint8_t familyCode () const
 Read the Family Code byte. More...
 
void setFamilyCode (uint8_t familyCode)
 Set the family code byte. More...
 
uint8_t crc8 () const
 Read the CRC8 byte. More...
 
void setCrc8 (uint8_t crc8)
 Set the CRC8 byte. More...
 
bool crc8Valid () const
 
void setValidCrc8 ()
 Calculate and set the CRC8 for the ROM ID. More...
 
bool valid () const
 

Static Public Attributes

static const size_t byteLen = 8
 Length of the buffer in bytes. More...
 

Detailed Description

Standard container for a 1-Wire ROM ID.

Member Typedef Documentation

typedef array<uint8_t, byteLen>::Buffer OneWire::RomId::ByteBuffer

Built-in array representation.

Constructor & Destructor Documentation

OneWire::RomId::RomId ( )
inline
OneWire::RomId::RomId ( const RomId romId)
inline
OneWire::RomId::RomId ( const ByteBuffer romIdBytes)
inline

Member Function Documentation

uint8_t OneWire::RomId::crc8 ( ) const
inline

Read the CRC8 byte.

bool OneWire::RomId::crc8Valid ( ) const
inline

Check if the CRC8 is valid for the ROM ID.

Returns
True if the CRC8 is valid.
uint8_t OneWire::RomId::familyCode ( ) const
inline

Read the Family Code byte.

OneWire::RomId::operator ByteBuffer & ( )
inline

Conversion to array reference.

OneWire::RomId::operator const ByteBuffer & ( ) const
inline

Conversion to const array reference.

bool OneWire::RomId::operator!= ( const RomId rhs) const
inline
const RomId& OneWire::RomId::operator= ( const RomId rhs)
inline
bool OneWire::RomId::operator== ( const RomId rhs) const
inline
void OneWire::RomId::reset ( void  )
inline

Reset to the default starting value.

void OneWire::RomId::setCrc8 ( uint8_t  crc8)
inline

Set the CRC8 byte.

void OneWire::RomId::setFamilyCode ( uint8_t  familyCode)
inline

Set the family code byte.

void OneWire::RomId::setValidCrc8 ( )
inline

Calculate and set the CRC8 for the ROM ID.

bool OneWire::RomId::valid ( ) const
inline

Check if the ROM ID is valid (Family Code and CRC8 are both valid).

Returns
True if the ROM ID is valid.

Member Data Documentation

const size_t OneWire::RomId::byteLen = 8
static

Length of the buffer in bytes.


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