TwiceAsNice
2019-02-18
|
The class DGauge provides all functions needed to create a connection to the Pfeiffer Vacuum DualGauge. More...
#include <PfeifferDGauge.h>
Public Member Functions | |
DGauge () | |
constructor More... | |
virtual | ~DGauge () |
virtual destructor More... | |
void | openChatLine (const std::string &_address) |
function to open a chatline with the device to enable communication More... | |
void | closeChatLine (void) |
function to close the chatline and end the connection to the device More... | |
void | gaugePR (int _input, int &_status, double &_value) |
function to get a single reading of one input More... | |
void | gaugePRX (int &_stat1, int &_stat2, double &_val1, double &_val2) |
function to get a single reading of both inputs More... | |
void | gaugeCOM (int _mode) |
function to start the continuous mode for the DGauge More... | |
StringVector | gaugeReadCon (void) |
function that reads out the values of the two inputs in a continous mode. More... | |
void | gaugeSEN (int _set1, int _set2, int &_mode1, int &_mode2) |
function to enable or disable the sensors and read the changes More... | |
void | gaugeSEN (int &_mode1, int &_mode2) |
function to get current mode set More... | |
void | gaugeTID (std::string &_type1, std::string &_type2) |
function to identify the sensor types More... | |
void | gaugeSCT (int &_display) |
function for the display channel More... | |
void | gaugeERR (std::string &_code) |
function to get the error status More... | |
void | gaugeRES (bool _erase, std::string &_error) |
function to reset the readings and erase queued errors More... | |
void | gaugeRES (std::string &_error) |
function to reset the readings More... | |
void | gaugeSP (int _func, int &_channel, double &_low, double &_high) |
function for the threshold parameters and the switching function More... | |
void | gaugeSPS (structSPS &_status) |
function to get the status of a switching function More... | |
void | gaugeFIL (int &_time1, int &_time2) |
function for the filter time constant More... | |
void | gaugeCAL (double &_fact1, double &_fact2) |
function for the calibration factor More... | |
void | gaugeFSR (int &_head1, int &_head2) |
function for the measurement window for linear sensors More... | |
void | gaugeOFC (int &_head1, int &_head2) |
function for offset correction status for linear sensors More... | |
void | gaugeOFD (double &_head1, double &_head2) |
function for the current offset for linear sensors More... | |
void | gaugePUC (int &_head1, int &_head2) |
function for the status of the penning underange controll More... | |
void | gaugeDGS (int &_head1, int &_head2) |
function for the degas status More... | |
void | gaugeSC (int _head, int &_sourceOn, int &_sourceOff, double &_valOn, double &_valOff) |
function for the sensor controll More... | |
void | gaugeUNI (int &_unit) |
function for the unit More... | |
void | gaugeBAUD (int &_baud) |
function for the baud rate More... | |
void | gaugeDCD (int &_digits) |
function for the display controll digits More... | |
void | gaugeSAV (int _save) |
function to store to teh EEPROM More... | |
void | gaugeDIC (int &_type) |
function for the display control More... | |
void | gaugePNR (std::string &_version) |
get firmware version More... | |
void | gaugeWDT (int &_dog) |
watchdog More... | |
void | gaugeTLC (int &_status) |
torrlock More... | |
void | gaugeLOC (int &_status) |
parameter setup lock More... | |
void | gaugeRAM (std::string &_error) |
RAM test. More... | |
void | gaugeEPR (std::string &_error, std::string &_check) |
EPROM test. More... | |
void | gaugeEEP (std::string &_error) |
EEPROM test. More... | |
void | gaugeDIS (int &_status) |
display test More... | |
void | gaugeADC (structADC &_status) |
ADC test. More... | |
void | gaugeIOT (int &_status, std::string &_relay) |
IO test. More... | |
void | gaugeTKB (structTKB &_pressed) |
keyboard test More... | |
void | gaugeRST (void) |
RS232 test. More... | |
void | enableSet (bool _enable) |
function to enable/disable set mode More... | |
DGauge () | |
constructor More... | |
virtual | ~DGauge () |
virtual destructor More... | |
void | openChatLine (const std::string &_address) |
function to open a chatline with the device to enable communication More... | |
void | closeChatLine (void) |
function to close the chatline and end the connection to the device More... | |
void | gaugePR (int _input, int &_status, double &_value) |
function to get a single reading of one input More... | |
void | gaugePRX (int &_stat1, int &_stat2, double &_val1, double &_val2) |
function to get a single reading of both inputs More... | |
void | gaugeCOM (int _mode) |
function to start the continuous mode for the DGauge More... | |
StringVector | gaugeReadCon (void) |
function that reads out the values of the two inputs in a continous mode. More... | |
void | gaugeSEN (int _set1, int _set2, int &_mode1, int &_mode2) |
function to enable or disable the sensors and read the changes More... | |
void | gaugeSEN (int &_mode1, int &_mode2) |
function to get current mode set More... | |
void | gaugeTID (std::string &_type1, std::string &_type2) |
function to identify the sensor types More... | |
void | gaugeSCT (int &_display) |
function for the display channel More... | |
void | gaugeERR (std::string &_code) |
function to get the error status More... | |
void | gaugeRES (bool _erase, std::string &_error) |
function to reset the readings and erase queued errors More... | |
void | gaugeRES (std::string &_error) |
function to reset the readings More... | |
void | gaugeSP (int _func, int &_channel, double &_low, double &_high) |
function for the threshold parameters and the switching function More... | |
void | gaugeSPS (structSPS &_status) |
function to get the status of a switching function More... | |
void | gaugeFIL (int &_time1, int &_time2) |
function for the filter time constant More... | |
void | gaugeCAL (double &_fact1, double &_fact2) |
function for the calibration factor More... | |
void | gaugeFSR (int &_head1, int &_head2) |
function for the measurement window for linear sensors More... | |
void | gaugeOFC (int &_head1, int &_head2) |
function for offset correction status for linear sensors More... | |
void | gaugeOFD (double &_head1, double &_head2) |
function for the current offset for linear sensors More... | |
void | gaugePUC (int &_head1, int &_head2) |
function for the status of the penning underange controll More... | |
void | gaugeDGS (int &_head1, int &_head2) |
function for the degas status More... | |
void | gaugeSC (int _head, int &_sourceOn, int &_sourceOff, double &_valOn, double &_valOff) |
function for the sensor controll More... | |
void | gaugeUNI (int &_unit) |
function for the unit More... | |
void | gaugeBAUD (int &_baud) |
function for the baud rate More... | |
void | gaugeDCD (int &_digits) |
function for the display controll digits More... | |
void | gaugeSAV (int _save) |
function to store to teh EEPROM More... | |
void | gaugeDIC (int &_type) |
function for the display control More... | |
void | gaugePNR (std::string &_version) |
get firmware version More... | |
void | gaugeWDT (int &_dog) |
watchdog More... | |
void | gaugeTLC (int &_status) |
torrlock More... | |
void | gaugeLOC (int &_status) |
parameter setup lock More... | |
void | gaugeRAM (std::string &_error) |
RAM test. More... | |
void | gaugeEPR (std::string &_error, std::string &_check) |
EPROM test. More... | |
void | gaugeEEP (std::string &_error) |
EEPROM test. More... | |
void | gaugeDIS (int &_status) |
display test More... | |
void | gaugeADC (structADC &_status) |
ADC test. More... | |
void | gaugeIOT (int &_status, std::string &_relay) |
IO test. More... | |
void | gaugeTKB (structTKB &_pressed) |
keyboard test More... | |
void | gaugeRST (void) |
RS232 test. More... | |
void | enableSet (bool _enable) |
function to enable/disable set mode More... | |
Protected Member Functions | |
int | sendMsg (const std::string &_cmd) |
function to send a command to the device connected More... | |
void | readMsg (std::string &_rcv) |
function to read the answer from the device More... | |
int | sendMsg (const std::string &_cmd) |
function to send a command to the device connected More... | |
void | readMsg (std::string &_rcv) |
function to read the answer from the device More... | |
Protected Attributes | |
bool | m_set |
boolean to indicate wheather setting or getting of the functions should be used More... | |
int | m_conMode |
current continous mode set to the device More... | |
Private Attributes | |
Nice::ChatLine | m_chat |
the member chatline used for the communication More... | |
bool | m_active |
boolean to indicate an active connection More... | |
std::string | m_term |
string containing the terminators for the sent and receaved messages More... | |
The class DGauge provides all functions needed to create a connection to the Pfeiffer Vacuum DualGauge.
Also it contains all methods to send and receave commands and answers. The communication is done by the Chatline.
Basda::DGauge::DGauge | ( | ) |
constructor
|
virtual |
virtual destructor
Basda::DGauge::DGauge | ( | ) |
constructor
|
virtual |
virtual destructor
void Basda::DGauge::closeChatLine | ( | void | ) |
function to close the chatline and end the connection to the device
void Basda::DGauge::closeChatLine | ( | void | ) |
function to close the chatline and end the connection to the device
void Basda::DGauge::enableSet | ( | bool | _enable | ) |
function to enable/disable set mode
_enable | enable=true, disable=false |
void Basda::DGauge::enableSet | ( | bool | _enable | ) |
function to enable/disable set mode
_enable | enable=true, disable=false |
void Basda::DGauge::gaugeADC | ( | structADC & | _status | ) |
ADC test.
_status | status struct of the ADC channels |
void Basda::DGauge::gaugeADC | ( | structADC & | _status | ) |
ADC test.
_status | status struct of the ADC channels |
void Basda::DGauge::gaugeBAUD | ( | int & | _baud | ) |
function for the baud rate
_baud | the rate used |
void Basda::DGauge::gaugeBAUD | ( | int & | _baud | ) |
function for the baud rate
_baud | the rate used |
void Basda::DGauge::gaugeCAL | ( | double & | _fact1, |
double & | _fact2 | ||
) |
function for the calibration factor
_fact1 | factor for sensor 1 (log. 0.100-9.990, lin. 0.500-2.000) |
_fact2 | factor for sensor 2 (log. 0.100-9.990, lin. 0.500-2.000) |
void Basda::DGauge::gaugeCAL | ( | double & | _fact1, |
double & | _fact2 | ||
) |
function for the calibration factor
_fact1 | factor for sensor 1 (log. 0.100-9.990, lin. 0.500-2.000) |
_fact2 | factor for sensor 2 (log. 0.100-9.990, lin. 0.500-2.000) |
void Basda::DGauge::gaugeCOM | ( | int | _mode | ) |
function to start the continuous mode for the DGauge
_mode | time mode for the readings |
void Basda::DGauge::gaugeCOM | ( | int | _mode | ) |
function to start the continuous mode for the DGauge
_mode | time mode for the readings |
void Basda::DGauge::gaugeDCD | ( | int & | _digits | ) |
function for the display controll digits
_digits | number of digits |
void Basda::DGauge::gaugeDCD | ( | int & | _digits | ) |
function for the display controll digits
_digits | number of digits |
void Basda::DGauge::gaugeDGS | ( | int & | _head1, |
int & | _head2 | ||
) |
function for the degas status
_head1 | setting for sensor 1 |
_head2 | setting for sensor 2 |
void Basda::DGauge::gaugeDGS | ( | int & | _head1, |
int & | _head2 | ||
) |
function for the degas status
_head1 | setting for sensor 1 |
_head2 | setting for sensor 2 |
void Basda::DGauge::gaugeDIC | ( | int & | _type | ) |
function for the display control
_type | type of display control (0=manual, 1=auto) |
void Basda::DGauge::gaugeDIC | ( | int & | _type | ) |
function for the display control
_type | type of display control (0=manual, 1=auto) |
void Basda::DGauge::gaugeDIS | ( | int & | _status | ) |
display test
_status | test status |
void Basda::DGauge::gaugeDIS | ( | int & | _status | ) |
display test
_status | test status |
void Basda::DGauge::gaugeEEP | ( | std::string & | _error | ) |
EEPROM test.
_error | error code |
void Basda::DGauge::gaugeEEP | ( | std::string & | _error | ) |
EEPROM test.
_error | error code |
void Basda::DGauge::gaugeEPR | ( | std::string & | _error, |
std::string & | _check | ||
) |
EPROM test.
_error | error code |
_check | check sum (hex) |
void Basda::DGauge::gaugeEPR | ( | std::string & | _error, |
std::string & | _check | ||
) |
EPROM test.
_error | error code |
_check | check sum (hex) |
void Basda::DGauge::gaugeERR | ( | std::string & | _code | ) |
function to get the error status
_code | the error code |
void Basda::DGauge::gaugeERR | ( | std::string & | _code | ) |
function to get the error status
_code | the error code |
void Basda::DGauge::gaugeFIL | ( | int & | _time1, |
int & | _time2 | ||
) |
function for the filter time constant
_time1 | time constant of the filter of sensor 1 |
_time2 | time constant of the filter of sensor 2 |
void Basda::DGauge::gaugeFIL | ( | int & | _time1, |
int & | _time2 | ||
) |
function for the filter time constant
_time1 | time constant of the filter of sensor 1 |
_time2 | time constant of the filter of sensor 2 |
void Basda::DGauge::gaugeFSR | ( | int & | _head1, |
int & | _head2 | ||
) |
function for the measurement window for linear sensors
_head1 | setting for sensor 1 |
_head2 | setting for sensor 2 |
void Basda::DGauge::gaugeFSR | ( | int & | _head1, |
int & | _head2 | ||
) |
function for the measurement window for linear sensors
_head1 | setting for sensor 1 |
_head2 | setting for sensor 2 |
void Basda::DGauge::gaugeIOT | ( | int & | _status, |
std::string & | _relay | ||
) |
IO test.
_status | status of the test |
_relay | status relays to test (in hex format) |
void Basda::DGauge::gaugeIOT | ( | int & | _status, |
std::string & | _relay | ||
) |
IO test.
_status | status of the test |
_relay | status relays to test (in hex format) |
void Basda::DGauge::gaugeLOC | ( | int & | _status | ) |
parameter setup lock
_status | status of the lock |
void Basda::DGauge::gaugeLOC | ( | int & | _status | ) |
parameter setup lock
_status | status of the lock |
void Basda::DGauge::gaugeOFC | ( | int & | _head1, |
int & | _head2 | ||
) |
function for offset correction status for linear sensors
_head1 | setting for sensor 1 |
_head2 | setting for sensor 2 |
void Basda::DGauge::gaugeOFC | ( | int & | _head1, |
int & | _head2 | ||
) |
function for offset correction status for linear sensors
_head1 | setting for sensor 1 |
_head2 | setting for sensor 2 |
void Basda::DGauge::gaugeOFD | ( | double & | _head1, |
double & | _head2 | ||
) |
function for the current offset for linear sensors
_head1 | offset for sensor 1 |
_head2 | offset for sensor 2 |
void Basda::DGauge::gaugeOFD | ( | double & | _head1, |
double & | _head2 | ||
) |
function for the current offset for linear sensors
_head1 | offset for sensor 1 |
_head2 | offset for sensor 2 |
void Basda::DGauge::gaugePNR | ( | std::string & | _version | ) |
get firmware version
_version | firmware number |
void Basda::DGauge::gaugePNR | ( | std::string & | _version | ) |
get firmware version
_version | firmware number |
void Basda::DGauge::gaugePR | ( | int | _input, |
int & | _status, | ||
double & | _value | ||
) |
function to get a single reading of one input
_input | specifies the input |
_status | status of the reading |
_value | the value of the reading |
void Basda::DGauge::gaugePR | ( | int | _input, |
int & | _status, | ||
double & | _value | ||
) |
function to get a single reading of one input
_input | specifies the input |
_status | status of the reading |
_value | the value of the reading |
void Basda::DGauge::gaugePRX | ( | int & | _stat1, |
int & | _stat2, | ||
double & | _val1, | ||
double & | _val2 | ||
) |
function to get a single reading of both inputs
_stat1 | status of the first reading |
_stat2 | status of the second reading |
_val1 | value of sensor 1 |
_val2 | value of sensor 2 |
void Basda::DGauge::gaugePRX | ( | int & | _stat1, |
int & | _stat2, | ||
double & | _val1, | ||
double & | _val2 | ||
) |
function to get a single reading of both inputs
_stat1 | status of the first reading |
_stat2 | status of the second reading |
_val1 | value of sensor 1 |
_val2 | value of sensor 2 |
void Basda::DGauge::gaugePUC | ( | int & | _head1, |
int & | _head2 | ||
) |
function for the status of the penning underange controll
_head1 | setting for sensor 1 |
_head2 | setting for sensor 2 |
void Basda::DGauge::gaugePUC | ( | int & | _head1, |
int & | _head2 | ||
) |
function for the status of the penning underange controll
_head1 | setting for sensor 1 |
_head2 | setting for sensor 2 |
void Basda::DGauge::gaugeRAM | ( | std::string & | _error | ) |
RAM test.
_error | error code |
void Basda::DGauge::gaugeRAM | ( | std::string & | _error | ) |
RAM test.
_error | error code |
StringVector Basda::DGauge::gaugeReadCon | ( | void | ) |
function that reads out the values of the two inputs in a continous mode.
The function has to be stopped manually by pressing the "escape" key.
StringVector Basda::DGauge::gaugeReadCon | ( | void | ) |
function that reads out the values of the two inputs in a continous mode.
The function has to be stopped manually by pressing the "escape" key.
void Basda::DGauge::gaugeRES | ( | bool | _erase, |
std::string & | _error | ||
) |
function to reset the readings and erase queued errors
_erase | specifies whether errors should be erased |
_error | string with queued errors |
void Basda::DGauge::gaugeRES | ( | bool | _erase, |
std::string & | _error | ||
) |
function to reset the readings and erase queued errors
_erase | specifies whether errors should be erased |
_error | string with queued errors |
void Basda::DGauge::gaugeRES | ( | std::string & | _error | ) |
function to reset the readings
_error | string with queued errors |
void Basda::DGauge::gaugeRES | ( | std::string & | _error | ) |
function to reset the readings
_error | string with queued errors |
void Basda::DGauge::gaugeRST | ( | void | ) |
RS232 test.
void Basda::DGauge::gaugeRST | ( | void | ) |
RS232 test.
void Basda::DGauge::gaugeSAV | ( | int | _save | ) |
function to store to teh EEPROM
_save | specifies the parameters to be saved (0=default parameters, 1=user parameters) |
void Basda::DGauge::gaugeSAV | ( | int | _save | ) |
function to store to teh EEPROM
_save | specifies the parameters to be saved (0=default parameters, 1=user parameters) |
void Basda::DGauge::gaugeSC | ( | int | _head, |
int & | _sourceOn, | ||
int & | _sourceOff, | ||
double & | _valOn, | ||
double & | _valOff | ||
) |
function for the sensor controll
_head | specifies the controlled sensor (1-2) |
_sourceOn | source for switching on controll |
_sourceOff | source for switching off controll |
_valOn | value for switching on |
_valOff | value for switching off |
void Basda::DGauge::gaugeSC | ( | int | _head, |
int & | _sourceOn, | ||
int & | _sourceOff, | ||
double & | _valOn, | ||
double & | _valOff | ||
) |
function for the sensor controll
_head | specifies the controlled sensor (1-2) |
_sourceOn | source for switching on controll |
_sourceOff | source for switching off controll |
_valOn | value for switching on |
_valOff | value for switching off |
void Basda::DGauge::gaugeSCT | ( | int & | _display | ) |
function for the display channel
_display | specifies the sensor to be used at the display |
void Basda::DGauge::gaugeSCT | ( | int & | _display | ) |
function for the display channel
_display | specifies the sensor to be used at the display |
void Basda::DGauge::gaugeSEN | ( | int | _set1, |
int | _set2, | ||
int & | _mode1, | ||
int & | _mode2 | ||
) |
function to enable or disable the sensors and read the changes
_set1 | mode change for sensor 1 |
_set2 | mode change for sensor 2 |
_mode1 | current mode of sensor 1 |
_mode2 | current mode of sensor 2 |
void Basda::DGauge::gaugeSEN | ( | int | _set1, |
int | _set2, | ||
int & | _mode1, | ||
int & | _mode2 | ||
) |
function to enable or disable the sensors and read the changes
_set1 | mode change for sensor 1 |
_set2 | mode change for sensor 2 |
_mode1 | current mode of sensor 1 |
_mode2 | current mode of sensor 2 |
void Basda::DGauge::gaugeSEN | ( | int & | _mode1, |
int & | _mode2 | ||
) |
function to get current mode set
_mode1 | current mode of sensor 1 |
_mode2 | current mode of sensor 2 |
void Basda::DGauge::gaugeSEN | ( | int & | _mode1, |
int & | _mode2 | ||
) |
function to get current mode set
_mode1 | current mode of sensor 1 |
_mode2 | current mode of sensor 2 |
void Basda::DGauge::gaugeSP | ( | int | _func, |
int & | _channel, | ||
double & | _low, | ||
double & | _high | ||
) |
function for the threshold parameters and the switching function
_func | specifies the switching function (1-4) |
_channel | channel the function applies to |
_low | lower threshold |
_high | upper threshold |
void Basda::DGauge::gaugeSP | ( | int | _func, |
int & | _channel, | ||
double & | _low, | ||
double & | _high | ||
) |
function for the threshold parameters and the switching function
_func | specifies the switching function (1-4) |
_channel | channel the function applies to |
_low | lower threshold |
_high | upper threshold |
void Basda::DGauge::gaugeSPS | ( | structSPS & | _status | ) |
function to get the status of a switching function
_status | status vector |
void Basda::DGauge::gaugeSPS | ( | structSPS & | _status | ) |
function to get the status of a switching function
_status | status vector |
void Basda::DGauge::gaugeTID | ( | std::string & | _type1, |
std::string & | _type2 | ||
) |
function to identify the sensor types
_type1 | type of sensor 1 |
_type2 | type of sensor 2 |
void Basda::DGauge::gaugeTID | ( | std::string & | _type1, |
std::string & | _type2 | ||
) |
function to identify the sensor types
_type1 | type of sensor 1 |
_type2 | type of sensor 2 |
void Basda::DGauge::gaugeTKB | ( | structTKB & | _pressed | ) |
keyboard test
_pressed | struct for the status of the four buttons |
void Basda::DGauge::gaugeTKB | ( | structTKB & | _pressed | ) |
keyboard test
_pressed | struct for the status of the four buttons |
void Basda::DGauge::gaugeTLC | ( | int & | _status | ) |
torrlock
_status | status of the lock |
void Basda::DGauge::gaugeTLC | ( | int & | _status | ) |
torrlock
_status | status of the lock |
void Basda::DGauge::gaugeUNI | ( | int & | _unit | ) |
function for the unit
_unit | the unit used |
void Basda::DGauge::gaugeUNI | ( | int & | _unit | ) |
function for the unit
_unit | the unit used |
void Basda::DGauge::gaugeWDT | ( | int & | _dog | ) |
watchdog
_dog | type of watchdog |
void Basda::DGauge::gaugeWDT | ( | int & | _dog | ) |
watchdog
_dog | type of watchdog |
void Basda::DGauge::openChatLine | ( | const std::string & | _address | ) |
function to open a chatline with the device to enable communication
_address | string with the connection address |
void Basda::DGauge::openChatLine | ( | const std::string & | _address | ) |
function to open a chatline with the device to enable communication
_address | string with the connection address |
|
protected |
function to read the answer from the device
_rcv | string to store the answer |
|
protected |
function to read the answer from the device
_rcv | string to store the answer |
|
protected |
function to send a command to the device connected
_cmd | command to send |
|
protected |
function to send a command to the device connected
_cmd | command to send |
|
private |
boolean to indicate an active connection
|
private |
the member chatline used for the communication
|
protected |
current continous mode set to the device
|
protected |
boolean to indicate wheather setting or getting of the functions should be used
|
private |
string containing the terminators for the sent and receaved messages