|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
21 FrameGrabberControls_Sender::FrameGrabberControls_Sender(
Port& port) : _port(port) {};
31 bool ret = _port.
write(cmd,response);
46 bool ret = _port.
write(cmd,response);
60 return _port.
write(cmd,response);
72 return _port.
write(cmd,response);
82 bool ret = _port.
write(cmd,response);
95 bool ret = _port.
write(cmd,response);
109 bool ret = _port.
write(cmd,response);
111 *_hasOnOff = response.
get(4).
asInt32() !=0?
true:
false;
123 return _port.
write(cmd,response);
133 bool ret = _port.
write(cmd,response);
135 *_isActive = response.
get(3).
asInt32() !=0?
true:
false;
146 bool ret = _port.
write(cmd,response);
148 *_hasAuto = response.
get(4).
asInt32() !=0?
true:
false;;
159 bool ret = _port.
write(cmd,response);
161 *_hasManual = response.
get(4).
asInt32() !=0?
true:
false;
172 bool ret = _port.
write(cmd,response);
174 *_hasOnePush = response.
get(4).
asInt32() !=0?
true:
false;
186 return _port.
write(cmd,response);
196 bool ret = _port.
write(cmd,response);
209 return _port.
write(cmd,response);
246 yError() <<
" Selected camera device has no IFrameGrabberControl interface";
301 yError() <<
"Unknown command 'HAS " <<
Vocab::decode(param) <<
"' received on IFrameGrabber2 interface";
340 yError() <<
"Unknown command 'SET " <<
Vocab::decode(param) <<
"' received on IFrameGrabber2 interface";
373 double value1, value2;
395 yError() <<
"Unknown command 'GET " <<
Vocab::decode(param) <<
"' received on IFrameGrabber2 interface";
A simple collection of objects that can be described and transmitted in a portable way.
virtual std::int32_t asVocab() const
Get vocabulary identifier as an integer.
std::string toString() const override
Gives a human-readable textual representation of the bottle.
bool hasManual(int feature, bool *hasManual) override
Check if the requested feature has the 'manual' mode.
void clear()
Empties the bottle of any objects it contains.
virtual bool getActive(int feature, bool *isActive)=0
Get the current status of the feature, on or off.
constexpr yarp::conf::vocab32_t VOCAB_CAMERA_DESCRIPTION
constexpr yarp::conf::vocab32_t VOCAB_FRAMEGRABBER_CONTROL
bool setActive(int feature, bool onoff) override
Set the requested feature on or off.
virtual bool hasFeature(int feature, bool *hasFeature)=0
Check if camera has the requested feature (saturation, brightness ...
virtual bool getCameraDescription(CameraDescriptor *camera)=0
Get a basic description of the camera hw.
FrameGrabberControls_Parser()
bool setOnePush(int feature) override
Set the requested feature to a value (saturation, brightness ...
constexpr yarp::conf::vocab32_t VOCAB_GET
constexpr yarp::conf::vocab32_t VOCAB_FEATURE2
constexpr yarp::conf::vocab32_t VOCAB_ONOFF
constexpr yarp::conf::vocab32_t VOCAB_ACTIVE
void addFloat64(yarp::conf::float64_t x)
Places a 64-bit floating point number in the bottle, at the end of the list.
std::string deviceDescription
bool hasOnePush(int feature, bool *hasOnePush) override
Check if the requested feature has the 'onePush' mode.
An interface for the device drivers.
virtual bool setFeature(int feature, double value)=0
Set the requested feature to a value (saturation, brightness ...
constexpr yarp::conf::vocab32_t VOCAB_HAS
std::string decode(NetInt32 code)
Convert a vocabulary identifier into a string.
bool setFeature(int feature, double value) override
Set the requested feature to a value (saturation, brightness ...
A mini-server for network communication.
constexpr yarp::conf::vocab32_t VOCAB_ONEPUSH
bool hasFeature(int feature, bool *hasFeature) override
Check if camera has the requested feature (saturation, brightness ...
constexpr yarp::conf::vocab32_t VOCAB_SET
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
virtual bool setMode(int feature, FeatureMode mode)=0
Set the requested mode for the feature.
bool respond(const yarp::os::Bottle &cmd, yarp::os::Bottle &response) override
Respond to a message.
bool getMode(int feature, FeatureMode *mode) override
Get the current mode for the feature.
bool hasAuto(int feature, bool *hasAuto) override
Check if the requested feature has the 'auto' mode.
virtual bool hasManual(int feature, bool *hasManual)=0
Check if the requested feature has the 'manual' mode.
virtual std::string asString() const
Get string value.
virtual bool getFeature(int feature, double *value)=0
Get the current value for the requested feature.
bool getFeature(int feature, double *value) override
Get the current value for the requested feature.
void addInt32(std::int32_t x)
Places a 32-bit integer in the bottle, at the end of the list.
virtual bool hasAuto(int feature, bool *hasAuto)=0
Check if the requested feature has the 'auto' mode.
Control interface for frame grabber devices.
void addString(const char *str)
Places a string in the bottle, at the end of the list.
constexpr yarp::conf::vocab32_t VOCAB_MANUAL
void addVocab(int x)
Places a vocabulary item in the bottle, at the end of the list.
bool getCameraDescription(CameraDescriptor *camera) override
Get a basic description of the camera hw.
virtual bool getMode(int feature, FeatureMode *mode)=0
Get the current mode for the feature.
virtual std::int32_t asInt32() const
Get 32-bit integer value.
constexpr yarp::conf::vocab32_t VOCAB_AUTO
bool write(const PortWriter &writer, const PortWriter *callback=nullptr) const override
Write an object to the port.
An interface to the operating system, including Port based communication.
constexpr yarp::conf::vocab32_t VOCAB_MODE
virtual bool hasOnePush(int feature, bool *hasOnePush)=0
Check if the requested feature has the 'onePush' mode.
virtual bool setOnePush(int feature)=0
Set the requested feature to a value (saturation, brightness ...
constexpr yarp::conf::vocab32_t VOCAB_IS
bool configure(IFrameGrabberControls *interface)
constexpr yarp::conf::vocab32_t VOCAB_FEATURE
virtual bool hasOnOff(int feature, bool *HasOnOff)=0
Check if the camera has the ability to turn on/off the requested feature.
virtual yarp::conf::float64_t asFloat64() const
Get 64-bit floating point value.
virtual bool setActive(int feature, bool onoff)=0
Set the requested feature on or off.
bool getActive(int feature, bool *isActive) override
Get the current status of the feature, on or off.
bool setMode(int feature, FeatureMode mode) override
Set the requested mode for the feature.
bool hasOnOff(int feature, bool *HasOnOff) override
Check if the camera has the ability to turn on/off the requested feature.
bool isOpen() const
Check if the port has been opened.