Examples of StateVariableValue


Examples of org.teleal.cling.model.state.StateVariableValue

  public String getTime() {
    if(isConfigured()) {
      updateTime();
      if(stateMap != null) {
        StateVariableValue value = stateMap.get("CurrentLocalTime");
        if(value != null) {
          return value.getValue().toString();
        }

      }
    }
    return null;
View Full Code Here

Examples of org.teleal.cling.model.state.StateVariableValue

        // only process the variables that have changed value
        for(String variable : result.keySet()) {
          ActionArgumentValue newArgument = result.get(variable);

          StateVariable newVariable = new StateVariable(variable,new StateVariableTypeDetails(newArgument.getDatatype()));
          StateVariableValue newValue = new StateVariableValue(newVariable, newArgument.getValue());

          if(isUpdatedValue(variable,newValue)) {
            mapToProcess.put(variable, newValue);
          }
        }
View Full Code Here

Examples of org.teleal.cling.model.state.StateVariableValue

      executeActionInvocation(invocation);

      // for this property we would like to "compile" a more friendly variable.
      // this newly created "variable" is also store in the stateMap
      StateVariableValue alarmID  = stateMap.get("AlarmID");
      StateVariableValue groupID  = stateMap.get("GroupID");
      StateVariableValue loggedStartTime  = stateMap.get("LoggedStartTime");
      String newStringValue = null;
      if(alarmID != null && loggedStartTime != null) {
        newStringValue = alarmID.getValue() + " - " + loggedStartTime.getValue();
      } else {
        newStringValue = "No running alarm";
      }

      StateVariable newVariable = new StateVariable("RunningAlarmProperties",new StateVariableTypeDetails(Datatype.Builtin.STRING.getDatatype()));
      StateVariableValue newValue = new StateVariableValue(newVariable, newStringValue);

      processStateVariableValue(newVariable.getName(),newValue);

      return true;
    } else {
View Full Code Here

Examples of org.teleal.cling.model.state.StateVariableValue

  public String getRunningAlarmProperties() {
    if(isConfigured()) {
      updateRunningAlarmProperties();
      if(stateMap != null) {
        StateVariableValue value = stateMap.get("RunningAlarmProperties");
        if(value != null) {
          return value.getValue().toString();
        }
      }
    }

    return null;
View Full Code Here

Examples of org.teleal.cling.model.state.StateVariableValue

  public String getMACAddress() {
    if(isConfigured()) {
      updateZoneInfo();
      if(stateMap != null) {
        StateVariableValue value = stateMap.get("MACAddress");
        if(value != null) {
          return value.getValue().toString();
        }
      }
    }
    return null;
View Full Code Here

Examples of org.teleal.cling.model.state.StateVariableValue

    if(isConfigured()) {

      updateLed();
      if(stateMap != null) {
        StateVariableValue variable = stateMap.get("CurrentLEDState");
        if(variable != null) {
          return variable.getValue().equals("On") ? true : false;
        }
      }
    } 

    return false;
View Full Code Here

Examples of org.teleal.cling.model.state.StateVariableValue

    if(isConfigured()) {

      updateCurrentZoneName();
      if(stateMap != null) {
        StateVariableValue variable = stateMap.get("CurrentZoneName");
        if(variable != null) {
          return variable.getValue().toString();
        }
      }
    } 

    return null;   
View Full Code Here

Examples of org.teleal.cling.model.state.StateVariableValue

  public String getPosition() {
    if(stateMap != null && isConfigured()) {

      updatePosition();
      if(stateMap != null) {
        StateVariableValue variable = stateMap.get("RelTime");
        if(variable != null) {
          return variable.getValue().toString();
        }
      } 
    }
    return null;
  }
View Full Code Here

Examples of org.teleal.cling.model.state.StateVariableValue

  }


  public Boolean isLineInConnected() {
    if(stateMap != null && isConfigured()) {
      StateVariableValue statusLineIn = stateMap.get("LineInConnected");
      if(statusLineIn != null) {
        return (Boolean) statusLineIn.getValue();
      }
    }
    return null;

  }
View Full Code Here

Examples of org.teleal.cling.model.state.StateVariableValue

  }

  public Boolean isAlarmRunning() {
    if(stateMap != null && isConfigured()) {
      StateVariableValue status = stateMap.get("AlarmRunning");
      if(status!=null) {
        return status.getValue().equals("1") ? true : false;
      }
    }
    return null;

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.