1

Topic: Record in serial port from different flows

Hello! The project in which in one flow the clod-port (rs-232 forms and opens, all as usual got, and even works - packets) are read and written. Further  this open port it is transferred in other flow which also writes packets to the same port. I.e., two flows write to one clod-port, and, is not eliminated, at the same time. Synchronization of records in port are not present, because of what there is a fear, whether packets from one flow with packets of the second will be confused?

2

Re: Record in serial port from different flows

Hello, vasvladal, you wrote: V> Hello! The project in which in one flow the clod-port (rs-232 forms and opens, all as usual got, and even works - packets) are read and written. Further  this open port it is transferred in other flow which also writes packets to the same port. I.e., two flows write to one clod-port, and, is not eliminated, at the same time. Synchronization of records in port are not present, because of what there is a fear, whether packets from one flow with packets of the second will be confused? All depends on flag FILE_FLAG_OVERLAPPED at discovery - Synchronous and Asynchronous I/O Handles: A synchronous handle behaves such that I/O function calls using that handle are blocked until they complete, while an asynchronous file handle makes it possible for the system to return immediately from I/O function calls, whether they completed the I/O operation or not. As stated previously, this synchronous versus asynchronous behavior is determined by specifying FILE_FLAG_OVERLAPPED within the dwFlagsAndAttributes parameter. If this flag is not specified, then I/O operations are serialized, even if the calls to the read and write functions specify an OVERLAPPED structure. Those are, if flag FILE_FLAG_OVERLAPPED is not specified, write operations will be arranged by OS kernel. Otherwise depends on specific implementation of the driver.

3

Re: Record in serial port from different flows

Hello, EreTIk, you wrote: , thanks for clarification