14 #if defined(_DEBUG) && !defined(USE_ROOT) && defined(WIN32) 30 debug(
"DCU::DCU" ,
"DCU built" ) ;
100 SPECSSLAVE *specsSlv=specsSlaveDevice();
103 "Could not reach proper Specs Master and/or Slave.");
107 SpecsError status = specs_dcu_acquire (specsSlv
116 warning(
"DCU::acquire",
"Acquisition failure channel " +
118 "[code=" +
itos(status) +
"]" );
122 verbose(
"DCU::acquire",
"Channel " +
itos (channel) +
123 " -> Acquisition : " +
itos(data) );
126 verbose(
"DCU::acquire",
"Compilation in _NODEVICE_ mode.");
136 SPECSSLAVE *specsSlv=specsSlaveDevice();
138 warning"DCU::reset",
"Could not reach proper Specs Master and/or Slave.");
141 SpecsError status = specs_dcu_reset (specsSlv
147 warning(
"DCU::reset",
"Could not properly reset the DCU.");
151 verbose(
"DCU::reset",
"DCU reset.");
154 verbose(
"DCU::reset",
"Compilation in _NODEVICE_ mode.");
163 SPECSSLAVE *specsSlv=specsSlaveDevice();
166 "Could not reach proper Specs Master and/or Slave.");
169 SpecsError status = specs_dcu_initialize (specsSlv
175 warning(
"DCU::init",
"Could not properly init the DCU.");
179 verbose(
"DCU::init",
"DCU init.");
182 verbose(
"DCU::init",
"Compilation in _NODEVICE_ mode.");
192 SPECSSLAVE *specsSlv=specsSlaveDevice();
195 "Could not reach proper Specs Master and/or Slave.");
198 SpecsError status = specs_dcu_set_LIR (specsSlv
204 msgSvc( WARNING,
"DCU::setLIR",
"Could not properly set LIR Mode");
208 verbose(
"DCU::setLIR",
"DCU LIR Mode set");
212 "Compilation in _NODEVICE_ mode.");
222 SPECSSLAVE *specsSlv=specsSlaveDevice();
225 "Could not reach proper Specs Master and/or Slave.");
228 SpecsError status = specs_dcu_set_HIR (specsSlv
234 msgSvc( WARNING,
"DCU::setHIR",
"Could not properly set HIR Mode");
238 verbose(
"DCU::setHIR",
"DCU HIR Mode set");
242 "Compilation in _NODEVICE_ mode.");
252 SPECSSLAVE *specsSlv=specsSlaveDevice();
255 "Could not reach proper Specs Master and/or Slave.");
259 SpecsError status = specs_dcu_read_mode (specsSlv
266 msgSvc( WARNING,
"DCU::readMode",
"Could not properly read DCU Mode");
272 verbose(
"DCU::readMode",
"DCU read Mode HIR" );
275 verbose(
"DCU::readMode",
"DCU read Mode LIR" );
280 "Compilation in _NODEVICE_ mode.");
293 warning(
"DCU::convertInputValueViaI2c",
"Cannot read mode" ) ;
297 std::string unit =
"V" ;
299 if ( channel == 7 ) unit =
"C" ;
304 value = ( (double) ( input_value - 2469 ) ) / 9.22 + 25. ;
307 value = input_value * 0.0003052 ;
308 else if ( mode == 0 )
309 value = 2.5 - input_value * 0.0003052 ;
311 std::ostringstream outstr ;
312 outstr << value <<
" " << unit ;
314 output_value = outstr.str() ;
void verbose(std::string mymsg)
bool acquire(U8, U16 &, double &)
void setType(std::string type)
void setId(unsigned char id)
void debug(std::string mymsg)
def data(object, stream=None)
bool convert(std::string &converted_value, U16 input_value, U8 channel)
void msgSvc(int level, std::string msg, std::string name)
void warning(std::string mymsg)