trikRuntime
trikControl::ColorSensorInterface Class Referenceabstract

Uses virtual color sensor to detect dominant color in every cell of m * n grid of camera field of view. More...

#include <colorSensorInterface.h>

Inheritance diagram for trikControl::ColorSensorInterface:
Collaboration diagram for trikControl::ColorSensorInterface:

Public Slots

virtual void init (bool showOnDisplay)=0
 Initializes a camera. More...
 
virtual QVector< int > read (int m, int n)=0
 Returns dominant color in given cell of a grid as a vector [R; G; B] in RGB color scale. More...
 
virtual void stop ()=0
 Stops detection until init() will be called again. More...
 

Signals

void stopped ()
 Emitted when sensor is stopped successfully. More...
 

Additional Inherited Members

- Public Types inherited from trikControl::DeviceInterface
enum  Status {
  Status::permanentFailure, Status::temporaryFailure, Status::off, Status::starting,
  Status::ready, Status::stopping
}
 Device status. More...
 
- Public Member Functions inherited from trikControl::DeviceInterface
 DeviceInterface ()=default
 
virtual ~DeviceInterface ()=default
 
virtual Status status () const =0
 Returns current status of the device. More...
 
- Static Public Member Functions inherited from trikControl::DeviceInterface
static Status combine (const DeviceInterface &underlying, const DeviceInterface::Status &dependent)
 Helper method to return status of a device relying on other device to work. More...
 

Detailed Description

Uses virtual color sensor to detect dominant color in every cell of m * n grid of camera field of view.

Member Function Documentation

virtual void trikControl::ColorSensorInterface::init ( bool  showOnDisplay)
pure virtualslot

Initializes a camera.

Parameters
showOnDisplay- true if we want an image from a camera to be drawn on robot display.
virtual QVector<int> trikControl::ColorSensorInterface::read ( int  m,
int  n 
)
pure virtualslot

Returns dominant color in given cell of a grid as a vector [R; G; B] in RGB color scale.

virtual void trikControl::ColorSensorInterface::stop ( )
pure virtualslot

Stops detection until init() will be called again.

void trikControl::ColorSensorInterface::stopped ( )
signal

Emitted when sensor is stopped successfully.


The documentation for this class was generated from the following file: