Click or drag to resize

DeviceConn, Proto Class

A generic Brainboxes Device
Inheritance Hierarchy
SystemObject
  Brainboxes.IODeviceConn, Proto
    Brainboxes.IOBBSerialPort
    Brainboxes.IOEDDevice
    Brainboxes.IOESDevice

Namespace:  Brainboxes.IO
Assembly:  Brainboxes.IO (in Brainboxes.IO.dll) Version: 1.5.0.8
Syntax
public abstract class Device<Conn, Proto> : IDevice<Conn, Proto>, 
	IDisposable
where Conn : IConnection
where Proto : IProtocol

Type Parameters

Conn
A class which implements IConnection
Proto
A class which implements IProtocol

The DeviceConn, Proto type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyConnection
The connection. If the connection is replaced and the previous connection was connected, the new connection will be connected too
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.
Public propertyIsConnected
Whether this Brainboxes Device instance has an active connection
Public propertyLabel
User definable label for the Device to help identify when many devices / when debugging
Public propertyProtocol
Marking as virtual allows it to be overridden in the child class
Top
Methods
  NameDescription
Public methodConnect
Connect the Brainboxes Device
Public methodStatic memberCreate
Connects to the IP Address given and determines what kind of Brainboxes Device is there, creates the object and returns it
Public methodDescribe
Give a complete summary of the Device
Public methodDisconnect
Disconnect the Brainboxes Device
Public methodDispose
Dispose of this Brainboxes device
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Describe this Brainboxes Device
(Overrides ObjectToString.)
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
Top
See Also