Click or drag to resize

BBSerialPort Class

Encapsulates a Brainboxes Serial Port, communicates over TCP rather than using the Com port API, this means no drivers are required to be installed on the computer
Inheritance Hierarchy
SystemObject
  Brainboxes.IODeviceIConnection, ISerialProtocol
    Brainboxes.IOBBSerialPort

Namespace: Brainboxes.IO
Assembly: Brainboxes.IO (in Brainboxes.IO.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public class BBSerialPort : Device<IConnection, ISerialProtocol>

The BBSerialPort type exposes the following members.

Properties
 NameDescription
Public propertyConnection The connection. If the connection is replaced and the previous connection was connected, the new connection will be connected too
(Inherited from DeviceConn, Proto)
Public propertyDataAvailable Indicates whether data is available, can be 0, for no data, 1 for 1 or more bytes, or a number representing the precise number of bytes
Public propertyIsAvailable Whether the connection to this Brainboxes Device is available, e.g. online or offline​. In case of network TCP connection: this is if the device is pingable on the network. In case of serial connection: this is if the device COM port is listed on the system and not open by another process.
(Inherited from DeviceConn, Proto)
Public propertyIsConnected Whether this Brainboxes Device instance has an active connection
(Inherited from DeviceConn, Proto)
Public propertyLabel User definable label for the Device to help identify when many devices / when debugging
(Inherited from DeviceConn, Proto)
Public propertyProtocol Marking as virtual allows it to be overridden in the child class
(Inherited from DeviceConn, Proto)
Top
Methods
 NameDescription
Public methodConnect Connect the Brainboxes Device
(Inherited from DeviceConn, Proto)
Public methodDescribe Give a complete summary of the Device
(Inherited from DeviceConn, Proto)
Public methodDisconnect Disconnect the Brainboxes Device
(Inherited from DeviceConn, Proto)
Public methodDispose Dispose of this Brainboxes device
(Inherited from DeviceConn, Proto)
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 methodReceive Receive data from the serial port
Public methodSend Transmit data to the serial port
Public methodToString Describe this Brainboxes Device
(Inherited from DeviceConn, Proto)
Top
Events
 NameDescription
Public eventDeviceStatusChangedEvent Event When the status of the devices connection changes for example goes from Disconnected to Connected or from Available to Unavailable
(Inherited from DeviceConn, Proto)
Top
Fields
 NameDescription
Public fieldBBSerialPortType The type of Serial port either RS232 or RS422/485
Public fieldPortNumber The port number of the device
Top
See Also