anbox-platform-sdk  1.23.0
Anbox Platform SDK API documentation
sensor_processor.h
Go to the documentation of this file.
1 /*
2  * This file is part of Anbox Platform SDK
3  *
4  * Copyright 2021 Canonical Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #ifndef ANBOX_SDK_SENSOR_PROCESSOR_H_
20 #define ANBOX_SDK_SENSOR_PROCESSOR_H_
21 
23 
24 namespace anbox {
30  public:
31  SensorProcessor() = default;
32  virtual ~SensorProcessor() = default;
33  SensorProcessor(const SensorProcessor &) = delete;
35 
45  virtual AnboxSensorType supported_sensors() const = 0;
46 
65  virtual int read_data(AnboxSensorData* data, int timeout) = 0;
66 
78  virtual int inject_data(AnboxSensorData data) = 0;
79 };
80 } // namespace anbox
81 
82 #endif
SensorProcessor allows processing sensor events from the Android container and perform sensor process...
virtual AnboxSensorType supported_sensors() const =0
Sensors supported by this processor.
virtual int read_data(AnboxSensorData *data, int timeout)=0
Read available sensor data.
SensorProcessor & operator=(const SensorProcessor &)=delete
SensorProcessor(const SensorProcessor &)=delete
virtual int inject_data(AnboxSensorData data)=0
Inject sensor data into AnboxPlatform.
virtual ~SensorProcessor()=default
AnboxSensorData represents the sensor data stucture,.
Definition: types.h:1366
AnboxSensorType
AnboxSensorType describes all sensor types supported by Anbox.
Definition: types.h:1313