Click or drag to resize

DeviceConn, Proto Class

A generic Brainboxes Device
Inheritance Hierarchy
  Brainboxes.IODeviceConn, Proto

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

Type Parameters

A class which implements IConnection
A class which implements IProtocol

The DeviceConn, Proto type exposes the following members.

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
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.)
Public eventDeviceStatusChangedEvent
Event When the status of the devices connection changes for example goes from Disconnected to Connected or from Available to Unavailable
See Also