Class Power#enableAllOffTimer
Power
- Defined in: power.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Power#enableAllOffTimer(successCallback, errorCallback, options)
Controls all "off timer".
|
Class Detail
Power#enableAllOffTimer(successCallback, errorCallback, options)
Controls all "off timer". This API enables/disables all "off timer" at once. Values of each "off timer" which was set by Power.addOffTimer() are not changed when options.clearOffTimer is false.
// Javascript code
function enableAllOffTimer () {
var options = {
allOffTimer : true
};
function successCb() {
// Do something
}
function failureCb(cbObject) {
var errorCode = cbObject.errorCode;
var errorText = cbObject.errorText;
console.log ("Error Code [" + errorCode + "]: " + errorText);
}
var power = new Power();
power.enableAllOffTimer(successCb, failureCb, options);
}
- Parameters:
- {Function} successCallback
- success callback function.
- {Function} errorCallback
- failure callback function.
- {Object} options
Property Type Description Required allOffTimer Boolean true : enabled / false : disabled required clearOffTimer Boolean true : removes all "off Timer" / false : do nothing. (default) optional
- Since:
- 1.0, 1.3 options.clearOffTimer
- Returns:
If the method is successfully executed, success callback function is called without a parameter. If an error occurs, failure callback function is called with failure callback object as a parameter.
- See:
- Power.getPowerStatus()