Home > other > A serial port to send data, how can the sender guarantee received let the receiver will not repeat t
A serial port to send data, how can the sender guarantee received let the receiver will not repeat t
Time:09-26
As title, such as the sender to the receiver sends A command, call A command,
For the receiver to receive commands and receive article N A N + 1 command, has the different branches on the logical processing at the receiving end,
That is to say, can't repeat,
Standing in the sending end, I don't know how to solve this problem? , of course, this kind of question is probably need to code and the agreement between the two sides cooperate, But what to do to solve it?
Thought the communication problem to network edition area could be better, but the support of network programming usually some libraries, there are a lot of middleware or have to weight function, so ask most of the past and I don't know to go to the principle of weight will only use, middleware or garage if it is going to find a principle, that may be more trouble,
Also please release a lot of friends to help, this kind of problem should not very special,
CodePudding user response:
A command on the sender and the next command cannot repeat, under the command to send the finished one line of code that needs to be saved just send the order, for the next to compare before sending, if the last command and send the need to send the command is the same, that it does not send any thing or send a not your specific signal of control command, if it is not the same as you send now need to send command, hope to help you,