fdhwlib
2.0.25
|
#include <calibcontrol.h>
Interface to control the UNM calibration system.
Configuration (Default: FE.ini)
; ; Control of the UNM calibration system [CalibControl] host = calib1 port = 12345
Changed:
Definition at line 40 of file calibcontrol.h.
CalibControl::CalibControl | ( | const char * | hostIp = "calib1" , |
int | portNo = 12345 |
||
) |
The contructor uses the default values calib1 and the port 12345 as prefered by J.
Matthews.
virtual CalibControl::~CalibControl | ( | ) | [virtual] |
int CalibControl::execute | ( | char * | command | ) |
Execute a command at the calibration PC.
int CalibControl::getData | ( | FILE * | fout, |
CalibData * | data | ||
) |
Get the information about the last performed calibration run.
Every script will produced one line of parameters beginning with a time stamp.
Format of the time stamp (source calib1:/home/johnm/develop/logging/logging.c):
temp_d = (float) systime.tm_yday + 1; // add 1 so that January 1 = day 1 (not 0) temp_h = (float) systime.tm_hour; temp_m = (float) systime.tm_min; temp_s = (float) systime.tm_sec; date = temp_d + (temp_s + (temp_m + temp_h*60.)*60.)/(24.*60.*60.); sprintf(date_str,"%-.5f",date);
@ return 0 reased end of data, no data returned, 1 returned valid data
int CalibControl::getData | ( | std::string * | data | ) |
Get a string with the calibration data from the calibration units.
@ return 0 reased end of data, no data returned, 1 returned valid data
char* CalibControl::getMessage | ( | int * | end_flag, |
int * | rpbp_bit | ||
) |
int CalibControl::getStatus | ( | int * | end_flag, |
int * | rpbp_bit | ||
) |
Retrieve the status of the calibration system.
Meaning of the end_flag (source calib1:/home/johnm/develop/main.c):
int CalibControl::getStatus | ( | FILE * | fout, |
int * | end_flag, | ||
int * | rpbp_bit | ||
) |
void CalibControl::init | ( | char * | inifile = "FE.ini" , |
FILE * | fdebug = 0 |
||
) |
Read configuration from ini file.
inifile | Name of the inifile |
fdebug | Optional output during initialisation |
int CalibControl::powerOff | ( | ) |
int CalibControl::powerOn | ( | ) |
void CalibControl::setLogFile | ( | FILE * | fout | ) |
Define the logging output stream.
The value 0 will disable logging.
int CalibControl::shutdown | ( | ) |
int CalibControl::stop | ( | ) |
FILE* CalibControl::fout [private] |
Pointer to the output stream for logging.
Definition at line 132 of file calibcontrol.h.
std::string CalibControl::host [private] |
Host IP of the calibration system.
Definition at line 126 of file calibcontrol.h.
int CalibControl::port [private] |
Port used by the calibration system.
Definition at line 129 of file calibcontrol.h.