Transmit
最終更新
最終更新
The procedure for transmission in a simple network allocates a structure and stores the information required for transmission in this structure.
Allocates the tsTxDataApp
structure as a local variable and clears the entire structure to zero.
Copy the data you wish to send into.auData
(payload).
Store the number of stored bytes of the payload in .u8Len
.
Stores .u32DstAddr
(destination)
Stores .u32SrcAddr
(the address of the sender)
Specify other sending options.
call .
When the transmission process in TWENET is finished, is executed.
It is exceptional for a completion event to disappear, but a timeout should be provided to handle exceptions. If the delay or retransmission delay is not set too long in the tsTxDataApp structure, then 100ms is not normally required.