nn::uds::CTR::Scan Functionnn::Result Scan( void * pBuffer, size_t bufferSize, u8 subId, bit32 localId, u8 channel = 0, u16 scanTime = 0 );
| Name | Description | |
|---|---|---|
| out | pBuffer | Discovered network information storage location. |
| in | bufferSize | Buffer size. Estimate roughly 1KB per network. |
| in | subId | Communication mode ID. Can be freely set by the application. Specify 0xff to search all sub IDs. |
| in | localId | The local communication ID. Specify the value generated by CreateLocalCommunicationId. |
| in | channel | Scans all channels used by UDS. Only set this value when you want to scan a specific channel.(0: Scans all channels used by UDS: 1, 6, and 11.) |
| in | scanTime | The scan time for a single channel. There is normally no need to specify this. (0: 110 milliseconds) |
Result values listed below. | Value | Description |
|---|---|
ResultSuccess |
Succeeded in creating local communication, and the network information found in the buffer was stored. |
ResultNotInitialized |
The library is not initialized. Execute the nn::uds::Initialize function. |
| ResultInvalidState | Not in an executable state. Returned when executed in a state other than STATE_DISCONNECTED. |
| ResultOutOfRange | The specified argument was not in a specifiable range. It is possible it will succeed if you re-execute with an appropriate value for the argument. |
| ResultWirelessOff | Transitioned to wireless OFF mode. Re-initialization is required. |
| A value other than the above. | Failed for reasons other than those given above. |
Scans for nearby networks.
CONFIDENTIAL