1 #ifndef LOCATION_LBS_CONTEXTHUB_NANOAPPS_CALIBRATION_ONLINE_CALIBRATION_COMMON_DATA_RESULT_CALLBACK_INTERFACE_H_ 2 #define LOCATION_LBS_CONTEXTHUB_NANOAPPS_CALIBRATION_ONLINE_CALIBRATION_COMMON_DATA_RESULT_CALLBACK_INTERFACE_H_ 3 4 #include "calibration/online_calibration/common_data/calibration_data.h" 5 #include "calibration/online_calibration/common_data/sensor_data.h" 6 7 namespace online_calibration { 8 9 // Interface for a results callback implementation (useful for building 10 // calibration event loggers). 11 class ResultCallbackInterface { 12 protected: 13 // Protected destructor. The implementation can destroy itself, it can't be 14 // destroyed through this interface. 15 virtual ~ResultCallbackInterface() = default; 16 17 public: 18 // Sets a calibration event, such as a magnetometer calibration event. 19 // 20 // event_timestamp_nanos: Timestamp in nanoseconds of when the calibration 21 // event was produced in the sensor timebase. 22 // sensor_type: Which sensor the calibration was produced for. 23 // flags: What kind of update the calibration was, e.g. offset, quality 24 // degradation (like a magnetization event), over temperature, etc. 25 virtual void SetCalibrationEvent(uint64_t event_timestamp_nanos, 26 SensorType sensor_type, 27 CalibrationTypeFlags flags) = 0; 28 }; 29 30 } // namespace online_calibration 31 32 #endif // LOCATION_LBS_CONTEXTHUB_NANOAPPS_CALIBRATION_ONLINE_CALIBRATION_COMMON_DATA_RESULT_CALLBACK_INTERFACE_H_ 33