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

Parity Property

Sets and returns the parity communications parameter.

Syntax

[Visual Basic]
object.Parity [ = value ]

[C#]
object.Parity [ = value ]

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

Parameters

object

An object expression that evaluates to a PortController object.

value

A value of type ParityValue indicating the parity setting.

Return Value

A value of type ParityValue representing the parity setting.

Remarks

  • Parity values are contained in the SciCom.PortController.ParityValue namespace
  • Valid parity values are as follows:

    • Parity_None (Default)
    • Parity_Odd
    • Parity_Even
    • Parity_Mark
    • Parity_Space

Default

Parity_None

Errors

Attempting to set Parity to an invalid value will cause PortController to throw an "Invalid argument" exception.

Example

[Visual Basic]
'Set parity
myPortController.Parity = SciCom.PortController.ParityValue.Parity_None

'Get parity
Dim parity as SciCom.PortController.ParityValue
parity = myPortController.Parity


[C#]
// Set parity
myPortController.Parity = SciCom.PortController.ParityValue.Parity_None;

// Get parity
SciCom.PortController.ParityValue parity = myPortController.Parity;

[C++]
// Set parity
myPortController->Parity = SciCom::PortController::ParityValue::Parity_None;

// Get parity
SciCom::PortController::ParityValue parity = myPortController->Parity;

See Also

DataBits property | BaudRate property | StopBits property | Open method