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

Loading...
Searching...
No Matches
sensorFactory.h
1#pragma once
2
3#include "xmsdk_export.h"
4#include "pixelFormat.h"
5
6#include <functional>
7#include <memory>
8#include <optional>
9#include <string_view>
10
11
12namespace xavia::sdk
13{
14 class ISensor;
15 class IPointCloud;
16 class IImage;
17 class SerialNumber;
18 class Exception;
19 enum class Alert;
20
21 inline constexpr std::string_view DEFAULT_XMANAGER_IP_ADDRESS{"10.10.100.11"};
22 inline constexpr int DEFAULT_XMANAGER_PORT{4000};
23
37 class XMSDK_EXPORT SensorFactory
38 {
39 public:
40 SensorFactory();
41 virtual ~SensorFactory();
42
43 using pcCallback = std::function<void(std::unique_ptr<IPointCloud>)>;
44 using imgCallback = std::function<void(std::unique_ptr<IImage>)>;
45 using errCallback = std::function<void(const Exception&)>;
46 using alertCallback = std::function<void(Alert, std::optional<bool>)>;
47
67 void SetPointCloudCallback(pcCallback callback);
68
79 void SetErrorCallback(errCallback callback);
80
98 void SetAlertCallback(alertCallback callback);
99
114 void SetPointCloudBufferSize(std::size_t bufferSize);
115
132 void SetImageCallback(imgCallback callback);
133
147 void SetCameraIPAddress(const std::string_view& ip4String);
148
159 void SetImageBufferSize(std::size_t bufferSize);
160
187 void SetImageOutputFormat(const PixelFormat format);
188
204 std::shared_ptr<ISensor> Build(const std::string_view& ip4String = DEFAULT_XMANAGER_IP_ADDRESS,
205 const int port = DEFAULT_XMANAGER_PORT);
206
207 private:
208 class Impl;
209 std::unique_ptr<Impl> pImpl;
210 };
211}
xavia::sdk::Exception
Exception base class for the Xavia SDK exceptions.
Definition error.h:18
xavia::sdk::IImage
The interface of the image object.
Definition iImage.h:38
xavia::sdk::IPointCloud
The interface of the point cloud object.
Definition iPointCloud.h:62
xavia::sdk::ISensor
Sensor object interface.
Definition iSensor.h:25
xavia::sdk::SensorFactory::SetErrorCallback
void SetErrorCallback(errCallback callback)
Register a function where the SDK will report errors.
xavia::sdk::SensorFactory::SetPointCloudBufferSize
void SetPointCloudBufferSize(std::size_t bufferSize)
Allows control over the amount of incoming point cloud messages that are buffered by the SDK.
xavia::sdk::SensorFactory::SetImageBufferSize
void SetImageBufferSize(std::size_t bufferSize)
Allows control over the amount of incoming image messages that are buffered by the SDK.
xavia::sdk::SensorFactory::Build
std::shared_ptr< ISensor > Build(const std::string_view &ip4String=DEFAULT_XMANAGER_IP_ADDRESS, const int port=DEFAULT_XMANAGER_PORT)
Build the sensor object.
xavia::sdk::SensorFactory::SetImageCallback
void SetImageCallback(imgCallback callback)
Register a function where the SDK will report incoming camera image data.
xavia::sdk::SensorFactory::SetPointCloudCallback
void SetPointCloudCallback(pcCallback callback)
Register a function where the SDK will report incoming point cloud data.
xavia::sdk::SensorFactory::SetCameraIPAddress
void SetCameraIPAddress(const std::string_view &ip4String)
Configure the camera IP address for this sensor.
xavia::sdk::SensorFactory::SetAlertCallback
void SetAlertCallback(alertCallback callback)
Register a function where the SDK will report alerts.
xavia::sdk::SensorFactory::SetImageOutputFormat
void SetImageOutputFormat(const PixelFormat format)
Configure the pixel format of output images.
xavia::sdk::SerialNumber
utility class that holds a serial number and allows interpretation.
Definition serialNumber.h:31