hardcoded median function in phosphor-virtual-sensor

Matt Spinler mspinler at linux.ibm.com
Wed Jan 6 01:18:47 AEDT 2021



On 1/4/2021 8:34 PM, Lei Yu wrote:
> On Tue, Jan 5, 2021 at 6:58 AM Matt Spinler <mspinler at linux.ibm.com> wrote:
>>>      whose values must be defined in entity-manager.  Since exprtk
>>>      expressions are not allowed in
>>>      entity-manager, I cannot just port the PVS's JSON config into an
>>>      entity-manager config.
>>>
>>> I missed this discussion but why can't we simply use virtual sensor as
>>> expertk provides median function and we have threshold support for
>>> each virtual sensor. Please help, if I am missing anything.
> I did not notice the discussion as well.
>  From my understanding, the exprtk is defined in the json config
> (/usr/share/phosphor-virtual-sensor/virtual_sensor_config.json), and
> technically we could use any expression that exprtk supports.
> e.g. we use max() in our system (see below example), which is not
> upstreamed yet but it works well.
>      "Expression": "max(T0, T1, T2)"

Yea, I agree, what you have here is exactly how PVS was designed to be used.
My  goal was to add support to have its config be able to be defined in
the entity manager JSON instead, which is what is driving the work of 
needing
selectable expressions based on the name.




More information about the openbmc mailing list