Control the shutdown and reboot of the target.
Methods
-
reboot(successCallback, errorCallbackopt, reasonopt, fast)
-
Initiate a reboot request.Parameters:
Name Type Attributes Description successCallback
function The function to call when successful. errorCallback
function <optional>
The function to call if there is an error. reason
String <optional>
The zone to filter the results by. fast
String Whether to use fast or slow reboot. Set to "1" for fast reboot (without logging), otherwise set to "0" for slow reboot (with with logging). Example
//define your callback function(s) function successCallback(audioMixerItems) { console.log("Shutdown Initiated") } function errorCallback(error) { console.log(error.code, error.msg); } //call the method qnx.power.reboot(successCallback, errorCallback, "userRequest","1");
-
shutdown(successCallback, errorCallbackopt, reasonopt, fast)
-
Initiate a shutdown request.Parameters:
Name Type Attributes Description successCallback
function The function to call when successful. errorCallback
function <optional>
The function to call if there's an error. reason
String <optional>
The zone to filter the results by. fast
String Whether to use fast or slow shutdown. Set to "1" for fast shutdown(without logging), otherwise set to "0" for slow showdown (with with logging). Example
//define your callback function(s) function successCallback(audioMixerItems) { console.log("Shutdown Initiated") } function errorCallback(error) { console.log(error.code, error.msg); } //call the method qnx.power.shutdown(successCallback, errorCallback, "userRequest","1");