80 lines
1.9 KiB
C#
80 lines
1.9 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace ExchangeHub.Contracts
|
|
{
|
|
public interface IExchangeHubSlave
|
|
{
|
|
event VoidEventHandler Disposed;
|
|
event DoubleEventHandler StartQ;
|
|
event VoidEventHandler StopQ;
|
|
event VoidEventHandler StartRef;
|
|
event DoubleEventHandler StopRef;
|
|
}
|
|
|
|
[Guid("21EA6C57-A004-456E-8D99-7DCAD3481205")]
|
|
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
|
|
public interface IExchangeHubMaster : IExchangeHubSlave
|
|
{
|
|
bool Connect(string url);
|
|
|
|
void Dispose();
|
|
|
|
void NotifyStartQ(double value = double.MaxValue);
|
|
|
|
void NotifyStopQ();
|
|
|
|
void NotifyStartRef();
|
|
|
|
void NotifyStopRef(double value = double.MaxValue);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Only for COM usage.
|
|
/// Exposes event handlers for the (VB6) master.
|
|
/// </summary>
|
|
[Guid("9FAA6100-E33F-46F7-9151-C85903472388")]
|
|
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
|
|
public interface IExchangeEvents
|
|
{
|
|
/// <summary>
|
|
/// VB6 should start given flow.
|
|
/// </summary>
|
|
void StartQ(double valueM3);
|
|
|
|
/// <summary>
|
|
/// VB6 should stop any flow.
|
|
/// </summary>
|
|
void StopQ();
|
|
|
|
/// <summary>
|
|
/// VB6 should start reference volume messuring.
|
|
/// </summary>
|
|
void StartRef();
|
|
|
|
/// <summary>
|
|
/// VB6 should stop reference volume messuring.
|
|
/// </summary>
|
|
void StopRef(double valueM3);
|
|
|
|
/// <summary>
|
|
/// VB6 should stop all running tasks.
|
|
/// </summary>
|
|
void Disposed();
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>Only for the SignalR host.</para>
|
|
/// <para>Exposes used events as methods.</para>
|
|
/// </summary>
|
|
public interface IExchangeHub : IExchangeEvents
|
|
{
|
|
|
|
}
|
|
|
|
|
|
public delegate void VoidEventHandler();
|
|
|
|
public delegate void DoubleEventHandler(double volumeM3);
|
|
}
|