|
OSDP.Net 5.2.1
A .NET library for implementing the Open Supervised Device Protocol (OSDP)
|
Connects using TCP/IP connection to a server. More...
Public Member Functions | |||||
| TcpClientOsdpConnection (string server, int portNumber, int baudRate) | |||||
| Initializes a new instance of the TcpClientOsdpConnection class. | |||||
| override async Task | Open () | ||||
| Open the connection for communications. | |||||
| override Task | Close () | ||||
| Close the connection for communications. | |||||
| override async Task | WriteAsync (byte[] buffer) | ||||
Write to connection.
| |||||
| override async Task< int > | ReadAsync (byte[] buffer, CancellationToken token) | ||||
Read from connection.
| |||||
| override string | ToString () | ||||
| Public Member Functions inherited from OSDP.Net.Connections.OsdpConnection | |||||
| Task | Close () | ||||
| Close the connection for communications. | |||||
| Task | Open () | ||||
| Open the connection for communications. | |||||
| Task< int > | ReadAsync (byte[] buffer, CancellationToken token) | ||||
Read from connection.
| |||||
| Task | WriteAsync (byte[] buffer) | ||||
Write to connection.
| |||||
| void | Dispose () | ||||
Properties | |
| override bool | IsOpen [get] |
| Is the connection open and ready to communicate. | |
| Properties inherited from OSDP.Net.Connections.OsdpConnection | |
| int | BaudRate [get, protected set] |
| Speed of the connection. | |
| virtual bool | IsOpen [get, protected set] |
| Is the connection open and ready to communicate. | |
| TimeSpan | ReplyTimeout = TimeSpan.FromMilliseconds(200) [get, set] |
| Timeout value waiting for a reply. | |
Additional Inherited Members | |
| Protected Member Functions inherited from OSDP.Net.Connections.OsdpConnection | |
| OsdpConnection (int baudRate) | |
| Creates an instance of OsdpConnection. | |
| virtual void | Dispose (bool disposing) |
| Disposes the OsdpConnection instance. | |
Connects using TCP/IP connection to a server.
Definition at line 9 of file TcpClientOsdpConnection.cs.
|
inline |
Initializes a new instance of the TcpClientOsdpConnection class.
| server | The server name or IP address. |
| portNumber | The port number. |
| baudRate | The baud rate. |
Definition at line 21 of file TcpClientOsdpConnection.cs.
|
inline |
Close the connection for communications.
Implements OSDP.Net.Connections.IOsdpConnection.
Definition at line 48 of file TcpClientOsdpConnection.cs.
Referenced by Open().
|
inline |
Open the connection for communications.
Implements OSDP.Net.Connections.IOsdpConnection.
Definition at line 39 of file TcpClientOsdpConnection.cs.
References Close().
Referenced by WriteAsync().
|
inline |
Read from connection.
| buffer | Array of bytes to read |
| token | Cancellation token to end reading of bytes |
Implements OSDP.Net.Connections.IOsdpConnection.
Definition at line 71 of file TcpClientOsdpConnection.cs.
|
inline |
Definition at line 83 of file TcpClientOsdpConnection.cs.
|
inline |
Write to connection.
| buffer | Array of bytes to write |
Implements OSDP.Net.Connections.IOsdpConnection.
Definition at line 58 of file TcpClientOsdpConnection.cs.
|
get |
Is the connection open and ready to communicate.
Implements OSDP.Net.Connections.IOsdpConnection.
Definition at line 29 of file TcpClientOsdpConnection.cs.
Referenced by WriteAsync().