Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Related Pages

configserver.h

00001 #ifndef SCT_CONFIGSERVER_H
00002 #define SCT_CONFIGSERVER_H
00003 #include <ipc/object.h>
00004 #include <ipc/server.h>
00005 
00006 #include "configuration.hh"
00007 
00008 #include "sctConf/configXMLImpl.h"
00009 
00010 #include <is/isinfo.h>
00011 #include <rc/RCStateInfo.h>
00012 #include <memory>
00013 
00014 class ConfigServer : public IPCNamedObject<POA_sctConf::Configuration, ipc::single_thread> {
00015   ConfigurationXMLImpl config;
00016   std::auto_ptr<ISInfoReceiver> infoReceiver;     
00017   
00019   static sctConf::ConfigurationException wrapException(SctConfiguration::ConfigurationException& e);
00020  public:
00021 
00022   ConfigServer(const IPCPartition& p, const std::string& name);
00023   virtual ~ConfigServer();      // destructor
00024   
00025  // methods
00026 
00027   virtual sctConf::PartitionList* listPartitions ();
00028   virtual sctConf::CrateList* listCratesInPartition (CORBA::ULong partition);
00029   virtual CORBA::Boolean isDummyCrate (CORBA::ULong partition, CORBA::ULong crate);
00030   virtual sctConf::RodList* listRodsInCrate (CORBA::ULong partition, CORBA::ULong crate);
00031   virtual sctConf::MURList* listMURSInRod (CORBA::ULong partition, CORBA::ULong crate, CORBA::ULong rod);
00032   virtual sctConf::ModuleList* listModulesInMUR (CORBA::ULong partition, CORBA::ULong MUR);
00033   virtual sctConf::ModuleList* listRModulesInMUR (CORBA::ULong partition, CORBA::ULong MUR);
00034   virtual sctConf::ModuleList* listAllModules ();
00035   virtual sctConf::ModuleList* listUnusedModules ();
00036   virtual sctConf::ABCDModule getModuleConfig (const char* mod);
00037   virtual CORBA::UShort getModuleGroup (const char* mod);
00038   virtual void setModuleGroup (const char* mod, CORBA::Short group);
00039   virtual sctConf::RodConfig * getRodConfig (CORBA::ULong partition, CORBA::ULong crate, CORBA::ULong rod);
00040   virtual sctConf::SlaveConfig* getDefaultSlaveConfig (CORBA::Octet type);
00041   virtual sctConf::TimConfig getTimConfig (CORBA::ULong partition, CORBA::ULong crate);
00042   virtual sctConf::CharBlock* getFibreMappings (CORBA::ULong partition, CORBA::ULong crate, CORBA::ULong rod);
00043   virtual void setFibreMapping(CORBA::ULong partition, CORBA::ULong crate, CORBA::ULong rod, CORBA::ULong channel, CORBA::ULong tx, CORBA::ULong rx0, CORBA::ULong rx1);
00044   virtual sctConf::BOCChannelConfig getBOCConfig (CORBA::ULong partition, CORBA::ULong crate, CORBA::ULong rod, CORBA::ULong channel);
00045   virtual sctConf::BOCGlobalConfig getBOCGlobalConfig (CORBA::ULong partition, CORBA::ULong crate, CORBA::ULong rod);
00046   virtual void printModuleConfig(const sctConf::ABCDModule& conf);
00047   virtual sctConf::MURType getMURType (CORBA::ULong MUR);
00048   virtual CORBA::ULong getFreeMurId ();
00049   virtual void translateToROD(CORBA::ULong MUR, CORBA::ULong mod, CORBA::ULong& partition, CORBA::ULong& crate, CORBA::ULong& rod, CORBA::ULong& channel);
00050   virtual void translateToRROD(CORBA::ULong MUR, CORBA::ULong mod, CORBA::ULong& partition, CORBA::ULong& crate, CORBA::ULong& rod, CORBA::ULong& channel);
00051   virtual void translateToSN(CORBA::ULong MUR, CORBA::ULong mod, CORBA::String_out sn);
00052   virtual void translateToRMUR(CORBA::ULong RMUR, CORBA::ULong rmod, CORBA::ULong& MUR, CORBA::ULong& mod);
00053   virtual void translateToBarrel(CORBA::ULong MUR, CORBA::ULong mod, CORBA::ULong& barrel, CORBA::ULong& row, CORBA::Long& number);
00054   virtual void translateToEndcap(CORBA::ULong MUR, CORBA::ULong mod, CORBA::Long& disk, CORBA::ULong& ring, CORBA::ULong& number);
00055   virtual void translateToPowerSupply(CORBA::ULong MUR, CORBA::ULong mod, CORBA::ULong& partition, CORBA::ULong& crate, CORBA::ULong& channel);
00056   virtual void translateFromROD(CORBA::ULong partition, CORBA::ULong crate, CORBA::ULong rod, CORBA::ULong channel, CORBA::ULong& MUR, CORBA::ULong& mod);
00057   virtual void translateFromRROD(CORBA::ULong partition, CORBA::ULong crate, CORBA::ULong rod, CORBA::ULong channel, CORBA::ULong& MUR, CORBA::ULong& mod);
00058   virtual void translateFromSN (const char* sn, CORBA::ULong& MUR, CORBA::ULong& mod);
00059   virtual void translateFromRMUR(CORBA::ULong MUR, CORBA::ULong mod, CORBA::ULong& RMUR, CORBA::ULong& rmod);
00060   virtual void translateFromBarrel(CORBA::ULong barrel, CORBA::ULong row, CORBA::Long number, CORBA::ULong& MUR, CORBA::ULong& mod);
00061   virtual void translateFromEndcap(CORBA::Long disk, CORBA::ULong ring, CORBA::ULong number, CORBA::ULong& MUR, CORBA::ULong& mod);
00062   virtual void translateFromPowerSupply(CORBA::ULong partition, CORBA::ULong crate, CORBA::ULong channel, CORBA::ULong& MUR, CORBA::ULong& mod);
00063   virtual void configureModuleFromStructure (const char* number, const sctConf::ABCDModule& mConf);
00064   virtual void configureModuleFromFile (const char* filename);
00065   virtual void configureROD (CORBA::ULong partition, CORBA::ULong crate, CORBA::ULong rod, const sctConf::RodConfig& conf);
00066   virtual void configureTIM (CORBA::ULong partition, CORBA::ULong crate, const sctConf::TimConfig& conf);
00067   virtual void configureBOC (CORBA::ULong partition, CORBA::ULong crate, CORBA::ULong rod, const sctConf::BOCGlobalConfig& conf);
00068   virtual void clearAll ();
00069   virtual void namePartition (CORBA::ULong partition, const char* name);
00070   virtual void mapRODMUR (CORBA::ULong partition, CORBA::ULong crate, CORBA::ULong rod, CORBA::ULong order, CORBA::ULong number);
00071   virtual void unmapRODMUR (CORBA::ULong MUR);
00072   virtual void mapBarrelMUR (CORBA::ULong MUR, CORBA::ULong barrel, CORBA::ULong row, CORBA::Long position);
00073   virtual void unmapBarrelMUR (CORBA::ULong MUR);
00074   virtual void mapEndcapMUR (CORBA::ULong MUR, CORBA::Long disk, CORBA::ULong quadrant, CORBA::ULong position);
00075   virtual void unmapEndcapMUR (CORBA::ULong MUR);
00076   virtual void mapPowerChannel (CORBA::ULong MUR, CORBA::ULong number, CORBA::ULong partition, CORBA::ULong crate, CORBA::ULong channel);
00077   virtual void unmapPowerChannel (CORBA::ULong MUR, CORBA::ULong number);
00078   virtual void mapModuleMUR (CORBA::ULong MUR, CORBA::ULong order, CORBA::ULong RMUR, CORBA::ULong rorder, const char* sn);
00079   virtual void unmapModuleMUR (CORBA::ULong MUR, CORBA::ULong order);
00080   virtual void getMapMURROD (CORBA::ULong MUR, CORBA::ULong& partition, CORBA::ULong& crate, CORBA::ULong& rod, CORBA::ULong& order);
00081   virtual void getMapRODMUR (CORBA::ULong partition, CORBA::ULong crate, CORBA::ULong rod, CORBA::ULong order, CORBA::ULong& MUR);
00082   virtual sctConf::MURType getMapMURPhysical (CORBA::ULong MUR, CORBA::ULong& plane, CORBA::ULong& section, CORBA::ULong& position);
00083   virtual void swapMURNames (CORBA::ULong MUR1, CORBA::ULong MUR2);
00084   virtual void modifyDefaultPowerParam(const char* state, const char* name, const char* type, CORBA::Float value);
00085   virtual void modifyHVCardParam(CORBA::ULong crate, CORBA::ULong card, const char* name, const char* type, CORBA::Float value);
00086   virtual void modifyLVCardParam(CORBA::ULong crate, CORBA::ULong card, const char* name, const char* type, CORBA::Float value);
00087   virtual void modifyPowerParam(CORBA::ULong MUR, CORBA::ULong number, const char* state, const char* name, const char* type, CORBA::Float value);
00088   virtual void modifyPowerParamCC(CORBA::ULong crate, CORBA::ULong channel, const char* state, const char* name, const char* type, CORBA::Float value);
00089   virtual CORBA::Float getDefaultPowerParam(const char* state, const char* name, const char* type);
00090   virtual CORBA::Float getHVCardParam(CORBA::ULong crate, CORBA::ULong card, const char* name, const char* type);
00091   virtual CORBA::Float getLVCardParam(CORBA::ULong crate, CORBA::ULong card, const char* name, const char* type);
00092   virtual CORBA::Float getPowerParam(CORBA::ULong MUR, CORBA::ULong number, const char* state, const char* name, const char* type);
00093   virtual CORBA::Float getPowerParamCC(CORBA::ULong crate, CORBA::ULong channel, const char* state, const char* name, const char* type);
00094   virtual sctConf::NameList* listDefaultPowerParams ();
00095   virtual sctConf::NameList* listDCSChannelParams ();
00096   virtual sctConf::NameList* listDCSCardParams ();
00097   virtual sctConf::NameList* listDCSCrateParams ();
00098   virtual void configureBOCChannel (CORBA::ULong MUR, CORBA::ULong position, const sctConf::BOCChannelConfig& conf);
00099   virtual void loadConfiguration (const char* filename);
00100   virtual void saveConfiguration (const char* filename);
00101   virtual void saveModuleConfiguration (const char* sn, const char* filename);
00102   virtual char* getModuleConfigurationString (const char* modsn, const sctConf::ABCDModule& config);
00103   virtual void writePowerSupplyConfiguration (const char* directory);
00104   virtual void shutdown();
00105 };
00106 
00107 #endif

Generated on Mon Feb 21 11:43:40 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5