analogsensorclient
: Device that reads an AnalogSensor (using the IAnalogSensor interface) from the YARP network.
More...
#include <AnalogSensorClient/AnalogSensorClient.h>
Public Member Functions | |
AnalogSensorClient ()=default | |
AnalogSensorClient (const AnalogSensorClient &)=delete | |
AnalogSensorClient (AnalogSensorClient &&)=delete | |
AnalogSensorClient & | operator= (const AnalogSensorClient &)=delete |
AnalogSensorClient & | operator= (AnalogSensorClient &&)=delete |
~AnalogSensorClient () override=default | |
bool | open (yarp::os::Searchable &config) override |
Open the DeviceDriver. More... | |
bool | close () override |
Close the DeviceDriver. More... | |
int | read (yarp::sig::Vector &out) override |
Read a vector from the sensor. More... | |
int | getState (int ch) override |
Check the state value of a given channel. More... | |
int | getChannels () override |
Get the number of channels of the sensor. More... | |
int | calibrateSensor () override |
Calibrates the whole sensor. More... | |
int | calibrateSensor (const yarp::sig::Vector &value) override |
Calibrates the whole sensor, using an vector of calibration values. More... | |
int | calibrateChannel (int ch) override |
Calibrates one single channel. More... | |
int | calibrateChannel (int ch, double value) override |
Calibrates one single channel, using a calibration value. More... | |
yarp::os::Stamp | getLastInputStamp () override |
Get the time stamp for the last read data. More... | |
Public Member Functions inherited from yarp::dev::DeviceDriver | |
~DeviceDriver () override=default | |
Destructor. More... | |
template<class T > | |
bool | view (T *&x) |
Get an interface to the device driver. More... | |
virtual DeviceDriver * | getImplementation () |
Some drivers are bureaucrats, pointing at others. More... | |
Public Member Functions inherited from yarp::os::IConfig | |
virtual | ~IConfig () |
Destructor. More... | |
virtual bool | configure (Searchable &config) |
Change online parameters. More... | |
Public Member Functions inherited from yarp::dev::IPreciselyTimed | |
virtual | ~IPreciselyTimed () |
Public Member Functions inherited from yarp::dev::IAnalogSensor | |
virtual | ~IAnalogSensor () |
Protected Member Functions | |
void | removeLeadingTrailingSlashesOnly (std::string &name) |
Protected Attributes | |
InputPortProcessor | inputPort |
yarp::os::Port | rpcPort |
std::string | local |
std::string | remote |
yarp::os::Stamp | lastTs |
std::string | robotName |
std::string | deviceId |
std::string | sensorType |
std::string | portPrefix |
Additional Inherited Members | |
Public Types inherited from yarp::dev::IAnalogSensor | |
enum | { AS_OK =0, AS_ERROR =1, AS_OVF =2, AS_TIMEOUT =3 } |
analogsensorclient
: Device that reads an AnalogSensor (using the IAnalogSensor interface) from the YARP network.
This device will connect to a port opened by the AnalogWrapper device and read the data broadcasted making them available to use for the user application. It also made available some function to check and control the state of the remote sensor.
Parameters accepted in the config argument of the open method:
Parameter name | Type | Units | Default Value | Required | Description | Notes |
---|---|---|---|---|---|---|
local | string | Yes | full name if the port opened by the device | must start with a '/' character | ||
remote | string | Yes | full name of the port the device need to connect to | must start with a '/' character | ||
carrier | string | udp | No | type of carrier to use, like tcp, udp and so on ... | - |
The device will create a port with name <local> and will connect to a port colled <remote> at startup, ex: /myModule/left_arm/ForceTorque , and will connect to a port called /icub/left_arm/ForceTorque.
Definition at line 89 of file AnalogSensorClient.h.
|
default |
|
delete |
|
delete |
|
overridedefault |
|
overridevirtual |
Calibrates one single channel.
ch | channel number. |
Implements yarp::dev::IAnalogSensor.
Definition at line 289 of file AnalogSensorClient.cpp.
|
overridevirtual |
Calibrates one single channel, using a calibration value.
ch | channel number. |
value | calibration value. |
Implements yarp::dev::IAnalogSensor.
Definition at line 299 of file AnalogSensorClient.cpp.
|
overridevirtual |
Calibrates the whole sensor.
Implements yarp::dev::IAnalogSensor.
Definition at line 268 of file AnalogSensorClient.cpp.
|
overridevirtual |
Calibrates the whole sensor, using an vector of calibration values.
value | a vector of calibration values. |
Implements yarp::dev::IAnalogSensor.
Definition at line 277 of file AnalogSensorClient.cpp.
|
overridevirtual |
Close the DeviceDriver.
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 245 of file AnalogSensorClient.cpp.
|
overridevirtual |
Get the number of channels of the sensor.
Implements yarp::dev::IAnalogSensor.
Definition at line 263 of file AnalogSensorClient.cpp.
|
overridevirtual |
Get the time stamp for the last read data.
Implements yarp::dev::IPreciselyTimed.
Definition at line 310 of file AnalogSensorClient.cpp.
|
overridevirtual |
Check the state value of a given channel.
ch | channel number. |
Implements yarp::dev::IAnalogSensor.
Definition at line 257 of file AnalogSensorClient.cpp.
|
overridevirtual |
Open the DeviceDriver.
config | is a list of parameters for the device. Which parameters are effective for your device can vary. See device invocation examples. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device). |
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 189 of file AnalogSensorClient.cpp.
|
delete |
|
delete |
|
overridevirtual |
Read a vector from the sensor.
out | a vector containing the sensor's last readings. |
Implements yarp::dev::IAnalogSensor.
Definition at line 252 of file AnalogSensorClient.cpp.
|
protected |
Definition at line 162 of file AnalogSensorClient.cpp.
|
protected |
Definition at line 101 of file AnalogSensorClient.h.
|
protected |
Definition at line 95 of file AnalogSensorClient.h.
|
protected |
Definition at line 99 of file AnalogSensorClient.h.
|
protected |
Definition at line 97 of file AnalogSensorClient.h.
|
protected |
Definition at line 103 of file AnalogSensorClient.h.
|
protected |
Definition at line 98 of file AnalogSensorClient.h.
|
protected |
Definition at line 100 of file AnalogSensorClient.h.
|
protected |
Definition at line 96 of file AnalogSensorClient.h.
|
protected |
Definition at line 102 of file AnalogSensorClient.h.