#region --------------- Copyright Dresser Wayne Pignone ------------- /* * $Log: /Wrk/Support/ForecourtControl/Wrk/ForecourtControl/Com/IForecourtControl.cs $ * * 6 07-11-14 20:20 roger.månsson * Added SetupLogging method. * * 5 07-03-09 15:32 roger.månsson * Added price poles. * * 4 07-02-16 9:59 roger.månsson * FxCop changes * * 3 07-01-05 15:14 roger.månsson * Added TankGroups property * * 2 07-01-05 9:01 roger.månsson * Documentation changes */ #endregion //using Wayne.Lib; using System.Runtime.InteropServices; namespace Wayne.ForecourtControl.Com { /// /// The ForecourtControl object is the main root object to the Forecourtcontrol object hiearchy. It owns a list of pumps, and provides /// functionality to control the site. /// [ComVisible(true)] //[InterfaceType( ComInterfaceType.InterfaceIsDual)] public interface IForecourtControl { #region Properties /// /// ClientId in the communicationClientName in the communication to the Forecourt Controller. /// int ClientId { get;} /// /// ClientName in the communication to the Forecourt Controller. /// string ClientName { get;} /// /// Tells whether the site is open or closed. /// bool SiteOpened { get;} /// /// This property tells the operation mode of the site according to the pre-configured pump operation. Typically the configuration has been pre-defined with /// day, Night and rush hour operation modes, but this interface does not restrict which site mode that is used as day, night and rush-hour. /// int SiteMode { get;} /// /// The collection of pump objects. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] IPump[] Pumps { get;} /// /// A list of the current fuel prices. The fuel prices can be modified when they are reserved through /// a call to ReserveFuelPricesAsync. The changes are committed through calling the ActivateFuelPricesAsync. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] IFuelPrice[] FuelPrices { get;} /// /// A list of the tank groups configured on the station. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] ITankGroup[] TankGroups { get;} /// /// A list of the price poles configured at the station. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")] IPricePole[] PricePoles { get;} #endregion #region Methods #region SetSiteOpened /// /// Opens or closes the station. /// /// True if the station should be opened, and false if it should be closed. /// A user supplied object that will be returned in the requestCompleted callback void SetSiteOpenedAsync(bool opened, object userToken); #endregion #region SetSiteMode /// /// Sets the site mode. The pumps can be set in different modes for different site modes. This /// enables the option to have different day/night/rush modes of the station. /// /// The new site mode. /// A user supplied object that will be returned in the requestCompleted callback void SetSiteModeAsync(int siteMode, object userToken); #endregion #region ReserveFuelPrices /// /// Reserves the fuel prices so they can be changed by this client. /// /// A user supplied object that will be returned in the requestCompleted callback void ReserveFuelPricesAsync(object userToken); #endregion #region UnreserveFuelPrices /// /// Releases the fuel price reservation. If the fuel prices were no reserved, the function will still return success=true. /// Changes made to the fuel prices will be undone. /// /// A user supplied object that will be returned in the requestCompleted callback void UnreserveFuelPricesAsync(object userToken); #endregion #region ActivateFuelPrices /// /// Activates the fuel prices, and triggers a new Fuel period when the prices has been activated. /// Note that it can take several minutes before all price signs and pumps have been updated. /// The FuelPrice reservation is released, so UnreserveFuelPricesAsync must not be called afterwards. /// /// A user supplied object that will be returned in the requestCompleted callback void ActivateFuelPricesAsync(object userToken); #endregion #region SetupLoggin /// /// Sets up the logging for ALL Wayne libraries loaded in the process. /// /// File name and path for the log configuration file. void SetupLogging(string logConfigFileName); #endregion #endregion #region IConnectable - substitute /// /// Current connection state of the forecourt control. /// DeviceConnectionState ConnectionState { get; } /// /// Tries to connect the forecourt control using the specified connection string. /// /// void Connect(string connectionString); /// /// Disconnects the forecourt control. /// void Disconnect(); #endregion } }