Connection Class |
Namespace: Brainboxes.IO
The Connection type exposes the following members.
Name | Description | |
---|---|---|
![]() | IsAvailable |
Whether this connection to a 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 connection instance to a Brainboxes Device is active
|
![]() | Stream |
The Connections underlying stream class
|
![]() | Timeout |
The timeout for Stream reads and writes, and connection availability test
|
Name | Description | |
---|---|---|
![]() | Connect |
Connect to the ED Device
|
![]() ![]() ![]() | Create |
Supply a connection IP address or com port and the correct IConnection concrete class will be created and returned
![]()
IConnection c1 = Connection.Create("192.168.0.5"); // returns a TCPConnection class
IConnection c2 = Connection.Create("COM6", 9600); //returns a SerialConnection class with the baud rate set to 9600
|
![]() | Disconnect |
Disconnect from the ED 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 |
ToString
(Overrides ObjectToString.) |
Name | Description | |
---|---|---|
![]() | ConnectionStatusChangedEvent |
When the status of the connection changes this event is raised
e.g. when IsConnected changes from false to true
or when IsAvailable changes:
* for example for a TCPConnection if the IP address is goes from on-line to off-line
* or for example for a SerialConnection when the COM name is no longer present or in use by another program
|