Searched hist:"7 f4c548dbf7df0f77b9b4672278d56b846f02ccc" (Results 1 – 3 of 3) sorted by relevance
/openbmc/phosphor-fan-presence/control/ |
H A D | functor.hpp | diff 7f4c548dbf7df0f77b9b4672278d56b846f02ccc Fri Feb 07 16:14:46 CST 2020 Matthew Barth <msbarth@us.ibm.com> Support sensor value property to type double
Constructed an intermediate function that is used to apply a visitor against the `xyz.openbmc_project.Sensor.Value` interface's `Value` property. This function is called to apply the visitor at each point the internally cached sensor value is updated and stores it as the data type that is given for this property within the configured yaml.
The visitor provides storing the sensor value directly where the data type configured matches the data type of the `Value` property on dbus. However, in the case where the configured data type is the original int64 and the data type on dbus is double, the visitor will scale the value from dbus to millidegree C(as it was when stored as an int64 on dbus) and cast it to the configured int64 data type. This resulting cast value is stored within the internal cache now as an int64 until the machine configuration yaml file is updated to reflect the change in the sensor's value data type to be a double.
Tested: No change with use of sensor value as int64 and configured as int64 No change with use of sensor value as double and configured as int64 Witherspoon fan control functions correctly with use of sensor value as double and configuration updated to utilize as a double
Change-Id: Ieb0a646ea37bf7991b9b1f94a85977d9e8984e60 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
H A D | types.hpp | diff 7f4c548dbf7df0f77b9b4672278d56b846f02ccc Fri Feb 07 16:14:46 CST 2020 Matthew Barth <msbarth@us.ibm.com> Support sensor value property to type double
Constructed an intermediate function that is used to apply a visitor against the `xyz.openbmc_project.Sensor.Value` interface's `Value` property. This function is called to apply the visitor at each point the internally cached sensor value is updated and stores it as the data type that is given for this property within the configured yaml.
The visitor provides storing the sensor value directly where the data type configured matches the data type of the `Value` property on dbus. However, in the case where the configured data type is the original int64 and the data type on dbus is double, the visitor will scale the value from dbus to millidegree C(as it was when stored as an int64 on dbus) and cast it to the configured int64 data type. This resulting cast value is stored within the internal cache now as an int64 until the machine configuration yaml file is updated to reflect the change in the sensor's value data type to be a double.
Tested: No change with use of sensor value as int64 and configured as int64 No change with use of sensor value as double and configured as int64 Witherspoon fan control functions correctly with use of sensor value as double and configuration updated to utilize as a double
Change-Id: Ieb0a646ea37bf7991b9b1f94a85977d9e8984e60 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
H A D | zone.hpp | diff 7f4c548dbf7df0f77b9b4672278d56b846f02ccc Fri Feb 07 16:14:46 CST 2020 Matthew Barth <msbarth@us.ibm.com> Support sensor value property to type double
Constructed an intermediate function that is used to apply a visitor against the `xyz.openbmc_project.Sensor.Value` interface's `Value` property. This function is called to apply the visitor at each point the internally cached sensor value is updated and stores it as the data type that is given for this property within the configured yaml.
The visitor provides storing the sensor value directly where the data type configured matches the data type of the `Value` property on dbus. However, in the case where the configured data type is the original int64 and the data type on dbus is double, the visitor will scale the value from dbus to millidegree C(as it was when stored as an int64 on dbus) and cast it to the configured int64 data type. This resulting cast value is stored within the internal cache now as an int64 until the machine configuration yaml file is updated to reflect the change in the sensor's value data type to be a double.
Tested: No change with use of sensor value as int64 and configured as int64 No change with use of sensor value as double and configured as int64 Witherspoon fan control functions correctly with use of sensor value as double and configuration updated to utilize as a double
Change-Id: Ieb0a646ea37bf7991b9b1f94a85977d9e8984e60 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|