5 #ifndef __RD_YARP_LOCAL_IMAGE_MANAGER_HPP__
6 #define __RD_YARP_LOCAL_IMAGE_MANAGER_HPP__
10 #include <yarp/os/PortReaderBuffer.h>
11 #include <yarp/os/BufferedPort.h>
12 #include <yarp/os/Semaphore.h>
13 #include <yarp/dev/PolyDriver.h>
15 #include "ImageManager.hpp"
35 public yarp::os::TypedReaderCallback<Image>
42 virtual bool configure(
const std::string & parameter,
const std::string & value);
56 static const std::string
id;
95 yarp::dev::PolyDriver cameraDevice;
105 #endif //-- __RD_YARP_LOCAL_IMAGE_MANAGER_HPP__
virtual bool configure(const std::string ¶meter, const std::string &value)
Configures a parameter with a value.
Definition: YarpLocalImageManager.cpp:83
YarpLocalImageManager()
Constructor.
Definition: YarpLocalImageManager.cpp:148
static YarpLocalImageManager * uniqueInstance
Reference to this manager (unique instance)
Definition: YarpLocalImageManager.hpp:75
yarp::os::Semaphore semaphore
Semaphore to make the image manipulation thread-safe.
Definition: YarpLocalImageManager.hpp:78
std::string remote_port_name
Name of the camera (remote) yarp port.
Definition: YarpLocalImageManager.hpp:90
virtual ~YarpLocalImageManager()
Destructor. Used to reset the local static reference after destroying this manager.
Definition: YarpLocalImageManager.cpp:124
virtual bool stop()
Stop capturing images.
Definition: YarpLocalImageManager.cpp:58
static const std::string id
String that identifies this manager.
Definition: YarpLocalImageManager.hpp:56
The main, catch-all namespace for Robot Devastation.
Definition: groups.dox:4
virtual bool start()
Start to capture images.
Definition: YarpLocalImageManager.cpp:20
Image input manager based in YARP.
Definition: YarpLocalImageManager.hpp:34
virtual Image getImage() const
Return the last received image.
Definition: YarpLocalImageManager.cpp:105
int camera_id
Used to select when several cameras are attached.
Definition: YarpLocalImageManager.hpp:98
yarp::os::BufferedPort< Image > imagePort
Yarp port to communicate with the remote camera.
Definition: YarpLocalImageManager.hpp:84
virtual bool setEnabled(bool enabled)
Enables/disables notifications to listeners.
Definition: YarpLocalImageManager.cpp:77
std::string local_port_name
Name of the local yarp port.
Definition: YarpLocalImageManager.hpp:87
virtual bool isStopped() const
True if the manager is not active.
Definition: YarpLocalImageManager.cpp:72
static bool RegisterManager()
Register this manager in the ImageManager registry so that can be used.
Definition: YarpLocalImageManager.cpp:114
void onRead(Image &image)
Yarp event for incoming messages.
Definition: YarpLocalImageManager.cpp:129
Image image
Last image received.
Definition: YarpLocalImageManager.hpp:81
Generic image input manager.
Definition: ImageManager.hpp:39