mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-11 19:44:52 +00:00
Updated Communication Basics (markdown)
@@ -1,20 +1,19 @@
|
||||
### Unifying communication methods
|
||||
|
||||
In networked A/V systems, devices can use many different methods of communication. Com ports; TCP/IP sockets; Telnet; SSh... Generally, the protocol and commands that are sent and received using any of these methods are the same, and it is not necessary for a device to need to know the details of the method of communication it is using. A Samsung MDC protocol display in room 1, using RS232 speaks the same language as another Samsung MDC does in the next room using TCP/IP. For these, and most cases where the device doesn't really need to know its communication method, we introduce the `IBasicCommunication` interface.
|
||||
In networked A/V systems, devices can use many different methods of communication. Com ports; TCP/IP sockets; Telnet; SSh... Generally, the data protocol and commands that are sent and received using any of these methods are the same, and it is not necessary for a device to need to know the details of the method of communication it is using. A Samsung MDC protocol display in room 1, using RS232 speaks the same language as another Samsung MDC does in the next room using TCP/IP. For these, and most cases where the device doesn't really need to know its communication method, we introduce the `IBasicCommunication` interface.
|
||||
|
||||
#### Classes covered
|
||||
|
||||
* PepperDash.Core.GenericTcpIpClient
|
||||
* PepperDash.Core.GenericSshClient
|
||||
* PepperDash.Core.GenericSecureTcpIpClient
|
||||
* PepperDash.Essentials.Core.ComPortController
|
||||
* `PepperDash.Core.GenericTcpIpClient`
|
||||
* `PepperDash.Core.GenericSshClient`
|
||||
* `PepperDash.Core.GenericSecureTcpIpClient`
|
||||
* `PepperDash.Essentials.Core.ComPortController`
|
||||
|
||||
#### IBasicCommunication and ISocketStatus
|
||||
#### IBasicCommunicationand ISocketStatus
|
||||
|
||||
All common communication controllers will implement the IBasicCommunication interface, which is an extension of ICommunicationReceiver. This defines receive events, connection state, and send methods. Devices that need to do Com, TCP, SSh or other similar communication will require an IBasicCommunication type object to be injected into them at construction time.
|
||||
|
||||
```
|
||||
All common communication controllers will implement the `IBasicCommunication` interface, which is an extension of `ICommunicationReceiver`. This defines receive events, connection state properties, and send methods. Devices that need to do Com, TCP, SSh or other similar communication will require an `IBasicCommunication` type object to be injected into them at construction time.
|
||||
|
||||
```csharp
|
||||
/// <summary>
|
||||
/// An incoming communication stream
|
||||
/// </summary>
|
||||
@@ -64,7 +63,7 @@ The DeviceManager will contain two new devices after this: The Cisco codec, and
|
||||
|
||||
PepperDash.Core.GenericTcpIpClient, GenericSshClient and other socket controllers implement ISocketStatus, which is an extension of IBasicCommunication. This reveals connection status properties and events.
|
||||
|
||||
```
|
||||
```csharp
|
||||
public interface ISocketStatus : IBasicCommunication
|
||||
{
|
||||
event EventHandler<GenericSocketStatusChageEventArgs> ConnectionChange;
|
||||
|
||||
Reference in New Issue
Block a user