AbstractNetworkService
On this page
- AbstractNetworkService ⇐
Abstract
- AbstractNetworkService()
- getConnectionStatus(options) ⇒
Promise.<number, Error>
- getError(options) ⇒
Promise.<AbstractServiceError, Error>
- getInterfaceList() ⇒
Promise.<Array.<AbstractNetworkInterface>>
- getInterfaceDetails(nwInterface) ⇒
Promise.<AbstractNetworkInterfaceDetails>
- setInterfaceDetails(interfaceDetails) ⇒
Promise
- getConnectedInterfacesDetails(options) ⇒
Promise.<Array.<AbstractNetworkInterfaceDetails>>
- getAddressList(nwInterface) ⇒
Promise
- addAddress(nwInterface, networkAddress) ⇒
Promise
- removeAddress(nwInterface, networkAddress) ⇒
Promise
- editAddress(nwInterface, networkAddress) ⇒
Promise
- getDnsServerList() ⇒
Promise
- addDnsServer(networkDns) ⇒
Promise
- removeDnsServer(networkDns) ⇒
Promise
- editDnsServer(networkDns) ⇒
Promise
- getNtpServerList() ⇒
Promise.<Array.<AbstractNetworkNtp>>
- addNtpServer(networkNtp) ⇒
Promise
- removeNtpServer(networkNtp) ⇒
Promise
- editNtpServer(networkNtp) ⇒
Promise
- enableWifi(nwInterface) ⇒
Promise
- disableWifi(nwInterface) ⇒
Promise
- getAPStatus() ⇒
Promise.<boolean>
- setAPStatus(status) ⇒
Promise.<boolean>
- isWifiAPAvailable(nwInterface) ⇒
Promise.<boolean>
- getAvailableWifiList(nwInterface) ⇒
Promise.<Array.<AbstractNetworkWifi>>
- getWifiProfileList(nwInterface) ⇒
Promise.<Array.<AbstractNetworkWifiProfile>>
- addWifiProfile(nwInterface, networkWifiProfile) ⇒
Promise
- removeWifiProfile(nwInterface, networkWifiProfile) ⇒
Promise
- editWifiProfile(nwInterface, networkWifiProfile) ⇒
Promise
- getWifiApConfig(nwInterface) ⇒
Promise
- editWifiApConfig(nwInterface, networkApConfig) ⇒
Promise
- startWifiWps(nwInterface) ⇒
Promise.<Boolean, Error>
- stopWifiWps(nwInterface) ⇒
Promise.<Boolean, Error>
- setState(state)
- getState() ⇒
boolean
- _getConnectionStatus(options) ⇒
Promise.<number, Error>
- _getError(options) ⇒
Promise.<AbstractServiceError>
- _getInterfaceList() ⇒
Promise
- _getInterfaceDetails(nwInterface) ⇒
Promise
- _setInterfaceDetails(interfaceDetails) ⇒
Promise
- _getAddressList(nwInterface) ⇒
Promise
- _addAddress(nwInterface, networkAddress) ⇒
Promise
- _removeAddress(nwInterface, addressId) ⇒
Promise
- _editAddress(nwInterface, networkAddress) ⇒
Promise
- _getDnsServerList() ⇒
Promise
- _addDnsServer(networkDns) ⇒
Promise
- _removeDnsServer(networkDnsId) ⇒
Promise
- _editDnsServer(networkDns) ⇒
Promise
- _getNtpServerList() ⇒
Promise
- _addNtpServer(networkNtp) ⇒
Promise
- _removeNtpServer(networkNtpId) ⇒
Promise
- _editNtpServer(networkNtp) ⇒
Promise
- _enableWifi(nwInterface) ⇒
Promise
- _disableWifi(nwInterface) ⇒
Promise
- _getAvailableWifiList(nwInterface) ⇒
Promise
- _getWifiProfileList(nwInterface) ⇒
Promise
- _addWifiProfile(nwInterface, networkWifiProfile) ⇒
*
- _removeWifiProfile(nwInterface, profileId) ⇒
Promise
- _editWifiProfile(nwInterface, networkWifiProfile) ⇒
Promise
- _getWifiApConfig(nwInterface) ⇒
*
- _editWifiApConfig(nwInterface, networkApConfig) ⇒
Promise
- _startWifiWps(nwInterface) ⇒
Promise.<Boolean, Error>
- _getAPStatus() ⇒
Promise.<number, Error>
- _setAPStatus(status) ⇒
Promise.<number, Error>
- _isWifiAPAvailable(nwInterface) ⇒
Promise.<number, Error>
- _stopWifiWps(nwInterface) ⇒
Promise.<Boolean, Error>
- _onInterfaceUp(nwInterface) ⇒
Promise
- _onInterfaceDown(nwInterface) ⇒
Promise
- _onWifiConnectionUp() ⇒
Promise
- _onWifiConnectionDown() ⇒
Promise
- _onWifiConnectionError() ⇒
Promise
- getWifiRepeaterConnectedDevices() ⇒
Promise.<Array.<Device>>
- _getWifiRepeaterConnectedDevices() ⇒
Promise.Promise.<Array.<Device>>
- “interfaceUp” (nwInterface)
- “interfaceDown” (nwInterface)
- “wifiConnectionUp”
- “wifiConnectionDown”
- “wifiConnectionError”
- NETWORK_CONNECTION_STATUS_OK
- NETWORK_CONNECTION_STATUS_KO
- EXTENDER_STATUS_ON
- EXTENDER_STATUS_OFF
AbstractNetworkService ⇐ Abstract
Kind: global abstract class
Extends: Abstract
Mixes: MServiceCache
Service:
Properties
Name | Type | Description |
---|---|---|
networkState | number | The network state |
- AbstractNetworkService ⇐
Abstract
- new AbstractNetworkService()
- instance
- .getConnectionStatus(options) ⇒
Promise.<number, Error>
- .getError(options) ⇒
Promise.<AbstractServiceError, Error>
- .getInterfaceList() ⇒
Promise.<Array.<AbstractNetworkInterface>>
- .getInterfaceDetails(nwInterface) ⇒
Promise.<AbstractNetworkInterfaceDetails>
- .setInterfaceDetails(interfaceDetails) ⇒
Promise
- .getConnectedInterfacesDetails(options) ⇒
Promise.<Array.<AbstractNetworkInterfaceDetails>>
- .getAddressList(nwInterface) ⇒
Promise
- .addAddress(nwInterface, networkAddress) ⇒
Promise
- .removeAddress(nwInterface, networkAddress) ⇒
Promise
- .editAddress(nwInterface, networkAddress) ⇒
Promise
- .getDnsServerList() ⇒
Promise
- .addDnsServer(networkDns) ⇒
Promise
- .removeDnsServer(networkDns) ⇒
Promise
- .editDnsServer(networkDns) ⇒
Promise
- .getNtpServerList() ⇒
Promise.<Array.<AbstractNetworkNtp>>
- .addNtpServer(networkNtp) ⇒
Promise
- .removeNtpServer(networkNtp) ⇒
Promise
- .editNtpServer(networkNtp) ⇒
Promise
- .enableWifi(nwInterface) ⇒
Promise
- .disableWifi(nwInterface) ⇒
Promise
- .getAPStatus() ⇒
Promise.<boolean>
- .setAPStatus(status) ⇒
Promise.<boolean>
- .isWifiAPAvailable(nwInterface) ⇒
Promise.<boolean>
- .getAvailableWifiList(nwInterface) ⇒
Promise.<Array.<AbstractNetworkWifi>>
- .getWifiProfileList(nwInterface) ⇒
Promise.<Array.<AbstractNetworkWifiProfile>>
- .addWifiProfile(nwInterface, networkWifiProfile) ⇒
Promise
- .removeWifiProfile(nwInterface, networkWifiProfile) ⇒
Promise
- .editWifiProfile(nwInterface, networkWifiProfile) ⇒
Promise
- .getWifiApConfig(nwInterface) ⇒
Promise
- .editWifiApConfig(nwInterface, networkApConfig) ⇒
Promise
- .startWifiWps(nwInterface) ⇒
Promise.<Boolean, Error>
- .stopWifiWps(nwInterface) ⇒
Promise.<Boolean, Error>
- .setState(state)
- .getState() ⇒
boolean
- ._getConnectionStatus(options) ⇒
Promise.<number, Error>
- ._getError(options) ⇒
Promise.<AbstractServiceError>
- ._getInterfaceList() ⇒
Promise
- ._getInterfaceDetails(nwInterface) ⇒
Promise
- ._setInterfaceDetails(interfaceDetails) ⇒
Promise
- ._getAddressList(nwInterface) ⇒
Promise
- ._addAddress(nwInterface, networkAddress) ⇒
Promise
- ._removeAddress(nwInterface, addressId) ⇒
Promise
- ._editAddress(nwInterface, networkAddress) ⇒
Promise
- ._getDnsServerList() ⇒
Promise
- ._addDnsServer(networkDns) ⇒
Promise
- ._removeDnsServer(networkDnsId) ⇒
Promise
- ._editDnsServer(networkDns) ⇒
Promise
- ._getNtpServerList() ⇒
Promise
- ._addNtpServer(networkNtp) ⇒
Promise
- ._removeNtpServer(networkNtpId) ⇒
Promise
- ._editNtpServer(networkNtp) ⇒
Promise
- ._enableWifi(nwInterface) ⇒
Promise
- ._disableWifi(nwInterface) ⇒
Promise
- ._getAvailableWifiList(nwInterface) ⇒
Promise
- ._getWifiProfileList(nwInterface) ⇒
Promise
- ._addWifiProfile(nwInterface, networkWifiProfile) ⇒
*
- ._removeWifiProfile(nwInterface, profileId) ⇒
Promise
- ._editWifiProfile(nwInterface, networkWifiProfile) ⇒
Promise
- ._getWifiApConfig(nwInterface) ⇒
*
- ._editWifiApConfig(nwInterface, networkApConfig) ⇒
Promise
- ._startWifiWps(nwInterface) ⇒
Promise.<Boolean, Error>
- ._getAPStatus() ⇒
Promise.<number, Error>
- ._setAPStatus(status) ⇒
Promise.<number, Error>
- ._isWifiAPAvailable(nwInterface) ⇒
Promise.<number, Error>
- ._stopWifiWps(nwInterface) ⇒
Promise.<Boolean, Error>
- ._onInterfaceUp(nwInterface) ⇒
Promise
- ._onInterfaceDown(nwInterface) ⇒
Promise
- ._onWifiConnectionUp() ⇒
Promise
- ._onWifiConnectionDown() ⇒
Promise
- ._onWifiConnectionError() ⇒
Promise
- .getWifiRepeaterConnectedDevices() ⇒
Promise.<Array.<Device>>
- ._getWifiRepeaterConnectedDevices() ⇒
Promise.Promise.<Array.<Device>>
- “interfaceUp” (nwInterface)
- “interfaceDown” (nwInterface)
- “wifiConnectionUp”
- “wifiConnectionDown”
- “wifiConnectionError”
- .getConnectionStatus(options) ⇒
- static
AbstractNetworkService()
A service to handle various Networking interfaces.
getConnectionStatus(options) ⇒ Promise.<number, Error>
Return the status of the network connection (i.e. if the device is connected or disconnected from the network)
Kind: instance method of AbstractNetworkService
Returns: Promise.<number, Error>
- A promise returning an integer value as: #NETWORK_CONNECTION_STATUS_OK or #NETWORK_CONNECTION_STATUS_KO
Param | Type | Description |
---|---|---|
options | Object | additional options |
options.names | Array.<String> | the names of the interfaces to check (defaulted to |
getError(options) ⇒ Promise.<AbstractServiceError, Error>
Return the last error that is the most important
Kind: instance method of AbstractNetworkService
Returns: Promise.<AbstractServiceError, Error>
- A promise resolved with the service error. @see AbstractServiceError
Param | Type | Description |
---|---|---|
options | Object | additional options |
getInterfaceList() ⇒ Promise.<Array.<AbstractNetworkInterface>>
Get list of network interfaces
Kind: instance method of AbstractNetworkService
Returns: Promise.<Array.<AbstractNetworkInterface>>
- A promise resolved with an array of AbstractNetworkInterface object.
getInterfaceDetails(nwInterface) ⇒ Promise.<AbstractNetworkInterfaceDetails>
Get details of interface given in arguments
Kind: instance method of AbstractNetworkService
Returns: Promise.<AbstractNetworkInterfaceDetails>
- A promise resolved with AbstractNetworkInterfaceDetails object.
Param | Type | Description |
---|---|---|
nwInterface | String | A network interface identifier |
setInterfaceDetails(interfaceDetails) ⇒ Promise
Set details of interface
Kind: instance method of AbstractNetworkService
Param | Type | Description |
---|---|---|
interfaceDetails | AbstractNetworkInterfaceDetails | : object describing interface |
getConnectedInterfacesDetails(options) ⇒ Promise.<Array.<AbstractNetworkInterfaceDetails>>
Return the details of the interfaces that are connected, ie enabled and up Usefull to know if you are connected to a network
Kind: instance method of AbstractNetworkService
Returns: Promise.<Array.<AbstractNetworkInterfaceDetails>>
- A promise resolved with an array of AbstractNetworkInterfaceDetails object.
Param | Type | Description |
---|---|---|
options | Object | additional options |
options.types | Array.<string> | the types of THE interfaces to check defaulted to "WIRED","WIRELESS" |
options.filter | function | your own function to check if the interface is connected (first arg is iface -the interface detail) |
getAddressList(nwInterface) ⇒ Promise
Get list of interface address
Kind: instance method of AbstractNetworkService
Param | Type |
---|---|
nwInterface | AbstractNetworkInterface |
addAddress(nwInterface, networkAddress) ⇒ Promise
Add an address to interface
Kind: instance method of AbstractNetworkService
Param | Type | Description |
---|---|---|
nwInterface | AbstractNetworkInterface | |
networkAddress | AbstractNetworkAddress | : address object |
removeAddress(nwInterface, networkAddress) ⇒ Promise
Remove an address from interface
Kind: instance method of AbstractNetworkService
Param | Type | Description |
---|---|---|
nwInterface | AbstractNetworkInterface | |
networkAddress | AbstractNetworkAddress | : id of address |
editAddress(nwInterface, networkAddress) ⇒ Promise
Edit an address
Kind: instance method of AbstractNetworkService
Param | Type | Description |
---|---|---|
nwInterface | AbstractNetworkInterface | |
networkAddress | AbstractNetworkAddress | : new address |
getDnsServerList() ⇒ Promise
Get list of dns server
Kind: instance method of AbstractNetworkService
addDnsServer(networkDns) ⇒ Promise
Add a dns server to configuration
Kind: instance method of AbstractNetworkService
Param | Type | Description |
---|---|---|
networkDns | AbstractNetworkDns | dns address |
removeDnsServer(networkDns) ⇒ Promise
Remove a dns server from configuration
Kind: instance method of AbstractNetworkService
Param | Type | Description |
---|---|---|
networkDns | AbstractNetworkDns | dns address id |
editDnsServer(networkDns) ⇒ Promise
Edit a dns server
Kind: instance method of AbstractNetworkService
Param | Type | Description |
---|---|---|
networkDns | AbstractNetworkDns | dns server |
getNtpServerList() ⇒ Promise.<Array.<AbstractNetworkNtp>>
Get ntp server list
Kind: instance method of AbstractNetworkService
addNtpServer(networkNtp) ⇒ Promise
Add a ntp server
Kind: instance method of AbstractNetworkService
Param | Type | Description |
---|---|---|
networkNtp | AbstractNetworkNtp | ntp server address |
removeNtpServer(networkNtp) ⇒ Promise
Remove a ntp server
Kind: instance method of AbstractNetworkService
Param | Type | Description |
---|---|---|
networkNtp | AbstractNetworkNtp | ntp server id |
editNtpServer(networkNtp) ⇒ Promise
Edit a ntp server
Kind: instance method of AbstractNetworkService
Param | Type | Description |
---|---|---|
networkNtp | AbstractNetworkNtp | ntp server object |
enableWifi(nwInterface) ⇒ Promise
Enable wifi interface
Kind: instance method of AbstractNetworkService
Param | Type |
---|---|
nwInterface | AbstractNetworkInterface |
disableWifi(nwInterface) ⇒ Promise
Disable wifi interface
Kind: instance method of AbstractNetworkService
Param | Type |
---|---|
nwInterface | AbstractNetworkInterface |
getAPStatus() ⇒ Promise.<boolean>
Kind: instance method of AbstractNetworkService
Returns: Promise.<boolean>
- one of EXTENDER_STATUS_ON or EXTENDER_STATUS_OFF
Access: protected
setAPStatus(status) ⇒ Promise.<boolean>
Kind: instance method of AbstractNetworkService
Access: protected
Param | Type |
---|---|
status | boolean |
isWifiAPAvailable(nwInterface) ⇒ Promise.<boolean>
Kind: instance method of AbstractNetworkService
Access: protected
Param | Type |
---|---|
nwInterface | AbstractNetworkInterface |
getAvailableWifiList(nwInterface) ⇒ Promise.<Array.<AbstractNetworkWifi>>
Get list of wifi
Kind: instance method of AbstractNetworkService
Param | Type |
---|---|
nwInterface | AbstractNetworkInterface |
getWifiProfileList(nwInterface) ⇒ Promise.<Array.<AbstractNetworkWifiProfile>>
Get list of wifi profile
Kind: instance method of AbstractNetworkService
Param | Type |
---|---|
nwInterface | AbstractNetworkInterface |
addWifiProfile(nwInterface, networkWifiProfile) ⇒ Promise
Add a profile to wifi
Kind: instance method of AbstractNetworkService
Param | Type | Description |
---|---|---|
nwInterface | AbstractNetworkInterface | |
networkWifiProfile | AbstractNetworkWifiProfile | : network wifi profile |
removeWifiProfile(nwInterface, networkWifiProfile) ⇒ Promise
Remove profile from wifi interface
Kind: instance method of AbstractNetworkService
Param | Type | Description |
---|---|---|
nwInterface | AbstractNetworkInterface | |
networkWifiProfile | AbstractNetworkWifiProfile | : id of profile |
editWifiProfile(nwInterface, networkWifiProfile) ⇒ Promise
Edit a wifi profile
Kind: instance method of AbstractNetworkService
Param | Type | Description |
---|---|---|
nwInterface | AbstractNetworkInterface | |
networkWifiProfile | string | network wifi profile |
getWifiApConfig(nwInterface) ⇒ Promise
Get wifi access points configuration
Kind: instance method of AbstractNetworkService
Param | Type |
---|---|
nwInterface | AbstractNetworkInterface |
editWifiApConfig(nwInterface, networkApConfig) ⇒ Promise
Edit wifi access points configuration
Kind: instance method of AbstractNetworkService
Param | Type | Description |
---|---|---|
nwInterface | AbstractNetworkInterface | |
networkApConfig | string | : access points configuration |
startWifiWps(nwInterface) ⇒ Promise.<Boolean, Error>
Launch WPS session.
Kind: instance method of AbstractNetworkService
Param | Type |
---|---|
nwInterface | AbstractNetworkInterface |
stopWifiWps(nwInterface) ⇒ Promise.<Boolean, Error>
Stop WPS session.
Kind: instance method of AbstractNetworkService
Param | Type |
---|---|
nwInterface | AbstractNetworkInterface |
setState(state)
Set network state
Kind: instance method of AbstractNetworkService
Param | Type | Description |
---|---|---|
state | number | network's state |
getState() ⇒ boolean
Retrieve network state
Kind: instance method of AbstractNetworkService
_getConnectionStatus(options) ⇒ Promise.<number, Error>
This method comes with a default implementation, but you can override it in your vendor.
This is the default implementation test if the given interfaces are up and enabled.
If at least one is up and enabled then the connection status is okay
status.
Kind: instance method of AbstractNetworkService
Returns: Promise.<number, Error>
- One of AbstractNetworkService.NETWORK_CONNECTION_STATUS_OK or AbstractNetworkService.NETWORK_CONNECTION_STATUS_KO
Access: protected
Param | Type | Description |
---|---|---|
options | Object | additional options |
options.names | Array.<String> | the names of the interfaces to check (defaulted to |
_getError(options) ⇒ Promise.<AbstractServiceError>
Default implementation that returns a AbstractServiceError that has the ServiceErrorCodes.NO_ERROR code
Kind: instance method of AbstractNetworkService
Returns: Promise.<AbstractServiceError>
- A promise resolved with the player error. @see AbstractServiceError
Param | Type | Description |
---|---|---|
options | Object | additional options |
_getInterfaceList() ⇒ Promise
Get list of network interfaces
Kind: instance abstract method of AbstractNetworkService
_getInterfaceDetails(nwInterface) ⇒ Promise
Get details of interface given in arguments
Kind: instance abstract method of AbstractNetworkService
Param | Type |
---|---|
nwInterface | AbstractNetworkInterface |
_setInterfaceDetails(interfaceDetails) ⇒ Promise
Set details of interface
Kind: instance abstract method of AbstractNetworkService
Param | Type | Description |
---|---|---|
interfaceDetails | Object | An object describing the network interface |
_getAddressList(nwInterface) ⇒ Promise
Get list of interface address
Kind: instance abstract method of AbstractNetworkService
Param | Type |
---|---|
nwInterface | AbstractNetworkInterface |
_addAddress(nwInterface, networkAddress) ⇒ Promise
Add an address to interface
Kind: instance abstract method of AbstractNetworkService
Param | Type | Description |
---|---|---|
nwInterface | AbstractNetworkInterface | |
networkAddress | string | An address object |
_removeAddress(nwInterface, addressId) ⇒ Promise
Remove an address from interface
Kind: instance abstract method of AbstractNetworkService
Param | Type | Description |
---|---|---|
nwInterface | AbstractNetworkInterface | |
addressId | string | An identifier of networking address |
_editAddress(nwInterface, networkAddress) ⇒ Promise
Edit an address
Kind: instance abstract method of AbstractNetworkService
Param | Type | Description |
---|---|---|
nwInterface | AbstractNetworkInterface | |
networkAddress | string | A new networking address |
_getDnsServerList() ⇒ Promise
Get list of DNS server
Kind: instance abstract method of AbstractNetworkService
_addDnsServer(networkDns) ⇒ Promise
Add a DNS server to configuration
Kind: instance abstract method of AbstractNetworkService
Param | Type | Description |
---|---|---|
networkDns | string | A DNS address |
_removeDnsServer(networkDnsId) ⇒ Promise
Remove a DNS server from configuration
Kind: instance abstract method of AbstractNetworkService
Param | Type | Description |
---|---|---|
networkDnsId | String | A given DNS address identifier |
_editDnsServer(networkDns) ⇒ Promise
Edit a DNS server
Kind: instance abstract method of AbstractNetworkService
Param | Type | Description |
---|---|---|
networkDns | string | A DNS server |
_getNtpServerList() ⇒ Promise
Get NTP server list
Kind: instance abstract method of AbstractNetworkService
_addNtpServer(networkNtp) ⇒ Promise
Add a NTP server
Kind: instance abstract method of AbstractNetworkService
Param | Type | Description |
---|---|---|
networkNtp | string | NTP server address |
_removeNtpServer(networkNtpId) ⇒ Promise
Remove a ntp server
Kind: instance abstract method of AbstractNetworkService
Param | Type | Description |
---|---|---|
networkNtpId | string | NTP server identifier |
_editNtpServer(networkNtp) ⇒ Promise
Edit a NTP server
Kind: instance abstract method of AbstractNetworkService
Param | Type | Description |
---|---|---|
networkNtp | string | A NTP server object |
_enableWifi(nwInterface) ⇒ Promise
Enable WiFi interface
Kind: instance abstract method of AbstractNetworkService
Param | Type |
---|---|
nwInterface | AbstractNetworkInterface |
_disableWifi(nwInterface) ⇒ Promise
Disable WiFi interface
Kind: instance abstract method of AbstractNetworkService
Param | Type |
---|---|
nwInterface | AbstractNetworkInterface |
_getAvailableWifiList(nwInterface) ⇒ Promise
Get an available list of WiFi
Kind: instance abstract method of AbstractNetworkService
Param | Type |
---|---|
nwInterface | AbstractNetworkInterface |
_getWifiProfileList(nwInterface) ⇒ Promise
Get a list of WiFi profiles
Kind: instance abstract method of AbstractNetworkService
Param | Type |
---|---|
nwInterface | AbstractNetworkInterface |
_addWifiProfile(nwInterface, networkWifiProfile) ⇒ *
Add a WiFi profile
Kind: instance abstract method of AbstractNetworkService
Param | Type | Description |
---|---|---|
nwInterface | AbstractNetworkInterface | |
networkWifiProfile | string | : network wifi profile |
_removeWifiProfile(nwInterface, profileId) ⇒ Promise
Remove a profile from the WiFi interface
Kind: instance abstract method of AbstractNetworkService
Param | Type | Description |
---|---|---|
nwInterface | AbstractNetworkInterface | |
profileId | string | : id of profile |
_editWifiProfile(nwInterface, networkWifiProfile) ⇒ Promise
Edit a WiFi profile
Kind: instance abstract method of AbstractNetworkService
Param | Type | Description |
---|---|---|
nwInterface | AbstractNetworkInterface | |
networkWifiProfile | string | nertwork wifi profile |
_getWifiApConfig(nwInterface) ⇒ *
Get WiFi access points configuration
Kind: instance abstract method of AbstractNetworkService
Param | Type |
---|---|
nwInterface | AbstractNetworkInterface |
_editWifiApConfig(nwInterface, networkApConfig) ⇒ Promise
Edit WiFi access points configuration
Kind: instance abstract method of AbstractNetworkService
Param | Type | Description |
---|---|---|
nwInterface | AbstractNetworkInterface | |
networkApConfig | string | : access points configuration |
_startWifiWps(nwInterface) ⇒ Promise.<Boolean, Error>
Launch WPS session implementation
Kind: instance abstract method of AbstractNetworkService
Param | Type |
---|---|
nwInterface | AbstractNetworkInterface |
_getAPStatus() ⇒ Promise.<number, Error>
Get the access point status
Kind: instance abstract method of AbstractNetworkService
_setAPStatus(status) ⇒ Promise.<number, Error>
Set the access point status
Kind: instance abstract method of AbstractNetworkService
Param | Type |
---|---|
status | boolean |
_isWifiAPAvailable(nwInterface) ⇒ Promise.<number, Error>
Check if the Access point in Available
Kind: instance abstract method of AbstractNetworkService
Param | Type |
---|---|
nwInterface | AbstractNetworkInterface |
_stopWifiWps(nwInterface) ⇒ Promise.<Boolean, Error>
Stop WPS session implementation
Kind: instance abstract method of AbstractNetworkService
Param | Type |
---|---|
nwInterface | AbstractNetworkInterface |
_onInterfaceUp(nwInterface) ⇒ Promise
Event triggered when an interface gets connected
Kind: instance method of AbstractNetworkService
Access: protected
Param | Type | Description |
---|---|---|
nwInterface | AbstractNetworkInterface | Interface instance that just connected |
_onInterfaceDown(nwInterface) ⇒ Promise
Event triggered when an interface gets disconnected
Kind: instance method of AbstractNetworkService
Access: protected
Param | Type | Description |
---|---|---|
nwInterface | AbstractNetworkInterface | Interface instance that just disconnected |
_onWifiConnectionUp() ⇒ Promise
Event triggered when WiFi gets connected
Kind: instance method of AbstractNetworkService
Access: protected
_onWifiConnectionDown() ⇒ Promise
Event triggered when WiFi gets disconnected
Kind: instance method of AbstractNetworkService
Access: protected
_onWifiConnectionError() ⇒ Promise
Event triggered when WiFi goes into error (can not connect)
Kind: instance method of AbstractNetworkService
Access: protected
getWifiRepeaterConnectedDevices() ⇒ Promise.<Array.<Device>>
Get list of connected devices
Kind: instance method of AbstractNetworkService
Access: protected
_getWifiRepeaterConnectedDevices() ⇒ Promise.Promise.<Array.<Device>>
Get list of connected devices
Kind: instance method of AbstractNetworkService
“interfaceUp” (nwInterface)
Event triggered when an interface gets connected
Kind: event emitted by AbstractNetworkService
Param | Type | Description |
---|---|---|
nwInterface | AbstractNetworkInterface | Interface instance that just connected |
“interfaceDown” (nwInterface)
Event triggered when an interface gets disconnected
Kind: event emitted by AbstractNetworkService
Param | Type | Description |
---|---|---|
nwInterface | AbstractNetworkInterface | Interface instance that just disconnected |
“wifiConnectionUp”
Event triggered when wifi gets connected
Kind: event emitted by AbstractNetworkService
“wifiConnectionDown”
Event triggered when wifi gets disconnected
Kind: event emitted by AbstractNetworkService
“wifiConnectionError”
Event triggered when wifi goes into error (can not connect)
Kind: event emitted by AbstractNetworkService
NETWORK_CONNECTION_STATUS_OK
The network connection is OK (device is connected to network)
Kind: static property of AbstractNetworkService
See: getConnectionStatus
NETWORK_CONNECTION_STATUS_KO
The network connection is OK (device is not connected to network)
Kind: static property of AbstractNetworkService
See: getConnectionStatus
EXTENDER_STATUS_ON
The network connection is OK (device is an extender)
Kind: static property of AbstractNetworkService
See: setAPStatus
EXTENDER_STATUS_OFF
The extender status is OFF (device is not an extender)
Kind: static property of AbstractNetworkService
See: setAPStatus