Update gauge/LiveProd data retrieving
This commit is contained in:
@@ -8,19 +8,19 @@ namespace CMS_CORE_Library.Models
|
||||
#region Thermo models
|
||||
|
||||
/// <summary>
|
||||
/// Represents thermo gauge data
|
||||
/// Represents thermo LIVE prod data (gauge, time adv...)
|
||||
/// </summary>
|
||||
public class GaugeModel
|
||||
public class LiveProdDataModel
|
||||
{
|
||||
public uint TimeAdv { get; set; } = 0;
|
||||
public int Power { get; set; } = 0;
|
||||
public int Vacuum { get; set; } = 0;
|
||||
public int Air { get; set; } = 0;
|
||||
public double TimeAdv { get; set; } = 0;
|
||||
public double Power { get; set; } = 0;
|
||||
public double Vacuum { get; set; } = 0;
|
||||
public double Air { get; set; } = 0;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
// Object is not a GaugeModel instance
|
||||
if (!(obj is GaugeModel item))
|
||||
if (!(obj is LiveProdDataModel item))
|
||||
return false;
|
||||
|
||||
if (TimeAdv != item.TimeAdv)
|
||||
|
||||
@@ -728,7 +728,7 @@ namespace CMS_CORE_Library
|
||||
/// <returns cref="CmsError">Returns an error when an internal or a library error occours</returns>
|
||||
/// </summary>
|
||||
/// <param name="gaugeData">Reference to the value of the gauge data</param>
|
||||
public abstract CmsError PLC_RGaugeData(ref ThermoModels.GaugeModel gaugeData);
|
||||
public abstract CmsError PLC_RGaugeData(ref ThermoModels.LiveProdDataModel gaugeData);
|
||||
/// <summary>
|
||||
/// Get current Production Info data
|
||||
/// </summary>
|
||||
|
||||
@@ -2198,7 +2198,7 @@ namespace CMS_CORE_Library.S7Net
|
||||
/// </summary>
|
||||
/// <param name="gaugeData"></param>
|
||||
/// <returns></returns>
|
||||
public override CmsError PLC_RGaugeData(ref ThermoModels.GaugeModel gaugeData)
|
||||
public override CmsError PLC_RGaugeData(ref ThermoModels.LiveProdDataModel gaugeData)
|
||||
{
|
||||
List<int> Values = new List<int>();
|
||||
CmsError libraryError = MEM_RWIntegerList(R, 1, MACHINE_GAUGE_DATA.MemType, MACHINE_GAUGE_DATA.Address, MACHINE_GAUGE_DATA.SubAddress, MACHINE_GAUGE_DATA.Size / 4, ref Values);
|
||||
@@ -2206,7 +2206,7 @@ namespace CMS_CORE_Library.S7Net
|
||||
if (libraryError.IsError())
|
||||
return libraryError;
|
||||
|
||||
gaugeData = new ThermoModels.GaugeModel()
|
||||
gaugeData = new ThermoModels.LiveProdDataModel()
|
||||
{
|
||||
TimeAdv = Convert.ToUInt32(Values[0]),
|
||||
Power = Values[1],
|
||||
|
||||
Reference in New Issue
Block a user