| Xavia SDK c++ API 2.1.0 API description of the xavia library

Loading...
Searching...
No Matches
iSensor.h
1#pragma once
2
3#include <cstddef>
4#include <vector>
5#include <memory>
6
7 namespace xavia::sdk
8{
9 class SerialNumber;
10 class ICamera;
11 enum class SensorState;
12 enum class SensorError;
13 struct FullSensorState;
14 constexpr std::size_t DEFAULT_STATE_CHANGE_TIMEOUT_MS = 5000;
15
24 class ISensor
25 {
26 public:
27 virtual ~ISensor() = default;
28
40 virtual void Start(const std::size_t& timeoutMS = DEFAULT_STATE_CHANGE_TIMEOUT_MS) = 0;
41
53 virtual void Stop(const std::size_t& timeoutMS = DEFAULT_STATE_CHANGE_TIMEOUT_MS) = 0;
54
65 virtual SerialNumber GetSerialNumber() const = 0;
66
77 virtual SensorState GetCurrentState() const = 0;
78
98 virtual std::vector<SensorError> GetErrors(const std::size_t& timeoutMS = DEFAULT_STATE_CHANGE_TIMEOUT_MS ) = 0;
99
111 virtual void Reboot() = 0;
112
125 virtual void Poweroff() = 0;
126
140 virtual std::shared_ptr<ICamera> GetCamera() const = 0;
141 };
142}
xavia::sdk::ICamera
Camera object interface.
Definition iCamera.h:24
xavia::sdk::ISensor
Sensor object interface.
Definition iSensor.h:25
xavia::sdk::ISensor::GetCurrentState
virtual SensorState GetCurrentState() const =0
Provides the current state of the sensor (running, idle, error).
xavia::sdk::ISensor::Start
virtual void Start(const std::size_t &timeoutMS=DEFAULT_STATE_CHANGE_TIMEOUT_MS)=0
Starts the sensor.
xavia::sdk::ISensor::Reboot
virtual void Reboot()=0
Sends a 'reboot' signal to the sensor.
xavia::sdk::ISensor::Poweroff
virtual void Poweroff()=0
Sends a 'poweroff' signal to the sensor.
xavia::sdk::ISensor::Stop
virtual void Stop(const std::size_t &timeoutMS=DEFAULT_STATE_CHANGE_TIMEOUT_MS)=0
Stop the sensor.
xavia::sdk::ISensor::GetSerialNumber
virtual SerialNumber GetSerialNumber() const =0
Provides the serial number of the sensor from local memory.
xavia::sdk::ISensor::GetErrors
virtual std::vector< SensorError > GetErrors(const std::size_t &timeoutMS=DEFAULT_STATE_CHANGE_TIMEOUT_MS)=0
Retrieves the state from the sensor and reports a list of errors.
xavia::sdk::ISensor::GetCamera
virtual std::shared_ptr< ICamera > GetCamera() const =0
Get the camera associated with this sensor.
xavia::sdk::SerialNumber
utility class that holds a serial number and allows interpretation.
Definition serialNumber.h:31