|
libvisiontransfer
10.0.0
|
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 (const char *id) |
| Reads an integer value from the parameter server. More... | |
| double | readDoubleParameter (const char *id) |
| Reads a double precision floating point value from the parameter server. More... | |
| bool | readBoolParameter (const char *id) |
| Reads a boolean value from the parameter server. More... | |
| void | writeIntParameter (const char *id, int value) |
| Writes an integer value to a parameter of the parameter server. More... | |
| void | writeDoubleParameter (const char *id, double value) |
| Writes a double precision floating point value to a parameter of the parameter server. More... | |
| void | writeBoolParameter (const char *id, bool value) |
| Writes a boolean value to a parameter of the parameter server. More... | |
| template<typename T > | |
| void | writeParameter (const char *id, const T &value) |
| Writes a scalar value to a parameter of the parameter server. More... | |
| std::map< std::string, ParameterInfo > | getAllParameters () |
| Enumerates all parameters as reported by the device. More... | |
| param::ParameterSet & | getParameterSet () |
| Returns a reference to the internal parameter set (once the network handshake is complete) More... | |
| template<> | |
| void | writeParameter (const char *id, const std::string &value) |
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 45 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 39 of file parametertransfer.cpp.
| std::map< std::string, ParameterInfo > visiontransfer::internal::ParameterTransfer::getAllParameters | ( | ) |
Enumerates all parameters as reported by the device.
Definition at line 185 of file parametertransfer.cpp.
| ParameterSet & visiontransfer::internal::ParameterTransfer::getParameterSet | ( | ) |
Returns a reference to the internal parameter set (once the network handshake is complete)
Definition at line 367 of file parametertransfer.cpp.
| bool visiontransfer::internal::ParameterTransfer::readBoolParameter | ( | const char * | 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 165 of file parametertransfer.cpp.
| double visiontransfer::internal::ParameterTransfer::readDoubleParameter | ( | const char * | 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 157 of file parametertransfer.cpp.
| int visiontransfer::internal::ParameterTransfer::readIntParameter | ( | const char * | 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 149 of file parametertransfer.cpp.
| void visiontransfer::internal::ParameterTransfer::writeBoolParameter | ( | const char * | id, |
| bool | 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 181 of file parametertransfer.cpp.
| void visiontransfer::internal::ParameterTransfer::writeDoubleParameter | ( | const char * | 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 177 of file parametertransfer.cpp.
| void visiontransfer::internal::ParameterTransfer::writeIntParameter | ( | const char * | id, |
| int | 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 173 of file parametertransfer.cpp.
| void visiontransfer::internal::ParameterTransfer::writeParameter | ( | const char * | id, |
| const T & | value | ||
| ) |
Writes a scalar 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 97 of file parametertransfer.cpp.