#region --------------- Copyright Dresser Wayne Pignone -------------
/*
* $Log: /Wrk/Support/ForecourtControl/Wrk/ForecourtControl/PumpAccumulatorReading.cs $
*
* 1 07-01-05 15:12 roger.månsson
* Created
*/
#endregion
namespace Wayne.ForecourtControl
{
///
/// Data structure for one pump accumulator reading.
///
public class PumpAccumulatorReading : Com.IPumpAccumulatorReading
{
#region Fields
IPump pump;
INozzle nozzle;
int fuelPeriodId;
PumpAccumulatorReadingType type;
decimal quantity;
decimal amount;
Com.IPump comPump;
Com.INozzle comNozzle;
#endregion
#region Construction
///
/// Private constructor called by the public constructors.
///
///
///
///
///
private PumpAccumulatorReading(int fuelPeriodId, PumpAccumulatorReadingType type,
decimal quantity, decimal amount)
{
this.fuelPeriodId = fuelPeriodId;
this.type = type;
this.quantity = quantity;
this.amount = amount;
}
///
/// Constructor for the .Net version
///
///
///
///
///
///
///
public PumpAccumulatorReading(IPump pump, INozzle nozzle, int fuelPeriodId,
PumpAccumulatorReadingType type, decimal quantity, decimal amount)
: this(fuelPeriodId, type, quantity, amount)
{
this.pump = pump;
this.nozzle = nozzle;
}
///
/// Constructor for the COM version
///
///
///
///
///
///
///
public PumpAccumulatorReading(Com.IPump pump, Com.INozzle nozzle, int fuelPeriodId,
PumpAccumulatorReadingType type, decimal quantity, decimal amount)
: this(fuelPeriodId, type, quantity, amount)
{
this.comPump = pump;
this.comNozzle = nozzle;
}
#endregion
#region Properties
///
/// Pump that made the reading.
///
public IPump Pump
{
get { return pump; }
}
///
/// The nozzle that the reading was done for.
///
public INozzle Nozzle
{
get { return nozzle; }
}
///
/// Fuel period that the reading was made in.
///
public int FuelPeriodId
{
get { return fuelPeriodId; }
}
///
/// Type of accumulator reading.
///
public PumpAccumulatorReadingType Type
{
get { return type; }
}
///
/// Read quantity
///
public decimal Quantity
{
get { return quantity; }
}
///
/// Read amount
///
public decimal Amount
{
get { return amount; }
}
#endregion
#region IPumpAccumulatorReading Members
Wayne.ForecourtControl.Com.IPump Wayne.ForecourtControl.Com.IPumpAccumulatorReading.Pump
{
get { return comPump; }
}
Wayne.ForecourtControl.Com.INozzle Wayne.ForecourtControl.Com.IPumpAccumulatorReading.Nozzle
{
get { return comNozzle; }
}
#endregion
}
}