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

LOW_devUnknown.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           LOW_devUnknown.h  -  description
00003                              -------------------
00004     begin                : Sun Nov 9 2003
00005     copyright            : (C) 2003 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 #ifndef LOW_DEVUNKNOWN_H
00019 #define LOW_DEVUNKNOWN_H
00020 
00021 
00022 #include "LOW_device.h"
00023 
00024 
00025 
00026 /** Device class for (yet) unknown 1-Wire devices.
00027 
00028     This class is thread-safe.
00029 
00030     @author Harald Roelle
00031  */
00032 class LOW_devUnknown : public LOW_device  {
00033 
00034 //=======================================================================================
00035 public:
00036 
00037   //=====================================================================================
00038   //
00039   // type definitions
00040   //
00041 
00042   typedef std::vector<LOW_devUnknown*> devUnknownPtrVec_t;  /**< Vector type of class device pointers. */
00043 
00044 
00045   //=====================================================================================
00046   //
00047   // constants
00048   //
00049 
00050   /** Family code of this specific device. */
00051   static const LOW_deviceIDRaw::devFamCode_t  familyCode = LOW_device::unknownDev_famCode;
00052 
00053   /** Family name of this specific device. */
00054   static const std::string familyName;
00055 
00056 
00057   //=====================================================================================
00058   //
00059   // constructors
00060   //
00061 
00062   /** Real constructor corresponding to static pseudo constructor new_Instance().
00063 
00064       External power supply status is initially detected here.
00065 
00066       @param  inSegment  Reference to network segment the device is on.
00067       @param  inDevID    Reference to device's ID.
00068    */
00069   LOW_devUnknown( LOW_netSegment &inSegment, const LOW_deviceID &inDevID);
00070 
00071 
00072   /** Destructor.
00073    */
00074   virtual ~LOW_devUnknown();
00075 
00076 
00077   //=====================================================================================
00078   //
00079   // methods
00080   //
00081 
00082   /** Get the device's family code.
00083       <B>Note:</B> Subclasses must implement this method to return their specific family code.
00084       @return Family name of the device.
00085    */
00086   virtual const LOW_deviceIDRaw::devFamCode_t getFamilyCode() const { return familyCode; };
00087 
00088   /** Get the device's family name.
00089       <B>Note:</B> Subclasses must implement this method to return a clear text
00090                    name of their family.
00091       @return Family name of the device.
00092    */
00093   virtual const std::string getFamilyName() const { return familyName; };
00094 
00095 
00096 
00097 //=======================================================================================
00098 protected:
00099 
00100   //=====================================================================================
00101   //
00102   // static methods
00103   //
00104 
00105   /** Static pseudo constructor for registering with LOW_deviceFactory.
00106       @param  inSegment  Reference to network segment the device is on.
00107       @param  inDevID    Reference to device's ID.
00108       @return  New dynamic instance of specific device class.
00109    */
00110   static LOW_device* new_Instance( LOW_netSegment &inNetSegment, const LOW_deviceID &inDevID);
00111 
00112 
00113 
00114 //=======================================================================================
00115 private:
00116 
00117   //=====================================================================================
00118   //
00119   // static initializer
00120   //
00121 
00122   /** Needed for dirty little C++ hack to force static initialization on application start.
00123       @see initialize()
00124   */
00125   static int initHelper;
00126 
00127   /** Static inizializer to register the class with LOW_deviceFactory.
00128       @see initHelper
00129   */
00130   static int initialize();
00131 
00132 };
00133 
00134 #endif

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