7 #ifndef trippLitePDU_simulator_hpp
8 #define trippLitePDU_simulator_hpp
26 const std::string & port
29 static_cast<void>(ipAddr);
30 static_cast<void>(port);
35 int login(
const std::string & user,
36 const std::string & pass
39 static_cast<void>(user);
40 static_cast<void>(pass);
77 snprintf(vstr,
sizeof(vstr),
"%0.1f",
m_voltage);
86 snprintf(cstr,
sizeof(cstr),
"%0.2f",
m_current);
88 strRead =
"-------------------------------------------------------------------------------\n";
89 strRead +=
"01: PDUMH20NET2LX 'Device0062'\n";
90 strRead +=
"--------------------------------------------------------------------------------\n";
91 strRead +=
"Device Type: PDU\n";
92 strRead +=
"Device Status: WARNING !\n";
94 strRead +=
"Input Voltage: " + std::string(vstr) +
" V \n" ;
95 strRead +=
"Input Frequency: " + std::string(fstr) +
" Hz \n" ;
96 strRead +=
"Low Transfer Voltage: " + std::string(tvstr) +
" V \n";
98 strRead +=
"Output Current: " + std::string(cstr) +
" A - Total \n";
100 strRead +=
"Outlets On: ";
105 for(
size_t n=0; n <
m_outlets.size(); ++n)
109 if(prev) strRead +=
" ";
110 strRead += std::to_string(n+1);
float m_lowTransferVoltage
int connect(const std::string &ipAddr, const std::string &port)
std::vector< int > m_outlets
int devStatus(std::string &strRead)
int turnOutletOff(uint16_t outletNum)
int login(const std::string &user, const std::string &pass)
int turnOutletOn(uint16_t outletNum)