#region --------------- Copyright Dresser Wayne Pignone ------------- /* * $Log: /Wrk/Support/ForecourtControl/Wrk/ForecourtControl/Com/IFuelling.cs $ * * 4 07-02-27 12:35 roger.månsson * Set decimal MarshalAs Currency to be better compliant with COM. * * 3 07-01-05 15:14 roger.månsson * Added PumpAccumulator property * * 2 07-01-05 9:01 roger.månsson * Documentation changes */ #endregion using System; using System.Runtime.InteropServices; namespace Wayne.ForecourtControl.Com { /// /// Represents a fuelling. It provides properties to display Amount, Volume and so on for a fuelling. It does /// also give the possibilities to change the state of the fuelling and eventually get it removed when it is paid. /// [System.Runtime.InteropServices.ComVisible(true)] public interface IFuelling { #region Properties /// /// Fuelling sequence number is a unique number created for ever /// completed fuelling. Begins to count from 1 at system cold-start /// int FuellingSequenceNumber { get;} /// /// Reference to the owning pump. /// IPump Pump { get;} /// /// The Nozzle object on which this fuelling was made /// INozzle Nozzle { get;} /// /// 0 if not reserved, else it contains the ClientId of the application /// that has reserved the fuelling. /// int ReservedBy { get;} /// /// State of the fuelling. /// FuellingState State { get;} /// /// Type of fuelling. /// FuellingType Type { get;} /// /// Filled volume /// decimal Quantity { [return:MarshalAs( UnmanagedType.Currency)] get;} /// /// Filled amount in domestic currency value. /// decimal Amount { [return: MarshalAs(UnmanagedType.Currency)]get;} /// /// Preset value when the fuelling was released. /// decimal PresetValue { [return: MarshalAs(UnmanagedType.Currency)]get;} /// /// Specifies if PresetValue is Amount or Volume. /// PresetType PresetType { get;} /// /// Price used for the fuelling in domestic currency value. /// decimal Price { [return: MarshalAs(UnmanagedType.Currency)]get;} /// /// The date time of when the fuelling was completed. /// DateTime CompletionDateTime { get;} /// /// A status code indicating what caused ending of the fuelling. /// /// 0=Ok /// 1=Timeout /// 2=BNT Timeout /// 3=Disconnected /// 4=BNT disconnected /// 5=Stopped /// 6=Volume or amount decreased /// 7=Pulser error /// 8=Pulser current error /// 9=Zero fuelling /// 10=No decimals set /// 11=Price error /// 12=Volume or amuont garbage /// 13=Display error /// 14=Checksum error /// /// int CompletionReason { get;} /// /// Fuel grade used. /// int FuelGrade { get;} /// /// PriceGroup used. /// int PriceGroup { get;} /// /// The Fuel period that the fuelling belongs to. /// int FuelPeriodId { get;} /// /// An identifiaction of the authorization that is originally returned in the /// async callback for the IReservePump.AuthorizeAsync. It is used to match the /// authorization with the fuelling completion. /// int AuthorizationId { get;} /// /// Pump accumulator read after completed fuelling. May be null if pump accumulator reading not is supported. /// IPumpAccumulatorReading PumpAccumulator { get;} #endregion #region Methods #region Reserve /// /// Reserves the fuelling for exclusive use. When the fuelling is successfully reserved, the ReservedBy property will /// be set to the ClientId of the reserving client. /// /// A user supplied object that will be returned in the requestCompleted callback. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] void ReserveAsync(object userToken); #endregion #region UnreserveAsync /// /// Cancel fuelling lock. /// /// A user supplied object that will be returned in the requestCompleted callback void UnreserveAsync(object userToken); #endregion #region Transfer /// /// Changes the state of the fuelling to Transferred. /// If the fuelling is not already reserved, that is done implicitly, and must succeed before the /// transfer can succeed. /// /// A user supplied object that will be returned in the requestCompleted callback void TransferAsync(object userToken); #endregion #region UndoTransfer /// /// Rolls back the transfer and unreserves the fuelling. /// /// A user supplied object that will be returned in the requestCompleted callback void UndoTransferAsync(object userToken); #endregion #region SetAsPaid /// /// Sets the fuelling to paid state, which means that it will no longer will be availiable in the Fuellings array. /// /// A user supplied object that will be returned in the requestCompleted callback void SetAsPaidAsync(object userToken); #endregion #endregion } }