SCENE C++ API  2.0.22
lsscanner.h
1 #pragma once
2 
3 #include <core_api/lsglobaldefinitions.h>
4 #include <core_api/lsinterface.h>
5 #include <core_api/lsstring.h>
6 #include <core_api/lsattributecontainer.h>
7 
8 #include <scanner_api/lsfuturetask.h>
9 
10 namespace SCENE_API {
11 
12 // Forward declarations
13 class LSScanner_Implementation;
14 
17 class LSScanner : public LSInterface
18 {
19  LS_UNCOPYABLE(LSScanner)
20 
21 public:
22 
25  SCANNER_API_EXPORT LSScanner();
26 
29  SCANNER_API_EXPORT virtual ~LSScanner();
30 
38  SCANNER_API_EXPORT LSResult::Result connect(LSString address);
39 
44  SCANNER_API_EXPORT LSResult::Result disconnect();
45 
50  SCANNER_API_EXPORT ref_ptr<LSFutureTask> takeScan();
51 
64  SCANNER_API_EXPORT ref_ptr<LSFutureTask> takeRemoteScan(LSString filePath);
65 
67  SCANNER_API_EXPORT void stopScan();
68 
72  SCANNER_API_EXPORT bool shutdown();
73 
78  SCANNER_API_EXPORT ref_ptr<LSAttributeContainer> getCurrentScanProfile() const;
79 
83  SCANNER_API_EXPORT bool setCurrentScanProfile(ref_ptr<LSAttributeContainer> scanProfile);
84 
89 
95  SCANNER_API_EXPORT bool selectScanProfile(LSString profileID);
96 
101  SCANNER_API_EXPORT bool addScanProfile(ref_ptr<LSAttributeContainer> scanProfile);
102 
107  SCANNER_API_EXPORT bool removeScanProfile(LSString profileID);
108 
113 
119  SCANNER_API_EXPORT bool selectScanProject(LSString projectID);
120 
125  SCANNER_API_EXPORT bool addScanProject(ref_ptr<LSAttributeContainer> scanProject);
126 
131  SCANNER_API_EXPORT bool removeScanProject(LSString projectID);
132 
136  SCANNER_API_EXPORT LSPod<std::vector<ref_ptr<LSAttributeContainer> > > getOperators() const;
137 
143  SCANNER_API_EXPORT bool selectOperator(LSString operatorID);
144 
149  SCANNER_API_EXPORT bool addOperator(ref_ptr<LSAttributeContainer> scanOperator);
150 
155  SCANNER_API_EXPORT bool removeOperator(LSString operatorID);
156 
161  SCANNER_API_EXPORT ref_ptr<LSAttributeContainer> getGeneralSettings() const;
162 
167  SCANNER_API_EXPORT bool setGeneralSettings(ref_ptr<LSAttributeContainer> settings);
168 
172  SCANNER_API_EXPORT LSPod<std::vector<ref_ptr<LSAttributeContainer> > > getScans() const;
173 
180  SCANNER_API_EXPORT ref_ptr<LSAttributeContainer> getScanProperties(LSString scanFile) const;
181 
186  SCANNER_API_EXPORT ref_ptr<LSAttributeContainer> getServiceInformation() const;
187 
192  SCANNER_API_EXPORT ref_ptr<LSAttributeContainer> getSensorInformation() const;
193 
198  SCANNER_API_EXPORT ref_ptr<LSAttributeContainer> getSystemVersion() const;
199 
204  SCANNER_API_EXPORT ref_ptr<LSAttributeContainer> getFirmwareVersion() const;
205 
213  SCANNER_API_EXPORT ref_ptr<LSAttributeContainer> getScannerStatus() const;
214 
219 
224  SCANNER_API_EXPORT ref_ptr<LSAttributeContainer> getWarningMessage() const;
225 
230  SCANNER_API_EXPORT ref_ptr<LSAttributeContainer> getScannerParameters() const;
231 
236  SCANNER_API_EXPORT bool setScannerParameters(ref_ptr<LSAttributeContainer> parameters);
237 
244  SCANNER_API_EXPORT LSPod<std::vector<std::pair<LSString, LSString>>> detectScanners(int waitForMs = 1000) const;
245 
250  SCANNER_API_EXPORT bool getSensorTemperature(double& temperature) const;
251 
252 protected:
253  LS_INTERFACE(LSScanner, LSInterface)
254 };
255 
256 }