eclipse-archived / unide

Eclipse Public License 1.0
29 stars 17 forks source link

v3 - Special Values to explicitly model limits #58

Open kfkloos opened 2 years ago

kfkloos commented 2 years ago

Hi, I am trying to understand Special Values for a case where I want to trasmit distinct single measurments via PPMP.

In the example it says:

          {"name": "turning point",
          "value": {
            "pressure": 101530,
            "force": 50
          }
        },
        {
          "name": "shutoffForce",
          "time": 24,
          "value": {
            "force": 24,
            "upperError": 26,
            "lowerError": 22,
            "upperWarn": 25,
            "lowerWarn": 23,
            "target": 24
            }
        },
        {
          "name": "shutoffPressure",
          "time": 24,
          "value": {
            "pressure": 100950,
            "upperError": 103000,
            "lowerError": 99000
          }
        }

In shutoffForce we have the "upperWarn", "target" etc. corresponding to limts for this point value. However, it is not explicitly expressend, that the limits & target belong to the paramter force. This is very limiting for analytics cases. Hence I suggest to modify the special values in the give example as follows:

        {
          "name": "shutoffForce",
          "time": 24,
          "singleValues": {
            "force": {"value": 24,
            "upperError": 26,
            "lowerError": 22,
            "upperWarn": 25,
            "lowerWarn": 23,
            "target": 24},

          }

This way it would be explicitly modelled that the limits belongs to the force tag. Even more, it would allow to combine "shutoffForce" and "shutoffPressure" into a single special value "shuttoff" and making int multi-dimensional.

With this change, PPMP process messages would also support single point measurments as well as they support series. (When doing that, please also consider making the series element optional for cases, where a device only measures single points.)