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

LOW_devDS2405.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                           LOW_devDS2405.cpp  -  description
00003                              -------------------
00004     begin                : Tue Aug 20 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 
00019 #include "LOW_devDS2405.h"
00020 #include "LOW_platformMisc.h"
00021 #include "LOW_helper_msglog.h"
00022 #include "LOW_deviceFactory.h"
00023 #include "LOW_netSegment.h"
00024 
00025 
00026 
00027 //=====================================================================================
00028 //
00029 // static initializer
00030 //
00031 
00032 const std::string LOW_devDS2405::familyName = "DS2405";
00033 
00034 int LOW_devDS2405::initHelper = initialize();
00035 int LOW_devDS2405::initialize()
00036 {
00037   LOW_deviceFactory::registerSpecificCtor( familyCode, &LOW_devDS2405::new_Instance);
00038   return 0;
00039 }
00040         
00041 
00042         
00043 //=====================================================================================
00044 //
00045 // static methods
00046 //
00047   
00048 LOW_device* LOW_devDS2405::new_Instance( LOW_netSegment &inNetSegment, const LOW_deviceID &inDevID)
00049 {
00050   return new LOW_devDS2405( inNetSegment, inDevID);
00051 }
00052 
00053 
00054 
00055 //=====================================================================================
00056 //
00057 // constructors
00058 //
00059 
00060 LOW_devDS2405::LOW_devDS2405( LOW_netSegment &inSegment, const LOW_deviceID &inDevID) : 
00061   LOW_device( inSegment, inDevID, familyCode)
00062 {
00063 }
00064 
00065 
00066 LOW_devDS2405::~LOW_devDS2405()
00067 {
00068 }
00069 
00070 
00071 //=====================================================================================
00072 //
00073 // methods
00074 //
00075 
00076 void LOW_devDS2405::cmd_Match() const
00077 {
00078   linkLock  lock( *this);
00079   
00080   cmd_MatchROM();
00081 }
00082 
00083 
00084 bool LOW_devDS2405::cmd_MatchRead() const
00085 { 
00086   linkLock  lock( *this);
00087 
00088   cmd_Match();
00089   return getLink().readDataBit();
00090 }
00091 
00092 
00093 bool LOW_devDS2405::cmd_SearchRead() const
00094 {
00095   linkLock  lock( *this);
00096   
00097   verifyDevice( false, false);
00098   return getLink().readDataBit();
00099 }
00100 
00101 
00102 bool LOW_devDS2405::cmd_SearchActive() const
00103 {
00104   linkLock  lock( *this);
00105   
00106   return verifyDevice( true);
00107 }

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