libvisiontransfer
9.0.3
|
Allows a configuration of device parameters over the network. More...
#include <visiontransfer/parametertransfer.h>
Public Member Functions | |
ParameterTransfer (const char *address, const char *service="7683") | |
Creates an object and connects to the given server. More... | |
int | readIntParameter (int32_t id) |
Reads an integer value from the parameter server. More... | |
double | readDoubleParameter (int32_t id) |
Reads a double precision floating point value from the parameter server. More... | |
bool | readBoolParameter (int32_t id) |
Reads a boolean value from the parameter server. More... | |
void | writeIntParameter (int32_t id, int32_t value) |
Writes an integer value to a parameter of the parameter server. More... | |
void | writeDoubleParameter (int32_t id, double value) |
Writes a double precision floating point value to a parameter of the parameter server. More... | |
void | writeBoolParameter (int32_t id, int32_t value) |
Writes a boolean value to a parameter of the parameter server. More... | |
std::map< std::string, ParameterInfo > | getAllParameters () |
Enumerates all parameters as reported by the device. More... | |
Allows a configuration of device parameters over the network.
A TCP connection is established to a parameter server. The protocol allows writing and reading of individual parameters, which are identified by a unique ID. There are three supported types of parameters: integers, double precision floating point values, and booleans.
This class is only used internally. Users should use the class DeviceParameters instead.
Definition at line 39 of file parametertransfer.h.
visiontransfer::internal::ParameterTransfer::ParameterTransfer | ( | const char * | address, |
const char * | service = "7683" |
||
) |
Creates an object and connects to the given server.
address | IP address or host name of the server. |
service | The port number that should be used as string or as textual service name. |
Definition at line 34 of file parametertransfer.cpp.
std::map< std::string, ParameterInfo > visiontransfer::internal::ParameterTransfer::getAllParameters | ( | ) |
Enumerates all parameters as reported by the device.
Definition at line 231 of file parametertransfer.cpp.
bool visiontransfer::internal::ParameterTransfer::readBoolParameter | ( | int32_t | id | ) |
Reads a boolean value from the parameter server.
id | Unique ID of the parameter to be read. |
If reading the parameter fails, then an exception of type TransferException or ParameterException is thrown.
Definition at line 213 of file parametertransfer.cpp.
double visiontransfer::internal::ParameterTransfer::readDoubleParameter | ( | int32_t | id | ) |
Reads a double precision floating point value from the parameter server.
id | Unique ID of the parameter to be read. |
If reading the parameter fails, then an exception of type TransferException or ParameterException is thrown.
Definition at line 207 of file parametertransfer.cpp.
int visiontransfer::internal::ParameterTransfer::readIntParameter | ( | int32_t | id | ) |
Reads an integer value from the parameter server.
id | Unique ID of the parameter to be read. |
If reading the parameter fails, then an exception of type TransferException or ParameterException is thrown.
Definition at line 201 of file parametertransfer.cpp.
void visiontransfer::internal::ParameterTransfer::writeBoolParameter | ( | int32_t | id, |
int32_t | value | ||
) |
Writes a boolean value to a parameter of the parameter server.
id | Unique ID of the parameter to be written. |
value | Value that should be written to the parameter. |
If writing the parameter fails, then an exception of type TransferException or ParameterException is thrown.
Definition at line 227 of file parametertransfer.cpp.
void visiontransfer::internal::ParameterTransfer::writeDoubleParameter | ( | int32_t | id, |
double | value | ||
) |
Writes a double precision floating point value to a parameter of the parameter server.
id | Unique ID of the parameter to be written. |
value | Value that should be written to the parameter. |
If writing the parameter fails, then an exception of type TransferException or ParameterException is thrown.
Definition at line 223 of file parametertransfer.cpp.
void visiontransfer::internal::ParameterTransfer::writeIntParameter | ( | int32_t | id, |
int32_t | value | ||
) |
Writes an integer value to a parameter of the parameter server.
id | Unique ID of the parameter to be written. |
value | Value that should be written to the parameter. |
If writing the parameter fails, then an exception of type TransferException or ParameterException is thrown.
Definition at line 219 of file parametertransfer.cpp.