nn::uds::CTR::SendTo Functionnn::Result SendTo( const EndpointDescriptor & endpointDesc, const void * data, size_t dataSize, u16 destNodeId, u8 port, bit8 option = 0x00 );
| Name | Description | |
|---|---|---|
| in | endpointDesc | Descriptor indicating the endpoint to use. |
| in | data | Pointer to the data to send. Specify a buffer aligned to 4 bytes. Make the buffer for storing the data of size dataSize, rounded up to a multiple of four. |
| in | dataSize | Size of the data to send (in bytes). 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. |
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. 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 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 |
Entered wireless-disabled mode. Re-initialization is required. |
ResultMisalignedAddress |
data is not appropriate. It is possible it will succeed if you re-execute with an appropriate value for the argument. |
| A value other than the above | Failed for reasons other than those given above. |
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 using NO_WAIT, FORCE_DIRECT_BC, or FORCE_UNICAST for option. To specify multiple options, you can specify them with an OR option.
This function is thread-safe.
UDS_PACKET_PAYLOAD_MAX_SIZE in the description of the dataSize argument. Added a link to BROADCAST_NODE_ID in the description of the destNodeId argument. Added a link to Initialize in Return Values.CONFIDENTIAL