All of lore.kernel.org
 help / color / mirror / Atom feed
* hardcoded median function in phosphor-virtual-sensor
@ 2021-01-04 17:48 Matt Spinler
  2021-01-04 20:54 ` Vijay Khemka
  2021-01-05 17:30 ` Ed Tanous
  0 siblings, 2 replies; 14+ messages in thread
From: Matt Spinler @ 2021-01-04 17:48 UTC (permalink / raw)
  To: OpenBMC Maillist

Hi,

Just putting on the list what was decided after some lengthy discussions 
on discord.

I need a median of some sensor values, where this median sensor has 
threshold interfaces
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.

Instead, I will make a new entity-manager config that will have the 
component sensors
along  with the thresholds to use, with a subtype of median, vaguely 
something like:

{

Type: "VirtualSensor"

Name: "MySensorName"

Subtype: "Median"

Sensors: [ "Sensor1", "Sensor2", .... ]

ThresholdsWithHysteresis [ ]

minInput: 0

maxInput: 100

}


The minInput/maxInput are needed so we don't use garbage sensor readings 
in the median
algorithm.  PVS will look for this config to be provided on D-Bus by 
entity-manager, and if
it's there it will calculate the median (in C++, not exprtk) and use it 
as the virtual sensor value.

Thanks,
Matt


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-01-05 20:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-04 17:48 hardcoded median function in phosphor-virtual-sensor Matt Spinler
2021-01-04 20:54 ` Vijay Khemka
2021-01-04 22:57   ` Matt Spinler
2021-01-05  2:34     ` Lei Yu
2021-01-05 14:18       ` Matt Spinler
2021-01-05 14:27     ` Patrick Williams
2021-01-05 15:56       ` Matt Spinler
2021-01-05 17:18         ` Vijay Khemka
2021-01-05 17:28           ` Matt Spinler
2021-01-05 17:38         ` Ed Tanous
2021-01-05 20:23           ` Patrick Williams
2021-01-05 20:20         ` Patrick Williams
2021-01-05 17:31   ` Ed Tanous
2021-01-05 17:30 ` Ed Tanous

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.