#region --------------- Copyright Dresser Wayne Pignone -------------
/*
* $Log: /Wrk/Support/ForecourtControl/Wrk/ForecourtControl/Com/ITankEvents.cs $
*
* 2 07-03-09 15:34 roger.månsson
* Supply success flag in OnReadCompleted event.
*
* 1 07-01-05 15:13 roger.månsson
* Created
*/
#endregion
using System.Runtime.InteropServices;
namespace Wayne.ForecourtControl.Com
{
///
/// Event interface for ITank
///
[ComVisible(true)]
[InterfaceType( ComInterfaceType.InterfaceIsIDispatch)]
public interface ITankEvents
{
#region Response events
///
/// Event invoked when the ReadAsync request has completed.
///
/// Tank object that raised the event.
/// Indicates if the reading was performed ok.
/// The tank reading that was created due to the read request. If success=false, tankreading will be null.
/// The user token that was specified in the request.
void OnReadCompleted(ITank sender, bool success, ITankReading tankReading, object userToken);
///
/// Event invoked when the RegisterManualTankDippingAsync request has completed.
///
/// Tank object that raised the event.
/// True if the registration succeeded.
/// The user token that was specified in the request.
void OnRegisterManualTankDippingCompleted(ITank sender, bool success, object userToken);
#endregion
#region Unsolicited events
///
/// Event fired when the connection state of the tank changes
///
/// Tank object that raised the event.
/// The new connection state of the tank.
void OnConnectionStateChanged(ITank sender, DeviceConnectionState connectionState);
#endregion
}
}