analogsensorclient
deprecated: Device that reads an AnalogSensor (using the IAnalogSensor interface) from the YARP network.
More...
#include <networkWrappers/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. | |
bool | close () override |
Close the DeviceDriver. | |
int | read (yarp::sig::Vector &out) override |
Read a vector from the sensor. | |
int | getState (int ch) override |
Check the state value of a given channel. | |
int | getChannels () override |
Get the number of channels of the sensor. | |
int | calibrateSensor () override |
Calibrates the whole sensor. | |
int | calibrateSensor (const yarp::sig::Vector &value) override |
Calibrates the whole sensor, using an vector of calibration values. | |
int | calibrateChannel (int ch) override |
Calibrates one single channel. | |
int | calibrateChannel (int ch, double value) override |
Calibrates one single channel, using a calibration value. | |
yarp::os::Stamp | getLastInputStamp () override |
Get the time stamp for the last read data. | |
![]() | |
DeviceDriver () | |
DeviceDriver (const DeviceDriver &other)=delete | |
DeviceDriver (DeviceDriver &&other) noexcept=delete | |
DeviceDriver & | operator= (const DeviceDriver &other)=delete |
DeviceDriver & | operator= (DeviceDriver &&other) noexcept=delete |
virtual | ~DeviceDriver () |
virtual std::string | id () const |
Return the id assigned to the PolyDriver. | |
virtual void | setId (const std::string &id) |
Set the id for this device. | |
template<class T > | |
bool | view (T *&x) |
Get an interface to the device driver. | |
virtual DeviceDriver * | getImplementation () |
Some drivers are bureaucrats, pointing at others. | |
![]() | |
virtual | ~IPreciselyTimed () |
![]() | |
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 | |
![]() | |
enum | { AS_OK =0 , AS_ERROR =1 , AS_OVF =2 , AS_TIMEOUT =3 } |
analogsensorclient
deprecated: 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 86 of file AnalogSensorClient.h.
|
default |
|
delete |
|
delete |
|
overridedefault |
Calibrates one single channel.
ch | channel number. |
Implements yarp::dev::IAnalogSensor.
Definition at line 293 of file AnalogSensorClient.cpp.
Calibrates one single channel, using a calibration value.
ch | channel number. |
value | calibration value. |
Implements yarp::dev::IAnalogSensor.
Definition at line 303 of file AnalogSensorClient.cpp.
|
overridevirtual |
Calibrates the whole sensor.
Implements yarp::dev::IAnalogSensor.
Definition at line 271 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 280 of file AnalogSensorClient.cpp.
|
overridevirtual |
Close the DeviceDriver.
Reimplemented from yarp::dev::DeviceDriver.
Definition at line 248 of file AnalogSensorClient.cpp.
|
overridevirtual |
Get the number of channels of the sensor.
Implements yarp::dev::IAnalogSensor.
Definition at line 266 of file AnalogSensorClient.cpp.
|
overridevirtual |
Get the time stamp for the last read data.
Implements yarp::dev::IPreciselyTimed.
Definition at line 314 of file AnalogSensorClient.cpp.
Check the state value of a given channel.
ch | channel number. |
Implements yarp::dev::IAnalogSensor.
Definition at line 260 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 188 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 255 of file AnalogSensorClient.cpp.
|
protected |
Definition at line 161 of file AnalogSensorClient.cpp.
|
protected |
Definition at line 98 of file AnalogSensorClient.h.
|
protected |
Definition at line 92 of file AnalogSensorClient.h.
|
protected |
Definition at line 96 of file AnalogSensorClient.h.
|
protected |
Definition at line 94 of file AnalogSensorClient.h.
|
protected |
Definition at line 100 of file AnalogSensorClient.h.
|
protected |
Definition at line 95 of file AnalogSensorClient.h.
|
protected |
Definition at line 97 of file AnalogSensorClient.h.
|
protected |
Definition at line 93 of file AnalogSensorClient.h.
|
protected |
Definition at line 99 of file AnalogSensorClient.h.