forked from PHOENIXCONTACT/MORYX-Framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IMessageDriver.cs
26 lines (23 loc) · 854 Bytes
/
IMessageDriver.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright (c) 2023, Phoenix Contact GmbH & Co. KG
// Licensed under the Apache License, Version 2.0
namespace Moryx.AbstractionLayer.Drivers.Message
{
/// <summary>
/// Multi-purpose driver that exchanges information with a device
/// </summary>
public interface IMessageDriver<TMessage> : IDriver, IMessageChannel<TMessage>
{
/// <summary>
/// Flag if the drivers supports identified channels or topics
/// </summary>
bool HasChannels { get; }
/// <summary>
/// Get channel using specialized API
/// </summary>
IMessageChannel<TChannel> Channel<TChannel>(string identifier);
/// <summary>
/// Get channel using specialized API
/// </summary>
IMessageChannel<TSend, TReceive> Channel<TSend, TReceive>(string identifier);
}
}