1/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "chre/platform/platform_sensor.h"
18
19namespace chre {
20
21PlatformSensor::PlatformSensor(PlatformSensor&& other) {
22  *this = std::move(other);
23}
24
25PlatformSensor::~PlatformSensor() {}
26
27void PlatformSensor::init() {
28  // TODO: Implement this. Probably we would open some files provided to mock
29  // sensor data. Perhaps from command-line arguemnts.
30}
31
32void PlatformSensor::deinit() {
33  // TODO: Implement this. Probably we would close the files opened previously
34  // by init.
35}
36
37bool PlatformSensor::getSensors(DynamicVector<Sensor> *sensors) {
38  CHRE_ASSERT(sensors);
39
40  // TODO: Implement this. Perhaps look at all sensor trace files provided and
41  // return the list of sensor data available.
42  return false;
43}
44
45bool PlatformSensor::applyRequest(const SensorRequest& request) {
46  // TODO: Implement this. Perhaps consider the request and start to pass in
47  // sensor samples from mock sensor data once the sensor has transitioned to
48  // being enabled. Maybe consider resampling input data if the provided mock
49  // data rate is higher than requested.
50  return false;
51}
52
53SensorType PlatformSensor::getSensorType() const {
54  // TODO: Implement this.
55  return SensorType::Unknown;
56}
57
58uint64_t PlatformSensor::getMinInterval() const {
59  // TODO: Implement this.
60  return 0;
61}
62
63const char *PlatformSensor::getSensorName() const {
64  // TODO: Implement this.
65  return "";
66}
67
68PlatformSensor& PlatformSensor::operator=(PlatformSensor&& other) {
69  // TODO: Implement this.
70  return *this;
71}
72
73ChreSensorData *PlatformSensor::getLastEvent() const {
74  // TODO: Implement this.
75  return nullptr;
76}
77
78bool PlatformSensor::getSamplingStatus(
79    struct chreSensorSamplingStatus *status) const {
80  // TODO: Implement this.
81  return false;
82}
83
84}  // namespace chre
85