Home > other >  C # serial communication problems
C # serial communication problems

Time:09-27

A serial port, receive data, but he may receive data in the same seconds (this kind of situation is bound to happen) I should how to ensure the integrity of the two or more data packets, the packets separately, and then the hands of the different threads, what should I do, I am using Microsoft serialport class,

CodePudding user response:

Add data protocol, which is used to guarantee

CodePudding user response:

Since it is a port, there must be conflict processing method or the agreement, otherwise you won't do it!
Or have the token or a President or a conflict processing mechanism, such as Ethernet, is communication in conflict,

CodePudding user response:

A serial port at the same time hardware is 1 to 1, can't receive the data at the same time

CodePudding user response:

I don't know is several devices communication? If is 1 to 1, and will not receive the data at the same time, if it is 1 to many, time-sharing communications, is 1 to 1, if it is a many-to-many, cannot use a serial port, with CAN or network,
  • Related