11 #include <mx/ioutils/stringUtils.hpp>
65 const std::string & tstr
68 std::vector<std::string> v;
69 mx::ioutils::parseStringVector(v, tstr,
"[]");
71 if( v.size() < 18)
return -1;
73 temps.
CCD = mx::ioutils::convertFromString<float>( v[1] );
74 temps.
CPU = mx::ioutils::convertFromString<float>( v[3] );
75 temps.
POWER = mx::ioutils::convertFromString<float>( v[5] );
76 temps.
BIAS = mx::ioutils::convertFromString<float>( v[7] );
77 temps.
WATER = mx::ioutils::convertFromString<float>( v[9] );
78 temps.
LEFT = mx::ioutils::convertFromString<float>( v[11] );
79 temps.
RIGHT = mx::ioutils::convertFromString<float>( v[13] );
80 temps.
SET = mx::ioutils::convertFromString<float>( v[15] )/10.0;
81 temps.
COOLING_POWER = mx::ioutils::convertFromString<float>( v[17] );
95 const std::string & fstr
98 std::vector<std::string> v;
99 mx::ioutils::parseStringVector(v, fstr,
"[]");
101 if( v.size() < 3)
return -1;
103 fps = mx::ioutils::convertFromString<float>( v[1] );
116 const std::string & fstr
119 std::vector<std::string> v;
120 mx::ioutils::parseStringVector(v, fstr,
" ");
128 emGain = mx::ioutils::convertFromString<unsigned>( v[3] );
130 if(emGain < 1 || emGain > 600)
int parseFPS(float &fps, const std::string &fstr)
Parse the FPS response.
int parseTemps(ocamTemps &temps, const std::string &tstr)
Parse the OCAM temp query and fill the ocamTemps structure.
int parseEMGain(unsigned &emGain, const std::string &fstr)
Parse the EM gain response.
Structure to hold the OCAM camera temperature readings returned by the device.
float WATER
Cooling water temperature.
int setInvalid()
Set all values to the invalid value, -999.
float COOLING_POWER
the cooling power in 100 mw.
float BIAS
Bias temperature.
bool operator==(const ocamTemps &t)
Test for equality between two ocamTemps structures.
float SET
The CCD set temeperature.
float CCD
The detector temperature.
float POWER
Power supply temperature.
float CPU
The CPU temperature.
float LEFT
The left amplifier temperature.
float RIGHT
The right amplifier temperature.