ZylSerialPort.NET is a thread based, event driven, asynchronous / synchronous serial port .NET component (class library). Use ZylSerialPort.NET component to easily communicate with external devices on serial port connection, such as modems, bar code readers, GSM modules and others.
You can use it asynchronously or synchronously (AutoReceive = true / false).
If you use it asynchronously, all the incoming data is automatically read and discharged in the Received event into e.Buffer.
If you use it synchronously, then you have to read the incoming data with one of the Read methods.
Classes Enumerations | Enumeration | Description |
---|
| SerialBaudRate |
Baud rate enumeration type.
It's the measure of how fast data is moving between instruments that use serial communication.
RS-232 uses only two voltage states, called MARK and SPACE.
In such a two-state coding scheme, the baud rate is identical to the maximum number of bits of information, including "control" bits, that are transmitted per second.
|
| SerialCommPort |
Physical serial port enumeration type.
|
| SerialCommPortType |
Serial port type enumeration.
|
| SerialDataWidth |
Data bits enumeration type (ByteSize).
Data bits are transmitted "upside down and backwards."
Inverted logic is used and the order of transmission is from least
significant bit (LSB) to most significant bit (MSB).
To interpret the data bits in a character frame, you must read from right to left,
and read 1 for negative voltage and 0 for positive voltage.
|
| SerialErrors |
Serial communication errors enumeration type. It can be one or more of the following values.
|
| SerialHardwareFlowControl |
Hardware flow control enumeration type.
|
| SerialParityBits |
Parity bits enumeration type.
An optional parity bit follows the data bits in the character frame.
The parity bit, if present, also follows inverted logic: read 1 for negative voltage and 0 for positive voltage.
This bit is included as a simple means of error checking.
The idea is this: you specify ahead of time whether the parity of the
transmission is to be even or odd. Suppose the parity is chosen to be odd.
The transmitter will then set the parity bit in such a way as to make an odd number of 1's among the data bits and the parity bit.
|
| SerialSoftwareFlowControl |
Software flow control enumeration type.
|
| SerialStopBits |
Stop bits enumeration type.
The last part of a character frame consists of 1, 1.5, or 2 stop bits.
These bits are always represented by a negative voltage.
If no further characters are transmitted, the line stays in the negative (MARK) condition.
The transmission of the next character frame, if any, is heralded by a start bit of positive (SPACE) voltage.
|