#ifndef EPOWERSWITCH_FRONTEND_H #define EPOWERSWITCH_FRONTEND_H #include "m_epics_ca.h" #include "tmfe.h" #include class ePowerSwitchEquipment : public TMFeEquipment { public: /** * @brief contructor * * @param equipmentName name show on midas for the equipment * @param equipmentFileName file name for automatic tagged message */ ePowerSwitchEquipment(std::string equipmentName, const char *equipmentFileName); /** * @brief call periodicly by midas */ void HandlePeriodic(); private: std::vector *> outletCommandRecords; std::vector outletLastState; 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 socket */ void refreshAllSockets(); /** * @brief detect and modify the current socket pool in case of change */ void updateSocketNumber(); }; class ePowerSwitchFrontend : public TMFrontend { public: /** * @brief contructor * * @param frontendName name show on midas for the frontend * @param equipmentName name show on midas for the equipment */ ePowerSwitchFrontend(std::string frontendName, std::string equipmentName); }; #endif