long time noc commit

This commit is contained in:
Roland Drabesch
2023-11-27 16:54:53 +01:00
parent c4e4381a20
commit 04ff12ecb5
65 changed files with 2430 additions and 157 deletions
+15 -1
View File
@@ -46,6 +46,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ProgramLogFileHelper.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
@@ -54,6 +55,19 @@
<None Include="configuration.json" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<ProjectReference Include="..\Logic\ServiceCore\ServiceCore.csproj">
<Project>{F7E3DF42-4D35-4A0C-9182-90438F9956E1}</Project>
<Name>ServiceCore</Name>
</ProjectReference>
<ProjectReference Include="..\Service\MeterProcessState\MeterProcessState.csproj">
<Project>{1057AD21-BA22-4CAB-B3FE-88C5C9980E6A}</Project>
<Name>MeterProcessState</Name>
</ProjectReference>
<ProjectReference Include="..\Utils\ByteArrayStyle\ByteArrayStyle.csproj">
<Project>{8A619CD5-6C8D-420C-A132-7946C6F13E6E}</Project>
<Name>ByteArrayStyle</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
File diff suppressed because it is too large Load Diff
@@ -106,6 +106,9 @@
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<PropertyGroup />
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
@@ -87,6 +87,7 @@
// nUD_TempField_Celsius
//
this.nUD_TempField_Celsius.Anchor = System.Windows.Forms.AnchorStyles.None;
this.nUD_TempField_Celsius.BackColor = System.Drawing.SystemColors.InactiveCaption;
this.nUD_TempField_Celsius.DecimalPlaces = 1;
this.nUD_TempField_Celsius.Increment = new decimal(new int[] {
1,
@@ -7,6 +7,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
using Xylem.Common.Logic.SoftwareAccessHelper;
using Xylem.Common.Ui.CordonelPreadjustmentUi.Helper.Extensions;
@@ -292,7 +293,7 @@ namespace CordonelPreadjustmentUi
}
private TempMode MeterTempMode;
public TempMode MeterTempMode;
private List<Tuple<double, double>> TempFromTofLUT;
internal void StartTempWatch(TempMode tempMode = TempMode.Hand)
{
@@ -308,40 +309,24 @@ namespace CordonelPreadjustmentUi
var pcbid = "notFound";
try
{
pcbid = Meter.GetPcbId();
if (string.IsNullOrEmpty(pcbid))
if (Meter.Slot == 11)
{
pcbid = Meter.GetPcbId();
if (string.IsNullOrEmpty(pcbid))
{
if (Meter.Slot == 11)
{
pcbid = "193400550";
Meter.WriteLog($"Fake pcbid {pcbid} for 2016 slot 11");
}
else if (Meter.Slot == 12)
{
pcbid = "193400388";
Meter.WriteLog($"Fake pcbid {pcbid} for 2016 slot 12");
}
}
pcbid = "193400032";
OverridePassword = "42133FF3682D";
Meter.WriteLog($"Fake pcbid {pcbid} for 2015 slot 11");
}
if (string.IsNullOrEmpty(pcbid) || pcbid.Length < 5 || pcbid.Length == "1934193400388".Length)
else if (Meter.Slot == 12)
{
if (Meter.Slot == 11)
{
pcbid = "193400550";
Meter.WriteLog($"Fake pcbid {pcbid} for 2016 slot 11");
}
else if (Meter.Slot == 12)
{
pcbid = "193400388";
Meter.WriteLog($"Fake pcbid {pcbid} for 2016 slot 12");
}
pcbid = "193400550";
OverridePassword = "42133FF37D41";
Meter.WriteLog($"Fake pcbid {pcbid} for 2015 slot 12");
}
//Meter.Login(OverridePassword);
//Meter.WriteRegister(Register.Genesisflow.TriggerIdle, 0);
//Meter.WriteRegister(Register.Genesisflow.LedMode, 6);
//Meter.WriteRegister(Register.Genesisflow.SampleRate, 10);
var resp = LocalWebRequest.GetRequest($"http://10.49.40.25/MeterProcessState/api/TempFlange/GetLut?PcbId={pcbid}", 50000);
@@ -576,6 +576,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.Controls.Add(this.lblBuildDate);
this.Controls.Add(this.cb_Metersize);
this.Controls.Add(this.l_SettingsPreparationMetersize);
@@ -88,6 +88,7 @@ namespace CordonelPreadjustmentUi
TempMeterStateCtls.Add(ctl);
gB_TempMeters.Controls.Add(ctl);
ctl.OnRequestDetails += Ctl_MouseEnter;
ctl.DoubleClick += Clt_ReConnect;
tmpI = tmpI + 1;
ctl.Enabled = true;
@@ -126,7 +127,6 @@ namespace CordonelPreadjustmentUi
{
}
private void Ctl_MouseEnter(object sender, EventArgs e)
{
if (sender is MeterStateControl meterStateCtl)
@@ -146,6 +146,22 @@ namespace CordonelPreadjustmentUi
}
private void Clt_ReConnect(object sender, EventArgs e)
{
if (sender is TempMeterStateControl meterStateCtl)
{
if (this.InvokeRequired)
{
this.Invoke((Action<object, EventArgs>)Clt_ReConnect, sender, e);
return;
}
meterStateCtl.StartTempWatch(meterStateCtl.MeterTempMode);
}
}
public void SetTestBenchTemp(double temp)
{
if (pp != null)
@@ -1686,7 +1702,7 @@ namespace CordonelPreadjustmentUi
listOfProgrammParts.Add(new FlushProcess("First Flush", StatusPanelItems.Detect, PredefinedMessages.WaitUntilFlushFinished(pp.Setting.Culture), string.Empty, 2 * 60));
listOfProgrammParts.Add(new PressureTestProcess("PreussureTest", StatusPanelItems.Prepare, PredefinedMessages.WaitUntilPreparationFinished(pp.Setting.Culture), PredefinedMessages.PreparationFailed(pp.Setting.Culture), 1 * 60));
//listOfProgrammParts.Add(new PressureTestProcess("PreussureTest", StatusPanelItems.Prepare, PredefinedMessages.WaitUntilPreparationFinished(pp.Setting.Culture), PredefinedMessages.PreparationFailed(pp.Setting.Culture), 1 * 60));
listOfProgrammParts.Add(new PreparationProcess("Preparation", StatusPanelItems.Prepare, PredefinedMessages.WaitUntilPreparationFinished(pp.Setting.Culture), PredefinedMessages.PreparationFailed(pp.Setting.Culture), 1 * 60));
@@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
using static CordonelPreadjustmentUi.PreAdjustmentControl;
namespace CordonelPreadjustmentUi.Processes.Actions
@@ -34,8 +35,40 @@ namespace CordonelPreadjustmentUi.Processes.Actions
if (pp.Setting.GetTempUseTempFlansh())
{
pp.DebugMessage($"Load Temp {tempmeterctl.Slot} with {MeterStateControl.TempMode.CalcTof}\n");
if (tempmeterctl.Meter.Slot == 11)
{
tempmeterctl.OverridePassword = "42133FF3682D";
}
else if (tempmeterctl.Meter.Slot == 12)
{
tempmeterctl.OverridePassword = "42133FF37D41";
}
var Result = string.IsNullOrEmpty(tempmeterctl.OverridePassword)
? tempmeterctl.Meter.Login()
: tempmeterctl.Meter.Login(tempmeterctl.OverridePassword);
if (!Result)
{
if (!tempmeterctl.Meter.Login(tempmeterctl.OverridePassword))
{
pp.DebugMessage($"Login to Flansch failed");
pp.Aborted = true;
}
}
Thread.Sleep(100);
pp.DebugMessage($"Load Temp {tempmeterctl.Slot} with {MeterStateControl.TempMode.CalcTof}\n");
tempmeterctl.Meter.WriteRegister(Register.Genesisflow.TriggerIdle, 0);
tempmeterctl.Meter.WriteRegister(Register.Genesisflow.LedMode, 6);
tempmeterctl.Meter.WriteRegister(Register.Genesisflow.SampleRate, 10);
try
{
tempmeterctl.StartTempWatch(MeterStateControl.TempMode.CalcTof);
@@ -104,6 +137,7 @@ namespace CordonelPreadjustmentUi.Processes.Actions
meterctl.Failed = !Result;
if (!Result)
{
pp.DebugMessage($"{ProcessName} procedure failed", meterctl.Slot, "APP", meterctl.Meter.PcbId);
//pp.GenerateReturnNote(PredefinedMessages.LoginFailed(pp.Setting.Culture), meterctl);
}
@@ -51,7 +51,7 @@ namespace CordonelPreadjustmentUi.Processes.Actions
foreach (var avgTempCtls in listOFEnabledTempMeters)
{
var check = avgTempCtls.GetTemperature();
if (check > 2 || ((double)check) != 25.0d )
if (check > 5 && (double)check != 25.0d )
{
avgTemp = avgTemp + avgTempCtls.GetTemperature();
TempFlanshCount = TempFlanshCount + 1;
@@ -61,7 +61,11 @@ namespace CordonelPreadjustmentUi.Processes.Actions
}
if (TempFlanshCount == 0)
{
System.Windows.Forms.MessageBox.Show("Fehler beim auslesen der TemperaturFlansche. Bitte per Hand eingeben");
skipMan = false;
pp.RequestTempretureSelection();
}
else
{
@@ -80,12 +84,12 @@ namespace CordonelPreadjustmentUi.Processes.Actions
//manual input
foreach (var meterctl in MetersToProcess)
{
meterctl.SetTemperature((decimal)25.0);
meterctl.SetTemperature((decimal)0);
}
pp.RequestTemperatur();
foreach (var meterctl in TempMeterStateCtls)
{
meterctl.SetTemperature((decimal)25.0);
meterctl.SetTemperature((decimal)0);
meterctl.OnTempretureChangedHandler += delegate (Object sender, EventArgsDecimal d)
{
decimal avgTemp = 0;
@@ -144,6 +148,11 @@ namespace CordonelPreadjustmentUi.Processes.Actions
{
var originTemp = putTempIntoMeter.GetTemperature();
if (originTemp == (decimal)25.0 || originTemp == (decimal)1 || originTemp == (decimal)0)
{
pp.DebugMessage($"Temperature check failed - default", putTempIntoMeter.Meter.Slot, "APP", putTempIntoMeter.Meter.PcbId);
return false;
}
UInt32 TempToRegister = (UInt32)(originTemp * 4096);
#region Set temperature calibration register
@@ -102,7 +102,7 @@ namespace CordonelPreadjustmentUi.Processes.Itinerary
public event EventHandler<EventArgsBool> OnBubblesChanged;
public event EventHandler<EventArgsBool> OnRequestTempretureSelection;
internal void RequestTempretureSelection()
public void RequestTempretureSelection()
{
if (OnRequestTempretureSelection == null)
{
@@ -2018,7 +2018,10 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
try
{
Logout();
//todo only from Bench
//WriteRegister<Byte>(Register.Genesisflow.SampleRate, 2, checkRegister: true);
//WriteRegister(Register.Genesisflow.LedMode, 0, checkRegister: true);
//Logout();
}
catch (Exception)
{
@@ -2396,6 +2399,14 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
}
}
}
public void TestBenchDispose()
{
if (IsLoggedOn)
{
}
}
#endregion
}
}
@@ -47,7 +47,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore
{
if (!SkipPreparationForTestBench)
{
SkipPreparationForTestBench = true;
//SkipPreparationForTestBench = true;
//TODO set display unit
//TODO calculated overflow volume for display
WriteRegister<Byte>(Register.Genesisflow.SampleRate, 16, checkRegister: true);
@@ -100,7 +100,7 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisPwd
{
var url = ServiceUrls.GenesisGetPasswordContainerServiceUrl();
var requestResponse = LocalWebRequest.GetRequestWithError(url + pcbId, out var errorCode, 20000, isRetry: true);
var requestResponse = LocalWebRequest.GetRequestWithError(url + pcbId, out var errorCode, 30000, isRetry: true);
if (errorCode == HttpStatusCode.OK.GetHashCode())
{
passwordContainer = JsonConvert.DeserializeObject<MeterPwdDb>(requestResponse);
@@ -123,5 +123,8 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisStatus
/// Date of approval.
/// </summary>
public DateTime ApprovalDate;
public Double UNTLimit { get; internal set; } = 0;
public Boolean UNTStatus { get; internal set; } = false;
}
}
@@ -136,6 +136,8 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.GenesisStatus
// convert the seconds to years
status.RemainingLifeTimeYears = remainingLifetime_s / 3600 / 24 / 365.25;
status.UNTLimit = 1368000000 + (status.ExceededLifeTime_s * 77.7);
status.UNTStatus = status.UNTLimit >= status.DrainedBatteryLoad_uAs;
return retVal;
}
}
@@ -600,15 +600,41 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol
Byte[] payload = null, Int32 expectedLength = 4, Boolean hideDataInLog = false,
UInt16 skipRetryErrorCode = CommunicationConfig.SkipRetryErrorCode)
{
//if (command == Commands.MultipleReadData && meterRegister != null && meterRegister.DataType == typeof(String))
//{
// var completeResponse = new List<Byte>();
// while (!completeResponse.Contains(0))
// {
// var cRecord = CommandToMeter(Commands.ReadData, meterRegister, payload, 4, hideDataInLog,
// skipRetryErrorCode);
// var rest = ProcessRecordList();
// if (rest == RequestAcknowledgeState.Ok && cRecord?.ResponsePayload != null)
// {
// completeResponse.AddRange(cRecord.ResponsePayload);
// if (cRecord.ResponsePayload.Contains(0))
// {
// cRecord.ResponsePayload = completeResponse;
// OnMeterRegisterUpdated?.Invoke(this,
// new RegisterUpdatedEventArgs(meterRegister, completeResponse.ToArray()));
// return cRecord;
// }
// }
// else
// {
// }
// }
//}
if (command == Commands.MultipleReadData && meterRegister != null && meterRegister.DataType == typeof(String))
{
var completeResponse = new List<Byte>();
while (!completeResponse.Contains(0))
//TODO THW check this including the recursive call CommandToMeter
while (true)
{
var cRecord = CommandToMeter(Commands.ReadData, meterRegister, payload, 4, hideDataInLog,
skipRetryErrorCode);
var cRecord = CommandToMeter(Commands.ReadData, meterRegister, payload, expectedLength,
hideDataInLog, skipRetryErrorCode);
var rest = ProcessRecordList();
if (rest == RequestAcknowledgeState.Ok && cRecord?.ResponsePayload != null)
if (rest == RequestAcknowledgeState.Ok && cRecord != null && cRecord.ResponsePayload != null)
{
completeResponse.AddRange(cRecord.ResponsePayload);
if (cRecord.ResponsePayload.Contains(0))
@@ -616,9 +642,40 @@ namespace Xylem.Common.Hardware.WaterMeter.Genesis.Protocols.RequestProtocol
cRecord.ResponsePayload = completeResponse;
OnMeterRegisterUpdated?.Invoke(this,
new RegisterUpdatedEventArgs(meterRegister, completeResponse.ToArray()));
if (completeResponse.Count < expectedLength)
{
_logger.Debug("Too Short. Payload contains zero");
}
return cRecord;
}
}
else
{
if (completeResponse.Any() &&
completeResponse.Count < expectedLength)
{
if (rest != RequestAcknowledgeState.Ok)
{
_logger.Debug($"Too Short.Request Acknowledge State is {rest}");
}
else if (cRecord == null)
{
_logger.Debug("Too Short.Record is empty or null");
}
else if (cRecord.ResponsePayload == null)
{
_logger.Debug("Too Short.ResponsePayload is empty or null");
}
else
{
_logger.Debug("Too Short.Unkown reason");
}
}
return cRecord;
}
}
}
//the minimum payload is one 4 byte chunk
@@ -1206,6 +1206,11 @@ namespace Xylem.Common.Hardware.WaterMeter.MagFlux.MagFluxCore
}
}
}
public void TestBenchDispose()
{
//nothing to do
}
#endregion
}
}
@@ -0,0 +1,12 @@
namespace Xylem.Common.Hardware.WaterMeter.WaterMeterCore.BatchActions
{
/// <inheritdoc />
public class BatchCallTestBenchDispose: BatchCall
{
/// <inheritdoc />
public override void DoSingleAction(IMeter meter)
{
meter.TestBenchDispose();
}
}
}
@@ -282,6 +282,6 @@ namespace Xylem.Common.Hardware.WaterMeter.WaterMeterCore
/// Clear all object set up on runtime
/// </summary>
void DisposeMeter();
void TestBenchDispose();
}
}
@@ -247,5 +247,11 @@ namespace Xylem.Common.Hardware.WaterMeter.WaterMeterCore
}
}
public void DisposeTestBench()
{
_logger.Info("Dispose batch make sure green LED is off");
var batchCall = new BatchCallStopMeasurement();
batchCall.RunAction(ListOfMeters);
}
}
}
@@ -254,6 +254,7 @@
<Compile Include="BatchActions\BatchCallStartCalibration.cs" />
<Compile Include="BatchActions\BatchCallStartMeasurement.cs" />
<Compile Include="BatchActions\BatchCallStopCalibration.cs" />
<Compile Include="BatchActions\BatchCallTestBenchDispose.cs" />
<Compile Include="BatchActions\BatchCallStopMeasurement.cs" />
<Compile Include="Consts\DisplayCodes.cs" />
<Compile Include="DataPackages\FlowDeviations.cs" />
+1 -1
View File
@@ -36,7 +36,7 @@
<StartupObject />
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>LaaProduction_SigningKey.snk</AssemblyOriginatorKeyFile>
@@ -49,11 +49,11 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
if (radioParams.RadioAddress != 0)
{
ret.Add(new ProgrammingParameters("SENSUSRADIO_RadioAddress", BitConverter.GetBytes(radioParams.RadioAddress).Reverse().ToArray(), ProgrammingSource.Order, (UInt32)radioParams.RadioAddress, typeof(UInt32).ToString(), ReadCompare.Equal));
ret.Add(new ProgrammingParameters("SENSUSRADIO_RadioAddress", BitConverter.GetBytes(radioParams.RadioAddress).Reverse().ToArray(), ProgrammingSource.Vako, (UInt32)radioParams.RadioAddress, typeof(UInt32).ToString(), ReadCompare.Equal));
if (radioParams.FrqOffset.HasValue)
{
ret.Add(new ProgrammingParameters("SENSUSRADIO_FrequencyOffset", BitConverter.GetBytes(radioParams.FrqOffset.Value).Reverse().ToArray(), ProgrammingSource.Order, (Int16)radioParams.FrqOffset.Value, typeof(Int16).ToString(), ReadCompare.Equal));
ret.Add(new ProgrammingParameters("SENSUSRADIO_FrequencyOffset", BitConverter.GetBytes(radioParams.FrqOffset.Value).Reverse().ToArray(), ProgrammingSource.Vako, (Int16)radioParams.FrqOffset.Value, typeof(Int16).ToString(), ReadCompare.Equal));
}
@@ -63,10 +63,10 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
if (radioParams.PowerLevel > 0 && radioParams.PowerLevelOption > 0 && radioParams.ImpedanceCodeNew > 0 && radioParams.ImpedanceCodeOption > 0)
{
ret.Add(new ProgrammingParameters("SENSUSRADIO_PowerLevel", BitConverter.GetBytes(radioParams.PowerLevel).Reverse().ToArray(),ProgrammingSource.Order, (ushort)radioParams.PowerLevel, typeof(ushort).ToString(), ReadCompare.Equal));
ret.Add(new ProgrammingParameters("SENSUSRADIO_PowerLevelOption", BitConverter.GetBytes(radioParams.PowerLevelOption).Reverse().ToArray(), ProgrammingSource.Order, (ushort)radioParams.PowerLevelOption, typeof(ushort).ToString(), ReadCompare.Equal));
ret.Add(new ProgrammingParameters("SENSUSRADIO_ImpedanceCodeNew", BitConverter.GetBytes(radioParams.ImpedanceCodeNew).Reverse().ToArray(), ProgrammingSource.Order, (UInt16)radioParams.ImpedanceCodeNew, typeof(UInt16).ToString(), ReadCompare.Equal));
ret.Add(new ProgrammingParameters("SENSUSRADIO_ImpedanceCodeOption", BitConverter.GetBytes(radioParams.ImpedanceCodeOption).Reverse().ToArray(), ProgrammingSource.Order, (UInt16)radioParams.ImpedanceCodeOption, typeof(UInt16).ToString(), ReadCompare.Equal));
ret.Add(new ProgrammingParameters("SENSUSRADIO_PowerLevel", BitConverter.GetBytes(radioParams.PowerLevel).Reverse().ToArray(),ProgrammingSource.Vako, (ushort)radioParams.PowerLevel, typeof(ushort).ToString(), ReadCompare.Equal));
ret.Add(new ProgrammingParameters("SENSUSRADIO_PowerLevelOption", BitConverter.GetBytes(radioParams.PowerLevelOption).Reverse().ToArray(), ProgrammingSource.Vako, (ushort)radioParams.PowerLevelOption, typeof(ushort).ToString(), ReadCompare.Equal));
ret.Add(new ProgrammingParameters("SENSUSRADIO_ImpedanceCodeNew", BitConverter.GetBytes(radioParams.ImpedanceCodeNew).Reverse().ToArray(), ProgrammingSource.Vako, (UInt16)radioParams.ImpedanceCodeNew, typeof(UInt16).ToString(), ReadCompare.Equal));
ret.Add(new ProgrammingParameters("SENSUSRADIO_ImpedanceCodeOption", BitConverter.GetBytes(radioParams.ImpedanceCodeOption).Reverse().ToArray(), ProgrammingSource.Vako, (UInt16)radioParams.ImpedanceCodeOption, typeof(UInt16).ToString(), ReadCompare.Equal));
}
}
var rawVako = VakoDbAdapter.GetRawVako(connectionString, orderNr);
@@ -1,4 +1,5 @@
using System;
using System.Linq;
namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
{
@@ -45,6 +46,31 @@ namespace Xylem.Common.Logic.ProductionOrderCore.OrderData
customerSr = scan.Substring(2, 9);
return true;
}
if (scan.Count( a => a == ',') == 2)
{
customerSr = scan.Split(',')[1] + ',';// 0, scan.IndexOf(",", StringComparison.Ordinal));
}
if (customerSr.StartsWith(prefix))
{
customerSr = customerSr.Substring(prefix.Length, length);
if (!customerSr.EndsWith(","))
{
throw new ApplicationException("Could not parse serial number");
}
customerSr = customerSr.TrimEnd(',');
}
if (int.TryParse(customerSr, out var retCustom))
{
internalSerialNr = retCustom;
return true;
}
throw new ApplicationException("Could not parse serial number");
}
@@ -72,6 +72,9 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.13.0.3\lib\net40\Newtonsoft.Json.dll</HintPath>
@@ -83,7 +86,6 @@
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
@@ -113,7 +113,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
// this calculates all life time values
if (!GenesisStatusHandler.BuildLifeTimeInformation(Meter, genesisStatus))
{
UserControl.lblText.Dispatcher.Invoke(DispatcherPriority.Send,
new Action(() =>
{
@@ -132,13 +132,37 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
return;
}
if (!genesisStatus.UNTStatus)
{
//currentProcessState = ProductionProcessState.Error;
UserControl.lblText.Dispatcher.Invoke(DispatcherPriority.Send,
new Action(() =>
{
UserControl.MessageBox($"UNT Limit überschritten Limit{genesisStatus.UNTLimit} vs {genesisStatus.DrainedBatteryLoad_uAs}");
UserControl.lblText.Content = $"UNT Limit überschritten Limit{genesisStatus.UNTLimit} vs {genesisStatus.DrainedBatteryLoad_uAs}";
}
));
Meter.WriteLog($"UNT Limit überschritten Limit{genesisStatus.UNTLimit} vs {genesisStatus.DrainedBatteryLoad_uAs}");
}
if (genesisStatus.RemainingLifeTimeYears < 20)
{
if (genesisStatus.DrainedBatteryLoadPercent > 8)
{
currentProcessState = ProductionProcessState.Error;
UserControl.lblText.Content = "Batterie über 10% entladen";
UserControl.lblText.Dispatcher.Invoke(DispatcherPriority.Send,
new Action(() =>
{
UserControl.MessageBox($"EMEA Limit überschritten Limit 8% vs {genesisStatus.DrainedBatteryLoadPercent}");
UserControl.lblText.Content = "Batterie über 10% entladen";
}
));
Meter.WriteLog("Batterie über 10% entladen");
}
@@ -157,7 +181,15 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
if (Meter.LutCrc != $@"0x{int.Parse(res[8]):X4}")
{
currentProcessState = ProductionProcessState.Error;
UserControl.lblText.Content = "Lut not correct";
UserControl.lblText.Dispatcher.Invoke(DispatcherPriority.Send,
new Action(() =>
{
UserControl.lblText.Content = "Lut not correct";
}
));
}
@@ -129,7 +129,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
{
throw new ApplicationException("Radio inconsistent between meter and programmingparameters");
}
foreach (var item in myJsonResponse.Where(m => m.Source == ProgrammingSource.Vako))
foreach (var item in myJsonResponse.Where(m => m.Source == ProgrammingSource.Vako || m.Source == ProgrammingSource.Order ))
{
if (item.RegisterName == "CUSTOMER_LeakFlowThreshold")
@@ -7,6 +7,7 @@ using System.Threading;
using System.Windows.Controls;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisFile;
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
namespace ProductionUiCordonel.ProductionProcesses.Actions
{
@@ -50,7 +51,10 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
hasRadio = Meter.RadioFrequencyMhz.HasValue;
if (doRestart)
{
}
if (hasRadio)
{
@@ -74,7 +78,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
};
var rebootSucceeded = _meterResetPsu.MeterResetPsuExecute();
Thread.Sleep(10000);
Thread.Sleep(16000);
if (!Meter.Login())
{
@@ -86,7 +90,15 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
currentProcessState = ProductionProcessState.Error;
}
}
Meter.WriteRegister("SYSTEM_ExitReason", 21, true, false);
var exitResult = RegisterConverter.ConvertTo<Int16>(Meter.ReadRegister("SYSTEM_ExitReason"));
if (exitResult != 0)
{
Meter.WriteLog("PasswordFile incorrect");
currentProcessState = ProductionProcessState.Error;
return;
}
Boolean? hasDiffrences = null;
foreach (var item in CheckValuesAfterBoot)
@@ -206,10 +218,17 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
};
var rebootSucceeded = _meterResetPsu.MeterResetPsuExecute();
Thread.Sleep(10000);
Thread.Sleep(16000);
Meter.Login();
Meter.WriteRegister("SYSTEM_ExitReason", 21, true, false);
var exitResult = RegisterConverter.ConvertTo<Int16>(Meter.ReadRegister("SYSTEM_ExitReason"));
if (exitResult != 0)
{
Meter.WriteLog("PasswordFile incorrect");
currentProcessState = ProductionProcessState.Error;
return;
}
Boolean? hasDiffrences = null;
foreach (var item in CheckValuesAufterBoot)
{
@@ -1,4 +1,5 @@
using System.Windows.Controls;
using System;
using System.Windows.Controls;
namespace ProductionUiCordonel.UserControls.FinalTest
{
@@ -11,5 +12,10 @@ namespace ProductionUiCordonel.UserControls.FinalTest
{
InitializeComponent();
}
internal void MessageBox(String v)
{
System.Windows.Forms.MessageBox.Show(v);
}
}
}
@@ -242,6 +242,10 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
query.AppendLine(" left outer join Identnr idt on idt.IdentNr = apg.Identnr ");
//query.AppendLine(" left outer join [MapPcbIdToSerialNumber] map on map.MapPcbIdToSerialNumber_SerialNumber = apsn.SerienNr ");
query.AppendLine($" where pg.Datum >= '{Start}' and pg.Datum <= '{End}' ");
@@ -254,7 +258,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
query.AppendLine(" inner join [Auftrag].[dbo].[AuftragPositionSerienNr] apsn on apsn.SerienNr = [MapPcbIdToSerialNumber_SerialNumber] and apsn.SerienNr not in (20702497,20702499,20717438) ");
query.AppendLine(" ");
query.AppendLine(" inner join[Auftrag].[dbo].[AuftragPosition_Gesamt] apg on apg.AuftragNr = apsn.AuftragNr and apg.PositionNr = apsn.PositionNr and apg.Ort = 'L2' ");
query.AppendLine(" inner join[Auftrag].[dbo].[Pruefgang] pg on apsn.[Pruefgangnr] = pg.PruefgangNr and pg.PruefstationNr = 2016 ");
query.AppendLine(" inner join[Auftrag].[dbo].[Pruefgang] pg on apsn.[Pruefgangnr] = pg.PruefgangNr and pg.PruefstationNr in (2016,2015) ");
query.AppendLine(" inner join[Auftrag].[dbo].Prueffehler pf on pg.[Pruefgangnr] = pf.PruefgangNr and pf.SerienNr = [MapPcbIdToSerialNumber_SerialNumber] ");
query.AppendLine(" ");
query.AppendLine($" where pg.Datum >= '{Start}' and pg.Datum <= '{End}' ");
@@ -652,7 +652,10 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
SkipRadioCheck = (Boolean)dt.Rows[0]["SkipRadioParameters"];
}
if (FrequencyIndicator == 0)
{
SkipRadioCheck = true;
}
sb = new StringBuilder();
@@ -708,6 +708,8 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
addOBJ.FileId = (Int32)row["FWUpdateReport_ID"];
addOBJ.Date = (DateTime)row["FWUpdateReport_Date"];
ret.Add(addOBJ);
//help to download all file to local store
//File.WriteAllText($"E:\\bat\\report\\{addOBJ.PcbId}_{addOBJ.FileId}.txt", addOBJ.Content);
}
}
return Request.CreateResponse(HttpStatusCode.OK, ret);
@@ -174,7 +174,12 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
sb.AppendLine($" select distinct kunden.KundenNr as CustomerNumber, kunden.Name as CustomerName, kunden.Ort as CustomerLocation ");
sb.AppendLine($" from Identnr ident ");
sb.AppendLine($" inner join Statistik_auftrag auftrag on auftrag.IdentNr = ident.IdentNr ");
// sb.AppendLine($" inner join Statistik_auftrag auftrag on auftrag.IdentNr = ident.IdentNr ");
sb.AppendLine($" inner join AuftragPosition_Gesamt auftragPOS on auftragPOS.IdentNr = ident.IdentNr ");
sb.AppendLine($" inner join Auftrag_Gesamt auftrag on auftrag.AuftragNr = auftragPOS.AuftragNr ");
sb.AppendLine($" inner join Kunde kunden on auftrag.KundenNr = kunden.KundenNr ");
sb.AppendLine($" where ident.Typ = 'GNS' ");
@@ -207,9 +212,13 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
StringBuilder sb = new StringBuilder();
sb.AppendLine($" select AuftragNr as CustomerOrderNumber, PositionNr as CustomerOrderPos ,Menge as Quantity, Katalognummer as CatalogNumber, Nennweite as Diameter,Baulaenge as Length from ");
sb.AppendLine($" select auftrag.AuftragNr as CustomerOrderNumber, PositionNr as CustomerOrderPos ,Menge as Quantity, Katalognummer as CatalogNumber, Nennweite as Diameter,Baulaenge as Length from ");
sb.AppendLine($" Identnr ident ");
sb.AppendLine($" inner join Statistik_auftrag auftrag on auftrag.IdentNr = ident.IdentNr ");
//sb.AppendLine($" inner join Statistik_auftrag auftrag on auftrag.IdentNr = ident.IdentNr ");
sb.AppendLine($" inner join AuftragPosition_Gesamt auftragPOS on auftragPOS.IdentNr = ident.IdentNr ");
sb.AppendLine($" inner join Auftrag_Gesamt auftrag on auftrag.AuftragNr = auftragPOS.AuftragNr ");
sb.AppendLine($" where ident.Typ = 'GNS' and auftrag.KundenNr = {CustomerNumber} ");
@@ -373,12 +373,150 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
}
[Route("GetPasswordHashFileContentDebug")]
public async Task<HttpResponseMessage> GetPasswordHashFileContentDebug(String PcbId)
{
try
{
var sbKeys = new StringBuilder();
var listOfHashes = new List<Byte[]>();
var sbOutPut = new StringBuilder();
var sbQuery = new StringBuilder();
sbQuery.AppendLine($" SELECT ");
sbQuery.AppendLine($" [Seriennummer] ");
sbQuery.AppendLine($" ,mps.MapPcbIdToSerialNumber_PcbId ");
sbQuery.AppendLine($" ,[Adresse] ");
sbQuery.AppendLine($" ,AuftragPosSNr.AuftragNr ");
sbQuery.AppendLine($" ,Auftrag.FertigungsauftragNr ");
sbQuery.AppendLine($" ,[GeschlossenDatum] ");
sbQuery.AppendLine($" ,[Vergabe_am] ");
sbQuery.AppendLine($" ,passwordtbl.KeySetId ");
sbQuery.AppendLine($" ,passwordtbl.orderNumber ");
sbQuery.AppendLine($" ,passwordtbl.Password ");
sbQuery.AppendLine($" ,passwordtbl.KitronSkeletonKey as Skeleton ");
sbQuery.AppendLine($" ,passwordtbl.ProcessorID as ProcessorUid ");
sbQuery.AppendLine($" FROM [Auftrag].[dbo].[Genesis_Meter] meter ");
sbQuery.AppendLine($" inner join MapPcbIdToSerialNumber mps" +
$" on mps.MapPcbIdToSerialNumber_SerialNumber = meter.Seriennummer and mps.MapPcbIdToSerialNumber_Deleted = 0 ");
sbQuery.AppendLine($" inner join[Auftrag].[dbo].[AuftragPositionSerienNr] AuftragPosSNr " +
$" on AuftragPosSNr.SerienNr = meter.Seriennummer and [Pruefgangnr] = 0 ");
sbQuery.AppendLine($" inner join[Auftrag].[dbo].[AlleAuftragPositionen] Auftrag" +
$" on Auftrag.AuftragNr = AuftragPosSNr.AuftragNr and AuftragPosSNr.PositionNr = Auftrag.PositionNr ");
sbQuery.AppendLine($" left outer join[dbo].[Genesis_PcbPassword] passwordtbl" +
$" on passwordtbl.PcbId = mps.MapPcbIdToSerialNumber_PcbId ");
sbQuery.AppendLine($" where mps.MapPcbIdToSerialNumber_PcbId = '{PcbId}' ");
var result = new MeterPwdDb();
using (var dataAccess = new SqlDataAccess(GlobalConfig.connectionString.Value))
{
var dt = dataAccess.ExecuteQuery(sbQuery.ToString());
foreach (var item in dt.Select())
{
result.OrderNumber = (Int32)item["FertigungsauftragNr"];
result.RadioAddress = (Int64)item["Adresse"];
result.Skeleton = (String)item["Skeleton"];
result.Password = (String)item["Password"];
result.PasswordFileIdent = (result.RadioAddress.HasValue && result.RadioAddress.Value != 0) ? result.RadioAddress.Value.ToString() : PcbId;
if (item["KeySetId"].GetType() != typeof(System.DBNull))
{
result.KeySetId = (String)item["KeySetId"];
}
sbKeys.AppendLine($"PcbId:{PcbId}");
sbKeys.AppendLine($"ProcessorUid:{(String)item["ProcessorUid"]}");
sbKeys.AppendLine($"Skeleton:{(String)item["Skeleton"]}");
sbKeys.AppendLine($"Password:{(String)item["Password"]}");
}
}
if (!result.OrderNumber.HasValue)
{
return Request.CreateResponse(HttpStatusCode.InternalServerError, new PcbIdNotException(new Guid("160B4C44-6EF7-41DC-A48D-4B4105B4779B")));
}
Request.Headers.Add("X-Node-Token", "d5b8c0b2-81f6-4421-80d0-44eb2093e616");
if (!Request.Headers.Contains("X-Node-Token"))
{
return Request.CreateResponse(HttpStatusCode.InternalServerError, new TokenRequiredException(new Guid("77895D13-CA58-48AB-8C5E-9CDB7F80C69D")));
}
if (string.IsNullOrEmpty(result.KeySetId))
{
result.KeySetId = CreateKeySet(Request.Headers.GetValues("X-Node-Token").First(), 7);
//mapp keyset
MapKeySet(Request.Headers.GetValues("X-Node-Token").First(), result.KeySetId, result.OrderNumber.Value, result.PasswordFileIdent);
using (var dataAccess = new SqlDataAccess(GlobalConfig.connectionString.Value))
{
var dt = dataAccess.ExecuteQuery(
$"update auftrag.[dbo].[Genesis_PcbPassword] set KeySetId = '{result.KeySetId}', [orderNumber] = {result.OrderNumber.Value}, [radioAdress] = {result.PasswordFileIdent} where PcbId = '{PcbId}'; select * from auftrag.[dbo].[Genesis_PcbPassword] where PcbId = '{PcbId}'");
}
}
var passwords = getKeys(Request.Headers.GetValues("X-Node-Token").First(), result.OrderNumber.Value.ToString(), result.PasswordFileIdent);
//pw lvl
passwords.Keys.Insert(2, new Key() { Index = 2, KeyKey = result.Skeleton });
var pwdLVL8 = "";
if (passwords.Keys.Count > 7)
{
pwdLVL8 = passwords.Keys[7].KeyKey.Substring(0, 12);
}
foreach (var keyLVL in passwords.Keys)
{
using (System.Security.Cryptography.SHA1Managed sha1 = new System.Security.Cryptography.SHA1Managed())
{
var rawKey = keyLVL.KeyKey;
if (rawKey.Length > 12)
{
rawKey = rawKey.Substring(0, 12);
}
if (result.ListOfPasswords.Count <= 7)
{
result.ListOfPasswords.Add(Encoding.UTF8.GetBytes(rawKey));
var hash = sha1.ComputeHash(Encoding.UTF8.GetBytes(rawKey));
result.ListOfHashes.Add(hash);
}
}
}
sbKeys.AppendLine("passwords:");
foreach (var item in result.ListOfPasswords)
{
sbKeys.AppendLine(BitConverter.ToString(item));
}
sbKeys.AppendLine("hashes:");
foreach (var item in result.ListOfHashes)
{
sbKeys.AppendLine(BitConverter.ToString(item));
}
return Request.CreateResponse(HttpStatusCode.OK, await Task.Run(() =>
{
return result;
}));
}
catch (Exception ex)
{
return Request.CreateResponse(HttpStatusCode.ExpectationFailed, ex.ToString() + "<br >" + ex.InnerException.ToString());
}
}
[Route("GetPasswordHashFileContent")]
public async Task<HttpResponseMessage> GetPasswordHashFileContent(String PcbId)
{
try
{
var sbKeys = new StringBuilder();
var listOfHashes = new List<Byte[]>();
var sbOutPut = new StringBuilder();
@@ -429,9 +567,14 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
result.KeySetId = (String)item["KeySetId"];
}
}
}
if (result.OrderNumber == 3219628)
{
result.PasswordFileIdent = "1" + result.PasswordFileIdent;
}
if (!result.OrderNumber.HasValue)
{
@@ -465,7 +608,7 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
{
pwdLVL8 = passwords.Keys[7].KeyKey.Substring(0, 12);
}
foreach (var keyLVL in passwords.Keys)
{
using (System.Security.Cryptography.SHA1Managed sha1 = new System.Security.Cryptography.SHA1Managed())
@@ -478,16 +621,25 @@ namespace Xylem.Common.Service.MeterProcessState.Controllers
if (result.ListOfPasswords.Count <= 7)
{
result.ListOfPasswords.Add(Encoding.UTF8.GetBytes(rawKey));
var hash = sha1.ComputeHash(Encoding.UTF8.GetBytes(rawKey));
result.ListOfHashes.Add(hash);
}
}
}
return Request.CreateResponse(HttpStatusCode.OK, await Task.Run(() =>
sbKeys.AppendLine($"PcbiD: {PcbId}");
sbKeys.AppendLine("passwords:");
foreach (var item in result.ListOfPasswords)
{
sbKeys.AppendLine(BitConverter.ToString(item));
}
sbKeys.AppendLine("hashes:");
foreach (var item in result.ListOfHashes)
{
sbKeys.AppendLine(BitConverter.ToString(item));
}
return Request.CreateResponse(HttpStatusCode.OK, await Task.Run(() =>
{
return result;
}));
@@ -58,8 +58,7 @@ namespace Service.MeterProcessState.Controllers
PcbId = PcbId,
RefTempC = RefTempC,
AvgTof = AvgTof,
Active = true,
Timestamp = dt == default(DateTime) ? null : (DateTime?)dt
Active = true
});
return await ctx.SaveChangesAsync() > 0;
@@ -65,6 +65,46 @@
[Route("GetMeterInfoForTestBench"), HttpGet]
public IHttpActionResult GetMeterInfoForTestBench(String PcbID)
{
var str = $@"
SELECT DISTINCT
[MapPcbIdToSerialNumber_SerialNumber] AS [SerialNr]
, [MapOrder].[CordonelAssignedPicking_FertigungsAuftragsNr] AS [FertigungsNr]
, [Meter].[Adresse] AS [RadioAddress]
, [KundeneigeneSerienNr] AS [CustomerSerialNr]
, (SELECT TOP 1 [ID]
FROM [CordonelMeterCalibrationResults]
WHERE [PcbId] = @{nameof(PcbID)}
ORDER BY [Date] DESC) AS [CalibrationRunID]
, (SELECT TOP 1 [StatusFertigung]
FROM [AuftragPositionSerienNr]
WHERE [SerienNr] = [MapPcbIdToSerialNumber_SerialNumber]
ORDER BY [AnlageDatum] DESC) AS [LastProcessState]
, [Nennweite] AS [Dn]
, (SELECT TOP 1 [Dn_InternalId]
FROM [CordonelMeterSizes]
WHERE [Dn_VakoID] = SUBSTRING([Identnr].[VakoCode], 4, 2)) AS [NewNennweiteID]
, [lut].[FileCrc] AS [LutCrc]
FROM [Cordonel_AssignedPicking] AS [MapOrder]
LEFT OUTER JOIN [MapPcbIdToSerialNumber] AS [map]
ON [MapOrder].[CordonelAssignedPicking_PcbId] = [map].[MapPcbIdToSerialNumber_PcbId]
AND [map].[MapPcbIdToSerialNumber_Deleted] = 0
LEFT OUTER JOIN [AuftragPositionSerienNr] AS [mapSrn]
ON [map].[MapPcbIdToSerialNumber_SerialNumber] = [mapSrn].[SerienNr]
AND [mapSrn].[Pruefgangnr] = 0
LEFT OUTER JOIN [AuftragPosition_gesamt] AS [auftraginfo]
ON [auftraginfo].[AuftragNr] = [mapSrn].[AuftragNr]
AND [auftraginfo].[PositionNr] = [mapSrn].[PositionNr]
LEFT OUTER JOIN [Genesis_Meter] AS [Meter]
ON [Meter].[Seriennummer] = [map].[MapPcbIdToSerialNumber_SerialNumber]
LEFT OUTER JOIN [Identnr]
ON [auftraginfo].[Identnr] = [Identnr].[IdentNr]
LEFT OUTER JOIN [Cordonel_Lut] AS [lut]
ON [lut].[MeterSize] = (SELECT TOP 1 [Dn_InternalId]
FROM [CordonelMeterSizes]
WHERE [Dn_VakoID] = SUBSTRING([Identnr].[VakoCode], 4, 2))
AND [lut].[CurrentVersionForProd] = 1
WHERE [MapOrder].[CordonelAssignedPicking_IsDeleted] = 0
AND [MapOrder].[CordonelAssignedPicking_PcbId] = @{nameof(PcbID)} ";
var results = SQLConnection
.CreateSQLConnection(ConnectionString.Value)
.CreateCommand($@"
@@ -113,12 +153,12 @@
$"{x.GetInt()}", // SerialNr,
$"{x.GetInt()}", // FertigungsNr,
$"{x.GetLong()}", // RadioAddress,
$"{x.GetString()}", // CustomerSerialNr,
$"{x.GetInt()}", // CalibrationRunID,
$"{x.GetValue<int?>()}", // CustomerSerialNr,
$"{x.GetString()}", // CalibrationRunID,
$"{x.GetValue<byte>()}", // LastProcessState,
$"{x.GetInt()}", // Dn,
$"{x.GetInt()}", // NewNennweiteID,
$"{x.GetInt()}", // LutCrc
$"{x.GetValue<int?>()}", // LutCrc
});
if (results.Count() == 1)
@@ -16,6 +16,5 @@
public Boolean Active { get; set; }
public DateTime? Timestamp { get; set; }
}
}
@@ -479,7 +479,7 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<DelaySign>false</DelaySign>
@@ -9,6 +9,10 @@
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
@@ -60,8 +60,8 @@
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Runtime.CompilerServices.Unsafe.4.6.0-preview.18571.3\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.Xml.Linq" />
@@ -7,5 +7,5 @@
<package id="System.Diagnostics.DiagnosticSource" version="4.7.1" targetFramework="net472" />
<package id="System.Memory" version="4.5.4" targetFramework="net472" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.3" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.6.0-preview.18571.3" targetFramework="net461" />
</packages>
+13
View File
@@ -66,6 +66,7 @@
this.btnAddReleaseConfig = new System.Windows.Forms.Button();
this.txtUpdateSW = new System.Windows.Forms.TextBox();
this.txtReleaseConfig = new System.Windows.Forms.TextBox();
this.button3 = new System.Windows.Forms.Button();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvFiles)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.filePartBindingSource)).BeginInit();
@@ -429,11 +430,22 @@
this.txtReleaseConfig.Size = new System.Drawing.Size(225, 20);
this.txtReleaseConfig.TabIndex = 37;
//
// button3
//
this.button3.Location = new System.Drawing.Point(857, 28);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(75, 23);
this.button3.TabIndex = 38;
this.button3.Text = "button3";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click_1);
//
// FrmFileCURD
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(971, 815);
this.Controls.Add(this.button3);
this.Controls.Add(this.txtReleaseConfig);
this.Controls.Add(this.txtUpdateSW);
this.Controls.Add(this.btnAddReleaseConfig);
@@ -504,5 +516,6 @@
private System.Windows.Forms.Button btnAddReleaseConfig;
private System.Windows.Forms.TextBox txtUpdateSW;
private System.Windows.Forms.TextBox txtReleaseConfig;
private System.Windows.Forms.Button button3;
}
}
+36 -1
View File
@@ -11,7 +11,7 @@ using Xylem.Common.CommonCore.Configuration;
using Xylem.Common.Logic.ProductionOrderCore.FW;
using Xylem.Common.Logic.ProductionOrderCore.OrderData;
using Xylem.Common.Logic.SoftwareAccessHelper;
using Xylem.ServiceFwUpdate.Common.FwUpdateDb;
namespace Xylem.Common.Ui.GenesisToolBox
{
@@ -568,5 +568,40 @@ namespace Xylem.Common.Ui.GenesisToolBox
{
}
private void button3_Click_1(Object sender, EventArgs e)
{
//var fwUpdRpt = new List<FwUpdateReportDb>();
//try
//{
// var url = ServiceUrls.DownloadFwUpdateReportServiceUrl();
// if (pcbId > 0)
// {
// url += $"PcbId={pcbId}";
// if (userId > 0) url += $"&UserId={userId}";
// if (orderNr > 0) url += $"&OrderNr={orderNr}";
// }
// else if (userId > 0)
// {
// url += $"UserId={userId}";
// if (orderNr > 0) url += $"&OrderNr={orderNr}";
// }
// else if (orderNr > 0)
// {
// url += $"OrderNr={orderNr}";
// }
// url += $"&readContent={readContent}";
// var requestResponse = LocalWebRequest.GetRequest(url, 20000);
// if (string.IsNullOrEmpty(requestResponse))
// {
// DbIsConnected = false;
// return false;
// }
// DbIsConnected = true;
// fwUpdRpt = JsonConvert.DeserializeObject<List<FwUpdateReportDb>>(requestResponse);
}
}
}
+14 -1
View File
@@ -80,6 +80,7 @@
this.label3 = new System.Windows.Forms.Label();
this.tbxFileToEraseDrive = new System.Windows.Forms.TextBox();
this.btnEraseFile = new System.Windows.Forms.Button();
this.btnUploadPWFile = new System.Windows.Forms.Button();
this.grpSetup.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.groupBox1.SuspendLayout();
@@ -488,6 +489,7 @@
//
// groupBox2
//
this.groupBox2.Controls.Add(this.btnUploadPWFile);
this.groupBox2.Controls.Add(this.ddlLocation);
this.groupBox2.Controls.Add(this.btnReadBatAndLog);
this.groupBox2.Controls.Add(this.btnListFileDetails);
@@ -495,7 +497,7 @@
this.groupBox2.Controls.Add(this.btnUploadConfig);
this.groupBox2.Location = new System.Drawing.Point(417, 69);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(136, 150);
this.groupBox2.Size = new System.Drawing.Size(136, 183);
this.groupBox2.TabIndex = 37;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Log";
@@ -605,6 +607,16 @@
this.btnEraseFile.UseVisualStyleBackColor = true;
this.btnEraseFile.Click += new System.EventHandler(this.btnEraseFile_Click);
//
// btnUploadPWFile
//
this.btnUploadPWFile.Location = new System.Drawing.Point(10, 145);
this.btnUploadPWFile.Name = "btnUploadPWFile";
this.btnUploadPWFile.Size = new System.Drawing.Size(116, 25);
this.btnUploadPWFile.TabIndex = 42;
this.btnUploadPWFile.Text = "Upload Config";
this.btnUploadPWFile.UseVisualStyleBackColor = true;
this.btnUploadPWFile.Click += new System.EventHandler(this.btnUploadPWFile_Click);
//
// FrmLowLevelTools
//
this.AccessibleRole = System.Windows.Forms.AccessibleRole.Sound;
@@ -701,5 +713,6 @@
private System.Windows.Forms.Button btnPulseModeOff;
private System.Windows.Forms.ComboBox ddlLocation;
private System.Windows.Forms.Button btnReadBatAndLog;
private System.Windows.Forms.Button btnUploadPWFile;
}
}
@@ -1267,6 +1267,65 @@ namespace Xylem.Common.Ui.GenesisToolBox
});
}
/// <summary>
/// Read config file from meter and store it to disk.
/// </summary>
/// <remarks date="2023-Jan-02" author="Thomas Wiedebusch">
/// - Initial
/// </remarks>
private void btnUploadPWFile_Click(Object sender, EventArgs e)
{
if (_currentGenesis == null)
{
return;
}
if (_meterFile == null)
{
_meterFile = new MeterFile(_currentGenesis);
}
//reset timer
_startTime = DateTimeOffset.UtcNow;
LowLevelActionControl(true);
var msg = @"Upload configuration file from meter";
LogText(msg);
lblOverall.Text = msg;
lblActualProcess.Text = @"Read config file";
var rawData = new List<Byte>();
Task.Factory.StartNew(() =>
{
_currentGenesis.ReLogin();
_meterFile.ReadMeterFile("0\\password", out var data);
rawData.AddRange(data);
}).ContinueWith(delegate
{
Invoke(new Action(() =>
{
if (saveConfigFile.ShowDialog() == DialogResult.OK)
{
var fs = new FileStream(saveConfigFile.FileName, FileMode.OpenOrCreate);
var bw = new BinaryWriter(fs);
foreach (var t in rawData)
{
bw.Write(t);
}
fs.Close();
}
}));
//add a blank line to separate next operation
LogText("");
_currentGenesis.Logout();
LowLevelActionControl(false);
});
}
/// <summary>
/// Set date and time from PC to Cordonel
/// </summary>
+137
View File
@@ -0,0 +1,137 @@
namespace Xylem.Common.Ui.GenesisToolBox
{
partial class FrmQsTool
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.lblState = new System.Windows.Forms.Label();
this.btnConnect = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.cbComSlot = new System.Windows.Forms.ComboBox();
this.btnWrite = new System.Windows.Forms.Button();
this.btnRead = new System.Windows.Forms.Button();
this.btnLogout = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// lblState
//
this.lblState.AutoSize = true;
this.lblState.Location = new System.Drawing.Point(12, 51);
this.lblState.Name = "lblState";
this.lblState.Size = new System.Drawing.Size(78, 13);
this.lblState.TabIndex = 9;
this.lblState.Text = "Not connected";
//
// btnConnect
//
this.btnConnect.Location = new System.Drawing.Point(212, 8);
this.btnConnect.Name = "btnConnect";
this.btnConnect.Size = new System.Drawing.Size(85, 30);
this.btnConnect.TabIndex = 8;
this.btnConnect.Text = "Connect";
this.btnConnect.UseVisualStyleBackColor = true;
this.btnConnect.Click += new System.EventHandler(this.btnConnect_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 21);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(25, 13);
this.label1.TabIndex = 7;
this.label1.Text = "Slot";
//
// cbComSlot
//
this.cbComSlot.FormattingEnabled = true;
this.cbComSlot.Location = new System.Drawing.Point(83, 12);
this.cbComSlot.Name = "cbComSlot";
this.cbComSlot.Size = new System.Drawing.Size(104, 21);
this.cbComSlot.TabIndex = 6;
this.cbComSlot.Text = "1";
//
// btnWrite
//
this.btnWrite.Location = new System.Drawing.Point(24, 164);
this.btnWrite.Name = "btnWrite";
this.btnWrite.Size = new System.Drawing.Size(129, 53);
this.btnWrite.TabIndex = 1;
this.btnWrite.Text = "Led Off";
this.btnWrite.UseVisualStyleBackColor = true;
this.btnWrite.Click += new System.EventHandler(this.btnWrite_Click);
//
// btnRead
//
this.btnRead.Location = new System.Drawing.Point(24, 105);
this.btnRead.Name = "btnRead";
this.btnRead.Size = new System.Drawing.Size(129, 53);
this.btnRead.TabIndex = 0;
this.btnRead.Text = "Lifetime Read";
this.btnRead.UseVisualStyleBackColor = true;
this.btnRead.Click += new System.EventHandler(this.btnRead_Click);
//
// btnLogout
//
this.btnLogout.Location = new System.Drawing.Point(303, 8);
this.btnLogout.Name = "btnLogout";
this.btnLogout.Size = new System.Drawing.Size(85, 30);
this.btnLogout.TabIndex = 12;
this.btnLogout.Text = "Logout";
this.btnLogout.UseVisualStyleBackColor = true;
this.btnLogout.Click += new System.EventHandler(this.btnLogout_Click);
//
// FrmQsTool
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(587, 450);
this.Controls.Add(this.btnLogout);
this.Controls.Add(this.lblState);
this.Controls.Add(this.btnConnect);
this.Controls.Add(this.label1);
this.Controls.Add(this.cbComSlot);
this.Controls.Add(this.btnRead);
this.Controls.Add(this.btnWrite);
this.Name = "FrmQsTool";
this.Text = "FrmConfigurations";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmConfigurations_FormClosing);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lblState;
private System.Windows.Forms.Button btnConnect;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox cbComSlot;
private System.Windows.Forms.Button btnLogout;
private System.Windows.Forms.Button btnWrite;
private System.Windows.Forms.Button btnRead;
}
}
+242
View File
@@ -0,0 +1,242 @@
using Newtonsoft.Json;
using NLog;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Windows.Forms;
using Xylem.Common.CommonCore.Consts;
using Xylem.Common.Hardware.Interfaces.Ports.PortCore;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisConfig;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisCore;
using Xylem.Common.Hardware.WaterMeter.Genesis.GenesisStatus;
using Xylem.Common.Hardware.WaterMeter.Genesis.Registers;
using Xylem.Common.Hardware.WaterMeter.WaterMeterCore;
using Xylem.Common.Utils.Logging;
namespace Xylem.Common.Ui.GenesisToolBox
{
public partial class FrmQsTool : Form
{
private GenesisMeter _currentGenesis;
private String _currentPcbId;
private MeterBatch _meterBatch = new MeterBatch();
private readonly ILogger logger = NLogHelper.CreateOrGetLogger("GenesisConfigurator");
public FrmQsTool()
{
InitializeComponent();
_meterBatch = new MeterBatch();
var configfile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), nameof(Xylem.Common.Hardware.WaterMeter.Genesis), ProgramConfig.SerialConfigFileName);
if (!File.Exists(configfile))
{
throw new ApplicationException($"Configuration file {configfile} not found ");
}
var tr = new StreamReader(configfile);
var meterConfigList = JsonConvert.DeserializeObject<SlotConfig[]>(tr.ReadToEnd());
cbComSlot.Items.Clear();
var listSlots = new List<Int32>();
foreach (var item in meterConfigList)
{
cbComSlot.Items.Add(item.Slot);
listSlots.Add(item.Slot);
}
if (cbComSlot.Items.Count >= 1)
{
cbComSlot.SelectedItem = cbComSlot.Items[0];
}
//foreach (var info in typeof(Register).GetNestedTypes())
//{
// cbPreselection.Items.Add(info.Name);
//}
}
private void btnLogout_Click(Object sender, EventArgs e)
{
if (_currentGenesis != null && _currentGenesis.IsLoggedOn)
{
_currentGenesis.Logout();
}
_currentPcbId = "";
}
private void btnConnect_Click(Object sender, EventArgs e)
{
if (cbComSlot.SelectedItem != null) // && cbComSlot.SelectedValue is ListBoxItem)
{
Int32 slotNR = 0;
if (!string.IsNullOrEmpty(cbComSlot.SelectedItem.ToString()) &&
int.TryParse(cbComSlot.SelectedItem.ToString(), out slotNR))
{
conntect(slotNR);
}
}
}
private void btnRead_Click(Object sender, EventArgs e)
{
if (_currentGenesis != null && _currentGenesis.IsLoggedOn)
{
if (cbComSlot.SelectedItem == null)
{
return;
}
if (string.IsNullOrEmpty(cbComSlot.SelectedItem.ToString()) ||
!int.TryParse(cbComSlot.SelectedItem.ToString(), out var slotNR))
{
return;
}
try
{
//conntect(slotNR);
foreach (var me in _meterBatch.ListOfMeters)
{
if (me is GenesisMeter)
{
if (((GenesisMeter)me).IsLoggedOn)
{
_currentGenesis = ((GenesisMeter)me);
var genesisStatus = new GenesisStatus();
if (GenesisStatusHandler.BuildLifeTimeInformation(_currentGenesis, genesisStatus))
{
var sbMSG = new StringBuilder();
sbMSG.AppendLine($"Pcb = {_currentGenesis.PcbId}");
sbMSG.AppendLine($"POWERMON_TotalUsedSeconds = {genesisStatus.ExceededLifeTime_s}");
sbMSG.AppendLine($"POWERMON_TotalUsedCharge = {genesisStatus.DrainedBatteryLoad_uAs}");
sbMSG.AppendLine($"POWERMON_BatteryQuantity = {genesisStatus.BatteryQuantity}");
sbMSG.AppendLine($"POWERMON_BatteryMilliAHrRating = {genesisStatus.InitialBatteryLoad_mAh}");
sbMSG.AppendLine("");
sbMSG.AppendLine($"Remaining life time in years {genesisStatus.RemainingLifeTimeYears:F2}");
sbMSG.AppendLine($"Totally drained battery load in % {genesisStatus.DrainedBatteryLoadPercent:F2}");
MessageBox.Show(sbMSG.ToString(), $"Battery for {_currentGenesis.PcbId} has remaining life " +
$"time of {genesisStatus.RemainingLifeTimeYears:F2} years");
}
else
{
MessageBox.Show("Failed to get life time information");
}
}
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
}
private void btnWrite_Click(Object sender, EventArgs e)
{
if (cbComSlot.SelectedItem == null)
{
return;
}
if (string.IsNullOrEmpty(cbComSlot.SelectedItem.ToString()) ||
!int.TryParse(cbComSlot.SelectedItem.ToString(), out var slotNR))
{
return;
}
if (!_currentGenesis.IsLoggedOn)
{
_currentGenesis.Login();
}
_currentGenesis.WriteRegister(Register.Genesisflow.SampleRate, 2);
_currentGenesis.WriteRegister(Register.Genesisflow.LedMode, 0);
_currentGenesis.WriteRegister(Register.Genesisflow.TriggerActive, 1);
}
private void conntect(Int32 slotNR)
{
try
{
_meterBatch.RemoveAllMeters();
_currentGenesis = new GenesisMeter();
//_currentGenesis.IsDevelopmentUsage = true; //Make sure to set this before login
try
{
_currentGenesis.SetupFromConfigFile(slotNR);
_currentGenesis.EnableAutoLogon();
_meterBatch.AddMeter(_currentGenesis);
}
catch (Exception ex)
{
logger.Error(ex, $"Slot #{slotNR} failed: {ex.Message}");
lblState.Text = "Failed";
}
_currentGenesis.Login();
_currentPcbId = _currentGenesis.PcbId;
if (_currentGenesis.IsLoggedOn)
{
lblState.Text = _currentGenesis.PcbId;
}
else
{
lblState.Text = "Failed";
}
}
catch (Exception ex)
{
logger.Error(ex, ex.Message);
}
}
private void btnDisplayDefault_Click(Object sender, EventArgs e)
{
if (_currentGenesis != null && _currentGenesis.IsLoggedOn)
{
_currentGenesis.WriteRegister("GENESISFLOW_SealDisplay", 0);
_currentGenesis.WriteRegister("CUSTOMER_Locale", 0);
_currentGenesis.WriteRegister("GENESISFLOW_DisplayPow10", 253);
_currentGenesis.WriteRegister("GENESISFLOW_DisplayUnits", 0);
_currentGenesis.WriteRegister("METROLOGYASST_FlowUnits", 1);
_currentGenesis.StoreAllConfigurations();
_currentGenesis.WriteRegister("SENSUSRADIO_SYSTEMSTATE", 0xFF, true, false);
}
}
private void FrmConfigurations_FormClosing(Object sender, FormClosingEventArgs e)
{
_meterBatch.Dispose();
}
}
}
+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -224,6 +224,12 @@
<Compile Include="FrmCalibrationResults.Designer.cs">
<DependentUpon>FrmCalibrationResults.cs</DependentUpon>
</Compile>
<Compile Include="FrmQsTool.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmQsTool.Designer.cs">
<DependentUpon>FrmQsTool.cs</DependentUpon>
</Compile>
<Compile Include="FrmConfigurations.cs">
<SubType>Form</SubType>
</Compile>
@@ -455,6 +461,9 @@
<EmbeddedResource Include="FrmCalibrationResults.resx">
<DependentUpon>FrmCalibrationResults.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmQsTool.resx">
<DependentUpon>FrmQsTool.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmConfigurations.resx">
<DependentUpon>FrmConfigurations.cs</DependentUpon>
</EmbeddedResource>
@@ -619,6 +628,10 @@
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\ServiceFwUpdate\Common\FwUpdateDb\FwUpdateDb.csproj">
<Project>{4806D89A-FBFB-41BC-AAA7-2242444BF55A}</Project>
<Name>FwUpdateDb</Name>
</ProjectReference>
<ProjectReference Include="..\..\CommonCore.Configuration\CommonCore.Configuration.csproj">
<Project>{9EB1F659-6F73-4F65-BCAB-4114FD94F5FC}</Project>
<Name>CommonCore.Configuration</Name>
+22 -22
View File
@@ -42,7 +42,7 @@
this.gpLAA = new System.Windows.Forms.GroupBox();
this.button5 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.btnPara = new System.Windows.Forms.Button();
this.btnQsTool = new System.Windows.Forms.Button();
this.btnRegHistory = new System.Windows.Forms.Button();
this.btnPassword = new System.Windows.Forms.Button();
this.btnLowLevelTools = new System.Windows.Forms.Button();
@@ -190,13 +190,13 @@
//
this.gpLAA.Controls.Add(this.button5);
this.gpLAA.Controls.Add(this.button2);
this.gpLAA.Controls.Add(this.btnPara);
this.gpLAA.Controls.Add(this.btnQsTool);
this.gpLAA.Controls.Add(this.btnRegHistory);
this.gpLAA.Controls.Add(this.btnPassword);
this.gpLAA.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.gpLAA.Location = new System.Drawing.Point(186, 27);
this.gpLAA.Name = "gpLAA";
this.gpLAA.Size = new System.Drawing.Size(168, 235);
this.gpLAA.Size = new System.Drawing.Size(168, 245);
this.gpLAA.TabIndex = 20;
this.gpLAA.TabStop = false;
this.gpLAA.Text = "Production LAA";
@@ -225,17 +225,17 @@
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click_1);
//
// btnPara
// btnQsTool
//
this.btnPara.Enabled = false;
this.btnPara.Location = new System.Drawing.Point(5, 103);
this.btnPara.Name = "btnPara";
this.btnPara.Size = new System.Drawing.Size(156, 40);
this.btnPara.TabIndex = 19;
this.btnPara.Text = "Parameterization";
this.btnPara.UseMnemonic = false;
this.btnPara.UseVisualStyleBackColor = true;
this.btnPara.Click += new System.EventHandler(this.btnPara_Click);
this.btnQsTool.Enabled = false;
this.btnQsTool.Location = new System.Drawing.Point(5, 103);
this.btnQsTool.Name = "btnQsTool";
this.btnQsTool.Size = new System.Drawing.Size(156, 40);
this.btnQsTool.TabIndex = 19;
this.btnQsTool.Text = "QS Tool";
this.btnQsTool.UseMnemonic = false;
this.btnQsTool.UseVisualStyleBackColor = true;
this.btnQsTool.Click += new System.EventHandler(this.btnQsTool_Click);
//
// btnRegHistory
//
@@ -261,7 +261,7 @@
//
// btnLowLevelTools
//
this.btnLowLevelTools.Location = new System.Drawing.Point(4, 158);
this.btnLowLevelTools.Location = new System.Drawing.Point(4, 153);
this.btnLowLevelTools.Name = "btnLowLevelTools";
this.btnLowLevelTools.Size = new System.Drawing.Size(157, 40);
this.btnLowLevelTools.TabIndex = 22;
@@ -277,9 +277,9 @@
this.gbDeveloper.Controls.Add(this.btnFiles);
this.gbDeveloper.Controls.Add(this.btnLegacyTestApp);
this.gbDeveloper.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.gbDeveloper.Location = new System.Drawing.Point(186, 282);
this.gbDeveloper.Location = new System.Drawing.Point(186, 293);
this.gbDeveloper.Name = "gbDeveloper";
this.gbDeveloper.Size = new System.Drawing.Size(168, 204);
this.gbDeveloper.Size = new System.Drawing.Size(168, 193);
this.gbDeveloper.TabIndex = 21;
this.gbDeveloper.TabStop = false;
this.gbDeveloper.Text = "Developer";
@@ -288,7 +288,7 @@
// BtnFileSplit
//
this.BtnFileSplit.Enabled = false;
this.BtnFileSplit.Location = new System.Drawing.Point(4, 114);
this.BtnFileSplit.Location = new System.Drawing.Point(4, 111);
this.BtnFileSplit.Name = "BtnFileSplit";
this.BtnFileSplit.Size = new System.Drawing.Size(157, 40);
this.BtnFileSplit.TabIndex = 18;
@@ -300,7 +300,7 @@
// btnFiles
//
this.btnFiles.Enabled = false;
this.btnFiles.Location = new System.Drawing.Point(4, 68);
this.btnFiles.Location = new System.Drawing.Point(4, 65);
this.btnFiles.Name = "btnFiles";
this.btnFiles.Size = new System.Drawing.Size(157, 40);
this.btnFiles.TabIndex = 16;
@@ -311,7 +311,7 @@
// btnLegacyTestApp
//
this.btnLegacyTestApp.Enabled = false;
this.btnLegacyTestApp.Location = new System.Drawing.Point(4, 24);
this.btnLegacyTestApp.Location = new System.Drawing.Point(4, 19);
this.btnLegacyTestApp.Name = "btnLegacyTestApp";
this.btnLegacyTestApp.Size = new System.Drawing.Size(157, 40);
this.btnLegacyTestApp.TabIndex = 15;
@@ -343,14 +343,14 @@
// loginMenuItem
//
this.loginMenuItem.Name = "loginMenuItem";
this.loginMenuItem.Size = new System.Drawing.Size(180, 22);
this.loginMenuItem.Size = new System.Drawing.Size(112, 22);
this.loginMenuItem.Text = "Login";
this.loginMenuItem.Click += new System.EventHandler(this.OnLoginClick);
//
// logoutMenuItem
//
this.logoutMenuItem.Name = "logoutMenuItem";
this.logoutMenuItem.Size = new System.Drawing.Size(180, 22);
this.logoutMenuItem.Size = new System.Drawing.Size(112, 22);
this.logoutMenuItem.Text = "Logout";
this.logoutMenuItem.Click += new System.EventHandler(this.OnLogoutClick);
//
@@ -392,7 +392,7 @@
private System.Windows.Forms.Button btnAlarm;
private System.Windows.Forms.Button btnSetup;
private System.Windows.Forms.GroupBox gpLAA;
private System.Windows.Forms.Button btnPara;
private System.Windows.Forms.Button btnQsTool;
private System.Windows.Forms.Button btnRegHistory;
private System.Windows.Forms.Button btnPassword;
private System.Windows.Forms.GroupBox gbDeveloper;
+9 -1
View File
@@ -419,7 +419,7 @@
btnPassword.Tag = SoftwareFunctions.LAA_PASSWORD;
btnRegHistory.Tag = SoftwareFunctions.LAA_REGISTER_HISTORY;
btnPara.Tag = SoftwareFunctions.LAA_PARAMETERIZATION;
btnQsTool.Tag = SoftwareFunctions.LAA_PARAMETERIZATION;
button2.Tag = SoftwareFunctions.LAA_PROCESS_PARAMETER;
button5.Tag = SoftwareFunctions.LAA_MAPPING_NA;
@@ -550,5 +550,13 @@
}
#endregion Form initialization
private void btnQsTool_Click(Object sender, EventArgs e)
{
var form = new FrmQsTool();
form.Show();
form.Closed += Form_Closed;
Hide();
}
}
}
@@ -120,4 +120,7 @@
<metadata name="menu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value>
</metadata>
</root>
+24 -13
View File
@@ -30,7 +30,6 @@
{
this.components = new System.ComponentModel.Container();
this.btnGet = new System.Windows.Forms.Button();
this.btnSet = new System.Windows.Forms.Button();
this.txtPcbID = new System.Windows.Forms.TextBox();
this.txtPassword = new System.Windows.Forms.TextBox();
this.lblPcbID = new System.Windows.Forms.Label();
@@ -52,6 +51,8 @@
this.barProgressDb = new System.Windows.Forms.ProgressBar();
this.tmrProgressPcb = new System.Windows.Forms.Timer(this.components);
this.tmrProgressDb = new System.Windows.Forms.Timer(this.components);
this.label4 = new System.Windows.Forms.Label();
this.txtProductionPassword = new System.Windows.Forms.TextBox();
this.grpSetup.SuspendLayout();
this.grpDataBase.SuspendLayout();
this.SuspendLayout();
@@ -66,16 +67,6 @@
this.btnGet.UseVisualStyleBackColor = true;
this.btnGet.Click += new System.EventHandler(this.btnGet_Click);
//
// btnSet
//
this.btnSet.Location = new System.Drawing.Point(291, 64);
this.btnSet.Name = "btnSet";
this.btnSet.Size = new System.Drawing.Size(54, 25);
this.btnSet.TabIndex = 1;
this.btnSet.Text = "Set";
this.btnSet.UseVisualStyleBackColor = true;
this.btnSet.Click += new System.EventHandler(this.btnSet_Click);
//
// txtPcbID
//
this.txtPcbID.Location = new System.Drawing.Point(9, 67);
@@ -194,6 +185,8 @@
//
// grpDataBase
//
this.grpDataBase.Controls.Add(this.label4);
this.grpDataBase.Controls.Add(this.txtProductionPassword);
this.grpDataBase.Controls.Add(this.label3);
this.grpDataBase.Controls.Add(this.txtLvl8);
this.grpDataBase.Controls.Add(this.btnErasePwdFile);
@@ -205,7 +198,6 @@
this.grpDataBase.Controls.Add(this.lblPcbID);
this.grpDataBase.Controls.Add(this.txtPassword);
this.grpDataBase.Controls.Add(this.txtPcbID);
this.grpDataBase.Controls.Add(this.btnSet);
this.grpDataBase.Controls.Add(this.btnGet);
this.grpDataBase.Location = new System.Drawing.Point(7, 101);
this.grpDataBase.Name = "grpDataBase";
@@ -279,6 +271,24 @@
this.barProgressDb.TabIndex = 24;
this.barProgressDb.Visible = false;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(121, 129);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(50, 13);
this.label4.TabIndex = 32;
this.label4.Text = "Prod PW";
this.label4.Click += new System.EventHandler(this.label4_Click);
//
// txtProductionPassword
//
this.txtProductionPassword.Location = new System.Drawing.Point(116, 145);
this.txtProductionPassword.Name = "txtProductionPassword";
this.txtProductionPassword.Size = new System.Drawing.Size(102, 20);
this.txtProductionPassword.TabIndex = 31;
this.txtProductionPassword.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
//
// FrmPassword
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -301,7 +311,6 @@
#endregion
private System.Windows.Forms.Button btnGet;
private System.Windows.Forms.Button btnSet;
private System.Windows.Forms.TextBox txtPcbID;
private System.Windows.Forms.TextBox txtPassword;
private System.Windows.Forms.Label lblPcbID;
@@ -323,5 +332,7 @@
private System.Windows.Forms.Button btnErasePwdFile;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtLvl8;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtProductionPassword;
}
}
+23 -30
View File
@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
@@ -56,20 +57,10 @@ namespace Xylem.Common.Ui.GenesisToolBox
Task.Factory.StartNew(() =>
{
ViewProgressDb(true);
#pragma warning disable CS0618 // Type or member is obsolete
var passwordServiceUrl = ServiceUrls.GenesisGetPasswordServiceUrl();
#pragma warning restore CS0618 // Type or member is obsolete
var http = (HttpWebRequest)WebRequest.Create(passwordServiceUrl + txtPcbID.Text);
var response = (HttpWebResponse)http.GetResponse();
var responseStream = response.GetResponseStream();
if (responseStream == null)
{
return;
}
var sr = new StreamReader(responseStream);
var autoPassword = "";
var url = ServiceUrls.GenesisGetPasswordContainerServiceUrl();
//var http = (HttpWebRequest)WebRequest.Create($"{url}{_currentGenesis.PcbId}");
@@ -81,16 +72,8 @@ namespace Xylem.Common.Ui.GenesisToolBox
var response2 = (HttpWebResponse)http2.GetResponse();
var responseStream2 = response2.GetResponseStream();
if (responseStream == null)
{
throw new InvalidOperationException();
}
if (response.StatusCode != HttpStatusCode.OK)
{
}
Invoke(new Action(() =>
{
@@ -100,12 +83,12 @@ namespace Xylem.Common.Ui.GenesisToolBox
var responseJson2 = sr2.ReadToEnd();
a = JsonConvert.DeserializeObject<MeterPwdDb>(responseJson2);
autoPassword = Encoding.UTF8.GetString(a.ListOfPasswords[7]);
}
var responseJson = sr.ReadToEnd();
//TODO THW hide skeleton key if read from DB
txtPassword.Text = responseJson.Trim('"');
txtLvl8.Text = autoPassword;
txtPassword.Text = a.Skeleton;
txtLvl8.Text = Encoding.UTF8.GetString(a.ListOfPasswords.Last());
txtProductionPassword.Text = a.Password;
lblConnectDb.Text = @"Connected to PWD DB";
lblConnectDb.ForeColor = Color.Green;
@@ -252,7 +235,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
txtPcbID.Text = "";
txtPassword.Text = "";
btnGet.Enabled = false;
btnSet.Enabled = false;
//btnSet.Enabled = false;
if (!string.IsNullOrEmpty(cbComSlot.SelectedItem.ToString()) &&
int.TryParse(cbComSlot.SelectedItem.ToString(), out slotNr))
{
@@ -326,7 +309,7 @@ namespace Xylem.Common.Ui.GenesisToolBox
txtPcbID.Text = "";
txtPassword.Text = "";
btnGet.Enabled = false;
btnSet.Enabled = false;
//btnSet.Enabled = false;
btnWritePwdFile.Enabled = false;
}
@@ -352,11 +335,11 @@ namespace Xylem.Common.Ui.GenesisToolBox
if (txtPcbID.Text.Length > 7 && txtPassword.Text.Length == 12
&& lblConnectPcb.Text == StrNotConnected)
{
btnSet.Enabled = true;
//btnSet.Enabled = true;
}
else
{
btnSet.Enabled = false;
//btnSet.Enabled = false;
}
}
@@ -603,5 +586,15 @@ namespace Xylem.Common.Ui.GenesisToolBox
{
}
private void label4_Click(Object sender, EventArgs e)
{
}
private void textBox1_TextChanged(Object sender, EventArgs e)
{
}
}
}
@@ -123,4 +123,7 @@
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>133, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>26</value>
</metadata>
</root>
@@ -2310,6 +2310,7 @@ namespace XylemCommonUiLegacyGenCtl
{
if (batch != null)
{
batch.DisposeTestBench();
batch.RemoveAllMeters();
batch.Dispose();
}
@@ -462,6 +462,11 @@ namespace XylemCommonUiLegacyGenCtl
{
meter.WriteRegister(Register.Genesisflow.TriggerIdle, 0, true, true);
}
meter.WriteRegister("GENESISFLOW_SealDisplay", 0, true, true);
meter.WriteRegister("GENESISFLOW_DisplayPow10", new Byte[] { 0x00, 0x00, 0x00, 0xFA }, true, true);
meter.WriteRegister("GENESISFLOW_DisplayUnits", 0, true, true);
meter.InitMeasurement();
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
</startup>
</configuration>
+30
View File
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xylem.Common.Hardware.Plc.Siemens.Client.TestbenchAdapter;
namespace SPSCheck
{
class Program
{
static void Main(string[] args)
{
try
{
var c = new Vb6Testbench();
Console.WriteLine("URL:");
c.Connect(Console.ReadLine());
}
catch (Exception ex)
{
Console.WriteLine(ex.Message)
; }
}
}
}
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("SPSCheck")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SPSCheck")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("1903344f-7ba5-4c38-b672-3ca81aa62b51")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{1903344F-7BA5-4C38-B672-3CA81AA62B51}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>SPSCheck</RootNamespace>
<AssemblyName>SPSCheck</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Hardware\PLC\Siemens\Client\TestbenchAdapter\TestbenchAdapter.csproj">
<Project>{494AB06C-10C4-43F8-BC8A-92088EB35867}</Project>
<Name>TestbenchAdapter</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -67,7 +67,7 @@
<GenerateManifests>true</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<SignManifests>true</SignManifests>
<SignManifests>false</SignManifests>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
@@ -75,7 +75,7 @@
<HintPath>..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\..\packages\NLog.5.2.2\lib\net46\NLog.dll</HintPath>
<HintPath>..\..\packages\NLog.5.0.0\lib\net46\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
@@ -141,8 +141,6 @@
<DependentUpon>Resources.de.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="FwUpdateLoader_1_TemporaryKey.pfx" />
<None Include="FwUpdateLoader_4_TemporaryKey.pfx" />
<None Include="FwUpdateLoader_TemporaryKey.pfx" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
<package id="NLog" version="5.2.2" targetFramework="net472" />
<package id="NLog" version="5.0.0" targetFramework="net472" />
</packages>
@@ -77,13 +77,14 @@
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<PropertyGroup />
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\..\packages\NLog.5.2.2\lib\net46\NLog.dll</HintPath>
<HintPath>..\..\packages\NLog.5.0.0\lib\net46\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
<package id="NLog" version="5.2.2" targetFramework="net472" />
<package id="NLog" version="5.0.0" targetFramework="net472" />
<package id="NLog.Config" version="4.6.7" targetFramework="net472" />
<package id="NLog.Schema" version="4.6.7" targetFramework="net472" />
</packages>