trikRuntime
cameraDevice.h
Go to the documentation of this file.
1 /* Copyright 2018 Ivan Tyulyandin and CyberTech Labs Ltd.
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License. */
14 
15 #pragma once
16 
17 #include <QtCore/QScopedPointer>
18 #include <QtCore/QVector>
19 
20 #include <QMutex>
21 
22 #include "cameraDeviceInterface.h"
24 #include "declSpec.h"
25 
26 namespace trikKernel {
27 class Configurer;
28 }
29 
30 namespace trikHal {
31 class HardwareAbstractionInterface;
32 }
33 
34 namespace trikControl {
35 
38 {
39 public:
40 
45  CameraDevice(const QString & mediaPath
46  , const trikKernel::Configurer &configurer
47  , trikHal::HardwareAbstractionInterface &hardwareAbstraction);
48 
49  QVector<uint8_t> getPhoto() override;
50 
51  Status status() const override;
52 
53  ~CameraDevice() override = default;
54 
55 private:
56  QMutex mCameraMutex;
57  QScopedPointer<CameraImplementationInterface> mCameraImpl;
58 };
59 
60 }
Definition: analogSensor.h:23
Generic configuration helper, parses configuration XML files and presents configuration as a set of a...
Definition: configurer.h:28
QScriptValue getPhoto(QScriptContext *context, QScriptEngine *engine)
Definition: scriptEngineWorker.cpp:101
Interface for camera device representation.
Definition: cameraDeviceInterface.h:25
#define TRIKCONTROL_EXPORT
Definition: declSpec.h:23
Status
Device status.
Definition: deviceInterface.h:33
Class for camera device instantiation.
Definition: cameraDevice.h:37
Definition: trikCommunicator.h:27
Definition: brickFactory.h:21
Hardware abstraction, provides devices that are used to communicate with robot hardware or emulate it...
Definition: hardwareAbstractionInterface.h:29