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 19 namespace chre { 20 ~PlatformSensor()21PlatformSensor::~PlatformSensor() {} 22 init()23void PlatformSensor::init() { 24 // TODO: Implement this. Probably we would open some files provided to mock 25 // sensor data. Perhaps from command-line arguemnts. 26 } 27 deinit()28void PlatformSensor::deinit() { 29 // TODO: Implement this. Probably we would close the files opened previously 30 // by init. 31 } 32 getSensors(DynamicVector<PlatformSensor> * sensors)33bool PlatformSensor::getSensors(DynamicVector<PlatformSensor> *sensors) { 34 CHRE_ASSERT(sensors); 35 36 // TODO: Implement this. Perhaps look at all sensor trace files provided and 37 // return the list of sensor data available. 38 return false; 39 } 40 setRequest(const SensorRequest & request)41bool PlatformSensor::setRequest(const SensorRequest& request) { 42 // TODO: Implement this. Perhaps consider the request and start to pass in 43 // sensor samples from mock sensor data once the sensor has transitioned to 44 // being enabled. Maybe consider resampling input data if the provided mock 45 // data rate is higher than requested. 46 return false; 47 } 48 getSensorType() const49SensorType PlatformSensor::getSensorType() const { 50 // TODO: Implement this. 51 return SensorType::Unknown; 52 } 53 getMinInterval() const54uint64_t PlatformSensor::getMinInterval() const { 55 // TODO: Implement this. 56 return 0; 57 } 58 getSensorName() const59const char *PlatformSensor::getSensorName() const { 60 // TODO: Implement this. 61 return ""; 62 } 63 operator =(PlatformSensor && other)64PlatformSensor& PlatformSensor::operator=(PlatformSensor&& other) { 65 // TODO: Implement this. 66 return *this; 67 } 68 getLastEvent() const69ChreSensorData *PlatformSensor::getLastEvent() const { 70 // TODO: Implement this. 71 return nullptr; 72 } 73 setLastEvent(const ChreSensorData * event)74void PlatformSensor::setLastEvent(const ChreSensorData *event) { 75 // TODO: Implement this. 76 } 77 78 } // namespace chre 79