Inheritance diagram for QBaseClient:
Public Member Functions | |
virtual | ~QBaseClient () |
destructor | |
void | SetConnectionMode (bool alwaysOpen) |
set connection mode | |
bool | GetConnectionMode () const |
get connection mode | |
const QError & | GetError () const |
get last error | |
Protected Member Functions | |
QBaseClient (const std::string &serverType) | |
constructor with default addres and port (from environment variables) | |
QBaseClient (const std::string &address, const std::string &port) | |
constructor with server address and port | |
bool | ExecCmdNoResponse (const std::string &command, std::string &answer) |
execute base command with no response. | |
bool | ExecSetCommand (const std::string &command, std::string &answer) |
execute set command. | |
bool | ExecStartCommand (const std::string &command, std::string &answer) |
execute start command. | |
bool | ExecGetCommand (const std::string &command, std::string &answer) |
execute get command. | |
bool | ReturnInt (const std::string &command, int &answer) |
execute get command and return int value | |
bool | ReturnDouble (const std::string &command, double &answer) |
execute get command and return double value | |
bool | ReturnBool (const std::string &command, bool &answer) |
execute get command and return bool value | |
bool | ReturnString (const std::string &command, std::string &answer) |
execute get command and return string value | |
bool | CompleteCommand (std::string &command) |
complete the command appending newline to its end | |
void | BuildError (std::string answer) |
convert server response from string to QError | |
Protected Attributes | |
bool | fConnMode |
QError | fError |
QBaseClient::QBaseClient | ( | const std::string & | serverType | ) | [protected] |
constructor with default addres and port (from environment variables)
serverType | string specifying the name of the environment varibles the constructor will search for. Allowed values are "SLOW", for communication with SlowServer, "DAQ", for DaqServer and "MSG" for MsgServer |
QBaseClient::QBaseClient | ( | const std::string & | address, | |
const std::string & | port | |||
) | [protected] |
constructor with server address and port
address | server address connection port |
void QBaseClient::SetConnectionMode | ( | bool | alwaysOpen | ) | [inline] |
set connection mode
alwaysOpen | if true, connection is opened when first command is executed and is closed when this object is destroyed. If false, connection is opened and closed every time a command is executed |
bool QBaseClient::GetConnectionMode | ( | ) | const [inline] |
get connection mode
bool QBaseClient::ExecCmdNoResponse | ( | const std::string & | command, | |
std::string & | answer | |||
) | [protected] |
execute base command with no response.
argument | to set command to be executed | |
answer | server response |
bool QBaseClient::ExecSetCommand | ( | const std::string & | command, | |
std::string & | answer | |||
) | [protected] |
execute set command.
argument | to set command to be executed | |
answer | server response |
bool QBaseClient::ExecStartCommand | ( | const std::string & | command, | |
std::string & | answer | |||
) | [protected] |
execute start command.
argument | to get command to be executed | |
answer | server response |
bool QBaseClient::ExecGetCommand | ( | const std::string & | command, | |
std::string & | answer | |||
) | [protected] |
execute get command.
argument | to get command to be executed | |
answer | server response |
bool QBaseClient::ReturnInt | ( | const std::string & | command, | |
int & | answer | |||
) | [protected] |
execute get command and return int value
argument | to get command to be executed | |
answer | server response |
bool QBaseClient::ReturnDouble | ( | const std::string & | command, | |
double & | answer | |||
) | [protected] |
execute get command and return double value
argument | to get command to be executed | |
answer | server response |
bool QBaseClient::ReturnBool | ( | const std::string & | command, | |
bool & | answer | |||
) | [protected] |
execute get command and return bool value
argument | to get command to be executed | |
answer | server response |
bool QBaseClient::ReturnString | ( | const std::string & | command, | |
std::string & | answer | |||
) | [protected] |
execute get command and return string value
argument | to get command to be executed | |
answer | server response |
bool QBaseClient::CompleteCommand | ( | std::string & | command | ) | [protected] |
complete the command appending newline to its end
command | string to be complete |
void QBaseClient::BuildError | ( | std::string | answer | ) | [protected] |
bool QBaseClient::fConnMode [protected] |
connection mode. If true, connection is open when the first command is executed and is closed when this object is destroyed. If false, connection is opened and closed every time a command is executed