ReSharper on DataPackages
This commit is contained in:
+2
-3
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using Xylem.Common.CommonCore.Consts;
|
||||
using Xylem.Common.Metrology.Measurements;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecords
|
||||
@@ -31,12 +30,12 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages.MeasurementRecor
|
||||
/// <summary>
|
||||
/// total time of flight in cordonel units
|
||||
/// </summary>
|
||||
public Int32 RAWTotalTimeOfFlight;
|
||||
public Int32 RawTotalTimeOfFlight;
|
||||
|
||||
/// <summary>
|
||||
/// delta time of flight in cordonel units
|
||||
/// </summary>
|
||||
public Int32 RAWDeltaTimeOfFlight;
|
||||
public Int32 RawDeltaTimeOfFlight;
|
||||
|
||||
/// <summary>
|
||||
/// volume scale (default: 1024) means
|
||||
|
||||
@@ -1,21 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages
|
||||
{
|
||||
//obs
|
||||
|
||||
/// <summary>
|
||||
/// All parameters needed for radio setup
|
||||
/// </summary>
|
||||
public class RadioConfigurationParams
|
||||
{
|
||||
public string PcbId;
|
||||
/// <summary>
|
||||
/// Pcb identification
|
||||
/// </summary>
|
||||
public String PcbId;
|
||||
/// <summary>
|
||||
/// Serial number
|
||||
/// </summary>
|
||||
public UInt32 SerialNumber;
|
||||
/// <summary>
|
||||
/// Radio address
|
||||
/// </summary>
|
||||
public UInt32 RadioAddress;
|
||||
/// <summary>
|
||||
/// Power level
|
||||
/// </summary>
|
||||
public UInt32 PowerLevel;
|
||||
/// <summary>
|
||||
/// Power level option
|
||||
/// </summary>
|
||||
public UInt32 PowerLevelOption;
|
||||
/// <summary>
|
||||
/// New code for impedance
|
||||
/// </summary>
|
||||
public UInt32 ImpedanceCodeNew;
|
||||
/// <summary>
|
||||
/// Impedance code option
|
||||
/// </summary>
|
||||
public UInt32 ImpedanceCodeOption;
|
||||
/// <summary>
|
||||
/// Encryption key
|
||||
/// </summary>
|
||||
public Byte[] EncryptionKey;
|
||||
|
||||
public short? FrqOffset { get; set; }
|
||||
/// <summary>
|
||||
/// Frequency offset
|
||||
/// </summary>
|
||||
public Int16? FrqOffset { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class RegisterToDb
|
||||
{
|
||||
public RegisterToDb(byte[] adresse, byte[] value)
|
||||
/// <summary>
|
||||
/// Register address and value to DB
|
||||
/// </summary>
|
||||
/// <param name="adresse"></param>
|
||||
/// <param name="value"></param>
|
||||
public RegisterToDb(Byte[] adresse, Byte[] value)
|
||||
{
|
||||
Adresse = adresse;
|
||||
Value = value;
|
||||
}
|
||||
public byte[] Adresse;
|
||||
public byte[] Value;
|
||||
/// <summary>
|
||||
/// Address
|
||||
/// </summary>
|
||||
public Byte[] Adresse;
|
||||
/// <summary>
|
||||
/// Value
|
||||
/// </summary>
|
||||
public Byte[] Value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Xylem.Common.Hardware.WaterMeter.Genesis.DataPackages
|
||||
{
|
||||
/// <summary>
|
||||
/// Temperature Time Of Flight calculation
|
||||
/// </summary>
|
||||
public struct TempTofCalc
|
||||
{
|
||||
private DateTime refDate;
|
||||
private double refTemp;
|
||||
private double tof;
|
||||
private DateTime _refDate;
|
||||
private Double _refTemp;
|
||||
private Double _tof;
|
||||
|
||||
public DateTime RefDate { get => refDate; set => refDate = value; }
|
||||
public double RefTemp { get => refTemp; set => refTemp = value; }
|
||||
public double Tof { get => tof; set => tof = value; }
|
||||
/// <summary>
|
||||
/// Reference data
|
||||
/// </summary>
|
||||
public DateTime RefDate { get => _refDate; set => _refDate = value; }
|
||||
/// <summary>
|
||||
/// Reference temperature
|
||||
/// </summary>
|
||||
public Double RefTemp { get => _refTemp; set => _refTemp = value; }
|
||||
/// <summary>
|
||||
/// Time Of Flight
|
||||
/// </summary>
|
||||
public Double Tof { get => _tof; set => _tof = value; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -371,9 +371,9 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.StreamingProtocol
|
||||
|
||||
|
||||
|
||||
dataProtHRec.RAWTotalTimeOfFlight =
|
||||
dataProtHRec.RawTotalTimeOfFlight =
|
||||
int.Parse(field[(Int32)ProtHsubString.Ttof], NumberStyles.AllowHexSpecifier);
|
||||
dataProtHRec.RAWDeltaTimeOfFlight = int.Parse(field[(Int32)ProtHsubString.Dtof], NumberStyles.AllowHexSpecifier);
|
||||
dataProtHRec.RawDeltaTimeOfFlight = int.Parse(field[(Int32)ProtHsubString.Dtof], NumberStyles.AllowHexSpecifier);
|
||||
|
||||
//Delta raw volume between two samples
|
||||
dataProtHRec.DeltaVolumeRaw = uint.Parse(field[(Int32)ProtHsubString.RawDVolume],
|
||||
|
||||
Reference in New Issue
Block a user