nn::ir::CTR::Communicator::RequireToConfirmId Member Function

Syntax

static Result RequireToConfirmId(
     u8 subId,
     bit32 communicationId,
     const char passphrase[],
     size_t passphraseLength
);

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.

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

Requests confirmation of the communication mode ID and communication ID.

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

In order for this process to succeed, the communication partner must execute WaitToConfirmId with the same specified communication ID and communication mode ID. To send and receive data with the Send and Receive functions, you must first use this function and the WaitToConfirmId 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/09/28
Added information on buffer size restrictions.
2011/08/30
Initial version.

CONFIDENTIAL