hardcoded median function in phosphor-virtual-sensor
Lei Yu
yulei.sh at bytedance.com
Tue Jan 5 13:34:54 AEDT 2021
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)"
--
BRs,
Lei YU
More information about the openbmc
mailing list