|
| ServerFrameGrabber ()=default |
|
| ServerFrameGrabber (const ServerFrameGrabber &)=delete |
|
| ServerFrameGrabber (ServerFrameGrabber &&)=delete |
|
ServerFrameGrabber & | operator= (const ServerFrameGrabber &)=delete |
|
ServerFrameGrabber & | operator= (ServerFrameGrabber &&)=delete |
|
| ~ServerFrameGrabber () override=default |
|
bool | close () override |
| Close the DeviceDriver. More...
|
|
bool | open (yarp::os::Searchable &config) override |
| Configure with a set of options. More...
|
|
virtual bool | respond (const yarp::os::Bottle &command, yarp::os::Bottle &reply) override |
| Respond to a message. More...
|
|
bool | getDatum (yarp::sig::ImageOf< yarp::sig::PixelRgb > &image) override |
|
bool | getDatum (yarp::sig::ImageOf< yarp::sig::PixelMono > &image) override |
|
bool | getDatum (yarp::dev::ImageRgbSound &imageSound) override |
|
virtual bool | getDatum (yarp::sig::ImageOf< yarp::sig::PixelRgb > &image, yarp::sig::Sound &sound) override |
|
bool | getImage (yarp::sig::ImageOf< yarp::sig::PixelRgb > &image) override |
| Get an rgb image from the frame grabber, if required demosaicking/color reconstruction is applied. More...
|
|
virtual bool | getImage (yarp::sig::ImageOf< yarp::sig::PixelMono > &image) |
|
virtual bool | getAudioVisual (yarp::sig::ImageOf< yarp::sig::PixelRgb > &image, yarp::sig::Sound &sound) override |
| Get an image and sound. More...
|
|
int | height () const override |
| Return the height of each frame. More...
|
|
int | width () const override |
| Return the width of each frame. More...
|
|
bool | startService () override |
| Initiate the service, whatever it is. More...
|
|
bool | stopService () override |
| Shut down the service, whatever it is. More...
|
|
bool | updateService () override |
| Give the service the chance to run for a while. More...
|
|
| ~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...
|
|
virtual | ~IConfig () |
| Destructor. More...
|
|
virtual bool | configure (Searchable &config) |
| Change online parameters. More...
|
|
| DeviceResponder () |
| Constructor. More...
|
|
void | addUsage (const char *txt, const char *explain=nullptr) |
| Add information about a message that the respond() method understands. More...
|
|
void | addUsage (const yarp::os::Bottle &bot, const char *explain=nullptr) |
| Add information about a message that the respond() method understands. More...
|
|
bool | read (yarp::os::ConnectionReader &connection) override |
| Handler for reading messages from the network, and passing them on to the respond() method. More...
|
|
void | onRead (yarp::os::Bottle &v) override |
| Alternative handler for reading messages from the network, and passing them on to the respond() method. More...
|
|
void | makeUsage () |
| Regenerate usage information. More...
|
|
void | attach (yarp::os::TypedReader< yarp::os::Bottle > &source) |
| Attach this object to a source of messages. More...
|
|
virtual | ~PortReader () |
| Destructor. More...
|
|
virtual Type | getReadType () const |
|
virtual | ~TypedReaderCallback () |
| Destructor. More...
|
|
virtual void | onRead (yarp::os::Bottle &datum) |
| Callback method. More...
|
|
virtual void | onRead (yarp::os::Bottle &datum, const yarp::os::TypedReader< yarp::os::Bottle > &reader) |
| Callback method. More...
|
|
virtual | ~IFrameGrabberImage () |
| Destructor. More...
|
|
virtual bool | getImageCrop (cropType_id_t cropType, yarp::sig::VectorOf< std::pair< int, int > > vertices, yarp::sig::ImageOf< yarp::sig::PixelRgb > &image) |
| Get a crop of the rgb image from the frame grabber, if required demosaicking/color reconstruction is applied. More...
|
|
virtual | ~IAudioVisualGrabber () |
| Destructor. More...
|
|
virtual | ~IService () |
|
grabber
: Export a frame grabber to the network.
Provides the IFrameGrabberImage, IFrameGrabberControls, and IAudioGrabberSound interfaces. The corresponding client is a RemoteFrameGrabber.
The network interface is a single Port. Images are streamed out from that Port – RemoteFrameGrabber uses this stream to provide the IFrameGrabberImage interface. The IFrameGrabberControls functionality is provided via RPC.
Here's a command-line example:
[terminal A] yarpdev --device fakeFrameGrabber --width 8 --height 8 --name /grabber --framerate 30
[terminal B] yarp read /read
[terminal C] yarp connect /grabber /read
[terminal C] echo "[get] [gain]" | yarp rpc /grabber
The yarpdev line starts a FakeFrameGrabber wrapped in a ServerFrameGrabber. Parameters are: –width, –height set the size of the frame in pixels –name portname set the name of the output port –framerate set the frequency (Hz) at which images will be read and broadcast to the network; if the parameter is not set images are provided at the maximum speed supported by the device. Notice that the maximum frame rate is determined by the device.
After the "yarp connect" line, image descriptions will show up in terminal B (you could view them with the yarpview application). The "yarp rpc" command should query the gain (0.0 for the test grabber).
Command (text form) | Response | Code equivalent |
[set] [bri] 1.0 | none | setBrightness() |
[set] [gain] 1.0 | none | setGain() |
[set] [shut] 1.0 | none | setShutter() |
[get] [bri] | [is] [bri] 1.0 | getBrightness() |
[get] [gain] | [is] [gain] 1.0 | getGain() |
[get] [shut] | [is] [shut] 1.0 | getShutter() |
Definition at line 79 of file ServerFrameGrabber.h.