# Class Power#enableWakeOnLan

Power

- Defined in: power.js

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| Power#enableWakeOnLan(successCallback, errorCallback, options) Enables or disables 'wake on LAN'.

## Class Detail

Power#enableWakeOnLan(successCallback, errorCallback, options)
Enables or disables 'wake on LAN'.

    // Javascript code
    function enableWakeOnLan () {
      var options = {
         wakeOnLan : 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.enableWakeOnLan(successCb, failureCb, options);
    }

Parameters:
{Function} successCallback
  success callback function.
{Function} errorCallback
  failure callback function.
{Object} options

  Property | Type | Description | Required
  --- | --- | --- | ---
  wakeOnLan | Boolean | true : enabled / false : disabled | required

Since:
  1.0
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()