#region --------------- Copyright Dresser Wayne Pignone ------------- /* * $Log: /Wrk/Support/ForecourtControl/Wrk/ForecourtControl/IFuelling.cs $ * * 6 08-01-03 16:28 roger.månsson * Added PriceRevision * * 5 07-12-20 12:11 roger.månsson * Added ReservingDeviceId to IFuelling. * * 4 07-01-05 15:10 roger.månsson * * 3 07-01-05 8:59 roger.månsson * Changed docs */ #endregion using System; namespace Wayne.ForecourtControl { /// /// Represents a fuelling. It provides properties to display Amount, Volume and so on for a fuelling. If the fuelling /// is reserved, the fuelling can be manipulated through the IReservedFuelling interface. /// 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;} /// /// "" if not reserved, else it contains the Id of the application /// that has authorized the fuelling. /// int AuthorizedBy { get; } /// /// State of the fuelling. /// FuellingState State { get;} /// /// Type of fuelling. /// FuellingType Type { get;} /// /// Filled volume /// decimal Quantity { get;} /// /// Filled amount in domestic currency value. /// decimal Amount { get;} /// /// Preset value when the fuelling was released. /// decimal PresetValue { get;} /// /// Specifies if PresetValue is Amount or Volume. /// PresetType PresetType { get;} /// /// Price used for the fuelling in domestic currency value. /// decimal Price { 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. /// long AuthorizationId { get;} /// /// Pump accumulator read after completed fuelling. May be null if pump accumulator reading not is supported. /// PumpAccumulatorReading PumpAccumulator { get;} /// /// Device Id that was supplied in the reservation of the pump before authorization of the fuelling. /// byte ReservingDeviceId { get;} /// /// Internal Price revision number that was active when the fuelling took place. /// byte PriceRevision { get;} /// /// Receipt lines to be printed for this fuelling. Contains signing information according to the appropriate regulations. Made for MID approval. /// string SignedReceiptLines { get; } /// /// Wide format for eceipt lines to be printed for this fuelling. Contains signing information according to the appropriate regulations. Made for MID approval. /// string SignedReceiptLinesWide { get; } #endregion #region Methods /// /// 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. /// /// Callback delegate that will be called on completion. /// A user supplied object that will be returned in the requestCompleted callback. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")] void ReserveAsync(EventHandler fuellingReserveCompleted, object userToken); /// /// Cancel fuelling lock. /// /// /// A user supplied object that will be returned in the requestCompleted callback void UnreserveAsync(EventHandler requestCompleted, object userToken); /// /// 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. /// /// Callback delegate that will be called on completion. /// A user supplied object that will be returned in the requestCompleted callback void TransferAsync(EventHandler requestCompleted, object userToken); /// /// Rolls back the transfer and unreserves the fuelling. /// /// Callback delegate that will be called on completion. /// A user supplied object that will be returned in the requestCompleted callback void UndoTransferAsync(EventHandler requestCompleted, object userToken); /// /// Sets the fuelling to paid state, which means that it will no longer will be availiable in the Fuellings array. /// /// Callback delegate that will be called on completion. /// A user supplied object that will be returned in the requestCompleted callback void SetAsPaidAsync(EventHandler requestCompleted, object userToken); #endregion } }