QDMI Devices v0.1
Quantum Device Management Interface Devices
|
The implementation of the encapsulated type QDMI_Device_Session on the device-side. More...
#include <session.h>
Public Member Functions | |
void | setHostnameAndPort (const std::string &baseUrl) |
Public function to set hostname and port number for the DCDB server. | |
void | setUsername (const std::string &new_username) |
Set the username for authentication. | |
void | setPassword (const std::string &new_password) |
Set the password for authentication. | |
DCDB::Connection * | getConnection () |
Get function for the underlying connection object. | |
int | connect () |
Public function to connect to the DCDB server. | |
void | disconnect () |
Disconnect and clean up the session. | |
void | setStatus (DCDB_QDMI_DEVICE_SESSION_STATUS _status) |
Set the session's status. | |
DCDB_QDMI_DEVICE_SESSION_STATUS | getStatus () |
Get function for the current session status. | |
~DCDB_QDMI_Device_Session_impl_d () | |
Destructor. | |
Private Member Functions | |
int | connect (std::string hostname, uint16_t port, std::string username, std::string password) |
Internal connection method using provided parameters. | |
void | setHostname (const std::string &new_hostname) |
Set a hostname for the session. | |
void | setPort (const uint16_t new_port) |
Set a port for the session. | |
Private Attributes | |
std::string | hostname = "stor" |
Hostname of the DCDB server. | |
uint16_t | port = 9042 |
Port number of the DCDB server. | |
std::string | username = "" |
Username used for authentication. | |
std::string | password = "" |
Password used for authentication. | |
DCDB::Connection * | connection = nullptr |
Pointer to the underlying DCDB connection object. | |
DCDB_QDMI_DEVICE_SESSION_STATUS | status |
Current status of the session. | |
The implementation of the encapsulated type QDMI_Device_Session on the device-side.
Implemented to hold all the required configuration and functions to connect the DCDB host at LRZ.
|
private |
Internal connection method using provided parameters.
[in] | hostname | The base url to be connected |
[in] | port | The port to be connected |
[in] | username | The username to be used for authentication |
[in] | password | The password to be used for authentication |
|
inlineprivate |
Set a hostname for the session.
[in] | new_hostname | The hostname to be set |
|
inlineprivate |
Set a port for the session.
[in] | new_port | The port to be set |
void DCDB_QDMI_Device_Session_impl_d::setHostnameAndPort | ( | const std::string & | baseUrl | ) |
Public function to set hostname and port number for the DCDB server.
This function calls privated functions setHostname and setPort. Set values are used to connect to the DCDB server using DCDB_QDMI_Device_Session_impl_d::connect
[in] | baseUrl | The base url to be set, i.e, example:8080 |
|
inline |
Set the username for authentication.
[in] | new_username | The username to be set, i.e, admin |
|
inline |
Set the password for authentication.
[in] | new_password | The password to be set. |
|
inline |
Get function for the underlying connection object.
|
inline |
Public function to connect to the DCDB server.
This function calls the privated function DCDB_QDMI_Device_Session_impl_d::connect with set parameters using the DCDB_QDMI_device_session_set_parameter
connection
is not NULL
,
|
inline |
Set the session's status.
[in] | _status | The status to be set. |
|
inline |
Get function for the current session status.