Esempio n. 1
0
    /** @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary) */
    @Override
    public Dictionary invoke(Dictionary _args) throws Exception {

      FloatHolder currentValue = new FloatHolder();
      FloatHolder currentError = new FloatHolder();
      StringHolder unit = new StringHolder();
      DateHolder timestamp = new DateHolder();

      // invoke model

      model.getCurrentValue(currentValue, currentError, unit, timestamp);

      // build returned Dictionary
      Dictionary _result = new Hashtable();

      _result.put("CurrentValue", currentValue.getObject());
      // java.lang.Float
      _result.put("CurrentError", currentError.getObject());
      // java.lang.Float
      _result.put("Unit", unit.getObject());
      // java.lang.String
      _result.put("Timestamp", timestamp.getObject());
      // java.util.Date
      return _result.isEmpty() ? null : _result;
    }
Esempio n. 2
0
    /** @see org.osgi.service.upnp.UPnPAction#invoke(java.util.Dictionary) */
    @Override
    public Dictionary invoke(Dictionary _args) throws Exception {

      FloatHolder currentLowValueThreshold = new FloatHolder();

      // invoke model

      model.getLowValueThreshold(currentLowValueThreshold);

      // build returned Dictionary
      Dictionary _result = new Hashtable();

      _result.put("CurrentLowValueThreshold", currentLowValueThreshold.getObject());
      // java.lang.Float
      return _result.isEmpty() ? null : _result;
    }