08-24-2006 01:32 PM
08-24-2006 04:14 PM - edited 08-24-2006 04:14 PM
When you open a serial port using OpenComConfig() you are actually opening the port through the windows OS serial driver. This driver handles both the transmit and receive queues for you. To use 8 ports, just call OpenComConfig() 8 times and you get 8 separate tx/rx queues. Simply set these queues large enough to handle your expected data packets. The minimum and maximum buffer sizes vary by OS, for example win2000 I believe has a minimum buffer size of 4K so if you are using shorter packets than that you are already covered.
The 128 byte receive buffer does not really affect your input data size unless your hardware can not keep up with the interrupt requests generated by the serial card when it is receiving data. If you have 8 ports simultaneously receiving data at high input speeds, and you are trying to run this on slow hardware, you may reach the limits of the hardware configuration, but with a 128 byte buffer on the card that is probably not likely to be an issue unless your system is heavily loaded by other applications or processes.
While there is not a single function to send the same data out 8 RS232 ports it should be pretty trivial to write you own to simply loop through the 8 ports sending your data buffer. The transmit functions pass the data to the transmit queue and the actual process of sending the data is handled by the OS and driver for you.
What you are proposing should be very practical to implement, if you have any additional questions post again.
Good Luck
Message Edited by mvr on 08-24-2006 04:15 PM
08-24-2006 05:59 PM
08-28-2006 12:09 PM