nn::uds::CTR::SendTo Function

Syntax

nn::Result SendTo(
     const EndpointDescriptor & endpointDesc,
     const void* data,
     size_t dataSize,
     u16 destNodeId,
     u8 port,
     bit8 option = 0x00
);

Arguments

Name Description
in endpointDesc Descriptor indicating the endpoint to use.
in data Pointer to the data to send.
in dataSize Size of the data to send. The maximum size of the data to send is UDS_PACKET_PAYLOAD_MAX_SIZE bytes.
in destNodeId Sending destination. Specify BROADCAST_NODE_ID to broadcast the data.
in port The port to use. Port number 0x00 is reserved by the system and cannot be used.
in option Sending options.

Return Values

Returns the function's execution result. Returns one of the Result values listed below.
Value Description
ResultSuccess Process was successful.
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 master or client.
ResultInvalidNode The target node does not exist on the network. It is possible you are disconnected.
ResultTooLarge dataSize exceeds nn::uds::UDS_PACKET_PAYLOAD_MAX_SIZE.
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.
ResultBufferIsFull When the NO_WAIT option is specified, occurs when packet sending exceeds the send capacity of the wireless device. This can occur more frequently when the signal strength is bad,
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

Sends data to the specified port on the specified partner's system.

This function blocks until it has finished sending data. The send method can be specified by specifying NO_WAIT, FORCE_DIRECT_BC, or FORCE_UNICAST for option. To specify multiple options, you can specify them with an OR option.

Revision History

2010/10/15
Expanded the information on the return values. Added a description of the added send options.
2010/06/14
Initial version.

CONFIDENTIAL