/* * dbCrate.hh * * Created on: Jul 26, 2014 * Author: Hovanes Egiyan */ #ifndef _DBCRATE_HH_ #define _DBCRATE_HH_ // for hostname to ip conversion #include #include #include #include #include #include #include #include #include #include #include #include "drvMPOD.hh" #include "drvGlobalMPOD.hh" extern "C" { #include "HVCAENx527.h" #include "BaseIUComDef.h" } #include "BaseIUDevice.hh" #include "BaseIUVirtBus.hh" #include "BaseIURecordMaker.hh" #include "dbObject.hh" using namespace std; class dbCrate : public dbObject { protected: static map crateMap; // Map of all unique crates created. The key is the host name static QString sqlFindCrates; // String to find the greates in the DB using unique ID int id; // Unique ID in Crate map string name; // Crate name string host; // Crate hostname string ipAddress; // IP address for crate string type; // Crate type string hostName2address(); // Convert hostname to IP address public: dbCrate( string uri, int dbID ); virtual ~dbCrate(); // Configure this create virtual void configureCrate( int slot = -1 ); // Load EPICS records static void loadRecords( string prefix, string crateName, int slot ); inline static map getCrateMap() // Return the crate map { return crateMap; } inline string getName() {return name;} inline string getHost() {return host;} inline string getIPAddress() {return ipAddress;} inline int getID() {return id;} }; #endif /* _DBCRATE_HH_ */