#ifndef EPOWERSWITCH_FRONTEND_H #define EPOWERSWITCH_FRONTEND_H #include "m_epics_ca.h" #include "tmfe.h" #include class ePowerSwitchEquipment : public TMFeEquipment { public: /** * @brief constructor * * @param equipmentName name show on Midas for the equipment * @param equipmentFileName file name for automatically tagged message */ ePowerSwitchEquipment(std::string equipmentName, const char *equipmentFileName); /** * @brief called periodically by Midas */ void HandlePeriodic(); private: std::vector *> outletSetRecords; std::vector *> outletGetRecords; mEpicsCa outletNumberRecord; int numberOfOutlet; /** * @brief refresh information about the given socket ID * * @param socketId which socket to refresh */ void refreshSocket(int socketId); /** * @brief refresh information about all the available sockets */ void refreshAllSockets(); /** * @brief detect and modify the current socket pool in case of change */ void updateSocketNumber(); }; class ePowerSwitchFrontend : public TMFrontend { public: /** * @brief constructor * * @param frontendName name shown on Midas for the frontend * @param equipmentName name shown on Midas for the equipment */ ePowerSwitchFrontend(std::string frontendName, std::string equipmentName); }; #endif