9 #ifndef YARP_DEV_ANALOGWRAPPER_ANALOGWRAPPER_H
10 #define YARP_DEV_ANALOGWRAPPER_ANALOGWRAPPER_H
46 #define DEFAULT_THREAD_PERIOD 20
206 bool close()
override;
209 void setId(
const std::string &
id);
226 std::string streamingPortName;
227 std::string rpcPortName;
229 std::vector<AnalogPortEntry> analogPorts;
230 std::vector<AnalogServerHandler*> handlers;
234 std::string sensorId;
238 std::vector<std::string> frame_idVec;
239 std::vector<std::string> ros_joint_names;
240 std::string rosMsgType;
241 std::string rosNodeName{
""};
242 std::vector<std::string> rosTopicNamesVec;
244 std::vector<yarp::os::NetUint32> rosMsgCounterVec;
250 std::vector<yarp::os::Publisher<yarp::rosmsg::geometry_msgs::WrenchStamped>> rosPublisherWrenchPortVec;
256 bool ownDevices{
false};
266 bool initialize_ROS();
270 void removeHandlers();
273 bool createPort(
const char* name,
int rate=20);
275 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.
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.