nn::uds::CTR::Attach Functionnn::Result Attach( EndpointDescriptor * pEndpointDesc, u16 srcNodeId, u8 port, size_t receiveBufferSize = ATTACH_BUFFER_SIZE_DEFAULT );
| Name | Description | |
|---|---|---|
| in | pEndpointDesc | Descriptor indicating the endpoint to use. |
| in | srcNodeId | ID of node to attach. When BROADCAST_NODE_ID is specified, all nodes will be attached. |
| in | port | Port number to attach. Port number 0x00 is reserved by the system and cannot be used. |
| in | receiveBufferSize | Size of the receive buffer to allocate. This is allocated from the memory block allocated by the Initialize function, so take care that the total size of all receive buffers does not exceed the size of this allocated memory block. You must specify at least ATTACH_BUFFER_SIZE_MIN bytes. By default, allocate ATTACH_BUFFER_SIZE_DEFAULT bytes. When specifying the data size, choosing a multiple of 32 will yield the maximum efficiency because memory is allocated in 32-byte chunks. |
Result values listed below. | Value | Description |
|---|---|
Result::IsSuccess |
Process was successful. |
ResultNotInitialized |
The library is not initialized. Execute the Initialize function. |
ResultInvalidState |
Not in an executable state. |
ResultOutOfResource |
This is returned when the receive buffer specified by the Initialize function is insufficient and when there are insufficient system resources. |
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-disabled mode. Re-initialization is required. |
| A value other than the above | Failed for reasons other than those given above. |
Makes the endpoint into a packet-receivable state.
Attaches the specified port and node ID to the endpoint. The system creates a receive buffer, and then becomes able to receive sent packets at a subsequently specified port.
BROADCAST_NODE_ID in the description of the destNodeId argument. Added a link to Initialize in Return Values.CONFIDENTIAL