nn::uds::CTR::Scan Function

Syntax

nn::Result Scan(
     void * pBuffer,
     size_t bufferSize,
     u8 subId,
     bit32 localId
);

Arguments

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.

Return Values

Returns the function's execution result. Returns one of the 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.

Description

Scans for nearby networks.

Revision History

2011/01/25
Restricted function to automatically scan all channels. The previous function can still be used as-is for backwards compatibility, but note that connectivity can be substantially impaired if only one channel has been scanned in a production version.
2010/10/15
Expanded the information on the return values. Revised the Description to make it easier to understand.
2010/06/14
Initial version.

CONFIDENTIAL