Skip to content

Commit a08ff94

Browse files
author
Amanda Butler
authored
Copy edit networkinterface.md
Copy edit for code style and precise language.
1 parent 46efd61 commit a08ff94

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/reference/api/connectivity/networksocket/networkinterface.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ For example, when providing Wi-Fi SSID and password, you may use the following `
5252

5353
Please see [Selecting the default network interface](configuration-connectivity.html#selecting-the-default-network-interface) for information about how to supply required configuration parameters on different connections.
5454

55-
Targets with connectivity set the `target.network-default-interface-type` configuration variable appropriately, either to their only interface or their most-commonly-used one. For targets that provide more than one type of connectivity, you may choose the default by overriding the `target.network-default-interface-type` configuration variable.
55+
Targets with connectivity set the `target.network-default-interface-type` configuration variable appropriately, either to their only interface or the one most commonly used. For targets that provide more than one type of connectivity, you may choose the default by overriding the `target.network-default-interface-type` configuration variable.
5656

5757
Applications may also ask for a specific type of connection, as the following table shows:
5858

@@ -64,11 +64,12 @@ Applications may also ask for a specific type of connection, as the following ta
6464
| `*CellularBase::get_default_instance()` | Return cellular connectivity | Requires network parameters (pin, APN, username, password) |
6565
| `*NetworkInterface::get_default_instance()` | One of the above, depending on `target.network-default-interface-type` | |
6666

67-
Note that the calls for a specific interface type do not preconfigure credentials such as SSID, as an interface-type-specific application is expected to configure these in code. NULL will be returned if no interface of that type is available.
67+
Note that the calls for a specific interface type do not preconfigure credentials such as SSID because an interface-type-specific application is expected to configure these in code. `NULL` is returned if no interface of that type is available.
6868

69-
Calls for a NetworkInterface will request one of the interface types depending on target.default-network-interface-type, and preconfigure the credentials. If credentials can't be preconfigured (for example because nsapi.default-wifi-ssid isn't set), the call returns NULL rather than an unconfigured interface.
69+
Calls for a NetworkInterface will request one of the interface types depending on `target.default-network-interface-type`, and preconfigure the credentials. If credentials can't be preconfigured (for example because `nsapi.default-wifi-ssid` isn't set), the call returns `NULL` rather than an unconfigured interface.
70+
71+
An application may check the type of the interface returned by `NetworkInterface::get_default_instance()` by using the "dynamic downcast" methods:
7072

71-
An application may check the type of the interface returned by NetworkInterface::get_default_instance() by using the "dynamic downcast" methods:
7273
```
7374
// net set from NetworkInterface::get_default_instance() as above
7475
WiFiInterface *wifi = net->wifiInterface();

0 commit comments

Comments
 (0)