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

Dtr Property

Sets and returns the state of the data-terminal-ready signal.

Syntax

[Visual Basic]
object.Dtr [ = value ]

[C#]
object.Dtr [ = value ]

[C++]
object->Dtr [ = value ]

Parameters

object

An object expression that evaluates to a PortController object.

value

A boolean value representing the state of the DTR signal.

Return Value

The boolean value true if the DTR signal is on, false otherwise.

Default

False

Remarks

When DTR/DSR handshaking is enabled the DTR line fluctuates between on and off. Reading the Dtr property returns the current value of the fluctuating DTR line.

Errors

Attempting to set the DTR signal while DTR/DSR handshaking is enabled is not permitted and will cause PortController to throw a "Unable to set Dtr value while DTR/DSR handshaking is enabled" exception.

Example

[Visual Basic]
'Set Dtr
myPortController.Dtr = True

'Get Dtr
Dim dtr As Boolean
dtr = myPortController.Dtr


[C#]
// Set Dtr
myPortController.Dtr = true;

// Get Dtr
Boolean bDtr = myPortController.Dtr;


[C++]
// Set Dtr
myPortController->Dtr = true;

// Get Dtr
Boolean bDtr = myPortController->Dtr;

See Also

Rts property | Break property | SimulateReceivedXon method | SimulateReceivedXoff method