radio param change
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
{
|
||||
UserControl = new UcBarcodeInput();
|
||||
}
|
||||
|
||||
|
||||
public override UserControl GetControl()
|
||||
{
|
||||
if (UserControl == null)
|
||||
|
||||
+9
-10
@@ -87,7 +87,13 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
}
|
||||
updateImage(UserControl.WriteToMeter, ret);
|
||||
base.Progress = base.Progress + 16;
|
||||
|
||||
//Check if new password is in the meter ... even the file wirte wasnt succesfull
|
||||
if (!ret)
|
||||
{
|
||||
Meter.Logout();
|
||||
ret = Meter.Login(Encoding.UTF8.GetString(pwContainer.listOfPasswords.Last()));
|
||||
|
||||
}
|
||||
if (ret)
|
||||
{
|
||||
ret = UpdatePasswordinDb();
|
||||
@@ -177,16 +183,9 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
|
||||
var newPs = Encoding.UTF8.GetString(pwContainer.listOfPasswords.Last());
|
||||
var passwordSetServiceUrl = ServiceUrls.GenesisSetPasswordServiceUrl();
|
||||
var http = (HttpWebRequest)WebRequest.Create(passwordSetServiceUrl + Meter.PcbId + "&Password=" + newPs + "&keepOldPw=true");
|
||||
var response = (HttpWebResponse)http.GetResponse();
|
||||
var responseStream = response.GetResponseStream();
|
||||
if (responseStream == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var sr = new StreamReader(responseStream);
|
||||
|
||||
var responseJson = sr.ReadToEnd();
|
||||
|
||||
var responseJson = LocalWebRequest.GetRequest(passwordSetServiceUrl + Meter.PcbId + "&Password=" + newPs + "&keepOldPw=true", 8000);
|
||||
if (responseJson.ToLower().Contains("store"))
|
||||
{
|
||||
return true;
|
||||
|
||||
+10
-7
@@ -17,6 +17,7 @@ using System.Configuration;
|
||||
using System.Net.Http;
|
||||
using System.Windows.Threading;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Xylem.Common.Logic.SoftwareAccessHelper;
|
||||
|
||||
namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
{
|
||||
@@ -76,20 +77,22 @@ namespace ProductionUiCordonel.ProductionProcesses.Actions
|
||||
{
|
||||
|
||||
//readout adress, freq,
|
||||
|
||||
//FrequencyIndicator
|
||||
var freq = RegisterConverter.ConvertTo<UInt32>(Meter.ReadRegister("SENSUSRADIO_FrequencyIndicator"));
|
||||
RadioAdress = RegisterConverter.ConvertTo<UInt32>(Meter.ReadRegister("SENSUSRADIO_RadioAddress"));
|
||||
|
||||
|
||||
Comport = Convert.ToByte(ConfigurationManager.AppSettings[$"SirtComport{freq}"]);
|
||||
//0B012188037ADDBD043CCE7018375AE9
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var enc = Meter.ReadRegister("SENSUSRADIO_EncryptionKey", 16);
|
||||
EncyptionKey = BitConverter.ToString(enc).Replace("-", "");
|
||||
|
||||
EncyptionKey = LocalWebRequest.GetRequest($"{ServiceUrls.GenesisFinalCheckServiceUrl()}GetEncryptionKey?PcbID={Meter.PcbId}", 80000).ToUpper().Trim('\"');
|
||||
if (!EncyptionKey.Equals(BitConverter.ToString(enc.ToArray()).Replace("-", "")))
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show("Funkschlüssel überprüfen!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
//if (freq == 868)
|
||||
//{
|
||||
|
||||
Reference in New Issue
Block a user