- update SHelly libs
- update EgwConf (valutare se da postare iin MapoSDK finito il lavoro ora è direttamente in IOB-WIN)
This commit is contained in:
@@ -31,6 +31,9 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MapoSDK, Version=6.14.2411.518, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MapoSDK.6.14.2411.518\lib\MapoSDK.dll</HintPath>
|
||||
</Reference>
|
||||
<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>
|
||||
@@ -58,6 +61,8 @@
|
||||
<Compile Include="EnumConf.cs" />
|
||||
<Compile Include="IniFile.cs" />
|
||||
<Compile Include="IobConfTree.cs" />
|
||||
<Compile Include="Mem\plcMemMapExt.cs" />
|
||||
<Compile Include="Mem\ToMapo.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Base\IobManDto.cs" />
|
||||
<Compile Include="Base\ServerMapoDto.cs" />
|
||||
|
||||
@@ -28,6 +28,63 @@ namespace EgwConf.Iob
|
||||
Log = LogManager.GetCurrentClassLogger();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Init classe configurazione da file
|
||||
/// </summary>
|
||||
public IobConfTree(string confFilePath)
|
||||
{
|
||||
Log = LogManager.GetCurrentClassLogger();
|
||||
if (File.Exists(confFilePath))
|
||||
{
|
||||
IobConfTree newConfObj = new IobConfTree();
|
||||
// verifico TIPO file...
|
||||
string fileExt = Path.GetExtension(confFilePath);
|
||||
string fileName = Path.GetFileName(confFilePath);
|
||||
string rawData = File.ReadAllText(confFilePath);
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
// leggo in base al tipo...
|
||||
switch (fileExt)
|
||||
{
|
||||
case "yaml":
|
||||
case "yml":
|
||||
var deserializer = new DeserializerBuilder()
|
||||
.WithNamingConvention(CamelCaseNamingConvention.Instance)
|
||||
.Build();
|
||||
try
|
||||
{
|
||||
newConfObj = deserializer.Deserialize<IobConfTree>(rawData);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
//lgError($"Eccezione in LoadFromYaml{Environment.NewLine}{exc}");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (newConfObj != null)
|
||||
{
|
||||
// ora copio in oggetto corrente...
|
||||
CncData = newConfObj.CncData;
|
||||
CodIOB = newConfObj.CodIOB;
|
||||
ConfFileName = fileName;
|
||||
Customer = newConfObj.Customer;
|
||||
GeneralCom = newConfObj.GeneralCom;
|
||||
InputDataProc = newConfObj.InputDataProc;
|
||||
IobManConf = newConfObj.IobManConf;
|
||||
IobType = newConfObj.IobType;
|
||||
Model = newConfObj.Model;
|
||||
OptPar = newConfObj.OptPar;
|
||||
ReleaseVers = newConfObj.ReleaseVers;
|
||||
ServerMES = newConfObj.ServerMES;
|
||||
TempoCiclo = newConfObj.TempoCiclo;
|
||||
Vendor = newConfObj.Vendor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce un oggetto di conf leggendo INI ed effettuando conversione
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,923 @@
|
||||
using MapoSDK;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace EgwConf.Iob.Mem
|
||||
{
|
||||
/// <summary>
|
||||
/// Classe gestione configurazione parametri di base x allarmi
|
||||
/// </summary>
|
||||
public class BaseAlarmConf
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Elenco dei contatori blink x gestione caso fronte salita/discesa segnale che blinka
|
||||
/// </summary>
|
||||
public int[] alarmsBlinkCounter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// BitMask 16bit (1 = valido, 0 = filtro) degli allarmi silenziati/disabilitati (se
|
||||
/// iniziano per ##) come valore da sottrarre x check
|
||||
/// </summary>
|
||||
public uint[] alarmsMask { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Array dei valori allarme correnti
|
||||
/// </summary>
|
||||
public uint[] alarmsState { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// valore di partenza x un segnale di blink in caso di fine variazione (fronte discesa)
|
||||
/// </summary>
|
||||
public int blinkDownVal { get; set; } = 4;
|
||||
|
||||
/// <summary>
|
||||
/// valore di partenza x un segnale di blink in caso di inizio variazione (fronte salita)
|
||||
/// </summary>
|
||||
public int blinkUpVal { get; set; } = 3;
|
||||
|
||||
/// <summary>
|
||||
/// Descrizione area allarmi
|
||||
/// </summary>
|
||||
public string description { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Indice nell'area di memoria (da valore iniziale = 0)
|
||||
/// </summary>
|
||||
public int index { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Nome "assoluto" della posizione nell'area di memoria (anche diverso da indice)
|
||||
/// </summary>
|
||||
public string memAddr { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Elenco allarmi configurati x la bitmap
|
||||
/// </summary>
|
||||
public List<string> messages { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// Size in byte
|
||||
/// </summary>
|
||||
public int size { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Tipo di dato
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public plcDataType tipoMem { get; set; } = plcDataType.Boolean;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Tipo del blocco allarmi configurato
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public AlarmBlockType blockType { get; set; } = AlarmBlockType.Bitmap;
|
||||
|
||||
/// <summary>
|
||||
/// Livello del blocco memoria
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public AlarmLevel blockLevel { get; set; } = AlarmLevel.Alarm;
|
||||
|
||||
/// <summary>
|
||||
/// Elenco KEY codici allarme attivabili
|
||||
/// </summary>
|
||||
public List<string> activeKeys { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// Elenco VALUE codici allarme attivabili
|
||||
/// </summary>
|
||||
public List<string> activeValues { get; set; } = new List<string>();
|
||||
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Calcola il filtro da condizione blink (ovvero maschera per valori indicati blinking)
|
||||
/// </summary>
|
||||
/// <param name="num"></param>
|
||||
/// <returns></returns>
|
||||
public uint blinkFilter(int num)
|
||||
{
|
||||
uint answ = 0;
|
||||
int idx = 16 * num;
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
if (alarmsBlinkCounter[idx + i] > 0)
|
||||
{
|
||||
answ += (uint)1 << i;
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua update dei contatori blink per gestire i segnali alternati sul fronte di salita/discesa
|
||||
/// </summary>
|
||||
/// <param name="num"></param>
|
||||
/// <param name="newStatus"></param>
|
||||
public void checkBlinkCounter(int num, uint newStatus)
|
||||
{
|
||||
// calcola la maschera di variazione da valore precedente
|
||||
var variations = newStatus ^ alarmsState[num];
|
||||
// ciclo sui 16 bit...
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
// controllo se è variato
|
||||
if ((variations & (1 << i)) == (1 << i))
|
||||
{
|
||||
// se il valore nuovo è 1 --> è in fronte salita
|
||||
if ((newStatus & (1 << i)) == (1 << i))
|
||||
{
|
||||
// cambio SOLO SE il valore blink è zero...
|
||||
if (alarmsBlinkCounter[num * 16 + i] == 0)
|
||||
{
|
||||
alarmsBlinkCounter[num * 16 + i] = blinkUpVal;
|
||||
}
|
||||
}
|
||||
// altrimenti se è fronte discesa
|
||||
else
|
||||
{
|
||||
// cambio SOLO SE il valore blink è zero...
|
||||
if (alarmsBlinkCounter[num * 16 + i] == 0)
|
||||
{
|
||||
alarmsBlinkCounter[num * 16 + i] = blinkDownVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// decremento contatori blink
|
||||
int idx = 0;
|
||||
foreach (var item in alarmsBlinkCounter)
|
||||
{
|
||||
alarmsBlinkCounter[idx] = item > 0 ? item - 1 : item;
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Confronta un valore di stato allarme con lo stato precedentemente salvato considerando blink/veto
|
||||
/// </summary>
|
||||
/// <param name="num">Numero/indice del banco di allarme (uint16)</param>
|
||||
/// <param name="newValue">Valore (bitmap) allarmi come uint16</param>
|
||||
/// <returns></returns>
|
||||
public bool isChanged(int num, uint newValue)
|
||||
{
|
||||
// per prima cosa controllo valori RAW
|
||||
bool answ = !alarmsState[num].Equals(newValue);
|
||||
if (answ)
|
||||
{
|
||||
// controllo valori filtrati con ## (sottraendo BITMASK dai valori di filtro)
|
||||
answ = ((alarmsState[num] & alarmsMask[num]) != (newValue & alarmsMask[num]));
|
||||
// se fossero ancora differenti controllo ulteriore mask dato il counter dei blink:
|
||||
if (answ)
|
||||
{
|
||||
var blinkFilt = blinkFilter(num);
|
||||
answ = ((alarmsState[num] & (alarmsMask[num] & ~blinkFilt)) != (newValue & (alarmsMask[num] & ~blinkFilt)));
|
||||
//answ = ((alarmsState[num] & (alarmsMask[num] | blinkFilt)) != (newValue & (alarmsMask[num] | blinkFilt)));
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Inizializzazione classe con valori calcolati: attenzione si aspetta banchi da 32 bit...
|
||||
/// ATTENZIONE: eseguita solo se blockType == bitmap
|
||||
/// </summary>
|
||||
public void setupData()
|
||||
{
|
||||
// verifico si tratti di un tipo allarmi a bitmap... altrimenti salto
|
||||
if (blockType == AlarmBlockType.Bitmap)
|
||||
{
|
||||
// inizializzo vettore valore allarmi x banco int8 x iniziare
|
||||
alarmsState = new uint[size];
|
||||
alarmsMask = new uint[size];
|
||||
int bitSize = 8;
|
||||
|
||||
// 16/32 bit
|
||||
if (size > 1)
|
||||
{
|
||||
// inizializzo vettore valore allarmi x banco int16
|
||||
alarmsState = new uint[size / 2];
|
||||
alarmsMask = new uint[size / 2];
|
||||
bitSize = 16;
|
||||
}
|
||||
|
||||
// una volta inizializzata la classe di base sistemo vettori allarmi disabilitati ed il
|
||||
// contatore blink dei fronti di discesa
|
||||
alarmsBlinkCounter = new int[messages.Count];
|
||||
//verifico i contatori di blink da eventuale conf...
|
||||
|
||||
int idx = 0;
|
||||
int bank = 0;
|
||||
foreach (var item in messages)
|
||||
{
|
||||
if (item.StartsWith("##"))
|
||||
{
|
||||
alarmsBlinkCounter[idx] = -999;
|
||||
}
|
||||
else
|
||||
{
|
||||
alarmsBlinkCounter[idx] = 1;
|
||||
alarmsMask[bank] += (uint)1 << idx;
|
||||
}
|
||||
idx++;
|
||||
// sistemo bank/indice
|
||||
if (idx > bitSize - 1)
|
||||
{
|
||||
bank++;
|
||||
idx = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua il caricamento dello status da un valore precedente (es da cache REDIS)
|
||||
/// ATTENZIONE: eseguita solo se blockType == bitmap e size corrisponde a quella della mem allarmi
|
||||
/// </summary>
|
||||
/// <param name="lastState"></param>
|
||||
public void loadPrev(uint[] lastState)
|
||||
{
|
||||
// verifico si tratti di un tipo allarmi a bitmap... altrimenti salto
|
||||
if (blockType == AlarmBlockType.Bitmap)
|
||||
{
|
||||
if (lastState.Length == alarmsState.Length)
|
||||
{
|
||||
alarmsState = lastState;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Imposta il valore dello status attuale allarme impostando eventuale valore blink x le variazioni
|
||||
/// </summary>
|
||||
/// <param name="num"></param>
|
||||
/// <param name="newStatus"></param>
|
||||
public void updStatusVal(int num, uint newStatus)
|
||||
{
|
||||
// salvo nuovo valore
|
||||
alarmsState[num] = newStatus;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tipologia del blocco allarmi configurato
|
||||
/// </summary>
|
||||
public enum AlarmBlockType
|
||||
{
|
||||
/// <summary>
|
||||
/// Modalità standard a bitmap
|
||||
/// </summary>
|
||||
Bitmap,
|
||||
|
||||
/// <summary>
|
||||
/// Modalità elenco dei valori attivi (es OPC-UA BLM/Adige)
|
||||
/// </summary>
|
||||
ActiveList
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Livello Allarme
|
||||
/// </summary>
|
||||
public enum AlarmLevel
|
||||
{
|
||||
/// <summary>
|
||||
/// Messaggio (non bloccante)
|
||||
/// </summary>
|
||||
Message = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Avviso (non bloccante)
|
||||
/// </summary>
|
||||
Warning = 100,
|
||||
|
||||
/// <summary>
|
||||
/// Allarme (bloccante)
|
||||
/// </summary>
|
||||
Alarm = 200,
|
||||
|
||||
/// <summary>
|
||||
/// Allarme di massimo livello
|
||||
/// </summary>
|
||||
Emergency = 300
|
||||
}
|
||||
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Classe gestione configurazione parametri di base x configurazione estesa (es MTConnect,
|
||||
/// OPC-UA, ...)
|
||||
/// </summary>
|
||||
public class BaseParamConf
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Struttura dati x check condizione LAVORA / Green
|
||||
/// </summary>
|
||||
public List<diCheckCondition> condWork { get; set; } = new List<diCheckCondition>();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Struttura dati x check condizione EXTRA di controllo x singoli BIT
|
||||
/// </summary>
|
||||
public Dictionary<int, diCheckCondSetup> bitSpecCond { get; set; } = new Dictionary<int, diCheckCondSetup>();
|
||||
|
||||
/// <summary>
|
||||
/// Indica se l'emergenza armata va riportata verso Mapo come bit a TRUE True --> armata
|
||||
/// = 1 / triggered = 0 False --> triggered = 1 / armata = 0
|
||||
/// </summary>
|
||||
public bool emergencyArmedTrue { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Elenco items FILTRATI da invio come dynData --> FluxLog (events o samples), ricerca SECCA
|
||||
/// </summary>
|
||||
public List<string> fluxLogVeto { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// Elenco items FILTRATI da invio come dynData --> FluxLog (events o samples), ricerca testo come contains in displayName
|
||||
/// </summary>
|
||||
public List<string> fluxLogVetoContains { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// Indica se il controllo di ping sia OK (x controllo prima della connessione)
|
||||
/// </summary>
|
||||
public bool forcePingOk { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Array degli elementi di traduzione item
|
||||
/// </summary>
|
||||
public Dictionary<string, string> itemTranslation { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Indica se decodificare valori dall'area mMapRead da valori byte[] delle variabili sottoscritte
|
||||
/// </summary>
|
||||
public bool mMapReadFromRawByte { get; set; } = false;
|
||||
/// <summary>
|
||||
/// Indica se decodificare valori dall'area mMapWrite da valori byte[] delle variabili sottoscritte
|
||||
/// </summary>
|
||||
public bool mMapWriteFromRawByte { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Indica se inviare i dati sottoscritti che sono "raw" o meno...
|
||||
/// </summary>
|
||||
public bool sendSubscribItemsRaw { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Separatore configurazione area OPC e subObj in caso di memorie struct speciali
|
||||
/// </summary>
|
||||
public char kvDelim { get; set; } = '#';
|
||||
|
||||
/// <summary>
|
||||
/// Separatore definizione aree memoria speciali
|
||||
/// </summary>
|
||||
public char memDelim { get; set; } = '.';
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Nome variabile x EmergencyStop
|
||||
/// </summary>
|
||||
public string keyEStop { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Nome variabile x ExeMode
|
||||
/// </summary>
|
||||
public string keyExeMode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Nome variabile x pezzi FATTI
|
||||
/// </summary>
|
||||
public string keyPartCount { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Nome variabile x Codice Articolo
|
||||
/// </summary>
|
||||
public string keyPartId { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Nome variabile x pezzi RICHIESTI
|
||||
/// </summary>
|
||||
public string keyPartReq { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Nome variabile x NOME PROGRAMMA
|
||||
/// </summary>
|
||||
public string keyProgName { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Nome variabile x RunMode
|
||||
/// </summary>
|
||||
public string keyRunMode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Aree di memoria lettura
|
||||
/// </summary>
|
||||
public Dictionary<string, dataConfTSVC> mMapRead { get; set; } = new Dictionary<string, dataConfTSVC>();
|
||||
|
||||
/// <summary>
|
||||
/// Aree di memoria scrittura
|
||||
/// </summary>
|
||||
public Dictionary<string, dataConf> mMapWrite { get; set; } = new Dictionary<string, dataConf>();
|
||||
|
||||
/// <summary>
|
||||
/// Dictionary dei nomi da cercare come "endsWith" a cui applicare la soglia indicata
|
||||
/// </summary>
|
||||
public Dictionary<string, float> paramsEndThresh { get; set; } = new Dictionary<string, float>();
|
||||
|
||||
/// <summary>
|
||||
/// Dictionary dei nomi da cercare come "contains" a cui applicare la soglia indicata
|
||||
/// </summary>
|
||||
public Dictionary<string, float> paramsContainsThresh { get; set; } = new Dictionary<string, float>();
|
||||
|
||||
/// <summary>
|
||||
/// Indica se il ping sia un criterio valido x determinare powerON impianto
|
||||
/// </summary>
|
||||
public bool pingAsPowerOn { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Indica se venga richiesta invio del run mode
|
||||
/// </summary>
|
||||
public bool runModeSend { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Indica se venga richiesta traduzione del run mode
|
||||
/// </summary>
|
||||
public bool runModeTrad { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Lista ulteriori configurazioni KeyValuePair
|
||||
/// </summary>
|
||||
public Dictionary<string, string> optKVP { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Oggetto x processing valori (elenco valori e modalità)
|
||||
/// </summary>
|
||||
public class calcConf
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public calcMode calcMode { get; set; } = calcMode.None;
|
||||
public List<string> listVal { get; set; } = new List<string>();
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Classe per rappresentare oggetti chiave/valore target x controlo condizioni multiple
|
||||
/// </summary>
|
||||
public class diCheckCondition
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Nome variabile
|
||||
/// </summary>
|
||||
public string keyName { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Se >=0 indica ordine bit x decodifica di byte[] raw
|
||||
/// </summary>
|
||||
public int bitNum { get; set; } = -1;
|
||||
|
||||
/// <summary>
|
||||
/// valore target per esito richiesto
|
||||
/// </summary>
|
||||
public string targetValue { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Classe per rappresentare una lista di oggetti chiave/valore target x controlo condizioni
|
||||
/// multiple + indicazione modalità di controllo (AND/OR/...)
|
||||
/// </summary>
|
||||
public class diCheckCondSetup
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Elenco condizioni
|
||||
/// </summary>
|
||||
public List<diCheckCondition> checkList { get; set; } = new List<diCheckCondition>();
|
||||
|
||||
/// <summary>
|
||||
/// Modalità verifica condizioni
|
||||
/// </summary>
|
||||
public boolCheckMode checkMode { get; set; } = boolCheckMode.AND;
|
||||
|
||||
/// <summary>
|
||||
/// indica se il check vada NEGATO (esempio se cerco la condizione opposta, esempio num
|
||||
/// allarmi 0 --> se true NEGO la condizione HO ALLARMI)
|
||||
/// </summary>
|
||||
public bool negateValue { get; set; } = false;
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Classe x definizione delle azioni in fase di setup macchina
|
||||
/// </summary>
|
||||
public class MachineSetupAction
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Indica se vada disabilitato il contapezzi quando la condizione NotEqual sia soddisfatta
|
||||
/// </summary>
|
||||
public bool DisablePzCountNotEqual { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Parametro target dell'azione
|
||||
/// </summary>
|
||||
public string TargetParam { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// parametro da impostare SE il check da esito EQUAL
|
||||
/// </summary>
|
||||
public int TargetValEqual { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// parametro da impostare SE il check da esito NOT EQUAL
|
||||
/// </summary>
|
||||
public int TargetValNotEqual { get; set; } = 1;
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Definizione parametri di setup incrociato...
|
||||
/// </summary>
|
||||
public class MachineSetupConf
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario dei parametri di corrispondenza tra variabili MES e variabili Macchina MES =
|
||||
/// scritte dal MES Macchina = scritte da macchina
|
||||
/// </summary>
|
||||
public Dictionary<string, string> checkParList { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// Abilitazione gestione Setup Avanzato (= scrittura)
|
||||
/// </summary>
|
||||
public bool EnableAdvSetup { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Modalità gestione setup
|
||||
/// </summary>
|
||||
public MachineSetupMode SetupMode { get; set; } = MachineSetupMode.ND;
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario dei parametri da scrivere quando si rilevano differenze tra i parametri MES/Macchina
|
||||
/// </summary>
|
||||
public List<MachineSetupAction> writeParAction { get; set; } = new List<MachineSetupAction>();
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// COnfigurazione blocchi x accesso memoria ottimizzato
|
||||
/// </summary>
|
||||
public class MemBlockConf
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public Dictionary<int, int> ReadBlocks { get; set; } = new Dictionary<int, int>();
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Classe gestione configurazione parametri specifici MTC da BaseParamConf
|
||||
/// </summary>
|
||||
public class MtcParamConf : BaseParamConf
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Struttura dati x check condizione PowerOn
|
||||
/// </summary>
|
||||
public diCheckCondition condPowerOn { get; set; } = new diCheckCondition();
|
||||
|
||||
/// <summary>
|
||||
/// Intervallo standard x SAMPLE data in ms
|
||||
/// </summary>
|
||||
public int clientSampleIntMs { get; set; } = 500;
|
||||
|
||||
/// <summary>
|
||||
/// Timeout standard x richieste in ms
|
||||
/// </summary>
|
||||
public int reqTOutMs { get; set; } = 1500;
|
||||
|
||||
/// <summary>
|
||||
/// Intervallo riconnessione standard in caso di mancanza risposta in ms
|
||||
/// </summary>
|
||||
public int reconnectIntMs { get; set; } = 1500;
|
||||
|
||||
/// <summary>
|
||||
/// Indica se usare il metodo di sottoscrizione alle variazioni in modalità observations
|
||||
/// </summary>
|
||||
public bool doSubsObserv { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Indica se usare il metodo di sottoscrizione alle variazioni sample
|
||||
/// </summary>
|
||||
public bool doSubsSample { get; set; } = true;
|
||||
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Classe gestione configurazione parametri specifici OPC-UA da BaseParamConf
|
||||
/// </summary>
|
||||
public class OpcUaParamConf : BaseParamConf
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Elenco Variabili (e valori da impostare) x indicare di resettare contatore lotto e
|
||||
/// quindi riavviare produzione (es: impostando valore a 1...)
|
||||
/// </summary>
|
||||
public Dictionary<string, string> actResetCounter { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// Elenco Variabili (e valori da impostare) x indicare di effettuare impostazione nuovo
|
||||
/// programma/ricetta (es: impostando valore a 1...)
|
||||
/// </summary>
|
||||
public Dictionary<string, string> actSetRecipe { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// Elenco Variabili (e valori da impostare) x indicare di fermare la produzione (es:
|
||||
/// impostando valore a 1...)
|
||||
/// </summary>
|
||||
public Dictionary<string, string> actStopProd { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// Identificativo nodo iniziale
|
||||
/// </summary>
|
||||
public string BrowseFullVal { get; set; } = "ns=2;s=Scalar_Static";
|
||||
|
||||
/// <summary>
|
||||
/// Elenco di nodi da sottoscrivere direttamente al posto dell'albero derivante dal BrowseFullVal
|
||||
/// </summary>
|
||||
public List<string> BrowseNodeList { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// Indice NS da cui fare il browse dei file
|
||||
/// </summary>
|
||||
public ushort BrowseNSIndex { get; set; } = 4;
|
||||
|
||||
/// <summary>
|
||||
/// ID del nodo da cui partire x il browse di identificazione nodi iniziale
|
||||
/// </summary>
|
||||
public uint BrowseValue { get; set; } = 5001;
|
||||
|
||||
/// <summary>
|
||||
/// Lista valori calcolati/derivati da processare
|
||||
/// </summary>
|
||||
public Dictionary<string, calcConf> calcValues { get; set; } = new Dictionary<string, calcConf>();
|
||||
|
||||
/// <summary>
|
||||
/// Numero minimo di secondi di durata di uno status
|
||||
/// </summary>
|
||||
public int minSecStatusDuration { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Numero minimo di secondi di attesa finale (es prima di chiedere chiusura ODL)
|
||||
/// </summary>
|
||||
public int minSecFinalWait { get; set; } = 30;
|
||||
|
||||
/// <summary>
|
||||
/// Struttura dati x check condizione Contapezzi Abilitato (se vuoto = sempre abilitato)
|
||||
/// </summary>
|
||||
public diCheckCondSetup condCountEnabled { get; set; } = new diCheckCondSetup();
|
||||
|
||||
/// <summary>
|
||||
/// Struttura dati x check condizione Errore
|
||||
/// </summary>
|
||||
public diCheckCondSetup condError { get; set; } = new diCheckCondSetup();
|
||||
|
||||
/// <summary>
|
||||
/// Struttura dati x check condizione Emergenza
|
||||
/// </summary>
|
||||
public diCheckCondSetup condEStop { get; set; } = new diCheckCondSetup();
|
||||
|
||||
/// <summary>
|
||||
/// Struttura dati x check condizione Manual
|
||||
/// </summary>
|
||||
public diCheckCondSetup condManual { get; set; } = new diCheckCondSetup();
|
||||
|
||||
/// <summary>
|
||||
/// Struttura dati x check condizione PowerOn
|
||||
/// </summary>
|
||||
public diCheckCondSetup condPowerOn { get; set; } = new diCheckCondSetup();
|
||||
|
||||
/// <summary>
|
||||
/// Struttura dati x check condizione READY
|
||||
/// </summary>
|
||||
public diCheckCondSetup condReady { get; set; } = new diCheckCondSetup();
|
||||
|
||||
/// <summary>
|
||||
/// Struttura dati x check condizione Setup
|
||||
/// </summary>
|
||||
public diCheckCondSetup condSetup { get; set; } = new diCheckCondSetup();
|
||||
|
||||
/// <summary>
|
||||
/// Struttura dati x check condizione WarmUp - CoolDown
|
||||
/// </summary>
|
||||
public diCheckCondSetup condWarmUpCoolDown { get; set; } = new diCheckCondSetup();
|
||||
|
||||
/// <summary>
|
||||
/// Struttura dati x check condizione Warning
|
||||
/// </summary>
|
||||
public diCheckCondSetup condWarning { get; set; } = new diCheckCondSetup();
|
||||
|
||||
/// <summary>
|
||||
/// Struttura dati x check condizione Errore
|
||||
/// </summary>
|
||||
public diCheckCondSetup condWorkOpc { get; set; } = new diCheckCondSetup();
|
||||
|
||||
/// <summary>
|
||||
/// Elenco dei NodeId da ignorare intesi come interi rami (se vuoto NON filtro)
|
||||
/// </summary>
|
||||
public List<string> filterItemsNodeId { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// Elenco item flux da FILTRARE per chiave tradotta/VALORE
|
||||
/// es: Cimolai / Baglietto, RunModeVal NON VOGLIO inviare quando il valore è 0
|
||||
/// </summary>
|
||||
public Dictionary<string, List<string>> fluxLogKeyValVeto { get; set; } = new Dictionary<string, List<string>>();
|
||||
|
||||
public UserIdent Identity { get; set; } = new UserIdent();
|
||||
|
||||
/// <summary>
|
||||
/// Aree di memoria lettura
|
||||
/// </summary>
|
||||
public new Dictionary<string, dataConfTSVC> mMapRead { get; set; } = new Dictionary<string, dataConfTSVC>();
|
||||
|
||||
/// <summary>
|
||||
/// Aree di memoria scrittura
|
||||
/// </summary>
|
||||
public new Dictionary<string, dataConf> mMapWrite { get; set; } = new Dictionary<string, dataConf>();
|
||||
|
||||
/// <summary>
|
||||
/// Elenco item RAW sottoscritti e relative configurazioni di decodifica da byte[]
|
||||
/// </summary>
|
||||
public Dictionary<string, string> rawSubscribedItemsConf { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// Conf gestione setup macchina
|
||||
/// </summary>
|
||||
public MachineSetupConf SetupConf { get; set; } = new MachineSetupConf();
|
||||
|
||||
/// <summary>
|
||||
/// Elenco dei SOLI item sottoscritti (se vuoto TUTTI)
|
||||
/// </summary>
|
||||
public List<string> subscribedItems { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// Conf Gestione WatchDog
|
||||
/// </summary>
|
||||
public WatchDogConf WatchDog { get; set; } = new WatchDogConf();
|
||||
|
||||
/// <summary>
|
||||
/// Indica che si utilizza (per LUT e gestione conf) il NodeId completo, default false (solo il DisplayName)
|
||||
/// </summary>
|
||||
public bool UseFullId { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Numero massimo di letture null prima di disconnettere il client
|
||||
/// </summary>
|
||||
public int maxNullRead { get; set; } = 1000;
|
||||
|
||||
/// <summary>
|
||||
/// Base del namespace da mascherare in invio OPC
|
||||
/// </summary>
|
||||
public string BaseIdMask { get; set; } = "";
|
||||
|
||||
public Dictionary<string, string> DictOpcNameReplace { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Classe gestione configurazione parametri specifici Rest Client da BaseParamConf
|
||||
/// </summary>
|
||||
public class RestParamConf : BaseParamConf
|
||||
{
|
||||
/// <summary>
|
||||
/// Timeout chiamate REST
|
||||
/// </summary>
|
||||
public int timeOutSec { get; set; } = 60;
|
||||
|
||||
/// <summary>
|
||||
/// API di base x chiamate REST, eventuali variabili van indicate come [[nomevar]]
|
||||
/// </summary>
|
||||
public string apiUrl { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Periodo minimo di campionamento in ms x lettura dati frequenti stato/semafori...
|
||||
/// </summary>
|
||||
public int samplePeriod { get; set; } = 1000;
|
||||
|
||||
/// <summary>
|
||||
/// Numero di errori dopo cui fare una vera disconnesisone con report poweroff della macchina
|
||||
/// </summary>
|
||||
public int connErrorMax { get; set; } = 5;
|
||||
|
||||
/// <summary>
|
||||
/// Elenco delle chiamate x ID / struttura
|
||||
/// </summary>
|
||||
public Dictionary<string, CallStruc> CallList { get; set; } = new Dictionary<string, CallStruc>();
|
||||
|
||||
public class CallStruc
|
||||
{
|
||||
/// <summary>
|
||||
/// ID univoco chiamata per poterla recuperare
|
||||
/// </summary>
|
||||
public int Idx { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Metodo chiamata
|
||||
/// </summary>
|
||||
public RestSharp.Method Method { get; set; } = RestSharp.Method.Get;
|
||||
|
||||
/// <summary>
|
||||
/// Url chiamata
|
||||
/// </summary>
|
||||
public string Url { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Nome x invio a MES
|
||||
/// </summary>
|
||||
public string Name { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Nome x salvataggio valore output in ProdData da poter richiamare
|
||||
/// </summary>
|
||||
public string OutVarName { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Intervallo di campionamento (minimo) da rispettare x evitare flood chiamate
|
||||
/// </summary>
|
||||
public int SamplePeriod { get; set; } = 5000;
|
||||
|
||||
/// <summary>
|
||||
/// Elenco chiamate richieste se non fosse trovata/valida una variabile
|
||||
/// </summary>
|
||||
public List<string> ListPrevCall { get; set; } = new List<string>();
|
||||
}
|
||||
}
|
||||
|
||||
public class UserIdent
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public string Passwd { get; set; } = "";
|
||||
public string UserName { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Definizione parametri watchdog
|
||||
/// </summary>
|
||||
public class WatchDogConf
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Abilitazione WatchDog
|
||||
/// </summary>
|
||||
public bool IsEnabled { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Valore max contatore prima di resettare
|
||||
/// </summary>
|
||||
public int MaxVal { get; set; } = 9999;
|
||||
|
||||
/// <summary>
|
||||
/// Conf memoria x lettura WatchDog (ToMes), se !="" è gestito
|
||||
/// </summary>
|
||||
public string MemConfRead { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Conf memoria x scrittura WatchDog (FromMes), se !="" è gestito
|
||||
/// </summary>
|
||||
public string MemConfWrite { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using MapoSDK;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EgwConf.Iob.Mem
|
||||
{
|
||||
public class plcMemMapExt : plcMemMap
|
||||
{
|
||||
/// <summary>
|
||||
/// Dizionario parametri opzionali
|
||||
/// </summary>
|
||||
public Dictionary<string, string> optMemPar { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario x decodifica file
|
||||
/// </summary>
|
||||
public Dictionary<string, int> fileDecod { get; set; } = new Dictionary<string, int>();
|
||||
|
||||
/// <summary>
|
||||
/// Lista ulteriori configurazioni KeyValuePair
|
||||
/// </summary>
|
||||
public Dictionary<string, string> optKVP { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario opzionale di configurazione memorie WRITE con "alias",
|
||||
/// impiegato tipicamente per poter gestire scritture valori INT su CNC/PLC che non accettano stringhe (es FANUC)
|
||||
/// </summary>
|
||||
public Dictionary<string, string> mMapWriteLink { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario di dizionari di decodifica, chiave è nome/tipo dizionario e poi dizionario da impiegare
|
||||
/// Usato ad esempio x decodifica stati da valore intero o degli step di esecuzione di un ciclo (es Fape v2+)
|
||||
/// </summary>
|
||||
public Dictionary<string, Dictionary<string, string>> DataDecodMap { get; set; } = new Dictionary<string, Dictionary<string, string>>();
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Base del NameSpace usato per le funzionalità di translate (parametri ACT-SET), da inserire come PRE
|
||||
/// </summary>
|
||||
public string BaseKeyTranslate { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario per la traduzione delle ricette (se gestite) tra valori acquisiti in dossier e impostazioni da inviare (ACTual, SETup)
|
||||
/// </summary>
|
||||
public Dictionary<string, string> RecipeKeyTranslate { get; set; } = new Dictionary<string, string>();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MapoSDK" version="6.14.2411.518" targetFramework="net462" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
|
||||
<package id="NLog" version="5.3.4" targetFramework="net462" />
|
||||
<package id="YamlDotNet" version="16.3.0" targetFramework="net462" />
|
||||
|
||||
@@ -10,7 +10,27 @@
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.1.0" newVersion="6.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.5.0" newVersion="4.1.5.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.2.1.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -11,6 +11,7 @@ using EgwProxy.Shelly.Clients;
|
||||
using System.Net.Http;
|
||||
using EgwProxy.Shelly.Options;
|
||||
using System.Threading;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace EgwProxy.Shelly.Test
|
||||
{
|
||||
@@ -26,7 +27,7 @@ namespace EgwProxy.Shelly.Test
|
||||
/// <summary>
|
||||
/// legge conf in formato stringa
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param power="key"></param>
|
||||
/// <returns></returns>
|
||||
protected static string ReadSetting(string key)
|
||||
{
|
||||
@@ -51,7 +52,7 @@ namespace EgwProxy.Shelly.Test
|
||||
/// <summary>
|
||||
/// Programma principale
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
/// <param power="args"></param>
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine(separator);
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace EgwProxy.Shelly.Clients
|
||||
{
|
||||
var readAsStringAsync = await response.Content.ReadAsStringAsync();
|
||||
var shelly1Status = JsonConvert.DeserializeObject<T>(readAsStringAsync);
|
||||
return ShellyResult<T>.Success(shelly1Status);
|
||||
return ShellyResult<T>.Success(shelly1Status, readAsStringAsync);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,35 +39,38 @@
|
||||
<Reference Include="Flurl.Http, Version=4.0.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Flurl.Http.4.0.2\lib\net461\Flurl.Http.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.9.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<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="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
<Reference Include="System.Buffers, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
||||
<Reference Include="System.IO.Pipelines, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IO.Pipelines.9.0.0\lib\net462\System.IO.Pipelines.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Memory, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.6.0\lib\net462\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<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 Include="System.Numerics.Vectors, Version=4.1.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.6.0\lib\net462\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Encodings.Web, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encodings.Web.6.0.0\lib\net461\System.Text.Encodings.Web.dll</HintPath>
|
||||
<Reference Include="System.Text.Encodings.Web, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encodings.Web.9.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Json, Version=6.0.0.4, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Json.6.0.4\lib\net461\System.Text.Json.dll</HintPath>
|
||||
<Reference Include="System.Text.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Json.9.0.0\lib\net462\System.Text.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.6.0\lib\net462\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
|
||||
@@ -109,11 +112,4 @@
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="..\packages\System.Text.Json.6.0.4\build\System.Text.Json.targets" Condition="Exists('..\packages\System.Text.Json.6.0.4\build\System.Text.Json.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\System.Text.Json.6.0.4\build\System.Text.Json.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Text.Json.6.0.4\build\System.Text.Json.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -59,7 +59,7 @@ namespace EgwProxy.Shelly
|
||||
return new ShellyResult<T>(default, success: false, isTransient: false, message);
|
||||
}
|
||||
|
||||
public static ShellyResult<T> Success(T value, string message = null)
|
||||
public static ShellyResult<T> Success(T value, string rawResp, string message = null)
|
||||
{
|
||||
return new ShellyResult<T>(value, true, false, message);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,27 @@
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.1.0" newVersion="6.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.5.0" newVersion="4.1.5.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.2.1.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -2,14 +2,15 @@
|
||||
<packages>
|
||||
<package id="Flurl" version="4.0.0" targetFramework="net462" />
|
||||
<package id="Flurl.Http" version="4.0.2" targetFramework="net462" />
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="6.0.0" targetFramework="net462" />
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="9.0.0" targetFramework="net462" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net462" />
|
||||
<package id="System.Memory" version="4.5.4" targetFramework="net462" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net462" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net462" />
|
||||
<package id="System.Text.Encodings.Web" version="6.0.0" targetFramework="net462" />
|
||||
<package id="System.Text.Json" version="6.0.4" targetFramework="net462" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
|
||||
<package id="System.Buffers" version="4.6.0" targetFramework="net462" />
|
||||
<package id="System.IO.Pipelines" version="9.0.0" targetFramework="net462" />
|
||||
<package id="System.Memory" version="4.6.0" targetFramework="net462" />
|
||||
<package id="System.Numerics.Vectors" version="4.6.0" targetFramework="net462" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.0" targetFramework="net462" />
|
||||
<package id="System.Text.Encodings.Web" version="9.0.0" targetFramework="net462" />
|
||||
<package id="System.Text.Json" version="9.0.0" targetFramework="net462" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.6.0" targetFramework="net462" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user