6 #ifndef YARP_DEV_ANALOGWRAPPER_ANALOGWRAPPER_H
7 #define YARP_DEV_ANALOGWRAPPER_ANALOGWRAPPER_H
42 #define DEFAULT_THREAD_PERIOD 20
200 bool close()
override;
203 void setId(
const std::string &
id);
220 std::string streamingPortName;
221 std::string rpcPortName;
223 std::vector<AnalogPortEntry> analogPorts;
224 std::vector<AnalogServerHandler*> handlers;
228 std::string sensorId;
232 std::vector<std::string> frame_idVec;
233 std::vector<std::string> ros_joint_names;
234 std::string rosMsgType;
235 std::string rosNodeName{
""};
236 std::vector<std::string> rosTopicNamesVec;
238 std::vector<yarp::os::NetUint32> rosMsgCounterVec;
244 std::vector<yarp::os::Publisher<yarp::rosmsg::geometry_msgs::WrenchStamped>> rosPublisherWrenchPortVec;
250 bool ownDevices{
false};
260 bool initialize_ROS();
264 void removeHandlers();
267 bool createPort(
const char* name,
int rate=20);
269 bool createPorts(
const std::vector<AnalogPortEntry>& _analogPorts,
int rate=20);
#define DEFAULT_THREAD_PERIOD
contains the definition of a Vector type
A yarp port that output data read from an analog sensor.
Handler of the rpc port related to an analog sensor.
analogServer deprecated: Device that expose an AnalogSensor (using the IAnalogSensor interface) on th...
AnalogWrapper & operator=(const AnalogWrapper &)=delete
void threadRelease() override
Release method.
void setId(const std::string &id)
void attach(yarp::dev::IAnalogSensor *s)
bool threadInit() override
Initialization method.
~AnalogWrapper() override
AnalogWrapper(AnalogWrapper &&)=delete
void run() override
Loop function.
AnalogWrapper & operator=(AnalogWrapper &&)=delete
bool open(yarp::os::Searchable ¶ms) override
Open the DeviceDriver.
AnalogWrapper(const AnalogWrapper &)=delete
bool close() override
Close the DeviceDriver.
bool attachAll(const yarp::dev::PolyDriverList &p) override
Specify which analog sensor this thread has to read from.
bool detachAll() override
Detach the object (you must have first called attach).
yarp::os::Bottle getOptions()
Interface implemented by all device drivers.
A generic interface to sensors (gyro, a/d converters).
Interface for an object that can wrap/attach to to another.
A container for a device driver.
A simple collection of objects that can be described and transmitted in a portable way.
An abstraction for a periodic thread.
A base class for nested structures that can be searched.
An abstraction for a time stamp and/or sequence number.