libvisiontransfer  8.1.0
Public Member Functions | List of all members
visiontransfer::internal::ParameterTransfer Class Reference

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, ParameterInfogetAllParameters ()
 Enumerates all parameters as reported by the device. More...
 

Detailed Description

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 SceneScanParameters instead.

Definition at line 39 of file parametertransfer.h.

Constructor & Destructor Documentation

◆ ParameterTransfer()

visiontransfer::internal::ParameterTransfer::ParameterTransfer ( const char *  address,
const char *  service = "7683" 
)

Creates an object and connects to the given server.

Parameters
addressIP address or host name of the server.
serviceThe port number that should be used as string or as textual service name.

Definition at line 34 of file parametertransfer.cpp.

Member Function Documentation

◆ getAllParameters()

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.

◆ readBoolParameter()

bool visiontransfer::internal::ParameterTransfer::readBoolParameter ( int32_t  id)

Reads a boolean value from the parameter server.

Parameters
idUnique ID of the parameter to be read.
Returns
If successful, the value of the parameter that has been read

If reading the parameter fails, then an exception of type TransferException or ParameterException is thrown.

Definition at line 213 of file parametertransfer.cpp.

◆ readDoubleParameter()

double visiontransfer::internal::ParameterTransfer::readDoubleParameter ( int32_t  id)

Reads a double precision floating point value from the parameter server.

Parameters
idUnique ID of the parameter to be read.
Returns
If successful, the value of the parameter that has been read

If reading the parameter fails, then an exception of type TransferException or ParameterException is thrown.

Definition at line 207 of file parametertransfer.cpp.

◆ readIntParameter()

int visiontransfer::internal::ParameterTransfer::readIntParameter ( int32_t  id)

Reads an integer value from the parameter server.

Parameters
idUnique ID of the parameter to be read.
Returns
If successful, the value of the parameter that has been read

If reading the parameter fails, then an exception of type TransferException or ParameterException is thrown.

Definition at line 201 of file parametertransfer.cpp.

◆ writeBoolParameter()

void visiontransfer::internal::ParameterTransfer::writeBoolParameter ( int32_t  id,
int32_t  value 
)

Writes a boolean value to a parameter of the parameter server.

Parameters
idUnique ID of the parameter to be written.
valueValue 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.

◆ writeDoubleParameter()

void visiontransfer::internal::ParameterTransfer::writeDoubleParameter ( int32_t  id,
double  value 
)

Writes a double precision floating point value to a parameter of the parameter server.

Parameters
idUnique ID of the parameter to be written.
valueValue 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.

◆ writeIntParameter()

void visiontransfer::internal::ParameterTransfer::writeIntParameter ( int32_t  id,
int32_t  value 
)

Writes an integer value to a parameter of the parameter server.

Parameters
idUnique ID of the parameter to be written.
valueValue 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.


The documentation for this class was generated from the following files:
Nerian Vision Technologies