Class Power#getPowerStatus

Power

Class Summary
Constructor Attributes Constructor Name and Description
 
Power#getPowerStatus(successCallback, errorCallback)
Gets power status

Class Detail

Power#getPowerStatus(successCallback, errorCallback)
Gets power status
// Javascript code
function getPowerStatus () {
  function successCb(cbObject) {
     console.log("cbObject : " + JSON.stringify(cbObject));
     console.log("wakeOnLan : " + cbObject.wakeOnLan);
     console.log("displayMode : " + cbObject.displayMode);
     console.log("allOnTimer : " + cbObject.allOnTimer);
     console.log("allOffTimer : " + cbObject.allOffTimer);         

     // Do something
        ...
  }

  function failureCb(cbObject) {
     var errorCode = cbObject.errorCode;
     var errorText = cbObject.errorText;
     console.log ("Error Code [" + errorCode + "]: " + errorText);
  }

  var power = new Power();
  power.getPowerStatus(successCb, failureCb);
}
Parameters:
{Function} successCallback
success callback function.
{Function} errorCallback
failure callback function.
Since:
1.0
Returns:

{Object}

PropertyTypeDescription
wakeOnLanBooleantrue : enabled / false : disabled
displayModeStringPower.DisplayMode.DISPLAY_ON | Power.DisplayMode.DISPLAY_OFF
allOnTimerBooleantrue : enabled / false : disabled
allOffTimerBooleantrue : enabled / false : disabled
See:
Power.setWakeOnLan(), Power.setDisplayMode()