Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

LOW_deviceIDRaw Class Reference

Base class for 1-Wire ROM IDs. More...

#include <LOW_deviceIDRaw.h>

Inheritance diagram for LOW_deviceIDRaw:

Inheritance graph
[legend]
Collaboration diagram for LOW_deviceIDRaw:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::vector< LOW_deviceIDRaw > deviceIDRawVec_t
 Vector type of class LOW_deviceIDRaw. More...

typedef uint8_t devRomID_t [8]
 Type of the whole 64 bit ID. More...

typedef uint8_t devCRC_t
 Type of 8 bit CRC checksum of the whole ID. More...

typedef uint8_t devSerNum_t [6]
 Type of device individual serial number. More...

typedef uint8_t devFamCode_t
 Type of device's family code. More...


Public Methods

 LOW_deviceIDRaw ()
 Default constructor. More...

 LOW_deviceIDRaw (const LOW_deviceIDRaw &inDeviceIDRaw)
 Copy constructor. More...

 LOW_deviceIDRaw (const devRomID_t &inRomID)
 Constructor from ROM ID as our own data type. More...

 LOW_deviceIDRaw (uint32_t inHighInt, uint32_t inLowInt)
 Constructor from two 32 bit values. More...

 LOW_deviceIDRaw (const byteVec_t &inRomID)
 Constructor from byte vector. More...

virtual ~LOW_deviceIDRaw ()
 Destructor. More...

virtual bool operator== (const LOW_deviceIDRaw &inDID) const
 Comparison on the whole 64 bits of ID. More...

virtual bool operator!= (const LOW_deviceIDRaw &inDID) const
 Comparison on the whole 64 bits of ID. More...

virtual bool operator< (const LOW_deviceIDRaw &inDID) const
 Comparison on the whole 64 bits of ID. More...

virtual void getRomID (devRomID_t &outID) const
 Get 64 bit ROM ID as our data type. More...

virtual byteVec_t getRomIDVec () const
 Get 64 bit ROM ID as byte vector. More...

virtual std::string getRomIDString () const
 Get 64 bit ROM ID as hex C++ string. More...

virtual devCRC_t getCRC () const
 Get 8 bit CRC. More...

virtual void getSerialNum (devSerNum_t &outSerNum) const
 Get 48 bit serial number. More...

virtual devFamCode_t getFamilyCode () const
 Get 8 bit family code. More...

virtual void setFamilyCode (const devFamCode_t inFamCode)
 Set 8 bit family code. More...

virtual bool getBit (uint8_t inBitNum) const
 Get 1 bit from the ID. More...

virtual void setBit (const uint8_t inBitNum, const bool inValue)
 Set 1 bit in the ID. More...


Protected Attributes

devRomID_t romID
 The lasered ROM ID. More...


Detailed Description

Base class for 1-Wire ROM IDs.

In contrast to LOW_deviceID this class allows manipulation of the ID. Furthermore no CRC validation is done on creation.

This class is thread-safe.

Author:
Harald Roelle

Definition at line 37 of file LOW_deviceIDRaw.h.


Member Typedef Documentation

typedef uint8_t LOW_deviceIDRaw::devCRC_t
 

Type of 8 bit CRC checksum of the whole ID.

Definition at line 67 of file LOW_deviceIDRaw.h.

Referenced by getCRC().

typedef uint8_t LOW_deviceIDRaw::devFamCode_t
 

Type of device's family code.

Definition at line 69 of file LOW_deviceIDRaw.h.

Referenced by LOW_netSegment::cmd_SearchROM(), getFamilyCode(), LOW_linkDS2490::getLinkFamily(), LOW_device::LOW_device(), LOW_deviceFactory::registerSpecificCtor(), LOW_linkDS2490::searchDevices(), and LOW_link::searchDevices().

typedef std::vector<LOW_deviceIDRaw> LOW_deviceIDRaw::deviceIDRawVec_t
 

Vector type of class LOW_deviceIDRaw.

Definition at line 64 of file LOW_deviceIDRaw.h.

typedef uint8_t LOW_deviceIDRaw::devRomID_t[8]
 

Type of the whole 64 bit ID.

Definition at line 66 of file LOW_deviceIDRaw.h.

Referenced by LOW_netSegment::cmd_ReadROM(), and LOW_linkDS2490::searchDevices().

typedef uint8_t LOW_deviceIDRaw::devSerNum_t[6]
 

Type of device individual serial number.

Definition at line 68 of file LOW_deviceIDRaw.h.


Constructor & Destructor Documentation

LOW_deviceIDRaw::LOW_deviceIDRaw  
 

Default constructor.

Definition at line 30 of file LOW_deviceIDRaw.cpp.

References romID.

LOW_deviceIDRaw::LOW_deviceIDRaw const LOW_deviceIDRaw &    inDeviceIDRaw
 

Copy constructor.

Definition at line 36 of file LOW_deviceIDRaw.cpp.

References romID.

LOW_deviceIDRaw::LOW_deviceIDRaw const devRomID_t   inRomID
 

Constructor from ROM ID as our own data type.

Note: No CRC validation is done.

Parameters:
inRomID  Reference to ROM ID.

Definition at line 43 of file LOW_deviceIDRaw.cpp.

References romID.

LOW_deviceIDRaw::LOW_deviceIDRaw uint32_t    inHighInt,
uint32_t    inLowInt
 

Constructor from two 32 bit values.

Note: No CRC validation is done.

Parameters:
inHighInt  Upper 32 bits of ROM ID.
inLowInt  Lower 32 bits of ROM ID.

Definition at line 50 of file LOW_deviceIDRaw.cpp.

References romID.

LOW_deviceIDRaw::LOW_deviceIDRaw const byteVec_t   inRomID
 

Constructor from byte vector.

Note: No CRC validation is done.

Parameters:
inRomID  Reference to byte vector of exactly 8 bytes.
Exceptions:
sizeMismatch_error  Thrown when inRomID has other size than 8.

Definition at line 62 of file LOW_deviceIDRaw.cpp.

References byteVec_t, and romID.

LOW_deviceIDRaw::~LOW_deviceIDRaw   [virtual]
 

Destructor.

Definition at line 72 of file LOW_deviceIDRaw.cpp.


Member Function Documentation

bool LOW_deviceIDRaw::getBit uint8_t    inBitNum const [virtual]
 

Get 1 bit from the ID.

Parameters:
inBitNum  Number of the bit to get (0-63).
Returns:
Value of requested bit.
Exceptions:
range_error  Thrown when inBitNum is out of range.

Definition at line 190 of file LOW_deviceIDRaw.cpp.

References __LOW_SYNCHRONIZE_METHOD_READ__, and romID.

Referenced by LOW_linkDS2480B::doSearchSequence(), LOW_link::doSearchSequence(), and LOW_link::searchDevices().

LOW_deviceIDRaw::devCRC_t LOW_deviceIDRaw::getCRC   const [virtual]
 

Get 8 bit CRC.

Returns:
The ID's CRC part.

Definition at line 157 of file LOW_deviceIDRaw.cpp.

References __LOW_SYNCHRONIZE_METHOD_READ__, devCRC_t, and romID.

LOW_deviceIDRaw::devFamCode_t LOW_deviceIDRaw::getFamilyCode   const [virtual]
 

Get 8 bit family code.

Returns:
The ID's family code part.

Definition at line 174 of file LOW_deviceIDRaw.cpp.

References __LOW_SYNCHRONIZE_METHOD_READ__, devFamCode_t, and romID.

Referenced by LOW_netSegment::getDevice(), LOW_device::LOW_device(), LOW_deviceFactory::new_SpecificDevice(), LOW_linkDS2490::searchDevices(), and LOW_link::searchDevices().

void LOW_deviceIDRaw::getRomID devRomID_t   outID const [virtual]
 

Get 64 bit ROM ID as our data type.

Parameters:
outID  Reference where ID is written to.

Definition at line 118 of file LOW_deviceIDRaw.cpp.

References __LOW_SYNCHRONIZE_METHOD_READ__, and romID.

std::string LOW_deviceIDRaw::getRomIDString   const [virtual]
 

Get 64 bit ROM ID as hex C++ string.

Returns:
The ROM ID as hex string.

Definition at line 140 of file LOW_deviceIDRaw.cpp.

References __LOW_SYNCHRONIZE_METHOD_READ__, and romID.

byteVec_t LOW_deviceIDRaw::getRomIDVec   const [virtual]
 

Get 64 bit ROM ID as byte vector.

Returns:
The ROM ID as byte vector.

Definition at line 127 of file LOW_deviceIDRaw.cpp.

References __LOW_SYNCHRONIZE_METHOD_READ__, byteVec_t, and romID.

Referenced by LOW_netSegment::cmd_MatchROM(), and LOW_linkDS2490::searchDevices().

void LOW_deviceIDRaw::getSerialNum devSerNum_t   outSerNum const [virtual]
 

Get 48 bit serial number.

Parameters:
outSerNum  Reference where rhe ID's serial number part is written to.

Definition at line 165 of file LOW_deviceIDRaw.cpp.

References __LOW_SYNCHRONIZE_METHOD_READ__, and romID.

bool LOW_deviceIDRaw::operator!= const LOW_deviceIDRaw &    inDID const [virtual]
 

Comparison on the whole 64 bits of ID.

Definition at line 92 of file LOW_deviceIDRaw.cpp.

References __LOW_SYNCHRONIZE_METHOD_READ__, and romID.

bool LOW_deviceIDRaw::operator< const LOW_deviceIDRaw &    inDID const [virtual]
 

Comparison on the whole 64 bits of ID.

Definition at line 99 of file LOW_deviceIDRaw.cpp.

References __LOW_SYNCHRONIZE_METHOD_READ__, and romID.

bool LOW_deviceIDRaw::operator== const LOW_deviceIDRaw &    inDID const [virtual]
 

Comparison on the whole 64 bits of ID.

Definition at line 82 of file LOW_deviceIDRaw.cpp.

References __LOW_SYNCHRONIZE_METHOD_READ__, and romID.

void LOW_deviceIDRaw::setBit const uint8_t    inBitNum,
const bool    inValue
[virtual]
 

Set 1 bit in the ID.

Parameters:
inBitNum  Number of the bit to set (0-63).
inValue  Value to set the bit to.
Exceptions:
range_error  Thrown when inBitNum is out of range.

Reimplemented in LOW_deviceID.

Definition at line 201 of file LOW_deviceIDRaw.cpp.

References __LOW_SYNCHRONIZE_METHOD_WRITE__, and romID.

Referenced by LOW_linkDS2480B::doSearchSequence(), LOW_link::doSearchSequence(), and LOW_link::searchDevices().

void LOW_deviceIDRaw::setFamilyCode const devFamCode_t    inFamCode [virtual]
 

Set 8 bit family code.

Parameters:
inFamCode  Value of family code to set.

Reimplemented in LOW_deviceID.

Definition at line 182 of file LOW_deviceIDRaw.cpp.

References __LOW_SYNCHRONIZE_METHOD_WRITE__, and romID.

Referenced by LOW_linkDS2490::searchDevices(), and LOW_link::searchDevices().


Member Data Documentation

devRomID_t LOW_deviceIDRaw::romID [protected]
 

The lasered ROM ID.

Definition at line 180 of file LOW_deviceIDRaw.h.

Referenced by LOW_deviceID::checkCRC(), getBit(), getCRC(), getFamilyCode(), getRomID(), getRomIDString(), getRomIDVec(), getSerialNum(), LOW_deviceIDRaw(), operator!=(), operator<(), operator==(), setBit(), and setFamilyCode().


The documentation for this class was generated from the following files:
Generated on Mon Oct 27 22:56:29 2003 by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001