SerialPortInUseException Class
Click or drag to resize

SerialPortInUseException Class

Exception thrown when a serial port method is already in progress and a second attempt is made to use the serial port.
Inheritance Hierarchy
SystemObject
  SystemException
    ASCOM.Utilities.ExceptionsHelperException
      ASCOM.Utilities.ExceptionsSerialPortInUseException

Namespace:  ASCOM.Utilities.Exceptions
Assembly:  ASCOM.Utilities (in ASCOM.Utilities.dll) Version: 6.0.0.0 (6.4.0.2624)
Syntax
[SerializableAttribute]
public class SerialPortInUseException : HelperException

The SerialPortInUseException type exposes the following members.

Constructors
  NameDescription
Public methodSerialPortInUseException(String)
Create a new exception with message
Public methodSerialPortInUseException(SerializationInfo, StreamingContext)
Serialise the exception
Public methodSerialPortInUseException(String, Exception)
Create a new exception with message
Top
Properties
  NameDescription
Public propertyData (Inherited from Exception.)
Public propertyHelpLink (Inherited from Exception.)
Public propertyInnerException (Inherited from Exception.)
Public propertyMessage (Inherited from Exception.)
Public propertySource (Inherited from Exception.)
Public propertyStackTrace (Inherited from Exception.)
Public propertyTargetSite (Inherited from Exception.)
Top
Methods
  NameDescription
Public methodGetBaseException (Inherited from Exception.)
Public methodGetObjectData (Inherited from Exception.)
Public methodGetType (Inherited from Exception.)
Public methodToString (Inherited from Exception.)
Top
Remarks
This exception is only thrown after 5 attempts, each with a 1 second timeout, have been made to acquire the serial port. It may indicate that you have more than one thread attempting to access the serial port and that you have not synchronised these within your application. The serial port can only handle one transaction at a time e.g. Serial.Receive or Serial.Transmit etc.
See Also