DeviceConn, Proto Class |
public abstract class Device<Conn, Proto> : IDevice<Conn, Proto>, IDisposable where Conn : IConnection where Proto : IProtocol
The DeviceConn, Proto type exposes the following members.
Name | Description | |
---|---|---|
DeviceConn, Proto | Default generic constructor | |
DeviceConn, Proto(Conn) | Construct with connection | |
DeviceConn, Proto(Proto) | Construct with protocol | |
DeviceConn, Proto(Conn, Proto) | Construct with connection and protocol |
Name | Description | |
---|---|---|
Connection | The connection. If the connection is replaced and the previous connection was connected, the new connection will be connected too | |
IsAvailable | 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. | |
IsConnected | Whether this Brainboxes Device instance has an active connection | |
Label | User definable label for the Device to help identify when many devices / when debugging | |
Protocol | Marking as virtual allows it to be overridden in the child class |
Name | Description | |
---|---|---|
Connect | Connect the Brainboxes Device | |
Create | Connects to the IP Address given and determines what kind of Brainboxes Device is there, creates the object and returns it | |
Describe | Give a complete summary of the Device | |
Disconnect | Disconnect the Brainboxes Device | |
Dispose | Dispose of this Brainboxes device | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
GetHashCode | Serves as the default hash function. (Inherited from Object) | |
GetType | Gets the Type of the current instance. (Inherited from Object) | |
ToString |
Describe this Brainboxes Device
(Overrides ObjectToString) |
Name | Description | |
---|---|---|
DeviceStatusChangedEvent | Event When the status of the devices connection changes for example goes from Disconnected to Connected or from Available to Unavailable |