...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
interface NetworkDiagnostics { Promise<InterfaceTestResult>Promise<NetworkDiagnosticsResult> testInternetConnectivity() Promise<InterfaceTestResult>Promise<NetworkDiagnotsticsResult> testNetworkInterface(String interface_name) Promise<InterfaceTestResult>Promise<PingResult> ping(String host_name, PingConfig config) //< For Promise<InterfaceTestResult>BrightSign traceroute(String host_name, TraceRouteConfig config) }; interface InterfaceTestResult {internal use. Behavior subject to change without notice. Promise<TracerouteResult> traceroute(String diagnosis; host_name, TracerouteConfig config) bool//< For BrightSign internal ok;use. Behavior subject to change LogListwithout log;notice. }; interface LogInterfaceTestResult { String namediagnosis; Stringbool pass; String resultok; Array<String>Array<Log> infolog; }; interface PingConfigLog { longString countname; longbool intervalpass; longString timeoutresult; longArray<String> packetsizeinfo; bool ipv4; bool ipv6; }; interface TraceRouteConfig { String resolve; //< For BrightSign internal use. Behaviour subject to change without notice. }; |
Object Creation
To create a networkdiagnostics object, first load the brightsign/networkdiagnostics
module using the require()
method. Then create an instance of the networkdiagnostics class.
...
testInternetConnectivity()
Code Block | ||
---|---|---|
| ||
PromisePromise<InterfaceTestResult> <InterfaceTestResult> testInternetConnectivity() |
Performs various tests on the Internet connection (via any available network interface) to determine whether it appears to be working correctly. This method returns an InterfaceTestResult
interface when diagnostics are complete.
testNetworkInterface()
Code Block | ||
---|---|---|
| ||
Promise <InterfaceTestResult>Promise<InterfaceTestResult> testNetworkInterface(DOMStringString interface_name) |
Performs tests on the specified network interface to determine whether it appears to be working correctly. Interface name values are the same as those used with the roNetworkConfiguration object. This method returns an InterfaceTestResult
interface when diagnostics are complete.
ping()
Code Block | ||
---|---|---|
| ||
Promise<PingResult> ping(String host_name, PingConfig config) |
For BrightSign internal use. Behavior subject to change without notice. Pings a device with the specified host_name
to determine if there are connection issues.
traceroute()
Code Block | ||
---|---|---|
| ||
Promise<InterfaceTestResult> traceroute(String host_name, TraceRouteConfig config) |
For BrightSign internal use. Behavior subject to change without notice. Performs a standard traceroute diagnostic on the specified host_name
.
InterfaceTestResult
This interface contains diagnostic results:
[bool] ok
: A Boolean flag indicating whether the network interface or Internet connection passed diagnostic tests[DOMStringString] diagnosis
: A single-line diagnosis of the first problem identified with the network interface or Internet connection[bool] ok
: A Boolean flag indicating whether the network interface or Internet connection passed diagnostic tests[Log] log
: A Log object containing diagnostic information related to the network interface or Internet connection
...
This interface contains a list of diagnostic logs. Each log contains the following attributes:
[DOMStringString] name
: A description of the diagnostic[bool] pass
: A Boolean flag indicating whether the diagnostic was successful[DOMStringString] result
: A description of the diagnostic result[DOMStringListStringList] info
: A string list containing diagnostic data
...