About PortController
Introduction
Purchasing PortController
Redistributing PortController
License Agreement
Support
Getting Started
How to Use PortController
PortController Sample Projects
Handling PortController Errors
Reference
Properties
AvailableSystemPorts
BaudRate Property
Break Property
BytesUsedRQ Property
BytesUsedTQ Property
Cd Property
Cts Property
DataBits Property
Dsr Property
Dtr Property
DtrDsr Property
EnableReadOnEventChar Property
EventChar Property
ForceBeginInvokeEventFiring Property
IsOpen Property
IsFileTransferInProgress Property
Parity Property
PortHandle Property
PortName Property
ReceiveBufferSize Property
Ring Property
Rts Property
RtsCts Property
StopBits Property
SystemPorts Property
TraceOutput Property
TransmitBufferSize
XoffByte Property
XonByte Property
XonXoff Property
Methods
CancelFileTransfer Method
ClearRQ Method
ClearTQ Method
Close Method
GetErrorStatus Method
Open Method
Read Method
ReadBinary Method
ReceiveFileXModem Method
ReceiveFileXModemCRC Method
ReceiveFileYModem Method
ReceiveFileZModem Method
SendFileXModem Method
SendFileXModem1k Method
SendFileYModem Method
SendFileZModem Method
SimulateReceivedXoff Method
SimulateReceivedXon Method
Write Method
WriteBinary Method
Events
OnBreakSignal Event
OnCdToggle Event
OnCtsToggle Event
OnDataReceived Event
OnDsrToggle Event
OnError Event
OnEventCharReceived Event
OnFileTransferComplete Event
OnFileTransferStatusUpdate Event
OnRing Event
OnTQEmpty Event

PortController Events

PortController events are signals that PortController sends to your application when something interesting on the port has occurred. For example, when data is received in the incoming buffer you can use PortController's DataReceived event to call your application's read function.

A powerful technique for reading from the port is to handle the EventCharReceived that is fired when a specific character is received in the incoming buffer. This is useful if you are reading formatted data that is delimited by a character such as a newline or a comma. When the delimiter you specify is received on the line, PortController fires the event and optionally reads the data from the incoming buffer and supplies it to your handling function.

The complete list of events fired by PortController is as follows:

Event Description
OnBreakSignal Fired when the Break signal is received.
OnCtsToggle Fired when the state of the Clear-to-Send line changes.
OnDsrToggle Fired when the state of the Data-set-Ready line changes.
OnCdToggle Fired when the state of the Carrier Detect line changes.
OnDataReceived Fired when a character is received and placed in the buffer.
OnError Fired when a line-status error occurs.
OnEventCharReceived Fired when the event character is received and placed in the input buffer.
OnFileTransferComplete Fired upon the completion of a successful, failed, or cancelled file transfer.
OnFileTransferStatusUpdate Fired periodically during a file transfer with information regarding the progress of the operation.
OnRing Fired when the state of the Ring line changes from high to low.
OnTQEmpty Fired when the last character in the output buffer is sent.