Click or drag to resize

ComPort Class

ComPort device.
Inheritance Hierarchy
SystemObject
  DeviceBasis
    CrestronDevice
      PortDevice
        Crestron.SimplSharpProComPort

Namespace: Crestron.SimplSharpPro
Assembly: SimplSharpPro (in SimplSharpPro.dll) Version: 2.21.121
Syntax
C#
public sealed class ComPort : PortDevice, 
	IParentInformation

The ComPort type exposes the following members.

Properties
 NameDescription
Public propertyBaudRate Get the current baud rate
Public propertyBREAK Sets/Clears the long break. Set to true to start a long break and then set to false to end the long break.
Public propertyCD Get the CD flag
Public propertyComPort_Capabilities Get the Capabilities of this com port. (RS 232/422/485 and RTS/CTS Support). Bitwise against the ComportCapabilitiesEnum.
Public propertyCTS Get the current CTS flag state
Public propertyDataBits Get the data bits
Public propertyDSR Get the DSR state
Public propertyEnableFeedback Enable Feedback for Comports Reserved for future use
Public propertyHwHandShake Get the hardware handshake state
Public propertyParity Get the parity
Public propertyPresent Property to indicate if a device is connected to the specific COMPORT. This is only supported on the COMPORTS on the CenIoCom2 device. For all other devices this will always return false.
Public propertyProtocol Get the current protocol
Public propertyRcvdString Function to get the Rcvdata on the COMPORT
Public propertyReportCTSChanges Property to return if this COM port will report CTS changes
Public propertyRING Get the RING state
Public propertyRTS Set the RTS flag.
Protected propertySlotType Function to return the slot Type
(Overrides CrestronDevice.SlotType)
Public propertyStopBits Get the number of stop bits
Public propertySupportedBaudRates Get the supported baudrates of this com port. Bitwise against the ComBaudRatesEnum.
Public propertySupports232 See if the COMPORT Supports 232
Public propertySupports422 See if the COMPORT Supports 422
Public propertySupports485 See if the COMPORT Supports 485
Public propertySupportsRTSCTS See if the COMPORT supports RTS/CTS
Public propertySwHandShake Get the software handshake state
Public propertyTransmitString Send data to the COMPORT
Top
Methods
 NameDescription
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodSend(String) Function for the user to send a string out the com port.
Public methodSend(Char, Int32) Function for the user to send a character array using the specified start and length. Does not update the TransmitString property to avoid string allocation overhead.
Public methodSendShortBreak Function for sending a short break.
Public methodSetComPortSpec(ComPortComPortSpec) Function to set the COM port's specification as defined in the ComPortSpec structure.
Public methodSetComPortSpec(ComPorteComBaudRates, ComPorteComDataBits, ComPorteComParityType, ComPorteComStopBits, ComPorteComProtocolType, ComPorteComHardwareHandshakeType, ComPorteComSoftwareHandshakeType, Boolean) Function to set the com spec for the specified COM Port
Public methodUnRegister Function to unregister the ComPort, if registered.
(Overrides PortDevice.UnRegister)
Top
Events
 NameDescription
Public eventExtendedInformationChanged Extended Information of the com port change event handler
Public eventPropertyChanged Property change event handler
Public eventSerialDataReceived Serial data receive event handler
Public eventSerialDataTransmitted Serial data transmit event handler. Not currently supported.
Top

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also