58 enum TouchMode : uint8_t { T_DISABLED = 0, T_TRACKING, T_DETECTION };
82 class CameraInterface :
public Component {
84 virtual void take_picture() = 0;
86 virtual void start_video_recording() = 0;
88 virtual void stop_video_recording() = 0;
90 virtual void set_optical_zoom_level(
unsigned int level) = 0;
92 virtual unsigned int get_optical_zoom_level() = 0;
94 virtual std::vector<unsigned int> get_optical_zoom_range() = 0;
96 virtual ZoomType get_optical_zoom_type() = 0;
98 virtual void set_digital_zoom_level(
unsigned int level) = 0;
100 virtual unsigned int get_digital_zoom_level() = 0;
102 virtual std::vector<unsigned int> get_digital_zoom_range() = 0;
104 virtual FocusMode get_focus_mode() = 0;
106 virtual void set_focus_mode(FocusMode mode) = 0;
108 virtual unsigned int get_focus_position() = 0;
110 virtual std::vector<unsigned int> get_focus_position_range() = 0;
112 virtual void set_focus_position(
unsigned int position) = 0;
114 virtual unsigned int get_iso_level() = 0;
116 virtual std::vector<unsigned int> get_iso_range() = 0;
118 virtual void set_iso_level(
unsigned int level) = 0;
120 virtual unsigned int get_shutter_speed() = 0;
122 virtual std::vector<unsigned int> get_shutter_speed_range() = 0;
124 virtual void set_shutter_speed(
unsigned int speed) = 0;
126 virtual ExposureProgramMode get_exposure_program_mode() = 0;
128 virtual void set_exposure_program_mode(ExposureProgramMode mode) = 0;
130 virtual unsigned int get_aperture() = 0;
132 virtual std::vector<unsigned int> get_aperture_range() = 0;
134 virtual void set_aperture(
unsigned int aperture) = 0;
136 virtual std::string get_white_balance() = 0;
138 virtual std::vector<std::string> get_white_balance_options() = 0;
140 virtual void set_white_balance(std::string wb) = 0;
142 [[nodiscard]]
virtual bool get_zoom()
const = 0;
144 [[nodiscard]]
virtual bool get_gimbal()
const = 0;
146 [[nodiscard]]
virtual bool get_picture()
const = 0;
148 [[nodiscard]]
virtual bool get_video()
const = 0;
150 [[nodiscard]]
virtual bool get_touch()
const = 0;
152 [[nodiscard]]
virtual CameraType get_type()
const = 0;
154 [[nodiscard]]
virtual bool is_recording()
const = 0;
156 [[nodiscard]]
virtual TouchMode get_touch_mode()
const = 0;
158 virtual void set_touch_mode(TouchMode mode) = 0;
160 virtual void set_touch_position(
unsigned int x,
unsigned int y) = 0;
173 virtual IRPalette get_color_palette() = 0;
175 virtual void set_color_palette(IRPalette palette) = 0;
177 virtual std::vector<IRPalette> get_color_palette_options() = 0;
194 :
Camera(std::string()) {}
202 : CameraInterface(name),
674 m_type = CameraType::THERMAL;
IRPalette
The different possible thermal palettes.
Definition camera.h:64
ZoomType
The zoom format for the camera, such as mm (24mm) or multiplier (3x)
Definition camera.h:29
ExposureProgramMode
The exposure program mode, such as manual or aperture priority.
Definition camera.h:47
TouchMode
The current mode for camera gestures.
Definition camera.h:58
FocusMode
The focus mode of the camera.
Definition camera.h:38
CameraType
The type of camera, such as standard EO or thermal.
Definition camera.h:20
The base camera class.
Definition camera.h:188
void set_focus_mode(FocusMode mode) override
Sets the focus mode.
Definition camera.h:483
TouchMode m_touch_mode
The current touch/gesture mode.
Definition camera.h:650
void set_exposure_program_mode(ExposureProgramMode mode) override
Sets the exposure program mode.
Definition camera.h:395
std::vector< unsigned int > get_focus_position_range() override
Gets the focus position range.
Definition camera.h:505
std::vector< unsigned int > get_iso_range() override
Gets the ISO range on the camera.
Definition camera.h:329
std::vector< unsigned int > get_digital_zoom_range() override
Gets the digital zoom range on the camera.
Definition camera.h:307
unsigned int get_shutter_speed() override
Gets the shutter speed on the camera.
Definition camera.h:351
void set_white_balance(std::string wb) override
Sets the white balance.
Definition camera.h:461
bool m_touch
Does the camera support touch gestures.
Definition camera.h:630
bool m_gimbal
Is the camera mounted on a controllable gimbal.
Definition camera.h:640
bool get_touch() const final
Does the camera support touch.
Definition camera.h:561
Camera()
The default constructor.
Definition camera.h:193
unsigned int get_focus_position() override
Gets the focus position.
Definition camera.h:494
unsigned int get_iso_level() override
Gets the ISO level on the camera.
Definition camera.h:318
void set_optical_zoom_level(unsigned int level) override
Sets the optical zoom on the camera.
Definition camera.h:241
std::vector< unsigned int > get_aperture_range() override
Gets the possible aperture values.
Definition camera.h:417
CameraType get_type() const final
Get the type of camera.
Definition camera.h:570
void set_shutter_speed(unsigned int speed) override
Sets the shutter speed on the camera.
Definition camera.h:373
void set_focus_position(unsigned int position) override
Sets the focus position.
Definition camera.h:516
std::string get_white_balance() override
Gets the white balance.
Definition camera.h:439
unsigned int get_optical_zoom_level() override
Gets the optical zoom on the camera.
Definition camera.h:252
bool get_zoom() const final
Does the camera support zoom.
Definition camera.h:525
void set_touch_mode(TouchMode mode) override
Set the camera touch/gesture mode.
Definition camera.h:597
CameraType m_type
The camera type.
Definition camera.h:615
ZoomType get_optical_zoom_type() override
Gets the optical zoom type on the camera.
Definition camera.h:274
unsigned int get_digital_zoom_level() override
Gets the digital zoom on the camera.
Definition camera.h:296
void set_digital_zoom_level(unsigned int level) override
Sets the digital zoom on the camera.
Definition camera.h:285
TouchMode get_touch_mode() const final
Get the camera touch/gesture mode.
Definition camera.h:588
bool m_video
Can the camera take videos.
Definition camera.h:625
ExposureProgramMode get_exposure_program_mode() override
Gets the exposure program mode.
Definition camera.h:384
void take_picture() override
Take a picture on the camera.
Definition camera.h:212
bool get_picture() const final
Does the camera support pictures.
Definition camera.h:543
unsigned int get_aperture() override
Gets the aperture.
Definition camera.h:406
bool m_zoom
Can the camera zoom.
Definition camera.h:635
void set_iso_level(unsigned int level) override
Sets the ISO level on the camera.
Definition camera.h:340
bool m_picture
Can the camera take pictures.
Definition camera.h:620
std::vector< std::string > get_white_balance_options() override
Gets the white balance options.
Definition camera.h:450
Camera(const std::string &name)
The name constructor.
Definition camera.h:201
bool get_gimbal() const final
Is the camera mounted on a gimbal.
Definition camera.h:534
bool is_recording() const final
Get the recording status of the camera.
Definition camera.h:579
std::vector< unsigned int > get_optical_zoom_range() override
Gets the optical zoom range on the camera.
Definition camera.h:263
void set_aperture(unsigned int aperture) override
Sets the aperture.
Definition camera.h:428
bool get_video() const final
Does the camera support videos.
Definition camera.h:552
bool m_is_recording
Is the camera currently recording.
Definition camera.h:645
void stop_video_recording() override
Stop recording a video on the camera.
Definition camera.h:230
FocusMode get_focus_mode() override
Gets the focus mode.
Definition camera.h:472
void set_touch_position(unsigned int x, unsigned int y) override
Set the touch position.
Definition camera.h:607
void start_video_recording() override
Start recording a video on the camera.
Definition camera.h:221
std::vector< unsigned int > get_shutter_speed_range() override
Gets the shutter speed range on the camera.
Definition camera.h:362
Component()=default
The default constructor.
IRPalette get_color_palette() override
Gets the active color palette of the IR camera.
Definition camera.h:684
IRCamera()
Default constructor.
Definition camera.h:666
std::vector< IRPalette > get_color_palette_options() override
Gets the active color palette of the IR camera.
Definition camera.h:706
IRCamera(const std::string &name)
Name constructor.
Definition camera.h:672
void set_color_palette(IRPalette palette) override
Sets the active color palette of the IR camera.
Definition camera.h:695
An error representing a function that is not implemented.
Definition error.h:19