Object Creation
To create a networkstatus component, load the @brightsign/networkstatus module using the require()
method.
Code Block | ||
---|---|---|
| ||
const NetworkStatus = require("@brightsign/networkstatus"); let networkStatus = new NetworkStatus(); |
NetworkStatus
getHostStatus()
Code Block | ||
---|---|---|
| ||
Promise<NetworkHostStatus> getHostStatus() |
Returns information about the network status of the player as a whole.
getDiagnosticWebServerStatus()
Code Block | ||
---|---|---|
| ||
Promise<DiagnosticWebServerStatus> getDiagnosticWebServerStatus() |
Returns information about the status of the diagnostic web server.
getRemoteLoginStatus()
Code Block | ||
---|---|---|
| ||
Promise<RemoteLoginStatus> getRemoteLoginStatus() |
Returns information about the status of the player related to remote shell access.
getInterfaceStatus()
Code Block | ||
---|---|---|
| ||
Promise<NetworkInterfaceStatus> getInterfaceStatus(string interfaceName) |
Returns information about the current status of the specified network interface.
getInterfaceWifiStatus()
Code Block | ||
---|---|---|
| ||
Promise<WifiInterfaceStatus> getInterfaceWifiStatus(string interfaceName) |
Returns information about the current WiFi status of the specified wireless network interface.
getPresentNetworkInterfaces()
Code Block | ||
---|---|---|
| ||
Promise<Array<string>> getPresentNetworkInterfaces() |
Returns an array containing the names of all the external network interfaces present on the player. Does not include the loopback interface.
getRoutes()
Code Block | ||
---|---|---|
| ||
Promise<Array<NetworkStatusRoute>> getRoutes(string protocol); // "IPv4" or "IPv6" |
Returns an array of the current network routes for the specified protocol.
NetworkHostStatus
hostName
string: The player's current host name.mDnsHostName
string: The player's current Multicast DNS host name. This will usually be the player's host name with ".local" on the end, but can differ if there are conflicts on the local network.domainSearchPath
Array<string>: A list of suffices that will be applied to unqualified domain names when looking them up in DNS. This is the combination of the search paths for all active network interfaces.domainNameServers
Array<string>: A list of the current DNS servers that will be consulted when performing name look ups. This is the combination of all the DNS servers for all active network interfaces.timeServers
Array<string>: A list of the current time servers that will be used to set the player's clock. Currently this will contain either zero or one entry, but it may contain more in the future.proxy
string optional:The currently active network proxy server, if any.proxyBypass
Array<string> optional: A list of host name suffices for which the proxy will be bypassed (IP addresses cannot be used)crashUrl
string optional: The URL to which player crash dumps will be posted, if any.errorUrl
string optional: The URL to which BrightScript errors will be posted, if any.recoveryUrl
string optional: The URL which will be consulted to determine whether the player should enter recovery, if any.
DiagnosticWebServerStatus
[optional] [short]
portport
short optional: The port number that the web server will be run on. If the web server is disabled then this attribute will not be present.
RemoteLoginStatus
[optional] [telnetPort
unsigned short]telnetPortoptional: The port number that the player will listen to telnet connections on. If telnet is not enabled then this attribute will not be present.[optional] [sshPort
unsigned short] sshPortoptional: The port number that the player will listen for secure shell connections on. If ssh is not enabled then this attribute will not be present.
NetworkInterfaceStatus
[optional] [string] typetype
string optional: If the interface is present, this attribute will contain "Wired", "WiFi", "Dialup" or "Unknown". Note that some USB network devices may appear to the BrightSign player to be of one type when they are actually a different type. For example, some broadband modems appear as "Wired" Ethernet devices.[present
bool] present: Indicates whether the specified network interface is currently present on the player.[presentStatus
string] presentStatus: Provides extra human-readable information explaining why the interface is not present. For example, a VLAN interface may not have been enabled on its corresponding physical interface.[optional] [bool]
hasLink:
IndicatehasLink
bool optional: Indicates whether the network interface currently has link.[optional] [string]
macAddress
macAddress
string optional: Contains the hardware MAC address for network interfaces that have one.[optional] [bool] isVlanisVlan
bool optional: Indicates whether this network interface is a VLAN on another lower network interface.[optional] [short]
vlanTagvlanTag
short optional: If this interface is a VLAN, this attribute contains the tag value that will be used on the lower interface.[optional] [string]
parentInterfaceparentInterface
string optional: If this interface is a VLAN, this attribute contains the name of the lower interface that packets will be sent on.[optional] [Array<short>] vlanChildTagListvlanChildTagList
Array<short> optional: If this network interface has VLAN interfaces running above it then this array contains all of their tag values. The special tag value of zero indicates that this interface is also used itself untagged.[optional] [Array<NetworkStatusIpAddress>] ipAddressListipAddressList
Array<NetworkStatusIpAddress> optional: A list of all IPv4 and IPv6 addresses assigned to this network interface.[optional] [long]
inboundShaperRateinboundShaperRate
long optional: If an inbound bandwidth shaper is enabled for this interface, this attribute contains the rate in bits per second.[optional] [Array<string>]
domainSearchPath:
domainSearchPath
Array<string> optional: A list of suffices that this network interface contributes to the host configuration when this network interface is active. See NetworkHostStatus.[optional] [Array<string>] domainNameServersdomainNameServers
Array<string> optional: A list of DNS servers that this network interface contributes to the host configuration when this network interface is active. See NetworkHostStatus.
NetworkStatusIpAddress
[family
string] family: Contains the address family: "IPv4" or "IPv6"[string]
scope
string: Mainly useful for IPv6 addresses, this attribute indicates the scope of the address. Possible values are "global", "site", "link", "host" and "nowhere".[optional] [string]
addressaddress
string optional: The actual address as a string.[optional] [string]
netmasknetmask
string optional: For IPv4 addresses only this attribute contains the prefix length expressed as a traditional netmask.[optional] [string]
broadcastbroadcast
string optional: For IPv4 addresses only this attribute contains the network broadcast address.[optional] [int]
prefixLengthprefixLength
int optional: For IPv4 and IPv6 addresses this attribute contains the number of bits of the address that are used to identify the network.[optional] [string]
cidrcidr
string optional: For IPv4 and IPv6 addresses this attribute contains the address and prefix length in classless inter-domain routing (CIDR) syntax: address/prefix.
WifiInterfaceStatus
[String]
mode
string: Indicates which mode the WiFi interface is currently in. When in "AP" mode the interface is acting as a wireless access point for other wireless devices to connect to. In "STA" mode the interface is acting as a client to another wireless access point.[optional] [bool]
connectedconnected
bool optional: If the interface is in "STA" mode, indicates whether the interface is connected to an access point. In "AP" mode this attribute is not present.[optional] [string]
essidessid
string optional: If the interface is in "STA" mode, indicates the ESSID of the AP that the interface is connected to. In "AP" mode, indicates the ESSID that the wireless interface is advertising for clients to connect to.[optional] [string]
bssid:
Ifbssid
string optional: If the interface is in "STA" mode, indicates the BSSID of the AP that the interface is connected to. In "AP" mode this attribute is not present.[optional] [string]
frequencyfrequency
string optional: The frequency that the wireless interface radio is currently using, in MHz.[optional] [int]
signalStrengthsignalStrength
int optional: The current signal strength, in dBm.
NetworkStatusRoute
[destination
string] destination: The route destination or "default" for the default route.[metric
int] metric: The priority for the route. Lower priority routes are preferred.[nextHops
Array<NextHops>] nextHops: A list of where packets subject to this route will be sent next. This list currently contains only one element.
NetworkStatusNextHop
[optional] [string]
gatewaygateway
string optional: The address to which packets will be sent.[optional] [string]
interfaceinterface
string optional: The network interface on which packets will be sent.