Click or drag to resize

ComPortSetComPortSpec(ComPorteComBaudRates, ComPorteComDataBits, ComPorteComParityType, ComPorteComStopBits, ComPorteComProtocolType, ComPorteComHardwareHandshakeType, ComPorteComSoftwareHandshakeType, Boolean) Method

Function to set the com spec for the specified COM Port

Namespace: Crestron.SimplSharpPro
Assembly: SimplSharpPro (in SimplSharpPro.dll) Version: 2.21.121
Syntax
C#
public int SetComPortSpec(
	ComPorteComBaudRates paramBaudRate,
	ComPorteComDataBits paramNumberOfDataBits,
	ComPorteComParityType paramParityType,
	ComPorteComStopBits paramNumberOfStopBits,
	ComPorteComProtocolType paramProtocolType,
	ComPorteComHardwareHandshakeType paramHardwareHandShake,
	ComPorteComSoftwareHandshakeType paramSoftwareHandshake,
	bool paramReportCTSChanges
)

Parameters

paramBaudRate  ComPorteComBaudRates
Baud Rate
paramNumberOfDataBits  ComPorteComDataBits
Number Of Data Bits
paramParityType  ComPorteComParityType
Parity Type
paramNumberOfStopBits  ComPorteComStopBits
Number of Stop bits
paramProtocolType  ComPorteComProtocolType
Protocol Type
paramHardwareHandShake  ComPorteComHardwareHandshakeType
Hardware Handshake
paramSoftwareHandshake  ComPorteComSoftwareHandshakeType
Software Handshake
paramReportCTSChanges  Boolean
Indicates whether we want to report CTS Changes

Return Value

Int32
UShort if sending the new com port specification was successful. 0 = successful.
Exceptions
ExceptionCondition
NotSupportedExceptionThe COMPORT does not supports a part of the specified configuration. See messages for more information.
InvalidOperationExceptionThe COMPORT is not registered.

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also