nn::ir::CTR::Communicator::WaitToConfirmId Member Function

Syntax

static Result WaitToConfirmId(
     u8 subId,
     bit32 communicationId,
     const char passphrase[],
     size_t passphraseLength,
     nn::fnd::TimeSpan timeout
);

Parameters

Name Description
in subId Communication mode ID.
in communicationId The communication ID. Specify the value generated by the nn::ir::Communicator::CreateCommunicationId function.
in passphrase[] String that is the seed for the encryption key.
in passphraseLength Length of passphrase. Specify a value that is at least IR_PASSPHRASE_LENGTH_MIN, but no larger than IR_PASSPHRASE_LENGTH_MAX.
in timeout Specify the amount of time to wait for a request.

Return Values

Returns whether confirmation succeeded.

Value Description
Result::IsSuccess Process was successful.
ResultNotConnected Not in the connected state.
ResultPacketFull Insufficient management region for packet.
ResultBufferInsufficient Insufficient save region for packet.
ResultCannotConfirmId The connection partner has a different communicationId or subId.
ResultMachineSleep Sleeping because the system is in Sleep Mode.
ResultFatalError The IR module may be malfunctioning.

Description

Waits for request to confirm communication ID and communication mode ID.

Execute this function after a connection has been established with the communication partner using either WaitConnection, RequireConnection or AutoConnection.

For confirmation to succeed, after this function executes the communication partner must call RequireToConfirmId, specifying the same communication ID and communication mode ID used here. To send and receive data using the Send and Receive functions, you must first use this function and the RequireToConfirmId function to confirm IDs.

For IDs to be confirmed, both regions used to save incoming and outgoing packets must be at least 32 bytes, and the size of the management region must be at least the value returned by GetManagementSize(1). If these conditions are not met, IDs will always fail to be confirmed.

Note: One nnos::Event object is used while this function is executing. Be aware of the upper limit for Event objects.

Revision History

2011/10/05
Fixed typos.
2011/09/28
Added information on buffer size restrictions.
2011/08/30
Initial version.

CONFIDENTIAL