platform-mc: Add sensor manager
Added sensor_manager class. The sensor_manager class manages the timing
of sensor polling.
tested: Verified on ast2600 EVB which is connected to a PLDM device
over I2C. bmcweb can display the state of numeric sensor.
Signed-off-by: Gilbert Chen <gilbert.chen@arm.com>
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
Change-Id: I4257f823ea26d7fdb322cc82d847e94db056258c
diff --git a/meson.options b/meson.options
index 63726dd..8a7138a 100644
--- a/meson.options
+++ b/meson.options
@@ -188,4 +188,23 @@
of the monitoring terminus after each configured
interval.''',
value: 999
-)
\ No newline at end of file
+)
+
+# Platform-mc configuration parameters
+
+## Sensor Polling Options
+option(
+ 'sensor-polling-time',
+ type: 'integer',
+ min: 1,
+ max: 10000,
+ description: '''The configured timeout in milliseconds of the common sensor
+ polling timer of each terminus which will trigger the
+ terminus sensor reading task. The task will check
+ whether the sensor in the terminus sensors list need to
+ be updated by comparing the sensor `updateInterval` with the
+ interval between current timestamp and latest updated
+ timestamp of the sensor. The task will send
+ `GetSensorReading` if the sensor need to be updated.''',
+ value: 249
+)