Rcu.h

Go to the documentation of this file.
00001 // -*- mode: C++ -*- 
00002 //
00003 // Copyright (C) 2006 Christian Holm Christensen <cholm@nbi.dk>
00004 //
00005 // This library is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public License
00007 // as published by the Free Software Foundation; either version 2.1
00008 // of the License, or (at your option) any later version.
00009 //
00010 // This library is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with this library; if not, write to the Free
00017 // Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018 // 02111-1307 USA
00019 //
00025 #ifndef RCUCONF_RCU_H
00026 #define RCUCONF_RCU_H
00027 #ifndef RCUCONF_COMPONENT_H
00028 # include <rcuconf/Component.h>
00029 #endif
00030 
00031 namespace Rcuxx
00032 {
00033   class Rcu;
00034   class RcuRegister;
00035   class RcuCommand;
00036   class RcuMemory;
00037 }
00038 
00039 namespace RcuConf
00040 {
00045   class Rcu : public Component 
00046   {
00047   public: 
00050     Rcu(Rcuxx::Rcu& rcu) : fRcu(rcu) {}
00052     virtual ~Rcu() {}
00053 
00059     unsigned int Write(const Parameter&   p, 
00060                        const SingleValue& v);
00066     unsigned int Write(const Parameter&   p, 
00067                        const BlobValue&   v);
00068 
00074     unsigned int Read(const Parameter&   p, 
00075                       SingleValue&       v);
00081     unsigned int Read(const Parameter&   p, 
00082                       BlobValue&         v);
00083 
00085     const std::string& ErrorString(int err);
00086 
00088     void StartBlock();
00091     int EndBlock();
00094     long int* GetBlock() const;
00095     
00096     
00100     static bool Create(RcuDb::Server& server);
00101   protected:
00103     Rcuxx::RcuRegister* Name2Register(const std::string& name);
00105     Rcuxx::RcuCommand* Name2Command(const std::string& name);
00107     Rcuxx::RcuMemory* Name2Memory(const std::string& name);
00108     
00110     Rcuxx::Rcu& fRcu;
00112     std::string fErrorString;
00113   };
00114 }
00115 #endif
00116 //
00117 // EOF
00118 // 
Top of page Last update Fri Apr 27 01:54:16 2007
Copyright © 2004 Christian Holm Created by DoxyGen 1.3.5