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

LOW_deviceID.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                           LOW_deviceID.cpp  -  description
00003                              -------------------
00004     begin                : Sat Jul 6 2002
00005     copyright            : (C) 2002 by Harald Roelle
00006     email                : roelle@informatik.uni-muenchen.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #include "LOW_deviceID.h"
00019 #include "LOW_helper_crc.h"
00020 
00021 
00022 //=====================================================================================
00023 //
00024 // public constructors
00025 //
00026 
00027 LOW_deviceID::LOW_deviceID() :
00028   LOW_deviceIDRaw()
00029 {
00030 }
00031 
00032 LOW_deviceID::LOW_deviceID( const LOW_deviceID &inDeviceID) :
00033   LOW_deviceIDRaw( inDeviceID)
00034 {
00035   checkCRC();
00036 }
00037 
00038 LOW_deviceID::LOW_deviceID( const devRomID_t &inRomID) :
00039   LOW_deviceIDRaw( inRomID)
00040 {
00041   checkCRC();
00042 }
00043 
00044 LOW_deviceID::LOW_deviceID( uint32_t inHighInt, uint32_t inLowInt) :
00045   LOW_deviceIDRaw( inHighInt, inLowInt)
00046 {
00047   checkCRC();
00048 }
00049   
00050 LOW_deviceID::LOW_deviceID( const byteVec_t &inRomID) :
00051   LOW_deviceIDRaw( inRomID)
00052 {
00053   checkCRC();
00054 }
00055 
00056 LOW_deviceID::LOW_deviceID( const LOW_deviceIDRaw &inDevIDRaw) :
00057   LOW_deviceIDRaw( inDevIDRaw)
00058 {
00059   checkCRC();
00060 }
00061 
00062     
00063 LOW_deviceID::~LOW_deviceID()
00064 {
00065 }
00066 
00067 
00068 //=====================================================================================
00069 //
00070 // private methods
00071 //
00072 
00073 void LOW_deviceID::checkCRC()
00074 {
00075   __LOW_SYNCHRONIZE_METHOD_READ__
00076 
00077   if ( LOW_helper_CRC::calcCRC8( romID, sizeof( romID)) != 0 )
00078     throw LOW_helper_CRC::crc_error( "CRC checksum error in ROM ID", __FILE__, __LINE__);
00079 }
00080 
00081 
00082 void LOW_deviceID::setBit( const uint8_t /*inBitNum*/, const bool /*inValue*/)
00083 {
00084 }
00085 
00086 
00087 void LOW_deviceID::setFamilyCode( const devFamCode_t /*inFamCode*/)
00088 {
00089 }

Generated on Tue Feb 3 11:30:25 2004 for OneWireLibrary++ by doxygen 1.3.2