80 class CameraInterface :
public Component {
82 virtual void take_picture() = 0;
84 virtual void start_video_recording() = 0;
86 virtual void stop_video_recording() = 0;
88 virtual void set_optical_zoom_level(
int level) = 0;
90 virtual unsigned int get_optical_zoom_level() = 0;
92 virtual std::vector<unsigned int> get_optical_zoom_range() = 0;
94 virtual ZoomType get_optical_zoom_type() = 0;
96 virtual void set_digital_zoom_level(
int level) = 0;
98 virtual unsigned int get_digital_zoom_level() = 0;
100 virtual std::vector<unsigned int> get_digital_zoom_range() = 0;
102 virtual FocusMode get_focus_mode() = 0;
104 virtual void set_focus_mode(FocusMode mode) = 0;
106 virtual unsigned int get_focus_position() = 0;
108 virtual std::vector<unsigned int> get_focus_position_range() = 0;
110 virtual void set_focus_position(
unsigned int position) = 0;
112 virtual unsigned int get_iso_level() = 0;
114 virtual std::vector<unsigned int> get_iso_range() = 0;
116 virtual void set_iso_level(
unsigned int level) = 0;
118 virtual unsigned int get_shutter_speed() = 0;
120 virtual std::vector<unsigned int> get_shutter_speed_range() = 0;
122 virtual void set_shutter_speed(
unsigned int speed) = 0;
124 virtual ExposureProgramMode get_exposure_program_mode() = 0;
126 virtual void set_exposure_program_mode(ExposureProgramMode mode) = 0;
128 virtual float get_aperture() = 0;
130 virtual std::vector<float> get_aperture_range() = 0;
132 virtual void set_aperture(
float aperture) = 0;
134 virtual std::string get_white_balance() = 0;
136 virtual std::vector<std::string> get_white_balance_options() = 0;
138 virtual void set_white_balance(std::string wb) = 0;
140 [[nodiscard]]
virtual bool get_zoom()
const = 0;
142 [[nodiscard]]
virtual bool get_gimbal()
const = 0;
144 [[nodiscard]]
virtual bool get_picture()
const = 0;
146 [[nodiscard]]
virtual bool get_video()
const = 0;
148 [[nodiscard]]
virtual CameraType get_type()
const = 0;
150 [[nodiscard]]
virtual bool is_recording()
const = 0;
161 class IRCameraInterface :
virtual public CameraInterface {
163 virtual IRPalette get_color_palette() = 0;
165 virtual void set_color_palette(IRPalette palette) = 0;
167 virtual std::vector<IRPalette> get_color_palette_options() = 0;
178 class Camera :
virtual public CameraInterface {
613 m_type = CameraType::THERMAL;
CameraType
The type of camera, such as standard EO or thermal.
Definition camera.h:21
IRPalette
The different possible thermal palettes.
Definition camera.h:62
ExposureProgramMode
The exposure program mode, such as manual or aperture priority.
Definition camera.h:51
FocusMode
The focus mode of the camera.
Definition camera.h:41
ZoomType
The zoom format for the camera, such as mm (24mm) or multiplier (3x)
Definition camera.h:31
The base camera class.
Definition camera.h:178
void set_focus_mode(FocusMode mode) override
Sets the focus mode.
Definition camera.h:470
std::vector< float > get_aperture_range() override
Gets the possible aperture values.
Definition camera.h:404
void set_exposure_program_mode(ExposureProgramMode mode) override
Sets the exposure program mode.
Definition camera.h:382
std::vector< unsigned int > get_focus_position_range() override
Gets the focus position range.
Definition camera.h:492
std::vector< unsigned int > get_iso_range() override
Gets the ISO range on the camera.
Definition camera.h:316
std::vector< unsigned int > get_digital_zoom_range() override
Gets the digital zoom range on the camera.
Definition camera.h:294
unsigned int get_shutter_speed() override
Gets the shutter speed on the camera.
Definition camera.h:338
void set_white_balance(std::string wb) override
Sets the white balance.
Definition camera.h:448
bool m_gimbal
Is the camera mounted on a controllable gimbal.
Definition camera.h:586
Camera()
The default constructor.
Definition camera.h:183
unsigned int get_focus_position() override
Gets the focus position.
Definition camera.h:481
unsigned int get_iso_level() override
Gets the ISO level on the camera.
Definition camera.h:305
CameraType get_type() const final
Get the type of camera.
Definition camera.h:548
void set_shutter_speed(unsigned int speed) override
Sets the shutter speed on the camera.
Definition camera.h:360
void set_focus_position(unsigned int position) override
Sets the focus position.
Definition camera.h:503
float get_aperture() override
Gets the aperture.
Definition camera.h:393
std::string get_white_balance() override
Gets the white balance.
Definition camera.h:426
unsigned int get_optical_zoom_level() override
Gets the optical zoom on the camera.
Definition camera.h:239
void set_digital_zoom_level(int level) override
Sets the digital zoom on the camera.
Definition camera.h:272
bool get_zoom() const final
Does the camera support zoom.
Definition camera.h:512
CameraType m_type
The camera type.
Definition camera.h:566
ZoomType get_optical_zoom_type() override
Gets the optical zoom type on the camera.
Definition camera.h:261
unsigned int get_digital_zoom_level() override
Gets the digital zoom on the camera.
Definition camera.h:283
bool m_video
Can the camera take videos.
Definition camera.h:576
ExposureProgramMode get_exposure_program_mode() override
Gets the exposure program mode.
Definition camera.h:371
void take_picture() override
Take a picture on the camera.
Definition camera.h:199
bool get_picture() const final
Does the camera support pictures.
Definition camera.h:530
bool m_zoom
Can the camera zoom.
Definition camera.h:581
void set_iso_level(unsigned int level) override
Sets the ISO level on the camera.
Definition camera.h:327
bool m_picture
Can the camera take pictures.
Definition camera.h:571
std::vector< std::string > get_white_balance_options() override
Gets the white balance options.
Definition camera.h:437
Camera(const std::string &name)
The name constructor.
Definition camera.h:190
bool get_gimbal() const final
Is the camera mounted on a gimbal.
Definition camera.h:521
void set_aperture(float aperture) override
Sets the aperture.
Definition camera.h:415
void set_optical_zoom_level(int level) override
Sets the optical zoom on the camera.
Definition camera.h:228
bool is_recording() const final
Get the recording status of the camera.
Definition camera.h:557
std::vector< unsigned int > get_optical_zoom_range() override
Gets the optical zoom range on the camera.
Definition camera.h:250
bool get_video() const final
Does the camera support videos.
Definition camera.h:539
bool m_is_recording
Is the camera currently recording.
Definition camera.h:591
void stop_video_recording() override
Stop recording a video on the camera.
Definition camera.h:217
FocusMode get_focus_mode() override
Gets the focus mode.
Definition camera.h:459
void start_video_recording() override
Start recording a video on the camera.
Definition camera.h:208
std::vector< unsigned int > get_shutter_speed_range() override
Gets the shutter speed range on the camera.
Definition camera.h:349
Component()=default
The default constructor.
The base infrared/thermal camera class.
Definition camera.h:602
IRPalette get_color_palette() override
Gets the active color palette of the IR camera.
Definition camera.h:623
IRCamera()
Default constructor.
Definition camera.h:607
std::vector< IRPalette > get_color_palette_options() override
Gets the active color palette of the IR camera.
Definition camera.h:645
IRCamera(const std::string &name)
Name constructor.
Definition camera.h:612
void set_color_palette(IRPalette palette) override
Sets the active color palette of the IR camera.
Definition camera.h:634
An error representing a function that is not implemented.
Definition error.h:17