nn::ir::CTR::Communicator::Send Member Functionstatic Result Send( void * pBuffer, size_t dataSize, size_t bufferSize, bool restore = false );
| Name | Description | |
|---|---|---|
| in | pBuffer | Specifies the send buffer. Place the send data in this buffer starting from the head of the buffer, in intervals of dataSize. Must be aligned on a 4-byte boundary. |
| in | dataSize | Specifies the size of the send data. |
| in | bufferSize | Specifies the buffer size. Note: This must be larger than the size of the send data. |
| in | restore | Specifies whether the send buffer will be restored to its unencrypted state. |
Result values listed below.| Value | Description |
|---|---|
Result::IsSuccess |
Process was successful. |
ResultNotConnected |
Not in the connected state. |
ResultCannotConfirm |
ID has not been confirmed. |
ResultPacketFull |
Insufficient management region for packet. |
ResultBufferInsufficient |
The region for storing packets is not large enough, or the send buffer is not large enough. |
ResultMachineSleep |
Sleeping because the system is in Sleep Mode. |
ResultFatalError |
The IR module may be malfunctioning. |
Sends the specified data.
Since security information is added to the send buffer, the buffer must be 48 to 53 bytes larger than the size of data being sent. The size of buffer required depends on the size of data you want to send. Calculate the value using the CalculateBufferSizeToCommunicate function. (Note that you do not use the GetPacketSize function.)
The send buffer also must be aligned on a 4-byte boundary.
Since the data is sent after various processes including encryption are performed on the buffer, the buffer state is different from its original state when the function returns. If you specify true for the restore parameter, the function restores an area of dataSize length from the head of the buffer to its original state before returning. However, restoring causes the process to take slightly longer.
This function returns control before the sending process is completed. Packets are sent at times when the receive process is not taking place.
This function can send data in sizes ranging from 0 to 16316 bytes. At least GetPacketSize(size) bytes of space must be available in the region used to save outgoing packets and GetManagementSize(1) bytes of space must be available in the management region for outgoing packets. (These regions are specified when the Initialize function is called.)
In order for this function to succeed, you must first confirm the ID using the RequireToConfirmId function or the WaitToConfirmId function.
CONFIDENTIAL