Exemplo n.º 1
0
  public void addSensorDataToCycleCompleteEvent(String sensorID, DateTime time, double duration) {
    System.out.println(this.getName() + " added sensor data to CycleComplete Event");

    InfoTablePrimitive primitiveInfoTable =
        (InfoTablePrimitive) this.eventInProgress.getPrimitive(XerosWasherThing.SENSOR_DATA);
    InfoTable data = primitiveInfoTable.getValue();

    ValueCollection dataInfo = new ValueCollection();
    dataInfo.put(XerosWasherThing.SENSORID, new StringPrimitive(sensorID));
    dataInfo.put(XerosWasherThing.TIME, new DatetimePrimitive(time));
    dataInfo.put(XerosWasherThing.DURATION, new NumberPrimitive(duration));

    data.addRow(dataInfo);
    this.eventInProgress.put(XerosWasherThing.SENSOR_DATA, new InfoTablePrimitive(data));
  }