Uploaded image for project: 'Edgent'
  1. Edgent
  2. EDGENT-246

Aggregate Function and Console

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Trivial
    • Resolution: Invalid
    • 0.4.0
    • 0.4.0
    • Analytics
    • None
    • Demonstration (Meetup)
    • Important

    Description

      I would like to use this function in a demo for my meetup in the next few weeks and my modification seems to have a compile error on the aggregate. I would also like to couple it with the Edgent Console. Do I need to modify this code to include the console or do I need to trigger using another component?

      //*****CODE
      // Create a window on the stream of the last 50 readings partitioned
      //TWindow<JsonObject,JsonElement> sensorWindow = sensors.last(50, j -> j.get("ts"));
      TWindow<JsonObject,Integer> sensorWindow = sensors.last(50, unpartitioned());

      // Aggregate the windows calculating the min, max, mean standard deviation and Slope across each window independently.
      sensors = JsonAnalytics.aggregate(sensorWindow,"cpuTemperature","cpuVoltage", MIN, MAX, MEAN, STDDEV, SLOPE);

      Attachments

        Activity

          People

            Unassigned Unassigned
            swink@us.ibm.com Brandon Swink
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: