UniSet  2.2.1
UConnector.h
00001 #ifndef UConnector_H_
00002 #define UConnector_H_
00003 // --------------------------------------------------------------------------
00004 #include <memory>
00005 #include <string>
00006 #include "Configuration.h"
00007 #include "UInterface.h"
00008 #include "UTypes.h"
00009 #include "UExceptions.h"
00010 // --------------------------------------------------------------------------
00011 class UConnector
00012 {
00013     public:
00014         UConnector( int argc, char** argv, const std::string& xmlfile )throw(UException);
00015         UConnector( UTypes::Params* p, const std::string& xmlfile )throw(UException);
00016         ~UConnector();
00017 
00018         inline std::string getUIType()
00019         {
00020             return string("uniset");
00021         }
00022 
00023         std::string getConfFileName();
00024         long getValue( long id, long node )throw(UException);
00025         void setValue( long id, long val, long node )throw(UException);
00026 
00027         long getSensorID( const std::string& name );
00028         long getNodeID(  const std::string& name );
00029 
00030         std::string getShortName( long id );
00031         std::string getName( long id );
00032         std::string getTextName( long id );
00033 
00034     private:
00035         std::shared_ptr<UniSetTypes::Configuration> conf;
00036         std::shared_ptr<UInterface> ui;
00037         std::string xmlfile;
00038 };
00039 //---------------------------------------------------------------------------
00040 #endif
00041 //---------------------------------------------------------------------------