123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- #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
- {
- /// <summary>
- /// 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.
- /// </summary>
- public interface IFuelling
- {
- #region Properties
- /// <summary>
- /// Fuelling sequence number is a unique number created for ever
- /// completed fuelling. Begins to count from 1 at system cold-start
- /// </summary>
- int FuellingSequenceNumber { get;}
- /// <summary>
- /// Reference to the owning pump.
- /// </summary>
- IPump Pump { get;}
- /// <summary>
- /// The Nozzle object on which this fuelling was made
- /// </summary>
- INozzle Nozzle { get;}
- /// <summary>
- /// 0 if not reserved, else it contains the ClientId of the application
- /// that has reserved the fuelling.
- /// </summary>
- int ReservedBy { get;}
- /// <summary>
- /// "" if not reserved, else it contains the Id of the application
- /// that has authorized the fuelling.
- /// </summary>
- int AuthorizedBy { get; }
- /// <summary>
- /// State of the fuelling.
- /// </summary>
- FuellingState State { get;}
- /// <summary>
- /// Type of fuelling.
- /// </summary>
- FuellingType Type { get;}
- /// <summary>
- /// Filled volume
- /// </summary>
- decimal Quantity { get;}
- /// <summary>
- /// Filled amount in domestic currency value.
- /// </summary>
- decimal Amount { get;}
- /// <summary>
- /// Preset value when the fuelling was released.
- /// </summary>
- decimal PresetValue { get;}
- /// <summary>
- /// Specifies if PresetValue is Amount or Volume.
- /// </summary>
- PresetType PresetType { get;}
- /// <summary>
- /// Price used for the fuelling in domestic currency value.
- /// </summary>
- decimal Price { get;}
- /// <summary>
- /// The date time of when the fuelling was completed.
- /// </summary>
- DateTime CompletionDateTime { get;}
- /// <summary>
- /// A status code indicating what caused ending of the fuelling.
- /// <list type="bullet">
- /// <item>0=Ok</item>
- /// <item>1=Timeout</item>
- /// <item>2=BNT Timeout</item>
- /// <item>3=Disconnected</item>
- /// <item>4=BNT disconnected</item>
- /// <item>5=Stopped</item>
- /// <item>6=Volume or amount decreased</item>
- /// <item>7=Pulser error</item>
- /// <item>8=Pulser current error</item>
- /// <item>9=Zero fuelling</item>
- /// <item>10=No decimals set</item>
- /// <item>11=Price error</item>
- /// <item>12=Volume or amuont garbage</item>
- /// <item>13=Display error</item>
- /// <item>14=Checksum error</item>
- /// </list>
- /// </summary>
- int CompletionReason { get;}
- /// <summary>
- /// Fuel grade used.
- /// </summary>
- int FuelGrade { get;}
- /// <summary>
- /// PriceGroup used.
- /// </summary>
- int PriceGroup { get;}
- /// <summary>
- /// The Fuel period that the fuelling belongs to.
- /// </summary>
- int FuelPeriodId { get;}
- /// <summary>
- /// 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.
- /// </summary>
- long AuthorizationId { get;}
- /// <summary>
- /// Pump accumulator read after completed fuelling. May be null if pump accumulator reading not is supported.
- /// </summary>
- PumpAccumulatorReading PumpAccumulator { get;}
- /// <summary>
- /// Device Id that was supplied in the reservation of the pump before authorization of the fuelling.
- /// </summary>
- byte ReservingDeviceId { get;}
- /// <summary>
- /// Internal Price revision number that was active when the fuelling took place.
- /// </summary>
- byte PriceRevision { get;}
- /// <summary>
- /// Receipt lines to be printed for this fuelling. Contains signing information according to the appropriate regulations. Made for MID approval.
- /// </summary>
- string SignedReceiptLines { get; }
- /// <summary>
- /// Wide format for eceipt lines to be printed for this fuelling. Contains signing information according to the appropriate regulations. Made for MID approval.
- /// </summary>
- string SignedReceiptLinesWide { get; }
- #endregion
- #region Methods
- /// <summary>
- /// 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.
- /// </summary>
- /// <param name="fuellingReserveCompleted">Callback delegate that will be called on completion.</param>
- /// <param name="userToken">A user supplied object that will be returned in the requestCompleted callback.</param>
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
- void ReserveAsync(EventHandler<Wayne.Lib.AsyncCompletedEventArgs> fuellingReserveCompleted, object userToken);
- /// <summary>
- /// Cancel fuelling lock.
- /// </summary>
- /// <param name="requestCompleted"></param>
- /// <param name="userToken">A user supplied object that will be returned in the requestCompleted callback</param>
- void UnreserveAsync(EventHandler<Wayne.Lib.AsyncCompletedEventArgs> requestCompleted, object userToken);
- /// <summary>
- /// 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.
- /// </summary>
- /// <param name="requestCompleted">Callback delegate that will be called on completion.</param>
- /// <param name="userToken">A user supplied object that will be returned in the requestCompleted callback</param>
- void TransferAsync(EventHandler<Wayne.Lib.AsyncCompletedEventArgs> requestCompleted, object userToken);
- /// <summary>
- /// Rolls back the transfer and unreserves the fuelling.
- /// </summary>
- /// <param name="requestCompleted">Callback delegate that will be called on completion.</param>
- /// <param name="userToken">A user supplied object that will be returned in the requestCompleted callback</param>
- void UndoTransferAsync(EventHandler<Wayne.Lib.AsyncCompletedEventArgs> requestCompleted, object userToken);
- /// <summary>
- /// Sets the fuelling to paid state, which means that it will no longer will be availiable in the Fuellings array.
- /// </summary>
- /// <param name="requestCompleted">Callback delegate that will be called on completion.</param>
- /// <param name="userToken">A user supplied object that will be returned in the requestCompleted callback</param>
- void SetAsPaidAsync(EventHandler<Wayne.Lib.AsyncCompletedEventArgs> requestCompleted, object userToken);
- #endregion
- }
- }
|