370 Commits

Author SHA1 Message Date
Samuele E. Locatelli a6dff6dc0b Merge remote-tracking branch 'origin/develop' into RemoteDebug 2022-09-07 11:12:51 +02:00
Samuele Locatelli 6d06c601a8 Merge branch 'Feature/FanucDoppioPallet' into develop 2022-09-07 11:12:16 +02:00
Samuele Locatelli 7c84d739fb Fix conf fanuc DP Colcom L018 2022-09-07 11:12:02 +02:00
Samuele Locatelli 49312dd181 Eliminazione fanuc DP (NON serve) 2022-09-07 11:09:59 +02:00
Samuele Locatelli 7e66ebb79a Colcom L018:
- aggiunti bit x doppio pallet e cambiate machcine ingresso
2022-09-06 19:23:03 +02:00
Samuele Locatelli 8ee2f3b9c4 Conf originale L18 colcom (NO DP signals) 2022-09-06 19:22:36 +02:00
Samuele Locatelli 9d320ae451 Inizio setup classe fanuc DP x gestione DOppioPallet 2022-09-06 19:09:35 +02:00
Samuele Locatelli d388c420ed Merge tag 'OpcUaOmp' into develop
Aggiunta gestione debug remoto x OMP
2022-09-06 17:56:42 +02:00
Samuele Locatelli d2aa632a89 Merge branch 'release/OpcUaOmp' 2022-09-06 17:56:25 +02:00
Samuele Locatelli 0199669847 COpe typo fix 2022-09-06 17:43:57 +02:00
Samuele Locatelli f85c47fe24 Reord classe ToMapo 2022-09-06 17:40:30 +02:00
Samuele Locatelli 3620822e83 Merge branch 'RemoteDebug' into develop 2022-09-06 17:29:37 +02:00
Samuele E. Locatelli 14740640fb COmpletata aggiunta metodi x OMP (da testare) 2022-09-06 17:27:55 +02:00
Samuele E. Locatelli 3b5e76d72a Continuo fix OMP 2022-09-06 17:22:45 +02:00
Samuele E. Locatelli eb8cb3cfb5 update bat scripts 2022-09-06 15:05:49 +02:00
Samuele E. Locatelli 821a2c3fcf update conf x valore contapezzi/pz req 2022-09-06 12:46:53 +02:00
Samuele E. Locatelli aded6e2020 timeout a 60 min x client OPC-UA 2022-09-06 12:40:54 +02:00
Samuele E. Locatelli 5029049835 Modifica conf x OMP FInassi 2022-09-06 12:40:31 +02:00
Samuele E. Locatelli 51227605f2 Update conf finassi x test remoto 2022-09-05 17:08:14 +02:00
Samuele E. Locatelli 7cfa69e889 Update x gestione debug remoto da conf progetto 2022-09-05 16:40:36 +02:00
Samuele E. Locatelli f40044ff31 Fix configurazione finazzi/OMP 2022-09-05 16:40:24 +02:00
Samuele Locatelli e2c905d113 Merge branch 'develop' of https://gitlab.steamware.net/steamware/Mapo-IOB-WIN into develop 2022-09-05 14:53:51 +02:00
Samuele E. Locatelli a399761674 Merge branch 'master' into develop 2022-09-05 12:41:00 +02:00
Samuele E. Locatelli c336f7504d Aggiunta preliminare OMP 2022-09-05 12:40:31 +02:00
Samuele Locatelli c3c9addbef Merge branch 'develop' of https://gitlab.steamware.net/steamware/Mapo-IOB-WIN into develop 2022-07-29 17:53:16 +02:00
Samuele E. Locatelli b7fb86f94f Merge branch 'develop' 2022-07-29 16:51:26 +02:00
Samuele E. Locatelli b861daaf12 Helpi
- ok scrittura string
- ok scrittura NUM
2022-07-29 16:50:55 +02:00
Samuele E. Locatelli 937fffb2c4 update x test scrittura string 2022-07-29 16:07:26 +02:00
Samuele E. Locatelli 503d2ecfa3 Merge branch 'develop' 2022-07-29 13:33:25 +02:00
Samuele E. Locatelli a200f1455e Update SDK Mapo, valori reversed LH x Helpi 2022-07-29 13:30:31 +02:00
Samuele E. Locatelli 9822f43894 Merge branch 'master' into develop 2022-07-29 11:10:00 +02:00
Samuele E. Locatelli eae1d51337 Update x gestione lettura string 2022-07-29 11:08:38 +02:00
Samuele E. Locatelli 9f8944876d update ModBus x lettura string 2022-07-28 19:15:24 +02:00
Samuele E. Locatelli 4941dc3fdc deploy remoto x FINASSI (test) 2022-07-28 19:15:14 +02:00
Samuele E. Locatelli 852bbcb29a update conf finassi x debug remoto 2022-07-28 19:15:02 +02:00
Samuele E. Locatelli 0f6f32a5a0 Aggiunta util x conversione dato EPOCH 2022-07-28 19:14:49 +02:00
Samuele Locatelli 06d25078e6 Merge tag 'ModbusHelpiDebug01' into develop
update log x helpi + modbus
2022-07-27 19:01:06 +02:00
Samuele Locatelli ace3ef79c1 Merge branch 'release/ModbusHelpiDebug01' 2022-07-27 19:00:56 +02:00
Samuele Locatelli e162c2a8af update x migliorare log helpi... 2022-07-27 18:59:09 +02:00
Samuele Locatelli 9baae29627 Merge tag 'ModbusLogReadDetailed' into develop
Log errori read modbus + dettagliato
2022-07-27 12:42:56 +02:00
Samuele Locatelli 845c32d56f Merge branch 'release/ModbusLogReadDetailed' 2022-07-27 12:42:43 +02:00
Samuele Locatelli 04734ddf46 Update x test lettura helpi che cade in lettura 2022-07-27 12:42:18 +02:00
Samuele Locatelli 3f995027b5 Inizio obj OpcUaSiemens OMP (FARE!!!) 2022-07-27 12:39:12 +02:00
Samuele Locatelli 46b50fac5b Update parametri simula (minDeltaSec) 2022-07-27 12:38:52 +02:00
Samuele Locatelli 657c90061f Update conf finassi/Helpi 2022-07-27 12:38:31 +02:00
Samuele Locatelli fffb0c712e update conf aprametri Fanuc aux x Jetco 2022-07-27 12:38:19 +02:00
Samuele Locatelli e8f5044972 Merge tag 'MinDeltaSecParametrico' into develop
Update: gestione delta sec parametrico + fix watchdog (ogni tentativo
--> update lastPLC)
2022-07-14 16:31:15 +02:00
Samuele Locatelli b5d214b437 Merge branch 'release/MinDeltaSecParametrico' 2022-07-14 16:30:47 +02:00
Samuele Locatelli cde83c36b0 Sistemato PING/watchdog x aggiornare lastPLC sempre 2022-07-14 16:30:18 +02:00
Samuele Locatelli 7c83c314ea Gestione delta secondi parametrico 2022-07-14 16:29:32 +02:00
Samuele Locatelli 42c50cad0c Aggiunta parametro x minimo delta sec 2022-07-14 16:29:24 +02:00
Samuele Locatelli 77de6722f3 Refresh conf x errore typo 2022-07-14 16:29:13 +02:00
Samuele Locatelli 6bfb159f19 Merge tag 'TestRefreshIobManWin' into develop
Cambio condizioni calcolo aggiornamento
2022-07-14 16:00:07 +02:00
Samuele Locatelli cbc6de2cca Merge branch 'release/TestRefreshIobManWin' 2022-07-14 16:00:00 +02:00
Samuele Locatelli 335a877d4d Update condizioni ultimo valore aggiornato 2022-07-14 15:59:24 +02:00
Samuele Locatelli 766fc5eade Merge tag 'UpdateLastPlcSignal' into develop
Update frequenza refresh lastPLC
2022-07-14 15:30:26 +02:00
Samuele Locatelli 1e7b2cd24e Merge branch 'release/UpdateLastPlcSignal' 2022-07-14 15:30:17 +02:00
Samuele Locatelli f009dbef37 IOB-WIN-NEXT:
- Refresh frequenza update lastPLC
- refreh MAN
2022-07-14 15:29:57 +02:00
Samuele Locatelli 81233d0bc4 Merge tag 'FixPlcOkModbus' into develop
Update modalità calcolo lastPlcIn x avere PLCOK prima in modbus
2022-07-14 15:17:13 +02:00
Samuele Locatelli a70d4af729 Merge branch 'release/FixPlcOkModbus' 2022-07-14 15:17:00 +02:00
Samuele Locatelli bbae83a669 UPdate modbus x inviare plcOk prima 2022-07-14 15:16:40 +02:00
Samuele Locatelli 121eacfb6a Merge tag 'UpdateSimDP_ErrorRawJson' into develop
Update classi x fix sim DP
2022-07-14 11:20:12 +02:00
Samuele Locatelli 0928ebe6ec Merge branch 'release/UpdateSimDP_ErrorRawJson' 2022-07-14 11:20:01 +02:00
Samuele Locatelli b4a0333085 fix x accodamento dari RAW:
- errore init IOB
- scambio URL di default
- inviava il dato watchdog sul "canale sbagliato"
2022-07-14 11:19:23 +02:00
Samuele Locatelli e0098e4194 Merge tag 'UpdateCenterfrigoWrite' into develop
Update centerfrigo x scrittura, pronto x test lettura con swap byte +
base addr cambiato
2022-07-13 19:22:36 +02:00
Samuele Locatelli 5a35a2e926 Merge branch 'release/UpdateCenterfrigoWrite' 2022-07-13 19:22:17 +02:00
Samuele Locatelli 8efa8fc1d1 Update vari:
- JObject x invio raw
- gestione RealHL e RealLH in lettura ModBus (test centerfrigo)
2022-07-13 19:21:49 +02:00
Samuele Locatelli fd45ab8180 update SDK x configurazione memorie Centerfrigo
- FLoat BaDc --> RealLH
2022-07-13 19:02:00 +02:00
Samuele Locatelli dbf5a88a4e Merge remote-tracking branch 'origin/Feature/Giacovelli' into develop 2022-07-13 18:31:47 +02:00
S.E.Locatelli c691a677d2 centerfrigo:
- update conf e scrittura real
- è LowHigh (NON HighLow)
- da aggiornare SDK
2022-07-13 18:10:05 +02:00
S.E.Locatelli b55cb314f2 Merge remote-tracking branch 'origin/HEAD' into Feature/Giacovelli 2022-07-13 17:49:30 +02:00
Samuele Locatelli bbe04ea0cb Merge tag 'FixDisplayCOntapezziFanuc' into develop
Fix log contapezzi FANUC
2022-07-12 11:43:24 +02:00
Samuele Locatelli 3a2749d947 Merge branch 'release/FixDisplayCOntapezziFanuc' 2022-07-12 11:43:04 +02:00
Samuele Locatelli 8b34765ad5 Update display contapezzi x FANUC (dopo lettura valori da MACRO) 2022-07-12 11:42:43 +02:00
Samuele Locatelli ebc7afc455 Merge tag 'UpdateAuxMacro' into develop
Update x gestione nuova delle p-code
2022-07-12 11:07:06 +02:00
Samuele Locatelli 3bd9da0949 Merge branch 'release/UpdateAuxMacro' 2022-07-12 11:06:50 +02:00
Samuele Locatelli 11fd84276c Update con nuova libreria FANUC 2022-07-12 11:06:18 +02:00
Samuele Locatelli a7ce11b60f Update SDK libreria MultiCNC 2022-07-12 11:02:16 +02:00
Samuele Locatelli 10ef85de20 Merge branch 'SDK/MultiCnc' into develop 2022-07-11 16:27:35 +02:00
Samuele Locatelli 8e4b89c48d Merge tag 'FixFanucMacroRead' into develop
Fix: aggiornata libreria lettura macro fanuc sopra indirizzi 10'000
(DEC)
2022-07-11 16:27:18 +02:00
Samuele Locatelli c595480f19 Merge branch 'release/FixFanucMacroRead' 2022-07-11 16:27:04 +02:00
Samuele Locatelli 4fe94cb958 Update IOB-WIN-NEXT
- libreria nuget fanuc comprende fix x indirizzi sopra 10k
2022-07-11 16:26:40 +02:00
Samuele Locatelli f5d7032df1 Merge branch 'develop' into SDK/MultiCnc 2022-07-11 16:24:37 +02:00
Samuele Locatelli 1fb557449c Update nuget x multicnc:
- fanuc lettura #10'000 in poi
2022-07-11 16:24:22 +02:00
Samuele Locatelli 0b738d13b9 Merge tag 'FixMinDuration' into develop
Update durata minima
2022-07-01 11:54:08 +02:00
Samuele Locatelli 216621f11f Merge branch 'release/FixMinDuration' 2022-07-01 11:53:55 +02:00
Samuele Locatelli 996587dbeb Fix periodo minimo simulazione (2 intervalli) 2022-07-01 11:53:19 +02:00
Samuele Locatelli d181d82ab7 Merge tag 'AddRedisChannelsIob' into develop
Update gestione channels redis
2022-07-01 11:50:24 +02:00
Samuele Locatelli 5c7177c2a6 Merge branch 'release/AddRedisChannelsIob' 2022-07-01 11:49:39 +02:00
Samuele Locatelli b3c56a3e6c Refresh progetto IOB-WIN 2022-07-01 11:49:02 +02:00
Samuele Locatelli 560e2dd2b4 Update IobWinStatus
- nuovi metodi pubblicazione nuove info da IOB (channels)
- nuovi campi
- mitigazione registrazione in cache
2022-07-01 11:48:50 +02:00
Samuele Locatelli 2f9e194beb Update modalità simulazione allarmi 2022-07-01 09:42:36 +02:00
Samuele Locatelli 3b429a8008 Merge tag 'FixSimWaitDurationEvents' into develop
Correzione simulazione durata eventi
2022-07-01 08:20:18 +02:00
Samuele Locatelli 275a111690 Merge branch 'release/FixSimWaitDurationEvents' 2022-07-01 08:20:09 +02:00
Samuele Locatelli 344599471c Fix SIM
- duration period come wait period (+noise)
2022-07-01 08:19:47 +02:00
Samuele Locatelli 891798d257 Merge tag 'FixSimAlarmDuration' into develop
Fix simulazione durata allarmi
2022-07-01 08:14:22 +02:00
Samuele Locatelli dbdccc3967 Merge branch 'release/FixSimAlarmDuration' 2022-07-01 08:14:13 +02:00
Samuele Locatelli 9d4ed7202c Update SIM x allarmi + coerenti durate 2022-07-01 08:13:51 +02:00
Samuele Locatelli c7e15fdc38 Merge tag 'ReviewSimPar' into develop
Revisione SimPar: variazione + consistente (5%-100% parametro impostato)
2022-06-30 11:43:28 +02:00
Samuele Locatelli da08f8f6bf Merge branch 'release/ReviewSimPar' 2022-06-30 11:43:10 +02:00
Samuele Locatelli 983913943a Accorciato periodo simulazione 2022-06-30 11:42:42 +02:00
Samuele Locatelli d7579b8be4 Merge tag 'UpdateSimAllarmi' into develop
Aggiornamento simulazione allarmi x testing nuove funzionalità
2022-06-30 11:32:07 +02:00
Samuele Locatelli 13ef2a709e Merge branch 'release/UpdateSimAllarmi' 2022-06-30 11:31:45 +02:00
Samuele Locatelli 6c8525125e Merge remote-tracking branch 'origin/Feature/Giacovelli' into develop 2022-06-30 11:30:49 +02:00
Samuele Locatelli 4b3ed4ce96 ModbusTCP:
- Fix gestione scrittura modbus,  considerando deltaBase value
2022-06-30 11:30:34 +02:00
Samuele Locatelli 4d30ea9085 Update SIM allarmi con invio 2022-06-30 11:29:59 +02:00
S.E.Locatelli 06c930a7af Update conf da produzione Giacovelli 2022-06-29 12:07:15 +02:00
Samuele Locatelli 18bcab111f Merge tag 'FixIntDoubleScaledModbusWrite' into develop
Corretta gestione virgole modbus
2022-06-28 19:42:35 +02:00
Samuele Locatelli dca21af7c0 Merge branch 'release/FixIntDoubleScaledModbusWrite' 2022-06-28 19:42:29 +02:00
Samuele Locatelli 35a31389be Merge remote-tracking branch 'origin/Feature/Giacovelli' into develop 2022-06-28 19:42:04 +02:00
S.E.Locatelli f54c0548d4 modbus TCP
- fix virgole/punti
- fix scaled double
2022-06-28 19:41:43 +02:00
Samuele Locatelli 07fae10616 Merge tag 'AddCedaxWriteTested' into develop
Aggiunta e testata scrittura CEDAX
2022-06-28 19:34:25 +02:00
Samuele Locatelli 55a74acfef Merge branch 'release/AddCedaxWriteTested' 2022-06-28 19:34:16 +02:00
Samuele Locatelli 8702001a59 Merge remote-tracking branch 'origin/Feature/Giacovelli' into develop 2022-06-28 19:33:53 +02:00
S.E.Locatelli ae727e0e2c Completata correzione cedax x scrfittura 2022-06-28 19:33:14 +02:00
S.E.Locatelli 6f67cf8047 Merge remote-tracking branch 'origin/develop' into Feature/Giacovelli 2022-06-28 19:18:42 +02:00
S.E.Locatelli 08e6c3e5f5 Update conf cedax:
- parametri sia write che read
- gestione parametri "doppi" (write/read)
- test scrittura modbus
2022-06-28 19:18:31 +02:00
Samuele Locatelli e32b2b2f93 Update modbus x gestione scalatura read/write 2022-06-28 19:17:37 +02:00
Samuele Locatelli cf28fdb365 Update setup NWSE x valori lettura aprametri 2022-06-28 19:17:28 +02:00
Samuele Locatelli d5edd3b3de Merge remote-tracking branch 'origin/Feature/Giacovelli' into develop 2022-06-28 17:48:42 +02:00
S.E.Locatelli ae37112e92 Cedax:
- test lettura parametri dosaggio
- ok lettura
- fix lettura interi singoli da LUT
2022-06-28 17:44:31 +02:00
S.E.Locatelli 5a98c67c8d fix conf cedax 002 2022-06-28 17:42:48 +02:00
S.E.Locatelli 998b1d884f Merge remote-tracking branch 'origin/develop' into Feature/Giacovelli 2022-06-28 16:49:37 +02:00
S.E.Locatelli aa7aa4488b Aggiunto lettura dose cedax 2022-06-28 16:49:30 +02:00
Samuele Locatelli 1dfe00a518 Fix cedax x interi 1 registro 2022-06-28 16:47:44 +02:00
Samuele Locatelli 6ed8446955 Merge tag 'TestSendIcoelOk' into develop
Invio icoel testato ed ok
2022-06-28 15:38:35 +02:00
Samuele Locatelli e3dc9f7131 Merge branch 'release/TestSendIcoelOk' 2022-06-28 15:38:07 +02:00
Samuele Locatelli e07c47736c Merge remote-tracking branch 'origin/Feature/Giacovelli' into develop 2022-06-28 15:37:46 +02:00
S.E.Locatelli 47df3a1361 Test invio ok con commenti 2022-06-28 15:37:28 +02:00
S.E.Locatelli 9863edbc22 Merge remote-tracking branch 'origin/develop' into Feature/Giacovelli 2022-06-28 15:15:44 +02:00
Samuele Locatelli a19e851074 Update metodo scrittura parametri ICOEL 2022-06-28 15:15:14 +02:00
S.E.Locatelli cc59454a32 Merge remote-tracking branch 'origin/develop' into Feature/Giacovelli 2022-06-28 15:05:47 +02:00
Samuele Locatelli 1a6f46d5a9 Update conf icoel 2 x variety data 2022-06-28 12:46:53 +02:00
Samuele Locatelli 6fc1b3c807 Merge tag 'IcoelFixParamsWrite' into develop
Sistemato invio parametri write
2022-06-28 12:42:18 +02:00
Samuele Locatelli 5205a95d03 Merge branch 'release/IcoelFixParamsWrite' 2022-06-28 12:41:58 +02:00
Samuele Locatelli 9750fea139 Merge remote-tracking branch 'origin/Feature/Giacovelli' into develop 2022-06-28 12:41:40 +02:00
S.E.Locatelli e7d41527ef Update modalità invio parametri allo start 2022-06-28 12:40:56 +02:00
S.E.Locatelli 683f53ad87 Merge remote-tracking branch 'origin/develop' into Feature/Giacovelli 2022-06-28 12:22:43 +02:00
Samuele Locatelli 377355db7c Merge tag 'IcoelSendRest' into develop
Aggiunto gestione parametri batch da REST icoel
2022-06-28 12:13:56 +02:00
Samuele Locatelli 78ef931f5c Merge branch 'release/IcoelSendRest' 2022-06-28 12:13:44 +02:00
Samuele Locatelli 0f5cf33c29 Completata revisione ICOEL (2 test) 2022-06-28 12:12:57 +02:00
Samuele Locatelli 159ed6dc2b Merge branch 'SDK/Icoel' into develop 2022-06-28 12:08:16 +02:00
Samuele Locatelli 6e7ff45b0b Merge remote-tracking branch 'origin/Feature/Giacovelli' into SDK/Icoel 2022-06-28 12:08:09 +02:00
Samuele Locatelli 23e8ea081e UPdate SDK ICOEL 2022-06-28 12:08:04 +02:00
S.E.Locatelli 31213f6d28 Update test icoel 2022-06-28 12:07:42 +02:00
S.E.Locatelli 8c4efc1f40 Merge remote-tracking branch 'origin/SDK/Icoel' into Feature/Giacovelli 2022-06-28 11:47:02 +02:00
S.E.Locatelli 849d38b5f2 Fix icoel test sw: max numTry 2022-06-28 11:46:50 +02:00
S.E.Locatelli d99448e386 pulizia old conf 2022-06-28 11:46:17 +02:00
Samuele Locatelli e1516a5605 Merge branch 'develop' into SDK/Icoel 2022-06-28 11:45:04 +02:00
Samuele Locatelli c3b641d5aa Update json ICOEL SOAP 2022-06-28 11:44:52 +02:00
Samuele Locatelli 2690235596 Sizer ICOEL SOAP:
- update metodi x recupero dati (batch + variety + lòayout)
- da aggiungere a SOAP client
2022-06-28 11:41:16 +02:00
S.E.Locatelli 7a0fa01e4f Merge remote-tracking branch 'origin/master' into Feature/Giacovelli 2022-06-28 09:34:55 +02:00
Samuele Locatelli a7a8364fcb Merge tag 'AddAlarmMitigationModbusCedax' into develop
Implementata mitigazione send stato allarmi cedax (2 test...)
2022-06-28 09:32:03 +02:00
Samuele Locatelli 6dd92534ef Merge branch 'release/AddAlarmMitigationModbusCedax' 2022-06-28 09:31:07 +02:00
Samuele Locatelli d037ecf346 Mitigazione allarmi in getDynData
- implementato x modbus (cedax)
- veto invio cablato a 120 sec (no conf x allarmi x ora)
2022-06-28 09:29:18 +02:00
S.E.Locatelli dc8b9b2f98 Merge remote-tracking branch 'origin/develop' into Feature/Giacovelli 2022-06-28 09:06:16 +02:00
Samuele Locatelli 74bca84447 Gestione allarmi
- inserita x modbus/cedax (da provare) come dynData
- reorg codice IobGeneric + ModbusTCP
2022-06-28 08:59:38 +02:00
Samuele Locatelli 40199534d1 Aggiunta BatchIcoel (da testare!!!) 2022-06-27 19:17:47 +02:00
Samuele Locatelli 23104a2024 Merge remote-tracking branch 'origin/Feature/Giacovelli' into develop 2022-06-27 18:59:30 +02:00
S.E.Locatelli b17acd2eda Aggiunta conf
- configuraizoni CEDAX di prod
2022-06-27 18:51:58 +02:00
Samuele Locatelli 86f519f83b Merge branch 'develop' 2022-06-27 14:17:33 +02:00
S.E.Locatelli 6654efc919 Merge remote-tracking branch 'origin/develop' into Feature/Giacovelli 2022-06-27 13:33:04 +02:00
Samuele Locatelli be21df40ee Aggiunto controllo su disabilitazione contapezzi 2022-06-27 13:32:34 +02:00
Samuele Locatelli 1376d3ec7d Merge tag 'FixSendEmpty' into develop
Fix invio valore "" --> "OK"
2022-06-27 12:54:06 +02:00
Samuele Locatelli 95603bb8d7 Merge branch 'release/FixSendEmpty' 2022-06-27 12:53:52 +02:00
Samuele Locatelli 0716ac0191 Correizone invio fluxlog in blocco:
- in caso di stato tutto 0 --> vuoto mandava ""
- ora manda "OK"
2022-06-27 12:53:26 +02:00
Samuele Locatelli 5707214fe8 Merge tag 'FixCheckDynDataKey' into develop
Fix check esistenza key pre controllo
2022-06-27 12:15:20 +02:00
Samuele Locatelli 94b8a298ff Merge branch 'hotfix/FixCheckDynDataKey' 2022-06-27 12:15:11 +02:00
Samuele Locatelli ed2f6f003c Merge branch 'develop' into hotfix/FixCheckDynDataKey 2022-06-27 12:15:01 +02:00
Samuele Locatelli e6bb233570 update Check Key DynData 2022-06-27 12:14:50 +02:00
S.E.Locatelli b36446abfe Merge remote-tracking branch 'origin/HEAD' into Feature/Giacovelli 2022-06-27 12:09:58 +02:00
Samuele Locatelli 2e03aca330 Merge tag 'FixVetoInvioCambioStato' into develop
Completata gesitone veto invio cambio stato FluxLog
2022-06-27 12:09:12 +02:00
Samuele Locatelli 7f565ca8e0 Merge branch 'release/FixVetoInvioCambioStato' 2022-06-27 12:09:01 +02:00
Samuele Locatelli bf0b5684b7 Update x veto invio cambio stato string 2022-06-27 12:08:37 +02:00
Samuele Locatelli 4a60c7cc0c Merge tag 'TestBitmapDecodeNwseOk' into develop
Completato test NWSE con decodifica stato macchina
2022-06-27 11:20:40 +02:00
Samuele Locatelli 89a6f8e367 Merge branch 'release/TestBitmapDecodeNwseOk' 2022-06-27 11:20:19 +02:00
Samuele Locatelli 8f64173a17 Merge remote-tracking branch 'origin/Feature/Giacovelli' into develop 2022-06-27 11:19:48 +02:00
S.E.Locatelli e2f248f57c Correzione decodifica bitmap NWSE
- prende dati correttamente
- costruisce stringa corretta
2022-06-27 10:52:20 +02:00
S.E.Locatelli 64bf154f19 Merge remote-tracking branch 'origin/develop' into Feature/Giacovelli 2022-06-27 09:50:35 +02:00
Samuele Locatelli 77cb123d2b Aggiunta decodifica stati NWSE - da testare 2022-06-27 09:50:14 +02:00
Samuele Locatelli 2a14ed9de6 Aggiunta modifiche x letture dati con estesa bitmap stati 2022-06-27 09:17:44 +02:00
Samuele Locatelli 1374d36428 Modifica NWS --> NWSE x impianto acqua 2022-06-27 09:17:29 +02:00
Samuele Locatelli 9da95aca53 Merge remote-tracking branch 'origin/Feature/Giacovelli' into develop 2022-06-27 08:35:54 +02:00
S.E.Locatelli 9b61847148 Merge remote-tracking branch 'origin/develop' into Feature/Giacovelli 2022-06-25 17:20:16 +02:00
S.E.Locatelli 10058e7169 Update conf NWS --> NWSE 2022-06-25 17:20:09 +02:00
Samuele Locatelli 502e014e55 Merge tag 'InizioTestNws' into develop
Completata release di test x NWS
2022-06-25 13:07:42 +02:00
Samuele Locatelli 40ce9677ce Merge branch 'release/InizioTestNws' 2022-06-25 13:05:29 +02:00
Samuele Locatelli a01b5e8a1e Merge remote-tracking branch 'origin/Feature/Giacovelli' into develop 2022-06-25 13:05:08 +02:00
S.E.Locatelli 2af0bd479c Minor fix:
- fix valori vuoti SIM
- fix copia file config NWS
2022-06-25 13:04:42 +02:00
S.E.Locatelli 52f3c71c1d Merge remote-tracking branch 'origin/develop' into Feature/Giacovelli 2022-06-25 12:42:49 +02:00
S.E.Locatelli 00da2310c6 test su NWS 2022-06-25 12:42:36 +02:00
Samuele Locatelli b612467325 Ottimizzazione zip log folder
- ora comprime anche MAIN
- mantenimento fino a 400 gg
2022-06-25 12:42:11 +02:00
S.E.Locatelli 31f1f180a0 Merge remote-tracking branch 'origin/develop' into Feature/Giacovelli 2022-06-25 12:30:39 +02:00
Samuele Locatelli 569efd65ee Update IOB-WIN x NWS
- portata gestione hasAlarms di comeca in siemens generale
- aggiunta gestione PLC S7 x NWS
- configuraizone base allarmi e stati
... da testare...
2022-06-25 12:29:24 +02:00
Samuele Locatelli 25e8fc1cc6 Update NLOG
- conf x salvataggio file log come .log di 10mb (non va zip)
- procedura compressione lasciata " a valle"
2022-06-25 09:47:48 +02:00
S.E.Locatelli 91fc8b648d Merge remote-tracking branch 'origin/develop' into Feature/Giacovelli 2022-06-24 17:06:49 +02:00
Samuele Locatelli 14f0c4ef61 Merge tag 'HotfixRebootOnServerNoPing' into develop
Fix (maybe) problema reboot se manca server ping
2022-06-24 15:16:59 +02:00
Samuele Locatelli 9d551277df Merge branch 'release/HotfixRebootOnServerNoPing' 2022-06-24 15:16:44 +02:00
Samuele Locatelli 104d58106d UPdate x evitare reboot IOB-WIN
- se server down NON si riavvia
- check log zip
- fix file conf NLog x zip file old (con sostituzione info/warn/...)
2022-06-24 15:16:10 +02:00
Samuele Locatelli af97350bae update note 2022-06-24 10:40:29 +02:00
Samuele Locatelli ff37ee05ca Merge tag 'AddSqlCommandTimeout' into develop
Aggiunta gestione command timeout x SQL icoel
2022-06-24 10:40:20 +02:00
Samuele Locatelli c062a9a0dc Merge branch 'release/AddSqlCommandTimeout' 2022-06-24 10:39:27 +02:00
Samuele Locatelli 5ad4ac9148 refresh nuget icoelDB 2022-06-24 10:39:18 +02:00
Samuele Locatelli 6521935ba8 Update gestione Icoel DB
- aggiunto parametro x  command timeout
- da provare
2022-06-24 10:38:36 +02:00
Samuele Locatelli 06c7ba9309 Merge branch 'develop' into SDK/Icoel 2022-06-24 10:32:26 +02:00
Samuele Locatelli f49277ec93 Update adapter SQL x usare command timeout 2022-06-24 10:32:14 +02:00
Samuele Locatelli fd4712f38d commentato cella 4 (da errore) 2022-06-21 20:02:01 +02:00
Samuele Locatelli fa1f4e1f03 Update conf varie centerfrigo! 2022-06-21 20:01:43 +02:00
Samuele Locatelli c24ffa6d32 Merge tag 'UpdateWaitRandom' into develop
Update conf centerfrigo + gestione wait randomico
2022-06-21 19:01:41 +02:00
Samuele Locatelli 636d7e28f7 Merge branch 'release/UpdateWaitRandom' 2022-06-21 19:01:30 +02:00
Samuele Locatelli 1ab5854bc3 Modbus:
- Fix attesa random x Centerfrigo
- update conf lettura
2022-06-21 19:01:10 +02:00
Samuele Locatelli 7cd001cef4 Merge tag 'TestMemoriaCenterfrigoLimit' into develop
limitato a 44 byte max letture centerfrigo...
2022-06-21 18:05:43 +02:00
Samuele Locatelli 982d8177e0 Merge branch 'release/TestMemoriaCenterfrigoLimit' 2022-06-21 18:05:34 +02:00
Samuele Locatelli 6f94b274b3 Merge remote-tracking branch 'origin/develop' into develop 2022-06-21 18:05:06 +02:00
S.E.Locatelli 197a5c2cd9 Correzioni centerfrigo 2022-06-21 18:04:40 +02:00
Samuele Locatelli b8d381c5df FIx commenti 2022-06-21 17:17:29 +02:00
Samuele Locatelli 8b4aaf84a3 Merge tag 'AddLogDeltaBase' into develop
Aggiunto log valore deltaBase x controllare se inizializza
2022-06-21 16:56:31 +02:00
Samuele Locatelli 1d2eb2116d Merge branch 'release/AddLogDeltaBase' 2022-06-21 16:56:15 +02:00
Samuele Locatelli 52330eb094 Aggiunto log x display deltaBase 2022-06-21 16:55:52 +02:00
Samuele Locatelli 4db1b7368b Merge tag 'AddDeltaParamCenterfrigo' into develop
Aggiunta deltaBase + conf iniziale parametri centerfrigo x test
2022-06-21 16:44:20 +02:00
Samuele Locatelli b967013739 Merge branch 'release/AddDeltaParamCenterfrigo' 2022-06-21 16:44:09 +02:00
Samuele Locatelli 0e6a034cf4 Aggiunto bozza confparametri IOB centerfrigo 2022-06-21 16:43:44 +02:00
Samuele Locatelli 448375b234 Modifiche modbus:
- aggiunto parametro x gestione delta base x ModBus
- nome parametro deltaBase
2022-06-21 16:41:50 +02:00
Samuele Locatelli ff0f39586f Merge tag 'Test02FloatCDAB' into develop
Modifica reverse anceh x array da 2 valori
2022-06-21 16:19:12 +02:00
Samuele Locatelli b7b8819461 Merge branch 'release/Test02FloatCDAB' 2022-06-21 16:19:02 +02:00
Samuele Locatelli 2bd1652369 Fix conversione float a 16 bit 2022-06-21 16:18:33 +02:00
Samuele Locatelli d8d979d53c Merge tag 'TestModbusArrayReverse' into develop
Versione da provare x Centerfrigo x array rovesciato
2022-06-21 16:11:37 +02:00
Samuele Locatelli 33055fc66f Merge branch 'release/TestModbusArrayReverse' 2022-06-21 16:11:17 +02:00
Samuele Locatelli 9269c8db4f Fix endianness modbus:
- update MapoSDK
- gestione decodifica dati modbus Array.Reverse
2022-06-21 16:10:36 +02:00
Samuele Locatelli 26f7176a62 Merge tag 'AddCenterFrigo' into develop
Aggiunta centerfrigo + fix x emergenza aramta cedax/centerfrigo
2022-06-21 15:45:08 +02:00
Samuele Locatelli 3cb33197e6 Merge branch 'release/AddCenterFrigo' 2022-06-21 15:44:53 +02:00
Samuele Locatelli 16807d7382 General refresh x selezione adapter 2022-06-21 15:44:30 +02:00
Samuele Locatelli dc074308a5 Modifiche amcchine modbus
- aggiunto emergenza armata x cedax (fam input 60)
- aggiuntocenterfrigo (famInput 60)
2022-06-21 15:44:11 +02:00
Samuele Locatelli 9a4010dabe Merge tag 'AddDisableDynDataRangeCheck' into develop
Fix installer
2022-06-15 11:48:01 +02:00
Samuele Locatelli b52cdaa5ce Merge branch 'release/AddDisableDynDataRangeCheck' 2022-06-15 11:47:04 +02:00
Samuele Locatelli 15bdde06b5 Aggiunto disab controllo range valori 2022-06-15 11:29:03 +02:00
Samuele Locatelli 7b008906dd Merge tag 'UpdateIobIcoelDb' into develop
Update IcoelDb x recupero CurrData
2022-06-01 17:44:37 +02:00
Samuele Locatelli cfa98e54f4 Merge branch 'release/UpdateIobIcoelDb' 2022-06-01 17:44:13 +02:00
Samuele Locatelli 2a2a389d71 Accodato info currData da DB 2022-06-01 17:41:07 +02:00
Samuele Locatelli 3384eb2a82 update dll proxy Icoel 2022-06-01 17:29:16 +02:00
Samuele Locatelli bfad961b1e Update conf Icoel x caricare nuovi dati Soap e DB 2022-06-01 17:29:04 +02:00
Samuele Locatelli 3e93f88b42 Merge branch 'SDK/Icoel' into develop 2022-06-01 16:55:52 +02:00
Samuele Locatelli 3fac227532 Fix num Vers x date inizio mese (0) 2022-06-01 16:55:03 +02:00
Samuele Locatelli 9c784e2233 Merge branch 'develop' into SDK/Icoel 2022-06-01 16:52:47 +02:00
Samuele Locatelli f2559b759e refresh ini conf ICOEL 2022-06-01 16:52:23 +02:00
Samuele Locatelli 5adee48d51 Aggiunto recupero CurrData da DB + update SyncStateModel 2022-06-01 16:52:10 +02:00
Samuele Locatelli 435b13d58c Aggiunta un altra metrica da SOAP client 2022-06-01 16:51:45 +02:00
Samuele Locatelli 429aebcc85 Merge tag 'UpdateIcoelsIob' into develop
Aggiornamento segnale emergenza armata x impianto ICOEL secondo 3
modalità
2022-05-31 18:01:10 +02:00
Samuele Locatelli 38dfd71842 Merge branch 'release/UpdateIcoelsIob' 2022-05-31 18:00:54 +02:00
Samuele Locatelli d019002454 Update Adapters ICOEL 2022-05-31 18:00:12 +02:00
S.E.Locatelli 5e73527847 Merge remote-tracking branch 'origin/develop' into Feature/Giacovelli 2022-05-30 15:46:12 +02:00
Samuele Locatelli 10121d874b Merge tag 'FixDuplicatedPackMapoSdk' into develop
Completato refactor e pulizia da doppio SDK a codice sistemato con
CodeMaid
2022-05-30 15:32:39 +02:00
Samuele Locatelli 284f2bb2ee Merge branch 'hotfix/FixDuplicatedPackMapoSdk' 2022-05-30 15:32:20 +02:00
Samuele Locatelli c6ea2fc22d Refresh e refactor vario codice 2022-05-30 15:32:09 +02:00
Samuele Locatelli 731e069a59 Merge branch 'develop' 2022-05-30 15:26:00 +02:00
Samuele Locatelli aae3504a5b Fix pack duplicati 2022-05-30 15:25:56 +02:00
Samuele Locatelli 4f58ea2846 fix doppio package 2022-05-30 15:25:20 +02:00
Samuele Locatelli 59332fb668 Merge tag 'FixIcoelDb' into develop
Fix IOB dedicato ai DB di Icoel
2022-05-30 15:19:50 +02:00
Samuele Locatelli e776951ec8 Merge branch 'release/FixIcoelDb' 2022-05-30 15:19:39 +02:00
Samuele Locatelli 9b8a314a62 Fix gestione sync DB Icoel 2022-05-30 15:19:16 +02:00
Samuele Locatelli 7584a729c1 Merge remote-tracking branch 'origin/develop' into develop 2022-05-30 12:22:23 +02:00
Samuele Locatelli 233bfeeee7 Update con inclusione nuovo tipo task syncDb 2022-05-30 12:19:56 +02:00
Samuele E. Locatelli 4020779bcb Merge remote-tracking branch 'gitlab.steamware/feature/Giacovelli' into develop 2022-05-28 14:47:20 +02:00
S.E.Locatelli 25112bddd7 Modifiche IcoelDb: sembra ok (a patto di includere EntityFramework in IOB-WIN-NEXT 2022-05-28 14:46:57 +02:00
Samuele E. Locatelli 884fbad219 Merge tag 'FixTraceIcoelSoapCall' into develop
Aggiunti trace per esecuzione chiamate SOAP x ICOEL
2022-05-28 14:20:12 +02:00
Samuele E. Locatelli 28ddddd8ef Merge branch 'release/FixTraceIcoelSoapCall' 2022-05-28 14:19:58 +02:00
Samuele E. Locatelli 0d11a69779 Merge remote-tracking branch 'gitlab.steamware/feature/Giacovelli' into develop 2022-05-28 14:18:10 +02:00
S.E.Locatelli d2931a363a Aggiunta trace soap x chiamate servizio, cambio parametri periodi 2022-05-28 14:15:50 +02:00
S.E.Locatelli 5ed3306661 Merge remote-tracking branch 'origin/develop' into Feature/Giacovelli 2022-05-28 14:02:27 +02:00
Samuele Locatelli a13dec7d3b Merge tag 'TestDemFactDynData' into develop
Abbozzata gestione demFact x DynData (SOAP icoel)
2022-05-28 12:44:32 +02:00
Samuele Locatelli ed17df0667 Merge branch 'release/TestDemFactDynData' 2022-05-28 12:44:15 +02:00
Samuele Locatelli aa8bf8861f Modifica x demoltiplica freq controlli dynData x icoel SOAP 2022-05-28 12:43:38 +02:00
Samuele Locatelli ed006c0367 Merge branch 'SDK/Icoel' into develop 2022-05-28 12:29:51 +02:00
Samuele Locatelli 589433dba4 Merge commit 'ac0c0a8d62e9b6388c5149466824641a2929d352' into SDK/Icoel 2022-05-28 12:27:37 +02:00
Samuele Locatelli 1a2e5639d8 Update (temporaneo) x gestione IcoelDb 2022-05-28 12:27:27 +02:00
Samuele Locatelli ac0c0a8d62 Update SDK Icoel parte DB x init MoonPro_ISF 2022-05-28 12:27:00 +02:00
Samuele Locatelli 2e88073973 Merge remote-tracking branch 'origin/Feature/GiacovelliSoap' into develop 2022-05-28 12:22:48 +02:00
Samuele Locatelli dab327c567 Bozza conf IobWinDb 2022-05-28 12:17:27 +02:00
Samuele Locatelli 99adc168fd Inserimento obj ed enum da SDK 2022-05-28 12:17:19 +02:00
S.E.Locatelli d07847ea54 Merge remote-tracking branch 'origin/master' into Feature/Giacovelli 2022-05-26 18:53:30 +02:00
Samuele E. Locatelli 6b3816a8ac Merge branch 'release/FixIcoelIobWin' 2022-05-26 18:52:15 +02:00
Samuele E. Locatelli dbbb562d66 Merge remote-tracking branch 'gitlab.steamware/feature/Giacovelli' into develop 2022-05-26 18:50:32 +02:00
S.E.Locatelli 5c75d5f128 Update IOB-WIN x permettere compilazione (di base) 2022-05-26 18:49:45 +02:00
S.E.Locatelli e7428e90f8 Merge remote-tracking branch 'origin/develop' into Feature/Giacovelli 2022-05-26 17:40:02 +02:00
Samuele E. Locatelli 54949ac357 Merge tag 'AddIcoelDbSync' into develop
Completata modifica DB ICoel x data Sync + inclusione in IOB-WIN-NEXT della nuova sdk dll x gestione
2022-05-26 17:38:57 +02:00
Samuele E. Locatelli 0a81b4f2c6 Merge branch 'release/AddIcoelDbSync' 2022-05-26 17:38:36 +02:00
Samuele E. Locatelli aca6f1afe0 Merge branch 'SDK/Icoel' into develop 2022-05-26 17:38:04 +02:00
Samuele E. Locatelli d8ef55a4fa Update nuget x IcoelDB 2022-05-26 17:37:53 +02:00
Samuele E. Locatelli ed95ecf1f9 Merge branch 'develop' into SDK/Icoel 2022-05-26 17:35:26 +02:00
Samuele E. Locatelli 06a481fae1 Merge remote-tracking branch 'gitlab.steamware/feature/Giacovelli' into develop 2022-05-26 17:35:21 +02:00
S.E.Locatelli 4ac926f24a Update libreria SDK x Icoel DB, ok procedure sync, da inglobare nell'IOB-WIN ora 2022-05-26 17:34:59 +02:00
Samuele E. Locatelli c61cda22ed Merge branch 'develop' into SDK/Icoel 2022-05-25 18:58:29 +02:00
Samuele E. Locatelli 4217e0fac1 Merge tag 'AddProxyDbIcoel' into develop
COmpletata libreri icoel x DB (da caricare SDK)
2022-05-25 18:58:09 +02:00
Samuele E. Locatelli f2cd283589 Merge branch 'release/AddProxyDbIcoel' 2022-05-25 18:57:46 +02:00
Samuele E. Locatelli d341046cc1 Merge remote-tracking branch 'gitlab.steamware/feature/Giacovelli' into release/AddProxyDbIcoel 2022-05-25 18:57:24 +02:00
S.E.Locatelli 0fecb35559 update appunti, e chiudo x oggi! 2022-05-25 18:56:43 +02:00
S.E.Locatelli 3770e1eb57 Update test DB 2022-05-25 18:33:00 +02:00
Samuele E. Locatelli 7148177c01 Merge remote-tracking branch 'gitlab.steamware/feature/Giacovelli' into develop 2022-05-25 18:18:34 +02:00
S.E.Locatelli 9c668938a8 Aggiunta metodi x recupero dati tracker lotti/confezioni/pack 2022-05-25 18:17:46 +02:00
S.E.Locatelli b807053813 Aggiunta doc sql di ICOEL 2022-05-25 18:17:33 +02:00
S.E.Locatelli 1b7f2cbda9 Merge remote-tracking branch 'origin/Feature/Giacovelli' into Feature/Giacovelli 2022-05-25 17:45:14 +02:00
S.E.Locatelli a7ec20ef5e Aggiunto gestione secondo DB ProductTotals 2022-05-25 17:13:28 +02:00
S.E.Locatelli 548fa2469a Appunti controller 2022-05-25 15:54:33 +02:00
S.E.Locatelli 358f422ade Aggiunti riferimento x progetto accesso ai DB SQL in test 2022-05-25 15:50:28 +02:00
S.E.Locatelli 397409ca40 Aggiunto bozza progetto DataLayer x accesso ai DB 2022-05-25 15:50:17 +02:00
Samuele E. Locatelli 4a5328f3fd Merge tag 'FixLastReadPlcIcoelSoap' into develop
Fix ultima lettura PLC x Icoel
2022-05-25 10:48:21 +02:00
Samuele E. Locatelli 2c996965a0 Merge branch 'release/FixLastReadPlcIcoelSoap' 2022-05-25 10:47:25 +02:00
Samuele E. Locatelli 27d5e1499f Merge branch 'feature/Giacovelli' into develop 2022-05-25 10:46:51 +02:00
Samuele E. Locatelli 45f06365dc Merge remote-tracking branch 'gitlab.steamware/feature/Giacovelli' into feature/Giacovelli 2022-05-25 10:46:37 +02:00
S.E.Locatelli 4ca5b52dff fix conf giacovello 002 2022-05-25 10:45:26 +02:00
S.E.Locatelli e2af337f04 Merge branch 'develop' into Feature/Giacovelli 2022-05-25 10:38:43 +02:00
S.E.Locatelli fd410de445 Merge branch 'Feature/Giacovelli' into develop 2022-05-25 10:38:06 +02:00
S.E.Locatelli 04a4820ed6 Merge remote-tracking branch 'origin/Feature/Giacovelli' into develop 2022-05-25 10:37:58 +02:00
Samuele E. Locatelli 2772f71042 Aggiunta info last read PLC 2022-05-25 10:34:57 +02:00
Samuele E. Locatelli f00c519263 Merge branch 'develop' into feature/Giacovelli 2022-05-25 08:48:03 +02:00
Samuele E. Locatelli 3df235284a Merge tag 'RefreshIobMan' into develop
Completata review ed update IOB-MAN ocn librerie interne aggiornate e eliminazione crc32 e snappyLib obsolete x zip
2022-05-25 08:47:36 +02:00
Samuele E. Locatelli 3a76d68b3e Merge branch 'release/RefreshIobMan' 2022-05-25 08:47:13 +02:00
Samuele E. Locatelli 6960eb7c81 typo fix 2022-05-25 08:46:14 +02:00
Samuele E. Locatelli c0c3334e9f Update IOB-MAN e refresh 2022-05-25 08:46:08 +02:00
S.E.Locatelli 1e3b6bede1 Merge branch 'develop' into Feature/Giacovelli 2022-05-24 18:17:51 +02:00
Samuele E. Locatelli ad34f3d5b1 Merge tag 'FirstIcoelSoapIobRelease' into develop
Prima versione IcoelSoap IOB
2022-05-24 18:12:12 +02:00
Samuele E. Locatelli 98f8b1f4da Merge branch 'release/FirstIcoelSoapIobRelease' 2022-05-24 18:11:41 +02:00
S.E.Locatelli df68a123aa Merge branch 'Feature/Giacovelli' into develop 2022-05-24 18:04:14 +02:00
S.E.Locatelli b7435c8703 Correzione stack variabili da SOAP client... 2022-05-24 18:03:47 +02:00
S.E.Locatelli e35e6cce89 OK encode parametri batch correnti + send (massivo) dati perfCounter (NON mediati, da mediare) 2022-05-24 17:34:11 +02:00
S.E.Locatelli c1f7fbffeb Merge branch 'Feature/Giacovelli' into SDK/Icoel 2022-05-24 16:24:23 +02:00
Samuele E. Locatelli 1966ab5db3 Update x test lettura parametri velocità (da provare) 2022-05-24 16:01:39 +02:00
Samuele E. Locatelli 482a085db9 Merge branch 'develop' into feature/Giacovelli 2022-05-24 15:25:01 +02:00
Samuele E. Locatelli 872fa084d5 Merge tag 'FixCounterPzFanucMacro' into develop
Fix gestione contapezzi: era solo sulla function di recupero dei parametri opzionali da recuperare e non sui parametri principali della funzione getPzCounter
2022-05-24 15:10:29 +02:00
Samuele E. Locatelli 56980c363f Merge branch 'release/FixCounterPzFanucMacro' 2022-05-24 15:09:27 +02:00
Samuele E. Locatelli 426d0561c8 Merge branch 'feature/Giacovelli' into develop 2022-05-24 15:08:36 +02:00
Samuele E. Locatelli 7f3d0979d2 Merge remote-tracking branch 'gitlab.steamware/feature/Giacovelli' into feature/Giacovelli 2022-05-24 15:08:28 +02:00
Samuele E. Locatelli 1136519691 Fix gestione contapezzi FANUC da MACRO 2022-05-24 15:08:15 +02:00
S.E.Locatelli 1c3c1b8a1a Aggiunta appunti ICOEL 2022-05-24 12:58:47 +02:00
Samuele Locatelli 60c4e6bd84 Vesrione x test in prod Giacovelli 2022-05-23 20:32:41 +02:00
Samuele Locatelli 9f7e7a1660 Aggiunta metodi accodamento RawTransf 2022-05-23 19:57:27 +02:00
Samuele Locatelli 1d0840a557 Versione aggiornata x test Giacovelli 2022-05-23 19:42:03 +02:00
Samuele Locatelli 721ed28b76 Merge tag 'UpdateFanucMacroContapezzi' into develop
Aggiunta gestione contapezzi fanuc da Macro (es Jetco 3025)
2022-05-23 19:26:28 +02:00
Samuele Locatelli e434712a4d Merge branch 'release/UpdateFanucMacroContapezzi' 2022-05-23 19:26:16 +02:00
Samuele Locatelli ee951372a3 Merge branch 'Feature/Giacovelli' into develop 2022-05-23 19:25:48 +02:00
Samuele Locatelli 3895543199 Modifica Fanuc x lettura valori MACRO (contapezzi STAR 3025 Jetco) 2022-05-23 19:25:38 +02:00
Samuele Locatelli 05fce2e224 Update conf jetco z 3025 con MACRO al posto di PAR 2022-05-23 19:23:29 +02:00
Samuele Locatelli 4a6b32fc47 Merge branch 'Feature/Giacovelli' into SDK/MultiCnc 2022-05-23 19:01:21 +02:00
Samuele Locatelli 1371a32164 Refresh x gestione (giacovelli) dell'invio dati RawTransfer (NON concluso) 2022-05-23 19:01:12 +02:00
Samuele Locatelli 7225941f5e Aggiunta Fanuc x lettura macro (indice elevato) 2022-05-23 19:00:52 +02:00
S.E.Locatelli 997e70fc88 Update x gestione rielttura periodica batch 2022-05-23 12:28:18 +02:00
S.E.Locatelli a5e081efd2 Merge remote-tracking branch 'origin/Feature/Giacovelli' into Feature/Giacovelli 2022-05-23 12:09:11 +02:00
S.E.Locatelli d4d65ae3a1 Migliorato test Batch attivo 2022-05-23 12:09:03 +02:00
Samuele Locatelli ff340ee8a5 Aggiunta gestione veto invio sig in x adapter 2022-05-23 12:08:08 +02:00
Samuele Locatelli e81b6b5755 Merge branch 'Feature/Giacovelli' of https://gitlab.steamware.net/steamware/Mapo-IOB-WIN into Feature/Giacovelli 2022-05-23 11:46:44 +02:00
Samuele Locatelli 6d9a3ef898 Update gestione semafori IcoelSoap 2022-05-23 11:46:41 +02:00
S.E.Locatelli b812efd438 update conf x gestione ws icoel 2022-05-23 11:46:05 +02:00
Samuele Locatelli 46705d265e Aggiunto start x IobIcoel DB/Soap 2022-05-23 11:28:10 +02:00
S.E.Locatelli c828b2eb79 Merge remote-tracking branch 'origin/Feature/Giacovelli' into Feature/Giacovelli 2022-05-23 11:23:07 +02:00
Samuele Locatelli 5eed8cbac6 refresh nuget 2022-05-23 11:22:37 +02:00
Samuele Locatelli ba72168d85 Refresh IcoelSoap x non invaire letture semafori 2022-05-23 11:18:06 +02:00
S.E.Locatelli 6f5e9b30bb update conf x start MAIN.ini 2022-05-23 10:35:40 +02:00
Samuele Locatelli f043d4ff75 Merge branch 'develop' into Feature/Giacovelli 2022-05-23 10:32:28 +02:00
Samuele Locatelli 922e0a4f5d Bozza icoelSoap da avviare in Giacovelli 2022-05-23 10:29:10 +02:00
Samuele Locatelli 5afee5d823 Aggiunta modifiche x IcoelSoap e generalizzazione invii vari 2022-05-21 12:26:53 +02:00
Samuele Locatelli 682a486252 Merge branch 'SDK/Icoel' into develop 2022-05-20 18:12:40 +02:00
Samuele Locatelli 6b43ed1081 Aggiunta preliminare classi IOB Icoel 2022-05-20 18:12:22 +02:00
Samuele Locatelli 60de646718 Merge commit '40618f573fc4df0807801a042457c7f9ebdd480b' into SDK/Icoel 2022-05-20 18:07:21 +02:00
Samuele Locatelli 40618f573f Merge branch 'develop' into Feature/Giacovelli 2022-05-20 18:06:58 +02:00
Samuele Locatelli 9c29d2f96c Merge remote-tracking branch 'origin/Feature/Giacovelli' into develop 2022-05-20 18:06:46 +02:00
Samuele Locatelli 8caea2861f cambio in internal x displayLayout 2022-05-20 18:06:39 +02:00
S.E.Locatelli 6dd2c9afb9 update test x sizing profile + fix conf porta tcp 2022-05-20 17:31:59 +02:00
Samuele Locatelli 3d8ce81114 Merge tag 'FixMultibranchCiCd' into develop
Fix multibranch CI/CD, testing master
2022-05-20 16:03:12 +02:00
Samuele Locatelli d1b01b1a9e Merge branch 'release/FixMultibranchCiCd' 2022-05-20 16:02:53 +02:00
Samuele Locatelli 369540d73d Fix develop yaml 2022-05-20 16:01:34 +02:00
175 changed files with 12948 additions and 5341 deletions
+4 -1
View File
@@ -36,7 +36,7 @@ variables:
.version-fix: &version-fix .version-fix: &version-fix
- | - |
$env:NEW_REL = $env:VERS_MAIN+"."+(get-date format yyMM)+"."+(get-date format ddHH) $env:NEW_REL = $env:VERS_MAIN+"."+(get-date format yyMM)+"."+(get-date format ddHH)
$env:NUM_REL = $env:VERS_MAIN+"."+(get-date format yyMM)+"."+(get-date format ddHH) $env:NUM_REL = $env:VERS_MAIN+"."+(get-date format yyMM)+"."+(get-date format dHH)
$env:NUM_DEB = $env:VERS_MAIN+"."+(get-date format yyMM)+"-beta."+(get-date format dHH) $env:NUM_DEB = $env:VERS_MAIN+"."+(get-date format yyMM)+"-beta."+(get-date format dHH)
$env:NEW_COPYRIGHT = "EgalWare @ 2006-" + (get-date -format yyyy) $env:NEW_COPYRIGHT = "EgalWare @ 2006-" + (get-date -format yyyy)
$contenuto = Get-Content -path 'VersGen\VersGen.cs' -Raw $contenuto = Get-Content -path 'VersGen\VersGen.cs' -Raw
@@ -209,6 +209,7 @@ EgwProxy.Icoel:build:
APP_NAME: EgwProxy.Icoel APP_NAME: EgwProxy.Icoel
only: only:
refs: refs:
- develop
- SDK/Icoel - SDK/Icoel
before_script: before_script:
- *nuget-fix - *nuget-fix
@@ -225,6 +226,7 @@ EgwProxy.MultiCncLib:build:
APP_NAME: EgwProxy.MultiCncLib APP_NAME: EgwProxy.MultiCncLib
only: only:
refs: refs:
- develop
- SDK/MultiCnc - SDK/MultiCnc
before_script: before_script:
- *nuget-fix - *nuget-fix
@@ -241,6 +243,7 @@ EgwProxy.OsaiCncLib:build:
APP_NAME: EgwProxy.OsaiCncLib APP_NAME: EgwProxy.OsaiCncLib
only: only:
refs: refs:
- develop
- SDK/OsaiCnc - SDK/OsaiCnc
before_script: before_script:
- *nuget-fix - *nuget-fix
@@ -0,0 +1,24 @@
SELECT *
FROM DettagliConferimentoMES
where FillingId = 31729
order by PackId
/*
Numero lotto = sigla giorno
sigla lotto: incrementale giornaliero
in particoalre x il prodotto grosso --> seleziono da + fornitori (es fornitori grossi)
PackId = id univoco scatoletta
FillingId / FillingRow NON USATI: li posso ignorare, si applicano al caso "travaso" da bins ingresso / bins uscita "tipizzati" --> serve x precalibrare
scaricoId = operazione di scannerizzazione ( è il barcode letto)
codice a barre è letto x ogni etichetta di conferimento
codice e nome fornitore = grower
codice e descrizione prodotto : sono il GREZZO specifico
cdice prodotto grezzo è il "ceppo" / famiglia
sigla e numero lotto: colonna di entrata ciliegie (frontiera)
idem x data e qta entrata
*/
@@ -0,0 +1,16 @@
SELECT *
FROM DettagliConfezioniMES
/*
pack id = singola cassetta/scatola/cartone
ean = barcode in uscita
batch id / batch name = dati tracciabilità, legato ai lotti in entrata sul sizer
lane [1/2]sizerBatchId = lotti del sizer
pesoDecigram = peso netto confezionato (tolleranza +/-10g...20gr)
tabella scritta dal momento in cui arriva il cartone/cassetta per iniziare riempimento
dati live li vediamo dal sizer
*/
@@ -0,0 +1,19 @@
select top 100 *
from ProductsTotals
/*
SizerBatch id = id del batch da WS SOAP
Index = indice di prodotto FINITO, di cui ho il NOME
- prodotti da matrice: colonne = gradi, righe = taglie(sizes)
- grado a colore rosso
- do il nome prodotto rosse 26- (che sono da 22 a 26 in grado A)
- colonna qualities = è la "somma dei qualities" ovvero le colonne che passano nelcontrollo prodotto
- codice in 3 parametri, che sono a,b,c
- a = qualità interna (SEMPRE NULL x le ciliegie)
- b grado = qualità esterna del frutto, es rosse, nere, con stelo... ricircolo = scarto per cattiva disposizione
- c : calibri che mi definiscono la dimensione, tipicamente 22..32
si scrive tutto quando è chiuso il lotto
inizialmente 1 solo lotto x entrambe le linee
*/
@@ -0,0 +1,23 @@
/****** Script for SelectTopNRows command from SSMS ******/
SELECT TOP (1000) [ID_CHIAVE]
,[CODBARRE]
,[CODICE_FORNITORE]
,[CODICE_LUOGO_PRODUZIONE]
,[NOME_FORNITORE]
,[INDIRIZZO_FORNITORE]
,[COMUNE_FORNITORE]
,[NOME_LUOGO_PRODUZIONE]
,[INDIRIZZO_LUOGO_PRODUZIONE]
,[COMUNE_LUOGO_PRODUZIONE]
,[CODICE_PRODOTTO]
,[DESCRIZIONE_PRODOTTO]
,[CODICE_PRODOTTO_GREZZO]
,[DESCRIZIONE_PRODOTTO_GREZZO]
,[SIGLA_LOTTO]
,[NUMERO_LOTTO]
,[DATA_ENTRATA]
,[QUANTITA_ENTRATA]
FROM [frontiera].[dbo].[ENTRATACILIEGIE]
-- utilizzare codice e descrizione prodotto...
+42
View File
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<connectionStrings>
<add name="EntrataFrontiera" connectionString="data source=192.168.137.10\sqlexpress;initial catalog=frontiera;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
<add name="ExportIcoel" connectionString="data source=192.168.137.10\sqlexpress;initial catalog=IcoelExport;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
<add name="TrackerLotti" connectionString="data source=192.168.250.250\sqlexpress;initial catalog=TrackerLotti3;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
<add name="SyncState" connectionString="data source=localhost\sqlexpress;initial catalog=MoonPro_ISF;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
</connectionStrings>
<runtime>
<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-4.0.5.0" newVersion="4.0.5.0" />
</dependentAssembly>
<dependentAssembly>
<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.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Encodings.Web" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.5.1" newVersion="4.0.5.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
@@ -0,0 +1,132 @@
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
/*------------------------------------------------
* Aggiunto fix come da link seguente:
*
* https://stackoverflow.com/questions/14033193/entity-framework-provider-type-could-not-be-loaded
*
* I solved this by adding an using stament on top of my DBContext class, like so:
* using SqlProviderServices= System.Data.Entity.SqlServer.SqlProviderServices;
*
*/
namespace EgwProxy.Icoel.DataLayer.Controllers
{
/// <summary>
/// Controller accesso dati DB vari x ICOEL
/// </summary>
public class DbController : IDisposable
{
#if false
private static EntrataDbContext dbEntrataCtx;
private static ExportDbContext dbExportCtx;
private static TrackerDbContext dbTrackerCtx;
#endif
#region Public Constructors
/// <summary>
/// Avvio dell'oggetto gestione DB con stringa di connessione specifica
/// </summary>
/// <param name="connSyncState">Connessione DB locale di SYNC</param>
public DbController(string connSyncState)
{
dbSyncStateCtx = new SyncStateDbContext(connSyncState);
Log.Info("Avviata classe dbSyncStateCtx");
}
#endregion Public Constructors
#region Public Methods
/// <summary>
/// Recupera la tab di CurrData corrente
/// </summary>
/// <returns></returns>
public List<DatabaseModels.CurrDataModel> CurrDataGetAll()
{
List<DatabaseModels.CurrDataModel> dbResult = new List<DatabaseModels.CurrDataModel>();
dbResult = dbSyncStateCtx
.DbSetCurrData
.ToList();
return dbResult;
}
/// <summary>
/// Dispose classe
/// </summary>
public void Dispose()
{
// Clear database context
#if false
dbEntrataCtx.Dispose();
dbExportCtx.Dispose();
dbTrackerCtx.Dispose();
#endif
dbSyncStateCtx.Dispose();
}
/// <summary>
/// Esegue una volta la stored di ImportAll (x recupero dati da DB esterni) e poi
/// restitusice in output la tab di SyncState x verificare lo stato
/// </summary>
/// <returns></returns>
public List<DatabaseModels.SyncStateModel> SyncStateDoExportAll()
{
List<DatabaseModels.SyncStateModel> dbResult = new List<DatabaseModels.SyncStateModel>();
dbResult = dbSyncStateCtx
.Database
.SqlQuery<DatabaseModels.SyncStateModel>("EXEC stp_ExportAll")
.ToList();
return dbResult;
}
/// <summary>
/// Esegue una volta la stored di ImportAll (x recupero dati da DB esterni) e poi
/// restitusice in output la tab di SyncState x verificare lo stato
/// </summary>
/// <returns></returns>
public List<DatabaseModels.SyncStateModel> SyncStateDoImportAll()
{
List<DatabaseModels.SyncStateModel> dbResult = new List<DatabaseModels.SyncStateModel>();
dbResult = dbSyncStateCtx
.Database
.SqlQuery<DatabaseModels.SyncStateModel>("EXEC stp_ImportAll")
.ToList();
return dbResult;
}
/// <summary>
/// recupera la tab di SyncState corrente
/// </summary>
/// <returns></returns>
public List<DatabaseModels.SyncStateModel> SyncStateGetAll()
{
List<DatabaseModels.SyncStateModel> dbResult = new List<DatabaseModels.SyncStateModel>();
dbResult = dbSyncStateCtx
.DbSetSyncState
.ToList();
return dbResult;
}
#endregion Public Methods
#region Private Fields
private static SyncStateDbContext dbSyncStateCtx;
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
}
}
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
namespace EgwProxy.Icoel.DataLayer.DatabaseModels
{
[Table("CurrData")]
public partial class CurrDataModel
{
[Key]
[StringLength(50)]
public string Topic { get; set; }
public decimal CurrVal { get; set; } = 0;
}
}
@@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
namespace EgwProxy.Icoel.DataLayer.DatabaseModels
{
[Table("DettagliConferimentoMES")]
public partial class DettConferimentoModel
{
[Key]
[Column(Order = 0)]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public long PackId { get; set; }
[Key]
[Column(Order = 1)]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public long FillingId { get; set; }
[Key]
[Column(Order = 2)]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public int FilligRow { get; set; }
[Key]
[Column(Order = 3)]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public long ScaricoId { get; set; }
public string CODBARRE { get; set; }
public string CODICE_FORNITORE { get; set; }
public string NOME_FORNITORE { get; set; }
public string CODICE_PRODOTTO { get; set; }
public string DESCRIZIONE_PRODOTTO { get; set; }
public string CODICE_PRODOTTO_GREZZO { get; set; }
public string DESCRIZIONE_PRODOTTO_GREZZO { get; set; }
public string SIGLA_LOTTO { get; set; }
public string NUMERO_LOTTO { get; set; }
public string DATA_ENTRATA { get; set; }
public string QUANTITA_ENTRATA { get; set; }
}
}
@@ -0,0 +1,69 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
namespace EgwProxy.Icoel.DataLayer.DatabaseModels
{
[Table("DettagliConfezioniMES")]
public partial class DettConfezioniModel
{
[Key]
[Column("Pack Id", Order = 0)]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public long Pack_Id { get; set; }
[StringLength(50)]
public string EAN { get; set; }
[Key]
[Column("Batch Id", Order = 1)]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public long Batch_Id { get; set; }
public string BatchName { get; set; }
[Key]
[Column(Order = 2)]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public int Lane1SizerBatchId { get; set; }
[Key]
[Column(Order = 3)]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public int Lane2SizerBatchId { get; set; }
[Key]
[Column("End Time", Order = 4, TypeName = "datetime2")]
public DateTime End_Time { get; set; }
[Key]
[Column(Order = 5)]
public Guid SizerProductGUID { get; set; }
[Column("Product Name")]
public string Product_Name { get; set; }
[Key]
[Column(Order = 6)]
public Guid SizerPackGUID { get; set; }
[Column("Pack Name")]
[StringLength(50)]
public string Pack_Name { get; set; }
[Key]
[Column(Order = 7)]
public decimal PesoDecigram { get; set; }
[StringLength(10)]
public string FillingMode { get; set; }
[Key]
[Column(Order = 8)]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public int Quantity { get; set; }
}
}
@@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
namespace EgwProxy.Icoel.DataLayer.DatabaseModels
{
[Table("ENTRATACILIEGIE")]
public partial class EntrataModel
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public long ID_CHIAVE { get; set; }
[StringLength(20)]
public string CODBARRE { get; set; }
public double? CODICE_FORNITORE { get; set; }
[StringLength(5)]
public string CODICE_LUOGO_PRODUZIONE { get; set; }
[StringLength(50)]
public string NOME_FORNITORE { get; set; }
[StringLength(50)]
public string INDIRIZZO_FORNITORE { get; set; }
[StringLength(50)]
public string COMUNE_FORNITORE { get; set; }
[StringLength(50)]
public string NOME_LUOGO_PRODUZIONE { get; set; }
[StringLength(50)]
public string INDIRIZZO_LUOGO_PRODUZIONE { get; set; }
[StringLength(50)]
public string COMUNE_LUOGO_PRODUZIONE { get; set; }
[StringLength(10)]
public string CODICE_PRODOTTO { get; set; }
[StringLength(50)]
public string DESCRIZIONE_PRODOTTO { get; set; }
[StringLength(10)]
public string CODICE_PRODOTTO_GREZZO { get; set; }
[StringLength(50)]
public string DESCRIZIONE_PRODOTTO_GREZZO { get; set; }
[StringLength(50)]
public string SIGLA_LOTTO { get; set; }
[StringLength(10)]
public string NUMERO_LOTTO { get; set; }
[Column(TypeName = "datetime2")]
public DateTime? DATA_ENTRATA { get; set; }
public double? QUANTITA_ENTRATA { get; set; }
}
}
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
namespace EgwProxy.Icoel.DataLayer.DatabaseModels
{
[Table("ProductsTotals")]
public partial class ProductsTotalsModel
{
[Key]
[Column(Order = 0)]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public int SizerBatchId { get; set; }
[Key]
[Column(Order = 1)]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
public int Index { get; set; }
public string Nome { get; set; }
public string Qualities { get; set; }
public string Grado { get; set; }
public string Calibro { get; set; }
public int NumeroFrutti { get; set; }
public string Decigrammi { get; set; }
}
}
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
namespace EgwProxy.Icoel.DataLayer.DatabaseModels
{
[Table("SyncState")]
public partial class SyncStateModel
{
[Key]
[StringLength(50)]
public string TableName { get; set; }
public long LastIdx { get; set; }
public long LastIdxIn { get; set; }
public long LastIdxOut { get; set; }
public long NumRec { get; set; }
public long NumRecIn { get; set; }
public long NumRecOut { get; set; }
public DateTime LastUpdate { get; set; } = DateTime.Today;
}
}
+71
View File
@@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EgwProxy.Icoel.DataLayer
{
public static class DbConfig
{
#region Public Fields
public static string DATABASE_NAME = "EgtBwDb";
public static int DATABASE_PROCESS_TIMEOUT = 5;
public static string DATABASE_PWD = "viacremasca";
// Database config
public static string DATABASE_SERV = "127.0.0.1";
public static string DATABASE_USER = "EgtUser";
#endregion Public Fields
#region Public Properties
/// <summary>
/// DB Connection string per azioni amministrative
/// </summary>
public static string ADMIN_CONNECTION_STRING { get; set; } = "";
/// <summary>
/// DB Connection string
/// </summary>
public static string CONNECTION_STRING { get; set; } = "";
#endregion Public Properties
#region Public Methods
/// <summary>
/// Metodo di init standard per DB in rete con Master_Key
/// </summary>
/// <param name="server">Indirizzo del server (tipicamente indirizzo di rete)</param>
/// <param name="nKey">Numero chiave</param>
/// <param name="sKey">Codice/pwd associato a chaive</param>
/// <param name="masterKey">Numero di chiave master con cui è creato il DB</param>
public static void InitDb(string server, string nKey, string sKey, string masterKey = "")
{
// se nulla metto amster come nKey...
masterKey = string.IsNullOrEmpty(masterKey) ? nKey : masterKey;
DATABASE_SERV = server;
DATABASE_NAME = $"EgtBwDb_{masterKey}";
DATABASE_USER = $"user_{nKey}";
DATABASE_PWD = $"pwd_{sKey}";
CONNECTION_STRING = $"server={DATABASE_SERV};port=3306;database={DATABASE_NAME};uid={DATABASE_USER};pwd={DATABASE_PWD};sslmode=None";
// stringa admin con utente root egalware...
ADMIN_CONNECTION_STRING = $"server={DATABASE_SERV};port=3306;database=mysql;uid=root;pwd=Egalware_24068!;sslmode=None;CHARSET=utf8";
}
#if false
public static bool CheckUser(string nKey, string sKey, bool isNetwork)
{
// esecuzione script di install locale
return Controllers.DbController.man.checkCreateUser(DATABASE_USER, DATABASE_PWD, isNetwork);
}
#endif
#endregion Public Methods
}
}
@@ -0,0 +1,199 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" />
<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>{E36544CB-D699-48D8-9F81-C2758E7C7D19}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>EgwProxy.Icoel.DataLayer</RootNamespace>
<AssemblyName>EgwProxy.Icoel.DataLayer</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Azure.Core, Version=1.6.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8, processorArchitecture=MSIL">
<HintPath>..\packages\Azure.Core.1.6.0\lib\net461\Azure.Core.dll</HintPath>
</Reference>
<Reference Include="Azure.Identity, Version=1.3.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8, processorArchitecture=MSIL">
<HintPath>..\packages\Azure.Identity.1.3.0\lib\netstandard2.0\Azure.Identity.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.1.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Data.SqlClient, Version=4.1.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Data.SqlClient.4.1.0\lib\net461\Microsoft.Data.SqlClient.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Identity.Client, Version=4.22.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Identity.Client.4.22.0\lib\net461\Microsoft.Identity.Client.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Identity.Client.Extensions.Msal, Version=2.16.5.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Identity.Client.Extensions.Msal.2.16.5\lib\net45\Microsoft.Identity.Client.Extensions.Msal.dll</HintPath>
</Reference>
<Reference Include="Microsoft.IdentityModel.JsonWebTokens, Version=6.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.JsonWebTokens.6.8.0\lib\net461\Microsoft.IdentityModel.JsonWebTokens.dll</HintPath>
</Reference>
<Reference Include="Microsoft.IdentityModel.Logging, Version=6.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.Logging.6.8.0\lib\net461\Microsoft.IdentityModel.Logging.dll</HintPath>
</Reference>
<Reference Include="Microsoft.IdentityModel.Protocols, Version=6.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.Protocols.6.8.0\lib\net461\Microsoft.IdentityModel.Protocols.dll</HintPath>
</Reference>
<Reference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect, Version=6.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.Protocols.OpenIdConnect.6.8.0\lib\net461\Microsoft.IdentityModel.Protocols.OpenIdConnect.dll</HintPath>
</Reference>
<Reference Include="Microsoft.IdentityModel.Tokens, Version=6.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.Tokens.6.8.0\lib\net461\Microsoft.IdentityModel.Tokens.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.9\lib\net45\NLog.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>
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Configuration.ConfigurationManager, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Configuration.ConfigurationManager.5.0.0\lib\net461\System.Configuration.ConfigurationManager.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Data.OracleClient" />
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.4.6.0\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.IdentityModel" />
<Reference Include="System.IdentityModel.Tokens.Jwt, Version=6.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\System.IdentityModel.Tokens.Jwt.6.8.0\lib\net461\System.IdentityModel.Tokens.Jwt.dll</HintPath>
</Reference>
<Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.Compression" />
<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>
<Reference Include="System.Net" />
<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>
<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\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Security" />
<Reference Include="System.Security.AccessControl, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.AccessControl.5.0.0\lib\net461\System.Security.AccessControl.dll</HintPath>
</Reference>
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.1\lib\net461\System.Security.Cryptography.Algorithms.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Cryptography.ProtectedData, Version=4.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.ProtectedData.4.5.0\lib\net461\System.Security.Cryptography.ProtectedData.dll</HintPath>
</Reference>
<Reference Include="System.Security.Permissions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Permissions.5.0.0\lib\net461\System.Security.Permissions.dll</HintPath>
</Reference>
<Reference Include="System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll</HintPath>
</Reference>
<Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Text.Encodings.Web, Version=4.0.5.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Encodings.Web.4.7.2\lib\net461\System.Text.Encodings.Web.dll</HintPath>
</Reference>
<Reference Include="System.Text.Json, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Json.4.6.0\lib\net461\System.Text.Json.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Transactions" />
<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>
</Reference>
<Reference Include="System.Windows.Forms" />
<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" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Controllers\DbController.cs" />
<Compile Include="DatabaseModels\EntrataModel.cs" />
<Compile Include="DatabaseModels\DettConferimentoModel.cs" />
<Compile Include="DatabaseModels\DettConfezioniModel.cs" />
<Compile Include="DatabaseModels\CurrDataModel.cs" />
<Compile Include="EntrataDbContext.cs" />
<Compile Include="ExportDbContext.cs" />
<Compile Include="DatabaseModels\ProductsTotalsModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="DatabaseModels\SyncStateModel.cs" />
<Compile Include="SyncStateDbContext.cs" />
<Compile Include="TrackerDbContext.cs" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>Questo progetto fa riferimento a uno o più pacchetti NuGet che non sono presenti in questo computer. Usare lo strumento di ripristino dei pacchetti NuGet per scaricarli. Per altre informazioni, vedere http://go.microsoft.com/fwlink/?LinkID=322105. Il file mancante è {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.Data.SqlClient.SNI.4.0.0\build\net46\Microsoft.Data.SqlClient.SNI.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Data.SqlClient.SNI.4.0.0\build\net46\Microsoft.Data.SqlClient.SNI.targets'))" />
</Target>
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
<Import Project="..\packages\Microsoft.Data.SqlClient.SNI.4.0.0\build\net46\Microsoft.Data.SqlClient.SNI.targets" Condition="Exists('..\packages\Microsoft.Data.SqlClient.SNI.4.0.0\build\net46\Microsoft.Data.SqlClient.SNI.targets')" />
</Project>
@@ -0,0 +1,46 @@
using EgwProxy.Icoel.DataLayer.DatabaseModels;
using NLog;
using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;
using SqlProviderServices = System.Data.Entity.SqlServer.SqlProviderServices;
namespace EgwProxy.Icoel.DataLayer
{
/// <summary>
/// Classe per accesso dati accettazione merce Agrimatica (via ICOEL)
/// </summary>
public partial class EntrataDbContext : DbContext
{
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
/// <summary>
/// Costruttore implicito
/// </summary>
public EntrataDbContext() : base("name=EntrataFrontiera")
{
Log.Info("Init 01 EntrataDbContext - DONE");
}
/// <summary>
/// Costruttore da connectionString
/// </summary>
/// <param name="connectionString"></param>
public EntrataDbContext(string connectionString) : base(connectionString)
{
Log.Info("Init 02 EntrataDbContext - DONE");
}
/// <summary>
/// DbSet record entrata merce
/// </summary>
public virtual DbSet<EntrataModel> DbSetEntrataMerce { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Entity<EntrataModel>()
.Property(e => e.DATA_ENTRATA)
.HasPrecision(0);
}
}
}
@@ -0,0 +1,44 @@
using EgwProxy.Icoel.DataLayer.DatabaseModels;
using NLog;
using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;
using SqlProviderServices = System.Data.Entity.SqlServer.SqlProviderServices;
namespace EgwProxy.Icoel.DataLayer
{
/// <summary>
/// Classe per accesso dati Tacker ICOEL
/// </summary>
public partial class ExportDbContext : DbContext
{
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
/// <summary>
/// Costruttore implicito
/// </summary>
public ExportDbContext() : base("name=ExportIcoel")
{
Log.Info("Init 01 ExportDbContext - DONE");
}
/// <summary>
/// Costruttore da connectionString
/// </summary>
/// <param name="connectionString"></param>
public ExportDbContext(string connectionString) : base(connectionString)
{
Log.Info("Init 02 ExportDbContext - DONE");
}
/// <summary>
/// DbSet dati prodotti
/// </summary>
public virtual DbSet<ProductsTotalsModel> DbSetProductsTotals { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
}
}
}
+87
View File
@@ -0,0 +1,87 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EgwProxy.Icoel.DataLayer
{
public class MainDbContext : DbContext
{
#region Private Fields
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
#region Public Constructors
// Il contesto è stato configurato per utilizzare una stringa di connessione 'BBMModel' dal file di configurazione
// dell'applicazione (App.config o Web.config). Per impostazione predefinita, la stringa di connessione è destinata al
// database 'BBMModel' nell'istanza di LocalDb.
//
// Per destinarla a un database o un provider di database differente, modificare la stringa di connessione 'BBMModel'
// nel file di configurazione dell'applicazione.
[Obsolete("This constructor should never be used directly, and is only needed to generate entityframework stuff. Connection string can be adapted as pleased.")]
//public DatabaseContext() : base("BBMModel")
public MainDbContext() : base("Data Source=SQLSTEAM;Initial Catalog=SHERPA.BBM;User ID=sa;Password=keyhammer;integrated security=False;MultipleActiveResultSets=True;App=EntityFramework")
{
}
public MainDbContext(string connectionString) : base(connectionString)
{
Log.Info($"init MainDbContext - start");
try
{
Database.CreateIfNotExists();
Log.Error("CreateIfNotExists - DONE");
//Database.SetInitializer(new MigrateDatabaseToLatestVersion<StratonLocalizerDatabase, Migrations.Configuration>());
Database.SetInitializer<MainDbContext>(null);
Database.Initialize(false);
}
catch (Exception exc)
{
Log.Error($"Eccezione in fase init MainDbContext, connectionString: {connectionString}{Environment.NewLine}{exc}");
}
Log.Error("init MainDbContext - DONE");
}
#endregion Public Constructors
// Aggiungere DbSet per ogni tipo di entità che si desidera includere nel modello. Per ulteriori informazioni
// sulla configurazione e sull'utilizzo di un modello Code, vedere http://go.microsoft.com/fwlink/?LinkId=390109.
#region Public Properties
public virtual DbSet<DatabaseModels.BasketsModel> DbSetBaskets { get; set; }
public virtual DbSet<DatabaseModels.CompanyModel> DbSetCompanies { get; set; }
public virtual DbSet<DatabaseModels.FluxCountersModel> DbSetCounters { get; set; }
public virtual DbSet<DatabaseModels.CustomersModel> DbSetCustomers { get; set; }
public virtual DbSet<DatabaseModels.DocsModel> DbSetDocs { get; set; }
public virtual DbSet<DatabaseModels.Fatt2DocModel> DbSetFatt2Doc { get; set; }
public virtual DbSet<DatabaseModels.ItemsModel> DbSetItems { get; set; }
public virtual DbSet<DatabaseModels.NegotiationsModel> DbSetNegotiations { get; set; }
public virtual DbSet<DatabaseModels.ResourcesModel> DbSetResources { get; set; }
#endregion Public Properties
#region Protected Methods
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
// Precision attribute for decimals
Precision.ConfigureModelBuilder(modelBuilder);
}
#endregion Protected Methods
}
}
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Le informazioni generali relative a un assembly sono controllate dal seguente
// set di attributi. Modificare i valori di questi attributi per modificare le informazioni
// associate a un assembly.
[assembly: AssemblyTitle("EgwProxy.Icoel.DataLayer")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("EgwProxy.Icoel.DataLayer")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Se si imposta ComVisible su false, i tipi in questo assembly non saranno visibili
// ai componenti COM. Se è necessario accedere a un tipo in questo assembly da
// COM, impostare su true l'attributo ComVisible per tale tipo.
[assembly: ComVisible(false)]
// Se il progetto viene esposto a COM, il GUID seguente verrà utilizzato come ID della libreria dei tipi
[assembly: Guid("e36544cb-d699-48d8-9f81-c2758e7c7d19")]
// Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
//
// Versione principale
// Versione secondaria
// Numero di build
// Revisione
//
// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
// usando l'asterisco '*' come illustrato di seguito:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,48 @@
using EgwProxy.Icoel.DataLayer.DatabaseModels;
using NLog;
using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;
namespace EgwProxy.Icoel.DataLayer
{
/// <summary>
/// Classe per accesso dati SyncState del DB
/// </summary>
public partial class SyncStateDbContext : DbContext
{
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
/// <summary>
/// Costruttore implicito
/// </summary>
public SyncStateDbContext() : base("name=SyncState")
{
Log.Info("Init 01 SyncStateDbContext - DONE");
}
/// <summary>
/// Costruttore da connectionString
/// </summary>
/// <param name="connectionString"></param>
public SyncStateDbContext(string connectionString) : base(connectionString)
{
Log.Info("Init 02 SyncStateDbContext - DONE");
}
/// <summary>
/// DbSet dei dati stato sync DB esterni <--> locale
/// </summary>
public virtual DbSet<SyncStateModel> DbSetSyncState { get; set; }
/// <summary>
/// DbSet CurrData
/// </summary>
public virtual DbSet<CurrDataModel> DbSetCurrData { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
}
}
}
@@ -0,0 +1,49 @@
using EgwProxy.Icoel.DataLayer.DatabaseModels;
using NLog;
using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;
using SqlProviderServices = System.Data.Entity.SqlServer.SqlProviderServices;
namespace EgwProxy.Icoel.DataLayer
{
/// <summary>
/// Classe per accesso dati Tacker ICOEL
/// </summary>
public partial class TrackerDbContext : DbContext
{
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
/// <summary>
/// Costruttore implicito
/// </summary>
public TrackerDbContext() : base("name=TrackerLotti")
{
Log.Info("Init 01 TrackerDbContext - DONE");
}
/// <summary>
/// Costruttore da connectionString
/// </summary>
/// <param name="connectionString"></param>
public TrackerDbContext(string connectionString) : base(connectionString)
{
Log.Info("Init 02 TrackerDbContext - DONE");
}
/// <summary>
/// DbSet dai dati conferimento <--> pack di uscita
/// </summary>
public virtual DbSet<DettConferimentoModel> DbSetConferimento { get; set; }
/// <summary>
/// DbSet dai dati conferimento <--> confezioni
/// </summary>
public virtual DbSet<DettConfezioniModel> DbSetConfezioni { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
}
}
}
+36
View File
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Azure.Core" version="1.6.0" targetFramework="net462" />
<package id="Azure.Identity" version="1.3.0" targetFramework="net462" />
<package id="EntityFramework" version="6.4.4" targetFramework="net462" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="1.0.0" targetFramework="net462" />
<package id="Microsoft.Data.SqlClient" version="4.1.0" targetFramework="net462" />
<package id="Microsoft.Data.SqlClient.SNI" version="4.0.0" targetFramework="net462" />
<package id="Microsoft.Identity.Client" version="4.22.0" targetFramework="net462" />
<package id="Microsoft.Identity.Client.Extensions.Msal" version="2.16.5" targetFramework="net462" />
<package id="Microsoft.IdentityModel.JsonWebTokens" version="6.8.0" targetFramework="net462" />
<package id="Microsoft.IdentityModel.Logging" version="6.8.0" targetFramework="net462" />
<package id="Microsoft.IdentityModel.Protocols" version="6.8.0" targetFramework="net462" />
<package id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="6.8.0" targetFramework="net462" />
<package id="Microsoft.IdentityModel.Tokens" version="6.8.0" targetFramework="net462" />
<package id="NLog" version="4.7.9" targetFramework="net462" />
<package id="System.Buffers" version="4.5.1" targetFramework="net462" />
<package id="System.Configuration.ConfigurationManager" version="5.0.0" targetFramework="net462" />
<package id="System.Diagnostics.DiagnosticSource" version="4.6.0" targetFramework="net462" />
<package id="System.IdentityModel.Tokens.Jwt" version="6.8.0" targetFramework="net462" />
<package id="System.IO" version="4.3.0" 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="4.6.0" targetFramework="net462" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net462" />
<package id="System.Security.AccessControl" version="5.0.0" targetFramework="net462" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net462" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net462" />
<package id="System.Security.Cryptography.ProtectedData" version="4.5.0" targetFramework="net462" />
<package id="System.Security.Permissions" version="5.0.0" targetFramework="net462" />
<package id="System.Security.Principal.Windows" version="5.0.0" targetFramework="net462" />
<package id="System.Text.Encodings.Web" version="4.7.2" targetFramework="net462" />
<package id="System.Text.Json" version="4.6.0" targetFramework="net462" />
<package id="System.Threading.Tasks.Extensions" version="4.5.2" targetFramework="net462" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
</packages>
+57 -8
View File
@@ -1,24 +1,73 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<startup> <configSections>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/> <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</startup> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<appSettings>
<add key="IndirizzoIpSizer" value="192.168.137.50" />
<add key="SizerTcpPort" value="8001" />
<add key="EntrataFrontiera" value="data source=192.168.137.10\sqlexpress;initial catalog=frontiera;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" />
<add key="ExportIcoel" value="data source=192.168.137.10\sqlexpress;initial catalog=IcoelExport;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" />
<add key="TrackerLotti" value="data source=192.168.250.250\sqlexpress;initial catalog=TrackerLotti3;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" />
<add key="SyncState" value="data source=localhost\sqlexpress;initial catalog=MoonPro_ISF;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" />
</appSettings>
<system.serviceModel> <system.serviceModel>
<bindings> <bindings>
<netNamedPipeBinding> <netNamedPipeBinding>
<binding name="NetNamedPipeBinding_ISizerService"> <binding name="NetNamedPipeBinding_ISizerService">
<security mode="None"/> <security mode="None" />
</binding> </binding>
</netNamedPipeBinding> </netNamedPipeBinding>
<wsHttpBinding> <wsHttpBinding>
<binding name="WSHttpBinding_ISizerService" maxReceivedMessageSize="2147483647"> <binding name="WSHttpBinding_ISizerService" maxReceivedMessageSize="2147483647">
<security mode="None"/> <security mode="None" />
</binding> </binding>
</wsHttpBinding> </wsHttpBinding>
</bindings> </bindings>
<client> <client>
<endpoint address="http://localhost:8001/SizerService/" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ISizerService" contract="SizerService.ISizerService" name="WSHttpBinding_ISizerService"/> <endpoint address="http://localhost:8001/SizerService/" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ISizerService" contract="SizerService.ISizerService" name="WSHttpBinding_ISizerService" />
<endpoint address="net.pipe://localhost/Compac/8001/SizerService" binding="netNamedPipeBinding" bindingConfiguration="NetNamedPipeBinding_ISizerService" contract="SizerService.ISizerService" name="NetNamedPipeBinding_ISizerService"/> <endpoint address="net.pipe://localhost/Compac/8001/SizerService" binding="netNamedPipeBinding" bindingConfiguration="NetNamedPipeBinding_ISizerService" contract="SizerService.ISizerService" name="NetNamedPipeBinding_ISizerService" />
</client> </client>
</system.serviceModel> </system.serviceModel>
<!--
<connectionStrings>
<add name="EntrataFrontiera" connectionString="data source=192.168.137.10\sqlexpress;initial catalog=frontiera;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" providerName="System.Data.SqlClient" />
<add name="ExportIcoel" connectionString="data source=192.168.137.10\sqlexpress;initial catalog=IcoelExport;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" providerName="System.Data.SqlClient" />
<add name="TrackerLotti" connectionString="data source=192.168.250.250\sqlexpress;initial catalog=TrackerLotti3;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" providerName="System.Data.SqlClient" />
<add name="SyncState" connectionString="data source=localhost\sqlexpress;initial catalog=MoonPro_ISF;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=IOB-WIN-NEXT" providerName="System.Data.SqlClient" />
</connectionStrings>
-->
<runtime>
<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-4.0.5.0" newVersion="4.0.5.0" />
</dependentAssembly>
<dependentAssembly>
<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.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Encodings.Web" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.5.1" newVersion="4.0.5.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> </configuration>
@@ -34,6 +34,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
@@ -43,9 +44,6 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="INI\BatchDetails.cs" />
<Compile Include="INI\IniFileCs.cs" />
<Compile Include="INI\Settaggi.cs" />
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
@@ -59,10 +57,17 @@
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\EgwProxy.Icoel.DataLayer\EgwProxy.Icoel.DataLayer.csproj">
<Project>{E36544CB-D699-48D8-9F81-C2758E7C7D19}</Project>
<Name>EgwProxy.Icoel.DataLayer</Name>
</ProjectReference>
<ProjectReference Include="..\EgwProxy.Icoel\EgwProxy.Icoel.csproj"> <ProjectReference Include="..\EgwProxy.Icoel\EgwProxy.Icoel.csproj">
<Project>{c45f5e6e-866b-4a34-a598-29aab2d178ad}</Project> <Project>{c45f5e6e-866b-4a34-a598-29aab2d178ad}</Project>
<Name>EgwProxy.Icoel</Name> <Name>EgwProxy.Icoel</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="INI\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
+142 -9
View File
@@ -1,7 +1,10 @@
using EgwProxy.Icoel.SizerService; using EgwProxy.Icoel.DataLayer.DatabaseModels;
using EgwProxy.Icoel.Test.INI; using EgwProxy.Icoel.SizerService;
//using EgwProxy.Icoel.Test.INI;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
namespace EgwProxy.Icoel.Test namespace EgwProxy.Icoel.Test
{ {
@@ -9,6 +12,33 @@ namespace EgwProxy.Icoel.Test
{ {
#region Internal Methods #region Internal Methods
/// <summary>
/// Mostra tutte le metriche di performance ricevute
/// </summary>
/// <param name="perfMeter"></param>
internal static void DisplayPerfMeter(Dictionary<string, double> perfMeter)
{
// mostra tutti i parametri rilevati...
foreach (var item in perfMeter)
{
Console.WriteLine($"{item.Key} | {item.Value:N2}");
}
}
/// <summary>
/// Mostra tutte le metriche di performance ricevute
/// </summary>
/// <param name="currData"></param>
internal static void DisplayCurrBatch(Dictionary<string, string> currData)
{
// mostra tutti i parametri rilevati...
foreach (var item in currData)
{
Console.WriteLine($"{item.Key} | {item.Value}");
}
}
/// <summary> /// <summary>
/// Generazione di una list di info sui dati variety /// Generazione di una list di info sui dati variety
/// </summary> /// </summary>
@@ -162,7 +192,7 @@ namespace EgwProxy.Icoel.Test
/// </summary> /// </summary>
/// <param name="layoutList"></param> /// <param name="layoutList"></param>
/// <exception cref="NotImplementedException"></exception> /// <exception cref="NotImplementedException"></exception>
private static void DisplayLayout(Layout[] layoutList) internal static void DisplayLayout(Layout[] layoutList)
{ {
foreach (var layout in layoutList) foreach (var layout in layoutList)
{ {
@@ -175,6 +205,26 @@ namespace EgwProxy.Icoel.Test
} }
} }
/// <summary>
/// legge conf in formato stringa
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
protected static string ReadSetting(string key)
{
string answ = "";
try
{
answ = $"{ConfigurationManager.AppSettings[key]}" ?? "";
}
catch (Exception exc)
{
Console.Write("Eccezione in ReadSettings");
Console.Write(exc.Message);
}
return answ;
}
/// <summary> /// <summary>
/// Programma principale /// Programma principale
/// </summary> /// </summary>
@@ -183,15 +233,67 @@ namespace EgwProxy.Icoel.Test
{ {
// leggo conf da file ini (ip/port) // leggo conf da file ini (ip/port)
Console.WriteLine("Loading Files..."); Console.WriteLine("Loading Files...");
Settaggi setup = new Settaggi();
setup.Load();
string userInput = ""; string userInput = "";
// oggetto x connessione
Connector IcoelSizer = new Connector(setup.IndirizzoIpSizer, setup.TcpPortSizerClient); Console.WriteLine("------------ Test DB ------------");
EgwProxy.Icoel.DbProxy dbProxy = new DbProxy(ReadSetting("SyncState"));
Console.WriteLine();
Console.WriteLine("--- SyncState ---");
bool needRedo = true;
int numTry = 1;
//int numTry = 3;
var elencoSyncState = dbProxy.DataController.SyncStateGetAll();
while (needRedo && numTry >= 0)
{
Console.WriteLine(" --- PRE --- ");
if (elencoSyncState != null)
{
foreach (var item in elencoSyncState)
{
Console.WriteLine($"TAB: {item.TableName} | IdxIN / IdxLocal {item.LastIdxIn} / {item.LastIdx} | NumIn / NumLocal {item.NumRecIn} / {item.NumRec}");
// verifico se serva redo..
}
}
Console.WriteLine();
Console.WriteLine("Premere un tasto x continuare...");
Console.ReadKey();
Stopwatch sw = new Stopwatch();
sw.Start();
elencoSyncState = dbProxy.DataController.SyncStateDoImportAll();
sw.Stop();
Console.WriteLine($" process time: {sw.ElapsedMilliseconds} ms ");
Console.WriteLine(" --- POST --- ");
if (elencoSyncState != null)
{
foreach (var item in elencoSyncState)
{
Console.WriteLine($"TAB: {item.TableName} | IdxIN / IdxLocal {item.LastIdxIn} / {item.LastIdx} | NumIn / NumLocal {item.NumRecIn} / {item.NumRec}");
// verifico se serva redo..
}
}
// processo
needRedo = testNeedRedo(elencoSyncState);
numTry--;
}
Console.WriteLine();
Console.WriteLine("Premere un tasto x continuare...");
Console.ReadKey();
// oggetto x connessione al sizer icoel
Connector IcoelSizer = new Connector(ReadSetting("IndirizzoIpSizer"), ReadSetting("SizerTcpPort"));
//Connector IcoelSizer = new Connector(setup.IndirizzoIpSizer, setup.SizerTcpPort);
Console.WriteLine("------------ Parametri CurrBatch rilevati ------------");
var cBatch = IcoelSizer.GetCurrBatchData();
if (cBatch != null)
{
DisplayCurrBatch(cBatch);
}
// ora effettua un pò di letture/scritture // ora effettua un pò di letture/scritture
try try
{ {
Console.WriteLine("------------ TUTTE variety ------------"); Console.WriteLine("------------ TUTTE variety ------------");
var varList = IcoelSizer.GetVarietyList(false); var varList = IcoelSizer.GetVarietyList(false);
var varietyData = IcoelSizer.GetLayoutForVarietyList(varList); var varietyData = IcoelSizer.GetLayoutForVarietyList(varList);
@@ -203,6 +305,17 @@ namespace EgwProxy.Icoel.Test
Console.WriteLine("Premere un tasto x continuare..."); Console.WriteLine("Premere un tasto x continuare...");
userInput = Console.ReadLine(); userInput = Console.ReadLine();
Console.WriteLine("------------ Parametri velocità rilevati ------------");
var perfMeter = IcoelSizer.GetPerfMeters();
if (perfMeter != null)
{
DisplayPerfMeter(perfMeter);
}
Console.WriteLine();
Console.WriteLine("Premere un tasto x continuare...");
userInput = Console.ReadLine();
// solo attive // solo attive
Console.WriteLine("------------ solo attive ------------"); Console.WriteLine("------------ solo attive ------------");
varList = IcoelSizer.GetVarietyList(); varList = IcoelSizer.GetVarietyList();
@@ -234,8 +347,12 @@ namespace EgwProxy.Icoel.Test
GrowerInfo GrowerData = new GrowerInfo(); GrowerInfo GrowerData = new GrowerInfo();
IcoelSizer.EnqueueBatch(GrowerData, varGuid, layGuid); IcoelSizer.EnqueueBatch(GrowerData, varGuid, layGuid);
IcoelSizer.GetCurrentBatch(); currBatch = IcoelSizer.GetCurrentBatch();
foreach (var item in currBatch)
{
string lato = item.Key == 1 ? "SX" : "DX";
Console.WriteLine($"[{item.Key}-{lato}] Grower code: {item.Value.GrowerCode} | Layout Name: {item.Value.LayoutName} | Totalling: [{item.Value.TotallingVarietyCode}] {item.Value.TotallingVariety} | Sizing: {item.Value.SizingProfileName} | Start {item.Value.StartTime} | End {item.Value.EndTime}");
}
Console.WriteLine("Test completato"); Console.WriteLine("Test completato");
Console.WriteLine("Premere un tasto x chiudere"); Console.WriteLine("Premere un tasto x chiudere");
Console.ReadKey(); Console.ReadKey();
@@ -246,6 +363,22 @@ namespace EgwProxy.Icoel.Test
Console.ReadKey(); Console.ReadKey();
} }
} }
/// <summary>
/// Verifico necessità di rifare sync
/// </summary>
/// <param name="elencoSyncState"></param>
/// <returns></returns>
/// <exception cref="NotImplementedException"></exception>
private static bool testNeedRedo(List<SyncStateModel> elencoSyncState)
{
bool answ = false;
foreach (var item in elencoSyncState)
{
answ = answ || (item.NumRecIn > item.NumRec || item.LastIdxIn > item.LastIdx);
}
return answ;
}
#endregion Private Methods #endregion Private Methods
} }
+6
View File
@@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EgwProxy.Icoel", "EgwProxy.
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EgwProxy.Icoel.Test", "EgwProxy.Icoel.Test\EgwProxy.Icoel.Test.csproj", "{A655A6AC-5997-46F9-9752-8C621B80516C}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EgwProxy.Icoel.Test", "EgwProxy.Icoel.Test\EgwProxy.Icoel.Test.csproj", "{A655A6AC-5997-46F9-9752-8C621B80516C}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EgwProxy.Icoel.DataLayer", "EgwProxy.Icoel.DataLayer\EgwProxy.Icoel.DataLayer.csproj", "{E36544CB-D699-48D8-9F81-C2758E7C7D19}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@@ -21,6 +23,10 @@ Global
{A655A6AC-5997-46F9-9752-8C621B80516C}.Debug|Any CPU.Build.0 = Debug|Any CPU {A655A6AC-5997-46F9-9752-8C621B80516C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A655A6AC-5997-46F9-9752-8C621B80516C}.Release|Any CPU.ActiveCfg = Release|Any CPU {A655A6AC-5997-46F9-9752-8C621B80516C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A655A6AC-5997-46F9-9752-8C621B80516C}.Release|Any CPU.Build.0 = Release|Any CPU {A655A6AC-5997-46F9-9752-8C621B80516C}.Release|Any CPU.Build.0 = Release|Any CPU
{E36544CB-D699-48D8-9F81-C2758E7C7D19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E36544CB-D699-48D8-9F81-C2758E7C7D19}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E36544CB-D699-48D8-9F81-C2758E7C7D19}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E36544CB-D699-48D8-9F81-C2758E7C7D19}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
+58 -23
View File
@@ -1,24 +1,59 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<startup> <configSections>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</startup> </configSections>
<system.serviceModel> <startup>
<bindings> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
<netNamedPipeBinding> </startup>
<binding name="NetNamedPipeBinding_ISizerService"> <system.serviceModel>
<security mode="None"/> <bindings>
</binding> <netNamedPipeBinding>
</netNamedPipeBinding> <binding name="NetNamedPipeBinding_ISizerService">
<wsHttpBinding> <security mode="None" />
<binding name="WSHttpBinding_ISizerService" maxReceivedMessageSize="2147483647"> </binding>
<security mode="None"/> </netNamedPipeBinding>
</binding> <wsHttpBinding>
</wsHttpBinding> <binding name="WSHttpBinding_ISizerService" maxReceivedMessageSize="2147483647">
</bindings> <security mode="None" />
<client> </binding>
<endpoint address="http://localhost:8001/SizerService/" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ISizerService" contract="SizerService.ISizerService" name="WSHttpBinding_ISizerService"/> </wsHttpBinding>
<endpoint address="net.pipe://localhost/Compac/8001/SizerService" binding="netNamedPipeBinding" bindingConfiguration="NetNamedPipeBinding_ISizerService" contract="SizerService.ISizerService" name="NetNamedPipeBinding_ISizerService"/> </bindings>
</client> <client>
</system.serviceModel> <endpoint address="http://localhost:8001/SizerService/" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ISizerService" contract="SizerService.ISizerService" name="WSHttpBinding_ISizerService" />
</configuration> <endpoint address="net.pipe://localhost/Compac/8001/SizerService" binding="netNamedPipeBinding" bindingConfiguration="NetNamedPipeBinding_ISizerService" contract="SizerService.ISizerService" name="NetNamedPipeBinding_ISizerService" />
</client>
</system.serviceModel>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<connectionStrings>
<add name="EntrataFrontiera" connectionString="data source=192.168.137.10\sqlexpress;initial catalog=frontiera;persist security info=True;user id=egalware;password=egalware2022;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
</connectionStrings>
<runtime>
<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-4.0.5.0" newVersion="4.0.5.0" />
</dependentAssembly>
<dependentAssembly>
<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.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Encodings.Web" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.5.1" newVersion="4.0.5.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
+107
View File
@@ -0,0 +1,107 @@
# Appunti impiego connesisoni ICOEL
## Icoel SOAP
Oltre ai metodi legati al batch, ci sono questi metodi x recuperare informazioni specifiche di produttività
| Metodo | Descrizione |
| ---------- | ---------- |
| GetMachineTonnesPH() | valore tonnellate/ora di velocità impianto |
| GetMachineTotalFPM() | valore frutti per minuto |
| GetMachineRodsPM() | velocità catena (carrellini / minuto) |
| GetMachineCupfill() | percentuale riempimento carrellini (100% = 1 frutto x ogni carrellino) |
## Icoel DB
Appunti sulla gestione tabelle di frontiera
### Products total
/****** Script for SelectTopNRows command from SSMS ******/
SELECT TOP (1000) [SizerBatchId]
,[Index]
,[Nome]
,[Qualities]
,[Grado]
,[Calibro]
,[NumeroFrutti]
,[Decigrammi]
FROM [IcoelExport].[dbo].[ProductsTotals]
### Entrata Ciliegie
SELECT *
FROM [frontiera].[dbo].[ENTRATACILIEGIE]
-- utilizzare codice e descrizione prodotto...
### Fine lavorazione
select top 100 *
from ProductsTotals
/*
SizerBatch id = id del batch da WS SOAP
Index = indice di prodotto FINITO, di cui ho il NOME
- prodotti da matrice: colonne = gradi, righe = taglie(sizes)
- grado a colore rosso
- do il nome prodotto rosse 26- (che sono da 22 a 26 in grado A)
- colonna qualities = è la "somma dei qualities" ovvero le colonne che passano nelcontrollo prodotto
- codice in 3 parametri, che sono a,b,c
- a = qualità interna (SEMPRE NULL x le ciliegie)
- b grado = qualità esterna del frutto, es rosse, nere, con stelo... ricircolo = scarto per cattiva disposizione
- c : calibri che mi definiscono la dimensione, tipicamente 22..32
si scrive tutto quando è chiuso il lotto
inizialmente 1 solo lotto x entrambe le linee
*/
### Conferimento MES
<code>
SELECT *
FROM DettagliConferimentoMES
where FillingId = 31729
order by PackId
</code>
/*
Numero lotto = sigla giorno
sigla lotto: incrementale giornaliero
in particoalre x il prodotto grosso --> seleziono da + fornitori (es fornitori grossi)
PackId = id univoco scatoletta
FillingId / FillingRow NON USATI: li posso ignorare, si applicano al caso "travaso" da bins ingresso / bins uscita "tipizzati" --> serve x precalibrare
scaricoId = operazione di scannerizzazione ( è il barcode letto)
codice a barre è letto x ogni etichetta di conferimento
codice e nome fornitore = grower
codice e descrizione prodotto : sono il GREZZO specifico
cdice prodotto grezzo è il "ceppo" / famiglia
sigla e numero lotto: colonna di entrata ciliegie (frontiera)
idem x data e qta entrata
*/
### Confezioni Mes
<code>
SELECT *
FROM DettagliConfezioniMES
</code>
pack id = singola cassetta/scatoal/cartone
ean = barcode in uscita
batch id / batch name = dati tracciabilità, legato ai lotti in entrata sul sizer
lane [1/2]sizerBatchId = lotti del sizer
pesoDecigram = peso netto confezionato (tolleranza +/-10g...20gr)
tabella scritta dal momento in cui arriva il cartone/cassetta per iniziare riempimento
dati live li vediamo dal sizer
*/
+26
View File
@@ -1,5 +1,6 @@
using EgwProxy.Icoel.SizerService; using EgwProxy.Icoel.SizerService;
using System; using System;
using System.Collections.Generic;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using System.ServiceModel; using System.ServiceModel;
@@ -174,6 +175,31 @@ namespace EgwProxy.Icoel.Compac
SSClient.AddBatch(batch); SSClient.AddBatch(batch);
} }
/// <summary>
/// Recupera elenco parametri performance impianto
/// </summary>
/// <returns>Dizionario delle variabili di performance dell'impianto in formato Dictionary<string,double></returns>
internal Dictionary<string, double> GetPerfMeters()
{
Dictionary<string, double> answ = new Dictionary<string, double>();
// velocità processo indicata in tonnellate /oOra
double velTonnOra = SSClient.GetMachineTonnesPH();
// velocità espressa in frutti/minuto
double velFruttiMinuto = SSClient.GetMachineTotalFPM();
// percentuale riempimento carrellini
double percRiemp = SSClient.GetMachineCupfill();
// Numero confezioni/ora
double numPackOra = SSClient.GetMachinePacksPH();
// accodo i valori ricavati
answ.Add("NumPacksOra", numPackOra);
answ.Add("PercRiemp", percRiemp);
answ.Add("VelFruttiMinuto", velFruttiMinuto);
answ.Add("VelTonnOra", velTonnOra);
return answ;
}
#endregion Internal Methods #endregion Internal Methods
#region Private Properties #region Private Properties
+35
View File
@@ -38,6 +38,38 @@ namespace EgwProxy.Icoel
Client.CheckGrower(GrowerData.GrowerCode, GrowerData.GrowerName); Client.CheckGrower(GrowerData.GrowerCode, GrowerData.GrowerName);
} }
} }
/// <summary>
/// Recupera array varie velocità rilevate
/// </summary>
/// <returns>Dictionary<string, double> delle velocità rilevate sul sizer</returns>
public Dictionary<string, double> GetPerfMeters()
{
Dictionary<string, double> answ = new Dictionary<string, double>();
using (var Client = new ComClient(ipAddress, tcpPort))
{
answ = Client.GetPerfMeters();
}
return answ;
}
/// <summary>
/// Recupera array dei batch sulle 2 linee: ID batch + layout + varietà x ogni linea...
/// </summary>
/// <returns>Dictionary<string, string> dei dati correnti x linea (batch, layout, variety) rilevate sul sizer</returns>
public Dictionary<string, string> GetCurrBatchData()
{
Dictionary<string, string> answ = new Dictionary<string, string>();
var batchData = GetCurrentBatch();
foreach (var item in batchData)
{
answ.Add($"L{item.Key}_Batch", $"{item.Value.Id} | {item.Value.Name} | {item.Value.StartTime}");
answ.Add($"L{item.Key}_Grower", $"{item.Value.GrowerCode}");
answ.Add($"L{item.Key}_Layout", $"{item.Value.LayoutId} | {item.Value.LayoutName}");
answ.Add($"L{item.Key}_Variety", $"{item.Value.VarietyId} | {item.Value.VarietyName}");
}
return answ;
}
/// <summary> /// <summary>
/// Invia un lotto in coda produzione sul sizer /// Invia un lotto in coda produzione sul sizer
@@ -47,7 +79,10 @@ namespace EgwProxy.Icoel
{ {
using (var Client = new ComClient(ipAddress, tcpPort)) using (var Client = new ComClient(ipAddress, tcpPort))
{ {
// va bene anche se vuoto! come lo torna ora...
string sizingProfile = Client.GetCurrentBatch().SizingProfileName; string sizingProfile = Client.GetCurrentBatch().SizingProfileName;
//var rawData = Client.GetCurrentBatchByLane(1);
//var rawData2 = Client.GetCurrentBatchByLane(2);
Batch newBatch = CreateBatch(GrowerData, varGuid, layGuid, sizingProfile); Batch newBatch = CreateBatch(GrowerData, varGuid, layGuid, sizingProfile);
Client.MettiLottoInCoda(newBatch); Client.MettiLottoInCoda(newBatch);
} }
+42
View File
@@ -0,0 +1,42 @@
using EgwProxy.Icoel.DataLayer.Controllers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EgwProxy.Icoel
{
/// <summary>
/// Proxy connessione DB
/// </summary>
public class DbProxy
{
/// <summary>
/// Controller DB esposto
/// </summary>
public DbController DataController { get; set; }
#if false
/// <summary>
/// Inizializzazione proxy
/// </summary>
/// <param name="connEntrata">stringa connesisone DB Entrata</param>
/// <param name="connTracker">stringa connesisone DB Tracker</param>
/// <param name="connExport">stringa connesisone DB Export</param>
/// <param name="connSyncState">Connessione DB locale di SYNC</param>
public DbProxy(string connEntrata, string connTracker, string connExport, string connSyncState)
{
DataController = new DbController(connEntrata, connTracker, connExport, connSyncState);
}
#endif
/// <summary>
/// Inizializzazione proxy
/// </summary>
/// <param name="connSyncState">Connessione DB locale di SYNC</param>
public DbProxy(string connSyncState)
{
DataController = new DbController(connSyncState);
}
}
}
+13
View File
@@ -39,12 +39,17 @@
<StartupObject /> <StartupObject />
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.9\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.IO.Compression" /> <Reference Include="System.IO.Compression" />
<Reference Include="System.Runtime.Serialization" /> <Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" /> <Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
@@ -54,6 +59,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Compac\ComClient.cs" /> <Compile Include="Compac\ComClient.cs" />
<Compile Include="DbProxy.cs" />
<Compile Include="GrowerInfo.cs" /> <Compile Include="GrowerInfo.cs" />
<Compile Include="Connected Services\SizerService\Reference.cs"> <Compile Include="Connected Services\SizerService\Reference.cs">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
@@ -135,6 +141,7 @@
</None> </None>
<None Include="docfx.json" /> <None Include="docfx.json" />
<None Include="index.md" /> <None Include="index.md" />
<None Include="packages.config" />
<None Include="toc.yml" /> <None Include="toc.yml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -155,5 +162,11 @@
<LastGenOutput>Reference.cs</LastGenOutput> <LastGenOutput>Reference.cs</LastGenOutput>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EgwProxy.Icoel.DataLayer\EgwProxy.Icoel.DataLayer.csproj">
<Project>{e36544cb-d699-48d8-9f81-c2758e7c7d19}</Project>
<Name>EgwProxy.Icoel.DataLayer</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NLog" version="4.7.9" targetFramework="net462" />
</packages>
+104 -8
View File
@@ -1078,14 +1078,110 @@ Namespace CNC
''' <summary> ''' <summary>
''' Legge o scrive le variabile Custom Macro ''' Legge una variabile macro (#)
''' </summary> ''' </summary>
''' <param name="bWrite">Se True SCRIVE, se False LEGGE</param> ''' <param name="nVar">Indirizzo da leggere</param>
''' <param name="MacroIndex">Indice di memoria</param> ''' <param name="dValue">Valore letto (restituito per riferimento)</param>
''' <param name="Value">Matrice di valori da scrivere su scrittura o letti su lettura</param> ''' <returns>Boolean di eseguito/errore</returns>
''' <returns>True se andata a buon fine</returns> Public Function F_Read_macro(ByVal nVar As Integer, ByRef dValue As Double) As Boolean
Public Overloads Function F_RW_Macro_Short(ByVal bWrite As Boolean, ByVal MacroIndex As Integer, ByRef Value() As Short) As Boolean
Const ONE_DATA_ONLY As Integer = 1
Const CUSTOM_MACRO_SIZE As Integer = 10
Dim ODBM As Focas1.ODBM
Dim MacroInfo3 As Focas1.IODBMRN3 = Nothing
Dim values() As Double
Dim n_ret_code As Short
Dim sz_routine As String = "-", sz_temp As String = "", d As Double = 0.0
'Try
' If nVar >= 10000 Then ' if var like 98xxx then use the other read routine .... ( :(( no comment )
' 'If nVar >= &H8000 Then ' if var like 98xxx then use the other read routine .... ( :(( no comment )
' n_ret_code = Focas1.cnc_rdmacror3(nLibHandle(1), nVar, ONE_DATA_ONLY, MacroInfo3)
' If (n_ret_code = Focas1.EW_OK) Then ' no Fanuc error
' dValue = MacroInfo3.mcr_val
' Else
' 'Error reading parameter :
' dValue = 0.0
' Return False
' End If ' no Fanuc error
' Else ' good ole boys
' ' cnc_rdmacro : read custom macro variable
' n_ret_code = Focas1.cnc_rdmacro(nLibHandle(1), nVar, CUSTOM_MACRO_SIZE, ODBM)
' If (n_ret_code = Focas1.EW_OK) Then ' no Fanuc error
' If ODBM.mcr_val = 0 And ODBM.dec_val = -1 Then ' variabile non definita
' dValue = 0 '"Null"
' Else
' dValue = ODBM.mcr_val * (10 ^ -(ODBM.dec_val))
' End If
' Else
' 'Error reading parameter :
' dValue = 0.0
' Return False
' End If ' no Fanuc error
' End If ' var > 8000h
'Catch ex As Exception
' dValue = 0.0
' Return False
'End Try
Try
If (nVar >= 98000) And (nVar <= 98499) Then ' if var like 98xxx then use the other read routine .... ( :(( no comment )
n_ret_code = Focas1.cnc_rdmacror3(nLibHandle(1), nVar, ONE_DATA_ONLY, MacroInfo3)
If (n_ret_code = Focas1.EW_OK) Then ' no Fanuc error
dValue = MacroInfo3.mcr_val
Else
dValue = -999999.999
Return False
End If ' no Fanuc error
ElseIf (((nVar >= 10000) And (nVar <= 85535)) Or
((nVar >= 200000) And (nVar <= 986432)) Or
((nVar >= 2000000) And (nVar <= 3999999))) Then
ReDim values(1)
n_ret_code = Focas1.cnc_rdpmacror2(nLibHandle(1), nVar, ONE_DATA_ONLY, 0, values)
If (n_ret_code = Focas1.EW_OK) Then ' no Fanuc error
dValue = values(0)
Else
dValue = -999999.999
Return False
End If ' no Fanuc error
Else ' good ole boys
' cnc_rdmacro : read custom macro variable
'n_var_int = CShort(nVar)
n_ret_code = Focas1.cnc_rdmacro(nLibHandle(1), nVar, CUSTOM_MACRO_SIZE, ODBM)
If (n_ret_code = Focas1.EW_OK) Then ' no Fanuc error
If ODBM.mcr_val = 0 And ODBM.dec_val = -1 Then ' variabile non definita
dValue = 0 '"Null"
Else
dValue = ODBM.mcr_val * (10 ^ -(ODBM.dec_val))
End If
Else
'Error reading parameter :
dValue = -999999.999
Return False
End If ' no Fanuc error
End If ' var > 98000
Catch ex As Exception
dValue = -999999.999
Return False
End Try
End Function
''' <summary>
''' Legge o scrive le variabile Custom Macro
''' </summary>
''' <param name="bWrite">Se True SCRIVE, se False LEGGE</param>
''' <param name="MacroIndex">Indice di memoria</param>
''' <param name="Value">Matrice di valori da scrivere su scrittura o letti su lettura</param>
''' <returns>True se andata a buon fine</returns>
Public Overloads Function F_RW_Macro_Short(ByVal bWrite As Boolean, ByVal MacroIndex As Integer, ByRef Value() As Short) As Boolean
Dim iodbmr As Focas1.IODBMR Dim iodbmr As Focas1.IODBMR
Dim nlength As Integer Dim nlength As Integer
Dim nReturn As Integer Dim nReturn As Integer
@@ -10949,4 +10949,21 @@ Public Class Focas1
Declare Function cnc_rdetherinfo Lib "FWLIB32.DLL" _ Declare Function cnc_rdetherinfo Lib "FWLIB32.DLL" _
(ByVal FlibHndl As Integer, ByRef a As Short, ByRef b As Short) As Short (ByVal FlibHndl As Integer, ByRef a As Short, ByRef b As Short) As Short
'
'-------------------------------------------------------- 28 - VI - 2019 cv ------------------------------
'
' cnc_rdmacror3 :read Custom macro names(area specified)
<StructLayout(LayoutKind.Sequential, Pack:=4)>
Public Structure IODBMRN3
Public mcr_val As Double
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=36)>
Public name As String ' var name
End Structure
' read custom macro variables:read Custom macro names(area specified)
Declare Function cnc_rdmacror3 Lib "FWLIB32.DLL" _
(ByVal FlibHndl As Integer, ByVal a As Integer, ByRef b As Integer, ByRef c As IODBMRN3) As Short
End Class 'Focas1 End Class 'Focas1
+9 -5
View File
@@ -8,7 +8,7 @@
<add key="appNameExt" value="IOB-WIN-NEXT" /> <add key="appNameExt" value="IOB-WIN-NEXT" />
<add key="uiPeriod" value="100" /> <add key="uiPeriod" value="100" />
<add key="checkPeriod" value="3000" /> <add key="checkPeriod" value="3000" />
<add key="forceCheckPeriodMult" value="15" /> <add key="forceCheckPeriodMult" value="20" />
<add key="autoRestartTimeoutMin" value="15" /> <add key="autoRestartTimeoutMin" value="15" />
<add key="autoStartProc" value="true" /> <add key="autoStartProc" value="true" />
<add key="closeOnChildUpdate" value="true" /> <add key="closeOnChildUpdate" value="true" />
@@ -43,7 +43,7 @@
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" /> <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
@@ -51,7 +51,7 @@
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="SharpCompress" publicKeyToken="afb0a02973931d96" culture="neutral" /> <assemblyIdentity name="SharpCompress" publicKeyToken="afb0a02973931d96" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-0.30.0.0" newVersion="0.30.0.0" /> <bindingRedirect oldVersion="0.0.0.0-0.31.0.0" newVersion="0.31.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
@@ -59,7 +59,7 @@
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.1" newVersion="5.0.0.1" /> <bindingRedirect oldVersion="0.0.0.0-6.0.0.2" newVersion="6.0.0.2" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
@@ -67,7 +67,7 @@
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Threading.Channels" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.Threading.Channels" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly> </dependentAssembly>
<probing privatePath="lib;libs" /> <probing privatePath="lib;libs" />
<probing privatePath="lib;libs" xmlns="" /> <probing privatePath="lib;libs" xmlns="" />
@@ -95,6 +95,10 @@
<assemblyIdentity name="RestSharp" publicKeyToken="598062e77f915f75" culture="neutral" /> <assemblyIdentity name="RestSharp" publicKeyToken="598062e77f915f75" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-106.15.0.0" newVersion="106.15.0.0" /> <bindingRedirect oldVersion="0.0.0.0-106.15.0.0" newVersion="106.15.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
<system.web> <system.web>
+1 -1
View File
@@ -1,5 +1,5 @@
--------------------------------------------------------------- ---------------------------------------------------------------
------- SteamWareLib SDK ------- ------- SteamWare SDK -------
--------------------------------------------------------------- ---------------------------------------------------------------
Libreria di utility base di SteamWare. Libreria di utility base di SteamWare.
+44 -47
View File
@@ -38,42 +38,38 @@
<ApplicationIcon>IobManIcon.ico</ApplicationIcon> <ApplicationIcon>IobManIcon.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Crc32C.NET, Version=1.0.5.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="DnsClient, Version=1.6.0.0, Culture=neutral, PublicKeyToken=4574bb5573c51424, processorArchitecture=MSIL">
<HintPath>..\packages\Crc32C.NET.1.0.5.0\lib\net20\Crc32C.NET.dll</HintPath> <HintPath>..\packages\DnsClient.1.6.0\lib\net45\DnsClient.dll</HintPath>
</Reference>
<Reference Include="DnsClient, Version=1.5.0.0, Culture=neutral, PublicKeyToken=4574bb5573c51424, processorArchitecture=MSIL">
<HintPath>..\packages\DnsClient.1.5.0\lib\net45\DnsClient.dll</HintPath>
</Reference> </Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=1.3.3.11, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL"> <Reference Include="ICSharpCode.SharpZipLib, Version=1.3.3.11, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath> <HintPath>..\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="MapoSDK, Version=6.14.2109.2809, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="MapoSDK, Version=6.14.2204.2616, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MapoSDK.6.14.2109.2809\lib\net40\MapoSDK.dll</HintPath> <HintPath>..\packages\MapoSDK.6.14.2204.2616\lib\MapoSDK.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath> <HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference> </Reference>
<Reference Include="MongoDB.Bson, Version=2.13.2.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="MongoDB.Bson, Version=2.15.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Bson.2.13.2\lib\net452\MongoDB.Bson.dll</HintPath> <HintPath>..\packages\MongoDB.Bson.2.15.0\lib\netstandard2.0\MongoDB.Bson.dll</HintPath>
</Reference> </Reference>
<Reference Include="MongoDB.Driver, Version=2.13.2.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="MongoDB.Driver, Version=2.15.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.2.13.2\lib\net452\MongoDB.Driver.dll</HintPath> <HintPath>..\packages\MongoDB.Driver.2.15.0\lib\netstandard2.0\MongoDB.Driver.dll</HintPath>
</Reference> </Reference>
<Reference Include="MongoDB.Driver.Core, Version=2.13.2.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="MongoDB.Driver.Core, Version=2.15.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Driver.Core.2.13.2\lib\net452\MongoDB.Driver.Core.dll</HintPath> <HintPath>..\packages\MongoDB.Driver.Core.2.15.0\lib\netstandard2.0\MongoDB.Driver.Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="MongoDB.Libmongocrypt, Version=1.2.3.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="MongoDB.Libmongocrypt, Version=1.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MongoDB.Libmongocrypt.1.2.3\lib\netstandard2.0\MongoDB.Libmongocrypt.dll</HintPath> <HintPath>..\packages\MongoDB.Libmongocrypt.1.3.0\lib\netstandard2.0\MongoDB.Libmongocrypt.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference> </Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.12\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.15\lib\net45\NLog.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Pipelines.Sockets.Unofficial, Version=1.0.0.0, Culture=neutral, PublicKeyToken=42ea0a778e13fbe2, processorArchitecture=MSIL"> <Reference Include="Pipelines.Sockets.Unofficial, Version=1.0.0.0, Culture=neutral, PublicKeyToken=42ea0a778e13fbe2, processorArchitecture=MSIL">
<HintPath>..\packages\Pipelines.Sockets.Unofficial.2.2.0\lib\net461\Pipelines.Sockets.Unofficial.dll</HintPath> <HintPath>..\packages\Pipelines.Sockets.Unofficial.2.2.2\lib\net461\Pipelines.Sockets.Unofficial.dll</HintPath>
</Reference> </Reference>
<Reference Include="RestSharp, Version=106.15.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL"> <Reference Include="RestSharp, Version=106.15.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.106.15.0\lib\net452\RestSharp.dll</HintPath> <HintPath>..\packages\RestSharp.106.15.0\lib\net452\RestSharp.dll</HintPath>
@@ -81,23 +77,20 @@
<Reference Include="RestSharp.Serializers.NewtonsoftJson, Version=106.15.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL"> <Reference Include="RestSharp.Serializers.NewtonsoftJson, Version=106.15.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.Serializers.NewtonsoftJson.106.15.0\lib\net452\RestSharp.Serializers.NewtonsoftJson.dll</HintPath> <HintPath>..\packages\RestSharp.Serializers.NewtonsoftJson.106.15.0\lib\net452\RestSharp.Serializers.NewtonsoftJson.dll</HintPath>
</Reference> </Reference>
<Reference Include="SharpCompress, Version=0.30.0.0, Culture=neutral, PublicKeyToken=afb0a02973931d96, processorArchitecture=MSIL"> <Reference Include="SharpCompress, Version=0.31.0.0, Culture=neutral, PublicKeyToken=afb0a02973931d96, processorArchitecture=MSIL">
<HintPath>..\packages\SharpCompress.0.30.0\lib\net461\SharpCompress.dll</HintPath> <HintPath>..\packages\SharpCompress.0.31.0\lib\net461\SharpCompress.dll</HintPath>
</Reference>
<Reference Include="Snappy.NET, Version=1.1.1.8, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Snappy.NET.1.1.1.8\lib\net45\Snappy.NET.dll</HintPath>
</Reference> </Reference>
<Reference Include="StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46, processorArchitecture=MSIL"> <Reference Include="StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46, processorArchitecture=MSIL">
<HintPath>..\packages\StackExchange.Redis.2.2.79\lib\net461\StackExchange.Redis.dll</HintPath> <HintPath>..\packages\StackExchange.Redis.2.5.61\lib\net461\StackExchange.Redis.dll</HintPath>
</Reference> </Reference>
<Reference Include="SteamWare.IO, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="SteamWare.IO, Version=5.2.2205.1719, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SteamWare.IO.5.1.2109.1716\lib\net462\SteamWare.IO.dll</HintPath> <HintPath>..\packages\SteamWare.IO.5.2.2205.1719\lib\net462\SteamWare.IO.dll</HintPath>
</Reference> </Reference>
<Reference Include="SteamWare.Logger, Version=5.1.2109.1716, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="SteamWare.Logger, Version=5.2.2205.1719, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SteamWare.Logger.5.1.2109.1716\lib\net462\SteamWare.Logger.dll</HintPath> <HintPath>..\packages\SteamWare.Logger.5.2.2205.1719\lib\net462\SteamWare.Logger.dll</HintPath>
</Reference> </Reference>
<Reference Include="Steamware.Scheduler, Version=5.1.2109.1716, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="SteamWare.Scheduler, Version=5.2.2205.1719, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Steamware.Scheduler.5.1.2109.1716\lib\net462\Steamware.Scheduler.dll</HintPath> <HintPath>..\packages\SteamWare.Scheduler.5.2.2205.1719\lib\net462\SteamWare.Scheduler.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
@@ -105,8 +98,8 @@
</Reference> </Reference>
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Diagnostics.PerformanceCounter, Version=5.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Diagnostics.PerformanceCounter, Version=6.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.PerformanceCounter.5.0.1\lib\net461\System.Diagnostics.PerformanceCounter.dll</HintPath> <HintPath>..\packages\System.Diagnostics.PerformanceCounter.6.0.1\lib\net461\System.Diagnostics.PerformanceCounter.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath> <HintPath>..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
@@ -114,8 +107,8 @@
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System.IO.Compression.FileSystem" /> <Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.IO.Pipelines, Version=5.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.IO.Pipelines, Version=6.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Pipelines.5.0.1\lib\net461\System.IO.Pipelines.dll</HintPath> <HintPath>..\packages\System.IO.Pipelines.6.0.2\lib\net461\System.IO.Pipelines.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <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> <HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
@@ -129,8 +122,8 @@
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <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> <HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath> <HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath> <HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
@@ -159,11 +152,11 @@
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System.ServiceModel" /> <Reference Include="System.ServiceModel" />
<Reference Include="System.Text.Encoding.CodePages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> <Reference Include="System.Text.Encoding.CodePages, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Encoding.CodePages.5.0.0\lib\net461\System.Text.Encoding.CodePages.dll</HintPath> <HintPath>..\packages\System.Text.Encoding.CodePages.6.0.0\lib\net461\System.Text.Encoding.CodePages.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Threading.Channels, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Threading.Channels, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Channels.5.0.0\lib\net461\System.Threading.Channels.dll</HintPath> <HintPath>..\packages\System.Threading.Channels.6.0.0\lib\net461\System.Threading.Channels.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <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> <HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
@@ -236,6 +229,10 @@
</None> </None>
<None Include="CONF\license.json" /> <None Include="CONF\license.json" />
<None Include="CONF\process.json" /> <None Include="CONF\process.json" />
<None Include="Core\Compression\Snappy\lib\linux\libsnappy64.so" />
<None Include="Core\Compression\Snappy\lib\osx\libsnappy64.dylib" />
<None Include="Core\Compression\Zstandard\lib\linux\libzstd.so" />
<None Include="Core\Compression\Zstandard\lib\osx\libzstd.dylib" />
<None Include="logs\.placeholder"> <None Include="logs\.placeholder">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
@@ -276,13 +273,13 @@
</ItemGroup> </ItemGroup>
<Move SourceFiles="@(MoveToLibFolder)" DestinationFolder="$(OutputPath)lib" OverwriteReadOnlyFiles="true" /> <Move SourceFiles="@(MoveToLibFolder)" DestinationFolder="$(OutputPath)lib" OverwriteReadOnlyFiles="true" />
</Target> </Target>
<Import Project="..\packages\MongoDB.Libmongocrypt.1.2.3\build\MongoDB.Libmongocrypt.targets" Condition="Exists('..\packages\MongoDB.Libmongocrypt.1.2.3\build\MongoDB.Libmongocrypt.targets')" /> <Import Project="..\packages\MongoDB.Libmongocrypt.1.3.0\build\MongoDB.Libmongocrypt.targets" Condition="Exists('..\packages\MongoDB.Libmongocrypt.1.3.0\build\MongoDB.Libmongocrypt.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <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> <ErrorText>Questo progetto fa riferimento a uno o più pacchetti NuGet che non sono presenti in questo computer. Usare lo strumento di ripristino dei pacchetti NuGet per scaricarli. Per altre informazioni, vedere http://go.microsoft.com/fwlink/?LinkID=322105. Il file mancante è {0}.</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\packages\MongoDB.Libmongocrypt.1.2.3\build\MongoDB.Libmongocrypt.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MongoDB.Libmongocrypt.1.2.3\build\MongoDB.Libmongocrypt.targets'))" /> <Error Condition="!Exists('..\packages\MongoDB.Libmongocrypt.1.3.0\build\MongoDB.Libmongocrypt.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MongoDB.Libmongocrypt.1.3.0\build\MongoDB.Libmongocrypt.targets'))" />
<Error Condition="!Exists('..\packages\MongoDB.Driver.Core.2.13.2\build\MongoDB.Driver.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MongoDB.Driver.Core.2.13.2\build\MongoDB.Driver.Core.targets'))" /> <Error Condition="!Exists('..\packages\MongoDB.Driver.Core.2.15.0\build\MongoDB.Driver.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MongoDB.Driver.Core.2.15.0\build\MongoDB.Driver.Core.targets'))" />
</Target> </Target>
<Import Project="..\packages\MongoDB.Driver.Core.2.13.2\build\MongoDB.Driver.Core.targets" Condition="Exists('..\packages\MongoDB.Driver.Core.2.13.2\build\MongoDB.Driver.Core.targets')" /> <Import Project="..\packages\MongoDB.Driver.Core.2.15.0\build\MongoDB.Driver.Core.targets" Condition="Exists('..\packages\MongoDB.Driver.Core.2.15.0\build\MongoDB.Driver.Core.targets')" />
</Project> </Project>
+237 -238
View File
@@ -1,20 +1,17 @@
using Newtonsoft.Json; using Newtonsoft.Json;
using RestSharp; using RestSharp;
using RestSharp.Serializers.NewtonsoftJson; using RestSharp.Serializers.NewtonsoftJson;
using Steamware.Scheduler;
using SteamWare.IO; using SteamWare.IO;
using SteamWare.Logger; using SteamWare.Logger;
using SteamWare.Scheduler;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration; using System.Configuration;
using System.Diagnostics; using System.Diagnostics;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using System.IO.Compression; using System.IO.Compression;
using System.Linq; using System.Linq;
using System.Net;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
@@ -24,28 +21,53 @@ namespace IOB_MAN
{ {
public partial class IOBManPanel : Form public partial class IOBManPanel : Form
{ {
#region Private Fields #region Public Fields
private const int SW_SHOWMAXIMIZED = 3;
private const int SW_SHOWMINIMIZED = 2;
private const int SW_SHOWNORMAL = 1;
/// <summary> /// <summary>
/// Context x sync thread /// Elenco ARGS (uno per child da avviare)
/// </summary> /// </summary>
private readonly SynchronizationContext synchronizationContext; public List<string> ArgsList = new List<string>();
#endregion Public Fields
#region Public Constructors
/// <summary> /// <summary>
/// Oggetto semaforico di lock /// Init classe
/// </summary> /// </summary>
private SemaphoreSlim _sync = new SemaphoreSlim(1); public IOBManPanel()
{
InitializeComponent();
synchronizationContext = SynchronizationContext.Current;
preInit();
loadConfig();
// fix log...
cbLogLevelMin.SelectedValue = "Info";
setLogLevel("Info");
initTimers();
initControls();
updateStatus();
}
#endregion Public Constructors
#region Public Methods
/// <summary> /// <summary>
/// Binding source degli elementi gestiti.. /// Cerca nell'elenco il processo corrente
/// </summary> /// </summary>
private BindingSource ElencoIOB = new BindingSource(); /// <param name="processlist"></param>
/// <param name="id"></param>
/// <returns></returns>
public static Process myGetProcByID(Process[] processlist, int id)
{
return processlist.FirstOrDefault(pr => pr.Id == id);
}
#endregion Private Fields #endregion Public Methods
#region Protected Fields #region Protected Fields
@@ -54,6 +76,11 @@ namespace IOB_MAN
/// </summary> /// </summary>
protected static List<iobAdapt> item2rem = new List<iobAdapt>(); protected static List<iobAdapt> item2rem = new List<iobAdapt>();
/// <summary>
/// URL di base x l'API di gestione licenze/file upload
/// </summary>
protected string ApiUrl = "";
/// <summary> /// <summary>
/// Ramo applicazione (x update) /// Ramo applicazione (x update)
/// </summary> /// </summary>
@@ -114,26 +141,21 @@ namespace IOB_MAN
/// </summary> /// </summary>
protected string TargetExe = ""; protected string TargetExe = "";
/// <summary>
/// File target x conf NLog
/// </summary>
protected string TargetNLogConf = "";
/// <summary> /// <summary>
/// Directory log generale x IOB-WIN (dentro ci sono x singoli IOB) /// Directory log generale x IOB-WIN (dentro ci sono x singoli IOB)
/// </summary> /// </summary>
protected string TargetLogDir = ""; protected string TargetLogDir = "";
/// <summary>
/// URL di base x l'API di gestione licenze/file upload
/// </summary>
protected string ApiUrl = "";
/// <summary> /// <summary>
/// Name dell'exe da chiamare /// Name dell'exe da chiamare
/// </summary> /// </summary>
protected string TargetName = ""; protected string TargetName = "";
/// <summary>
/// File target x conf NLog
/// </summary>
protected string TargetNLogConf = "";
/// <summary> /// <summary>
/// Dataora prossima scadenza riavvio automatico /// Dataora prossima scadenza riavvio automatico
/// </summary> /// </summary>
@@ -151,39 +173,6 @@ namespace IOB_MAN
#endregion Protected Fields #endregion Protected Fields
#region Public Fields
/// <summary>
/// Elenco ARGS (uno per child da avviare)
/// </summary>
public List<string> ArgsList = new List<string>();
#endregion Public Fields
#region Public Constructors
/// <summary>
/// Init classe
/// </summary>
public IOBManPanel()
{
InitializeComponent();
synchronizationContext = SynchronizationContext.Current;
preInit();
loadConfig();
// fix log...
cbLogLevelMin.SelectedValue = "Info";
setLogLevel("Info");
initTimers();
initControls();
updateStatus();
}
#endregion Public Constructors
#region Protected Properties #region Protected Properties
/// <summary> /// <summary>
@@ -199,6 +188,29 @@ namespace IOB_MAN
#endregion Protected Properties #endregion Protected Properties
#region Private Fields
private const int SW_SHOWMAXIMIZED = 3;
private const int SW_SHOWMINIMIZED = 2;
private const int SW_SHOWNORMAL = 1;
/// <summary>
/// Context x sync thread
/// </summary>
private readonly SynchronizationContext synchronizationContext;
/// <summary>
/// Oggetto semaforico di lock
/// </summary>
private SemaphoreSlim _sync = new SemaphoreSlim(1);
/// <summary>
/// Binding source degli elementi gestiti..
/// </summary>
private BindingSource ElencoIOB = new BindingSource();
#endregion Private Fields
#region Private Methods #region Private Methods
[DllImport("user32.dll")] [DllImport("user32.dll")]
@@ -375,12 +387,155 @@ namespace IOB_MAN
updateStatus(); updateStatus();
} }
private async void btnSendLog_Click(object sender, EventArgs e)
{
// salvo valori button normali
var stdColor = btnSendLog.BackColor;
var stdText = btnSendLog.Text;
// mostro che sto inviando dati...
btnSendLog.Enabled = false;
btnSendLog.BackColor = Color.OrangeRed;
btnSendLog.Text = "fix directory";
btnSendLog.Refresh();
// svuoto area temp...
string fileName = "LogFiles.zip";
string tempDir = Path.Combine(Application.StartupPath, "temp", "logs");
string zipPath = Path.Combine(Application.StartupPath, "temp", fileName);
if (Directory.Exists(tempDir))
{
Directory.Delete(tempDir, true);
}
// ricreo directory...
Directory.CreateDirectory(tempDir);
// definisco limite temporale alle 21 di 2 gg prima...
DateTime minDate = DateTime.Today.AddHours(-27);
// SOLO SE selezionato in dgv...
string logDir = TargetLogDir;
if (dgvManagedItems.SelectedRows.Count > 0)
{
btnSendLog.Text = "zip start";
btnSendLog.Refresh();
// ciclo su row selezionate
foreach (DataGridViewRow riga in dgvManagedItems.SelectedRows)
{
// verifico che sia già chiuso...
var iobData = (iobAdapt)ElencoIOB[riga.Index];
// calcolo folder
logDir = Path.Combine(TargetLogDir, iobData.CodIOB);
// recupero file odierno
DirectoryInfo dI = new DirectoryInfo(logDir);
var files = dI.GetFiles().Where(i => i.CreationTime >= minDate);
// copio in area temp...
foreach (var file in files)
{
Directory.CreateDirectory(Path.Combine(tempDir, iobData.CodIOB));
file.CopyTo(Path.Combine(tempDir, iobData.CodIOB, file.Name));
}
}
// creo unico ZIP
if (File.Exists(zipPath))
{
File.Delete(zipPath);
}
ZipFile.CreateFromDirectory(tempDir, zipPath);
btnSendLog.Text = "zip end";
btnSendLog.Refresh();
// ciclo di creazione ticket e upload file
try
{
// client chiamate rest
var client = new RestClient(ApiUrl);
client.UseNewtonsoftJson();
SupportRequest newSuppReq = new SupportRequest();
string licensePath = Path.Combine(Application.StartupPath, "CONF", "license.json");
string rawData = "";
if (File.Exists(licensePath))
{
rawData = File.ReadAllText(licensePath);
}
if (!string.IsNullOrEmpty(rawData))
{
// fare: composizione richiesta da parametri chiave
newSuppReq = JsonConvert.DeserializeObject<SupportRequest>(rawData);
}
else
{
string hostName = utils.machineName;
string listIP = string.Join(", ", utils.machineIp);
// genero il ticket
newSuppReq = new SupportRequest()
{
CodApp = "MAPO-IOB-WIN-NEXT",
CodImp = "",
CodInst = "SteamWare",
ContactEmail = "info@steamware.net",
ContactName = "Default Config",
ContactPhone = "035-460560",
MasterKey = "a3BRQz/1B34uvvcDoE/D38ssH/c/KSsjpn39wZsxOVsck9rGnBkF3xfUnj3edYIl",
ReqBody = $"File Upload - MISSING license file | machine: {utils.machineName} | IP: {listIP}",
Tipo = TipologiaTicket.FileUpload,
idxSubLic = 0
};
}
btnSendLog.Text = "LogSend start";
btnSendLog.BackColor = Color.DarkOrange;
btnSendLog.Refresh();
var ticketReq = new RestRequest("/api/ticket/sendReq", DataFormat.Json).AddJsonBody(newSuppReq);
var ticketResp = await client.PostAsync<TicketDTO>(ticketReq);
// preparo richiesta x upload file
var fileUploadReq = new RestRequest("/api/filesave/single");
fileUploadReq.AddParameter("ticketId", ticketResp.idxTicket);
fileUploadReq.AddFile("file", zipPath);
// ... infine INVIA file zip che li contiene...
//var fileUploadResp = client.Post(fileUploadReq);
var fileUploadResp = await client.PostAsync<UploadResult>(fileUploadReq);
btnSendLog.Text = "LogSend end";
btnSendLog.BackColor = Color.DarkOliveGreen;
btnSendLog.Refresh();
// elimino folder temporanea
if (Directory.Exists(tempDir))
{
Directory.Delete(tempDir, true);
}
// elimino il file temporaneo...
if (File.Exists(zipPath))
{
File.Delete(zipPath);
}
}
catch (Exception exc)
{
Logging.LogError($"Eccezione in fase gestione REST services{Environment.NewLine}{exc}");
}
}
btnSendLog.BackColor = stdColor;
btnSendLog.Text = stdText;
btnSendLog.Enabled = true;
}
private void btnStartSel_Click(object sender, EventArgs e) private void btnStartSel_Click(object sender, EventArgs e)
{ {
// riapro child (SOLO SE non era già aperto...) // riapro child (SOLO SE non era già aperto...)
apriChildSel(); apriChildSel();
} }
private void cbLogLevelMin_SelectedIndexChanged(object sender, EventArgs e)
{
// aggiornato livelo di log --> chiamo procedura x riscrivere il file conf di NLog
setLogLevel($"{cbLogLevelMin.SelectedItem}");
}
/// <summary> /// <summary>
/// verifica buttons attivi data selezione su gridview... /// verifica buttons attivi data selezione su gridview...
/// </summary> /// </summary>
@@ -476,7 +631,8 @@ namespace IOB_MAN
IList<iobAdapt> allItems = (IList<iobAdapt>)ElencoIOB.List; IList<iobAdapt> allItems = (IList<iobAdapt>)ElencoIOB.List;
bool needRem = false; bool needRem = false;
// 2020.02.01 passato chiamata specifica x leggere in 1 sola volta TUTTO elenco processi (x nome)... // 2020.02.01 passato chiamata specifica x leggere in 1 sola volta TUTTO elenco processi
// (x nome)...
Process[] processList = Process.GetProcessesByName(TargetName); Process[] processList = Process.GetProcessesByName(TargetName);
// ciclo // ciclo
@@ -729,6 +885,12 @@ namespace IOB_MAN
} }
} }
private void dgvManagedItems_SelectionChanged(object sender, EventArgs e)
{
checkButtons();
}
private void ElencoIOB_AddingNew(object sender, System.ComponentModel.AddingNewEventArgs e) private void ElencoIOB_AddingNew(object sender, System.ComponentModel.AddingNewEventArgs e)
{ {
} }
@@ -1093,6 +1255,21 @@ namespace IOB_MAN
updateStatus(); updateStatus();
} }
private void setLogLevel(string selectedValue)
{
// leggo il file loglevel in resources
string rawData = File.ReadAllText($@"{Application.StartupPath}\Resources\NLog.template.config");
// sostituzione livello minimo da selezione
rawData = rawData.Replace("{{minLevel}}", selectedValue);
// scrivo conf x programma IOB-MAN
File.WriteAllText($@"{Application.StartupPath}\NLog.config", rawData);
// scrivo conf x IOB-WIN gestiti
File.WriteAllText(TargetNLogConf, rawData);
}
/// <summary> /// <summary>
/// Avvio di un child process da parametro ARG /// Avvio di un child process da parametro ARG
/// </summary> /// </summary>
@@ -1239,183 +1416,5 @@ namespace IOB_MAN
#endregion Private Methods #endregion Private Methods
#region Public Methods
/// <summary>
/// Cerca nell'elenco il processo corrente
/// </summary>
/// <param name="processlist"></param>
/// <param name="id"></param>
/// <returns></returns>
public static Process myGetProcByID(Process[] processlist, int id)
{
return processlist.FirstOrDefault(pr => pr.Id == id);
}
#endregion Public Methods
private void cbLogLevelMin_SelectedIndexChanged(object sender, EventArgs e)
{
// aggiornato livelo di log --> chiamo procedura x riscrivere il file conf di NLog
setLogLevel($"{cbLogLevelMin.SelectedItem}");
}
private void setLogLevel(string selectedValue)
{
// leggo il file loglevel in resources
string rawData = File.ReadAllText($@"{Application.StartupPath}\Resources\NLog.template.config");
// sostituzione livello minimo da selezione
rawData = rawData.Replace("{{minLevel}}", selectedValue);
// scrivo conf x programma IOB-MAN
File.WriteAllText($@"{Application.StartupPath}\NLog.config", rawData);
// scrivo conf x IOB-WIN gestiti
File.WriteAllText(TargetNLogConf, rawData);
}
private void dgvManagedItems_SelectionChanged(object sender, EventArgs e)
{
checkButtons();
}
private async void btnSendLog_Click(object sender, EventArgs e)
{
// salvo valori button normali
var stdColor = btnSendLog.BackColor;
var stdText = btnSendLog.Text;
// mostro che sto inviando dati...
btnSendLog.Enabled = false;
btnSendLog.BackColor = Color.OrangeRed;
btnSendLog.Text = "fix directory";
btnSendLog.Refresh();
// svuoto area temp...
string fileName = "LogFiles.zip";
string tempDir = Path.Combine(Application.StartupPath, "temp", "logs");
string zipPath = Path.Combine(Application.StartupPath, "temp", fileName);
if (Directory.Exists(tempDir))
{
Directory.Delete(tempDir, true);
}
// ricreo directory...
Directory.CreateDirectory(tempDir);
// definisco limite temporale alle 21 di 2 gg prima...
DateTime minDate = DateTime.Today.AddHours(-27);
// SOLO SE selezionato in dgv...
string logDir = TargetLogDir;
if (dgvManagedItems.SelectedRows.Count > 0)
{
btnSendLog.Text = "zip start";
btnSendLog.Refresh();
// ciclo su row selezionate
foreach (DataGridViewRow riga in dgvManagedItems.SelectedRows)
{
// verifico che sia già chiuso...
var iobData = (iobAdapt)ElencoIOB[riga.Index];
// calcolo folder
logDir = Path.Combine(TargetLogDir, iobData.CodIOB);
// recupero file odierno
DirectoryInfo dI = new DirectoryInfo(logDir);
var files = dI.GetFiles().Where(i => i.CreationTime >= minDate);
// copio in area temp...
foreach (var file in files)
{
Directory.CreateDirectory(Path.Combine(tempDir, iobData.CodIOB));
file.CopyTo(Path.Combine(tempDir, iobData.CodIOB, file.Name));
}
}
// creo unico ZIP
if (File.Exists(zipPath))
{
File.Delete(zipPath);
}
ZipFile.CreateFromDirectory(tempDir, zipPath);
btnSendLog.Text = "zip end";
btnSendLog.Refresh();
// ciclo di creazione ticket e upload file
try
{
// client chiamate rest
var client = new RestClient(ApiUrl);
client.UseNewtonsoftJson();
SupportRequest newSuppReq = new SupportRequest();
string licensePath = Path.Combine(Application.StartupPath, "CONF", "license.json");
string rawData = "";
if (File.Exists(licensePath))
{
rawData = File.ReadAllText(licensePath);
}
if (!string.IsNullOrEmpty(rawData))
{
// fare: composizione richiesta da parametri chiave
newSuppReq = JsonConvert.DeserializeObject<SupportRequest>(rawData);
}
else
{
string hostName = utils.machineName;
string listIP = string.Join(", ", utils.machineIp);
// genero il ticket
newSuppReq = new SupportRequest()
{
CodApp = "MAPO-IOB-WIN-NEXT",
CodImp = "",
CodInst = "SteamWare",
ContactEmail = "info@steamware.net",
ContactName = "Default Config",
ContactPhone = "035-460560",
MasterKey = "a3BRQz/1B34uvvcDoE/D38ssH/c/KSsjpn39wZsxOVsck9rGnBkF3xfUnj3edYIl",
ReqBody = $"File Upload - MISSING license file | machine: {utils.machineName} | IP: {listIP}",
Tipo = TipologiaTicket.FileUpload,
idxSubLic = 0
};
}
btnSendLog.Text = "LogSend start";
btnSendLog.BackColor = Color.DarkOrange;
btnSendLog.Refresh();
var ticketReq = new RestRequest("/api/ticket/sendReq", DataFormat.Json).AddJsonBody(newSuppReq);
var ticketResp = await client.PostAsync<TicketDTO>(ticketReq);
// preparo richiesta x upload file
var fileUploadReq = new RestRequest("/api/filesave/single");
fileUploadReq.AddParameter("ticketId", ticketResp.idxTicket);
fileUploadReq.AddFile("file", zipPath);
// ... infine INVIA file zip che li contiene...
//var fileUploadResp = client.Post(fileUploadReq);
var fileUploadResp = await client.PostAsync<UploadResult>(fileUploadReq);
btnSendLog.Text = "LogSend end";
btnSendLog.BackColor = Color.DarkOliveGreen;
btnSendLog.Refresh();
// elimino folder temporanea
if (Directory.Exists(tempDir))
{
Directory.Delete(tempDir, true);
}
// elimino il file temporaneo...
if (File.Exists(zipPath))
{
File.Delete(zipPath);
}
}
catch (Exception exc)
{
Logging.LogError($"Eccezione in fase gestione REST services{Environment.NewLine}{exc}");
}
}
btnSendLog.BackColor = stdColor;
btnSendLog.Text = stdText;
btnSendLog.Enabled = true;
}
} }
} }
+2 -2
View File
@@ -12,7 +12,7 @@
name="f_base" name="f_base"
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log" fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true}|${message}" layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true}|${message}"
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.zip" archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
archiveNumbering="Sequence" archiveNumbering="Sequence"
archiveAboveSize="10240000" archiveAboveSize="10240000"
maxArchiveFiles="60" maxArchiveFiles="60"
@@ -23,7 +23,7 @@
name="f_error" name="f_error"
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log" fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true}|${message}${newline}${exception:format=tostring}" layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true}|${message}${newline}${exception:format=tostring}"
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.zip" archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
archiveNumbering="Sequence" archiveNumbering="Sequence"
archiveAboveSize="10240000" archiveAboveSize="10240000"
maxArchiveFiles="60" maxArchiveFiles="60"
+127 -120
View File
@@ -29,6 +29,16 @@ namespace IOB_MAN
/// </summary> /// </summary>
public float counterMAC { get; set; } = 0; public float counterMAC { get; set; } = 0;
/// <summary>
/// Ultimo stato noto dei parametri in memoria letti dalla macchina
/// </summary>
public Dictionary<string, string> currParams { get; set; } = new Dictionary<string, string>();
/// <summary>
/// Note (libere) da child a controller
/// </summary>
public string freeNotes { get; set; } = "";
/// <summary> /// <summary>
/// Tipo IOB /// Tipo IOB
/// </summary> /// </summary>
@@ -39,6 +49,11 @@ namespace IOB_MAN
/// </summary> /// </summary>
public DateTime lastDataIn { get; set; } = DateTime.Now.AddMinutes(-1); public DateTime lastDataIn { get; set; } = DateTime.Now.AddMinutes(-1);
/// <summary>
/// DataOra ultima comunicazione OUT (con MP Server)
/// </summary>
public DateTime lastDataOut { get; set; } = DateTime.Now.AddDays(-1);
/// <summary> /// <summary>
/// DataOra ultima comunicazione OUT (con MP Server) /// DataOra ultima comunicazione OUT (con MP Server)
/// </summary> /// </summary>
@@ -49,21 +64,6 @@ namespace IOB_MAN
/// </summary> /// </summary>
public bool online { get; set; } = false; public bool online { get; set; } = false;
#if false
/// <summary>
/// Indica se sia correntemente in setup
/// </summary>
public bool inSetup { get; set; } = false;
/// <summary>
/// Semaforo IN (IOB-PLC)
/// </summary>
public Semaforo SemIn { get; set; } = Semaforo.ND;
/// <summary>
/// Semaforo OUT (IOB-MPserver)
/// </summary>
public Semaforo SemOut { get; set; } = Semaforo.ND;
#endif
/// <summary> /// <summary>
/// Lungh coda ALLARMI in uscita /// Lungh coda ALLARMI in uscita
/// </summary> /// </summary>
@@ -84,73 +84,26 @@ namespace IOB_MAN
/// </summary> /// </summary>
public int queueMsLen { get; set; } = 0; public int queueMsLen { get; set; } = 0;
#endregion Public Properties /// <summary>
/// Semaforo IN (IOB-Macchina)
/// </summary>
public string semIn { get; set; } = "ND";
#if false /// <summary>
/// <summary> /// Semaforo OUT (IOB-MPServer)
/// DataOra ultima comunicazione OUT (con MP Server) /// </summary>
/// </summary> public string semOut { get; set; } = "ND";
public DateTime lastDataOut { get; set; } = DateTime.Now.AddDays(-1);
/// <summary> /// <summary>
/// Ultimo stato noto dei parametri in memoria letti da PLC /// Parametri configurazione (es IP target, porta, ...)
/// </summary> /// </summary>
public Dictionary<string, string> currParams { get; set; } = null; public Dictionary<string, string> setupParams { get; set; } = new Dictionary<string, string>();
#endif
#endregion Public Properties
} }
public class RedisIobCache public class RedisIobCache
{ {
#region Private Fields
/// <summary>
/// Connessione lazy a redis...
/// </summary>
private Lazy<ConnectionMultiplexer> lazyConnection = new Lazy<ConnectionMultiplexer>(() =>
{
string RedisConn = utils.CRS("RedisConn");
if (string.IsNullOrEmpty(RedisConn))
{
RedisConn = "localhost,abortConnect=false,ssl=false";
}
return ConnectionMultiplexer.Connect(RedisConn);
});
/// <summary>
/// Connessione lazy a redis...
/// </summary>
private Lazy<ConnectionMultiplexer> lazyConnectionAdmin = new Lazy<ConnectionMultiplexer>(() =>
{
string RedisConnAdmin = utils.CRS("RedisConnAdmin");
if (string.IsNullOrEmpty(RedisConnAdmin))
{
RedisConnAdmin = "localhost,abortConnect=false,ssl=false,allowAdmin=true";
}
return ConnectionMultiplexer.Connect(RedisConnAdmin);
});
#endregion Private Fields
#region Protected Fields
/// <summary>
/// Cod IOB
/// </summary>
protected string CodIob = "000";
/// <summary>
/// Hash redis x dati IOB
/// </summary>
protected string redIobKey = "";
/// <summary>
/// Hash redis x dati server
/// </summary>
protected string redServKey = "";
#endregion Protected Fields
#region Public Constructors #region Public Constructors
/// <summary> /// <summary>
@@ -225,15 +178,6 @@ namespace IOB_MAN
#endregion Public Enums #endregion Public Enums
#region Private Properties
/// <summary>
/// Oggetto currentDb locale
/// </summary>
private IDatabase _currDB { get; set; }
#endregion Private Properties
#region Public Properties #region Public Properties
/// <summary> /// <summary>
@@ -385,36 +329,11 @@ namespace IOB_MAN
#endregion Public Properties #endregion Public Properties
#region Private Methods
/// <summary>
/// Effettua comaprazione x CHIAVE in KVP ASC
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
private int CompareKey(KeyValuePair<string, int> x, KeyValuePair<string, int> y)
{
return x.Key.CompareTo(y.Key);
}
/// <summary>
/// Effettua comaprazione x CHIAVE in KVP DESC
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
private int CompareKeyDesc(KeyValuePair<string, int> x, KeyValuePair<string, int> y)
{
return y.Key.CompareTo(x.Key);
}
#endregion Private Methods
#region Public Methods #region Public Methods
/// <summary> /// <summary>
/// Nome della variabile HASH da utilizzare (dato CodModulo / Server / DB impiegato da funzionalita' DbConfig) + keyName richiesto... /// Nome della variabile HASH da utilizzare (dato CodModulo / Server / DB impiegato da
/// funzionalita' DbConfig) + keyName richiesto...
/// </summary> /// </summary>
public static string redHash(string keyName) public static string redHash(string keyName)
{ {
@@ -556,8 +475,7 @@ namespace IOB_MAN
public int redCountKey(string keyPattern) public int redCountKey(string keyPattern)
{ {
int answ = 0; int answ = 0;
// cerco se ci sia valore in redis... // cerco se ci sia valore in redis... se vuoto = ALL...
// se vuoto = ALL...
keyPattern = string.IsNullOrEmpty(keyPattern) ? "**" : keyPattern; keyPattern = string.IsNullOrEmpty(keyPattern) ? "**" : keyPattern;
try try
{ {
@@ -607,8 +525,7 @@ namespace IOB_MAN
public bool redFlushKey(string keyPattern) public bool redFlushKey(string keyPattern)
{ {
bool answ = false; bool answ = false;
// cerco se ci sia valore in redis... // cerco se ci sia valore in redis... se vuoto = ALL...
// se vuoto = ALL...
keyPattern = string.IsNullOrEmpty(keyPattern) ? "**" : keyPattern; keyPattern = string.IsNullOrEmpty(keyPattern) ? "**" : keyPattern;
try try
{ {
@@ -895,7 +812,9 @@ namespace IOB_MAN
/// </summary> /// </summary>
/// <param name="hashKey">chiave</param> /// <param name="hashKey">chiave</param>
/// <param name="hashFields">valori</param> /// <param name="hashFields">valori</param>
/// <param name="expireSeconds">scadenza preimpostata hash (secondi) | defaoult = -1 (non scade)</param> /// <param name="expireSeconds">
/// scadenza preimpostata hash (secondi) | defaoult = -1 (non scade)
/// </param>
/// <returns></returns> /// <returns></returns>
public bool redSaveHash(string hashKey, KeyValuePair<string, string>[] hashFields, double expireSeconds = -1) public bool redSaveHash(string hashKey, KeyValuePair<string, string>[] hashFields, double expireSeconds = -1)
{ {
@@ -953,7 +872,9 @@ namespace IOB_MAN
/// </summary> /// </summary>
/// <param name="hashKey">chiave</param> /// <param name="hashKey">chiave</param>
/// <param name="hashFields">valori</param> /// <param name="hashFields">valori</param>
/// <param name="expireSeconds">scadenza preimpostata hash (secondi) | defaoult = -1 (non scade)</param> /// <param name="expireSeconds">
/// scadenza preimpostata hash (secondi) | defaoult = -1 (non scade)
/// </param>
/// <returns></returns> /// <returns></returns>
public bool redSaveHashDict(string hashKey, Dictionary<string, string> hashFields, double expireSeconds = -1) public bool redSaveHashDict(string hashKey, Dictionary<string, string> hashFields, double expireSeconds = -1)
{ {
@@ -1109,7 +1030,7 @@ namespace IOB_MAN
} }
/// <summary> /// <summary>
/// Salva un set KVP (Key Value Pair) in RedisCache /// Salva un set KVP (Key Value Pair) in RedisCache
/// </summary> /// </summary>
/// <param name="valori">Set KVP chiave-valore da salvare</param> /// <param name="valori">Set KVP chiave-valore da salvare</param>
/// <returns></returns> /// <returns></returns>
@@ -1174,6 +1095,92 @@ namespace IOB_MAN
} }
#endregion Public Methods #endregion Public Methods
#region Protected Fields
/// <summary>
/// Cod IOB
/// </summary>
protected string CodIob = "000";
/// <summary>
/// Hash redis x dati IOB
/// </summary>
protected string redIobKey = "";
/// <summary>
/// Hash redis x dati server
/// </summary>
protected string redServKey = "";
#endregion Protected Fields
#region Private Fields
/// <summary>
/// Connessione lazy a redis...
/// </summary>
private Lazy<ConnectionMultiplexer> lazyConnection = new Lazy<ConnectionMultiplexer>(() =>
{
string RedisConn = utils.CRS("RedisConn");
if (string.IsNullOrEmpty(RedisConn))
{
RedisConn = "localhost,abortConnect=false,ssl=false";
}
return ConnectionMultiplexer.Connect(RedisConn);
});
/// <summary>
/// Connessione lazy a redis...
/// </summary>
private Lazy<ConnectionMultiplexer> lazyConnectionAdmin = new Lazy<ConnectionMultiplexer>(() =>
{
string RedisConnAdmin = utils.CRS("RedisConnAdmin");
if (string.IsNullOrEmpty(RedisConnAdmin))
{
RedisConnAdmin = "localhost,abortConnect=false,ssl=false,allowAdmin=true";
}
return ConnectionMultiplexer.Connect(RedisConnAdmin);
});
#endregion Private Fields
#region Private Properties
/// <summary>
/// Oggetto currentDb locale
/// </summary>
private IDatabase _currDB { get; set; }
#endregion Private Properties
#region Private Methods
/// <summary>
/// Effettua comaprazione x CHIAVE in KVP ASC
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
private int CompareKey(KeyValuePair<string, int> x, KeyValuePair<string, int> y)
{
return x.Key.CompareTo(y.Key);
}
/// <summary>
/// Effettua comaprazione x CHIAVE in KVP DESC
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
private int CompareKeyDesc(KeyValuePair<string, int> x, KeyValuePair<string, int> y)
{
return y.Key.CompareTo(x.Key);
}
#endregion Private Methods
} }
/// <summary> /// <summary>
+4 -4
View File
@@ -48,12 +48,12 @@
name="f" name="f"
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log" fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true}|${message}|${exception:format=tostring}" layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true}|${message}|${exception:format=tostring}"
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.zip" archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
archiveNumbering="Sequence" archiveNumbering="Sequence"
archiveEvery="Day" archiveEvery="Day"
archiveOldFileOnStartup="true" archiveOldFileOnStartup="true"
maxArchiveFiles="90" maxArchiveFiles="90"
enableArchiveFileCompression="true" enableArchiveFileCompression="false"
keepFileOpen="true" keepFileOpen="true"
/>--> />-->
<!--<target name="fAsync" xsi:type="AsyncWrapper" queueLimit="5" overflowAction="Discard"> <!--<target name="fAsync" xsi:type="AsyncWrapper" queueLimit="5" overflowAction="Discard">
@@ -61,12 +61,12 @@
keepFileOpen="true" keepFileOpen="true"
fileName="${basedir}/logs/${shortdate}_${var:codIOB:default=0000}.log" fileName="${basedir}/logs/${shortdate}_${var:codIOB:default=0000}.log"
layout="${longdate}|${uppercase:${level}}|${var:codIOB:default=0000}|${callsite}|${message}|${exception:format=tostring}" layout="${longdate}|${uppercase:${level}}|${var:codIOB:default=0000}|${callsite}|${message}|${exception:format=tostring}"
archiveFileName="${basedir}/logs/${shortdate}_${var:codIOB:default=0000}.{###}.zip" archiveFileName="${basedir}/logs/${shortdate}_${var:codIOB:default=0000}.{###}.log"
archiveNumbering="Sequence" archiveNumbering="Sequence"
archiveEvery="Day" archiveEvery="Day"
archiveOldFileOnStartup="true" archiveOldFileOnStartup="true"
maxArchiveFiles="0" maxArchiveFiles="0"
enableArchiveFileCompression="true" enableArchiveFileCompression="false"
/> />
</target>--> </target>-->
</targets> </targets>
+3 -3
View File
@@ -12,7 +12,7 @@
name="f_base" name="f_base"
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log" fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true}|${message}" layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true}|${message}"
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.zip" archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
archiveNumbering="Sequence" archiveNumbering="Sequence"
archiveAboveSize="10240000" archiveAboveSize="10240000"
maxArchiveFiles="60" maxArchiveFiles="60"
@@ -23,7 +23,7 @@
name="f_error" name="f_error"
fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log" fileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.log"
layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true}|${message}${newline}${exception:format=tostring}" layout="${longdate} [${uppercase:${level}}] ${logger:shortName=true}|${message}${newline}${exception:format=tostring}"
archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.zip" archiveFileName="${logDir}/${var:codIOB:default=0000}/${shortdate}.{###}.log"
archiveNumbering="Sequence" archiveNumbering="Sequence"
archiveAboveSize="10240000" archiveAboveSize="10240000"
maxArchiveFiles="60" maxArchiveFiles="60"
@@ -33,7 +33,7 @@
</targets> </targets>
<rules> <rules>
<!-- Logging Levels (Trace, Debug, Info, Warn, Error, Fatal)--> <!-- Logging Levels (Trace, Debug, Info, Warn, Error, Fatal)-->
<logger name="*" minlevel="{{minLevel}}" maxlevel="Warn" final="true" writeTo="f_base" /> <logger name="*" minlevel="{{minLevel}}" maxlevel="Warn" final="true" writeTo="f_base" />
<logger name="*" minlevel="Error" writeTo="f_error" /> <logger name="*" minlevel="Error" writeTo="f_error" />
</rules> </rules>
</nlog> </nlog>
+19 -21
View File
@@ -1,43 +1,41 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Crc32C.NET" version="1.0.5.0" targetFramework="net461" /> <package id="DnsClient" version="1.6.0" targetFramework="net462" />
<package id="DnsClient" version="1.5.0" targetFramework="net462" /> <package id="MapoSDK" version="6.14.2204.2616" targetFramework="net462" />
<package id="MapoSDK" version="6.14.2109.2809" targetFramework="net462" /> <package id="Microsoft.Bcl.AsyncInterfaces" version="6.0.0" targetFramework="net462" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="5.0.0" targetFramework="net462" /> <package id="MongoDB.Bson" version="2.15.0" targetFramework="net462" />
<package id="MongoDB.Bson" version="2.13.2" targetFramework="net462" /> <package id="MongoDB.Driver" version="2.15.0" targetFramework="net462" />
<package id="MongoDB.Driver" version="2.13.2" targetFramework="net462" /> <package id="MongoDB.Driver.Core" version="2.15.0" targetFramework="net462" />
<package id="MongoDB.Driver.Core" version="2.13.2" targetFramework="net462" /> <package id="MongoDB.Libmongocrypt" version="1.3.0" targetFramework="net462" />
<package id="MongoDB.Libmongocrypt" version="1.2.3" targetFramework="net462" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net462" /> <package id="Newtonsoft.Json" version="13.0.1" targetFramework="net462" />
<package id="NLog" version="4.7.12" targetFramework="net462" /> <package id="NLog" version="4.7.15" targetFramework="net462" />
<package id="NLog.Config" version="4.7.12" targetFramework="net462" /> <package id="NLog.Config" version="4.7.12" targetFramework="net462" />
<package id="NLog.Schema" version="4.7.12" targetFramework="net462" /> <package id="NLog.Schema" version="4.7.12" targetFramework="net462" />
<package id="Pipelines.Sockets.Unofficial" version="2.2.0" targetFramework="net462" /> <package id="Pipelines.Sockets.Unofficial" version="2.2.2" targetFramework="net462" />
<package id="PrettyBin" version="1.1.0" targetFramework="net461" /> <package id="PrettyBin" version="1.1.0" targetFramework="net461" />
<package id="RestSharp" version="106.15.0" targetFramework="net462" /> <package id="RestSharp" version="106.15.0" targetFramework="net462" />
<package id="RestSharp.Serializers.NewtonsoftJson" version="106.15.0" targetFramework="net462" /> <package id="RestSharp.Serializers.NewtonsoftJson" version="106.15.0" targetFramework="net462" />
<package id="SharpCompress" version="0.30.0" targetFramework="net462" /> <package id="SharpCompress" version="0.31.0" targetFramework="net462" />
<package id="SharpZipLib" version="1.3.3" targetFramework="net462" /> <package id="SharpZipLib" version="1.3.3" targetFramework="net462" />
<package id="Snappy.NET" version="1.1.1.8" targetFramework="net461" /> <package id="StackExchange.Redis" version="2.5.61" targetFramework="net462" />
<package id="StackExchange.Redis" version="2.2.79" targetFramework="net462" /> <package id="SteamWare.IO" version="5.2.2205.1719" targetFramework="net462" />
<package id="SteamWare.IO" version="5.1.2109.1716" targetFramework="net462" /> <package id="SteamWare.Logger" version="5.2.2205.1719" targetFramework="net462" />
<package id="SteamWare.Logger" version="5.1.2109.1716" targetFramework="net462" /> <package id="SteamWare.Scheduler" version="5.2.2205.1719" targetFramework="net462" />
<package id="Steamware.Scheduler" version="5.1.2109.1716" targetFramework="net462" />
<package id="System.Buffers" version="4.5.1" targetFramework="net462" /> <package id="System.Buffers" version="4.5.1" targetFramework="net462" />
<package id="System.Diagnostics.PerformanceCounter" version="5.0.1" targetFramework="net462" /> <package id="System.Diagnostics.PerformanceCounter" version="6.0.1" targetFramework="net462" />
<package id="System.IO.Compression" version="4.3.0" targetFramework="net462" /> <package id="System.IO.Compression" version="4.3.0" targetFramework="net462" />
<package id="System.IO.Pipelines" version="5.0.1" targetFramework="net462" /> <package id="System.IO.Pipelines" version="6.0.2" targetFramework="net462" />
<package id="System.Memory" version="4.5.4" targetFramework="net462" /> <package id="System.Memory" version="4.5.4" targetFramework="net462" />
<package id="System.Net.Http" version="4.3.4" targetFramework="net462" /> <package id="System.Net.Http" version="4.3.4" targetFramework="net462" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net461" /> <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net462" /> <package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net462" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net461" /> <package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net461" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net462" /> <package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net462" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net462" /> <package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net462" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net462" /> <package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net462" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net462" /> <package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net462" />
<package id="System.Text.Encoding.CodePages" version="5.0.0" targetFramework="net462" /> <package id="System.Text.Encoding.CodePages" version="6.0.0" targetFramework="net462" />
<package id="System.Threading.Channels" version="5.0.0" targetFramework="net462" /> <package id="System.Threading.Channels" version="6.0.0" targetFramework="net462" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" /> <package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" /> <package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
</packages> </packages>
+15 -16
View File
@@ -6,20 +6,6 @@ namespace IOB_UT_NEXT
{ {
public class BinaryUtils : IFormatProvider, ICustomFormatter public class BinaryUtils : IFormatProvider, ICustomFormatter
{ {
#region Private Methods
private string HandleOtherFormats(string format, object arg)
{
if (arg is IFormattable)
return ((IFormattable)arg).ToString(format, CultureInfo.CurrentCulture);
else if (arg != null)
return arg.ToString();
else
return String.Empty;
}
#endregion Private Methods
#region Public Methods #region Public Methods
// Format number in binary (B), octal (O), or hexadecimal (H). // Format number in binary (B), octal (O), or hexadecimal (H).
@@ -29,8 +15,7 @@ namespace IOB_UT_NEXT
int baseNumber; int baseNumber;
// Handle null or empty format string, string with precision specifier. // Handle null or empty format string, string with precision specifier.
string thisFmt = String.Empty; string thisFmt = String.Empty;
// Extract first character of format string (precision specifiers // Extract first character of format string (precision specifiers are not supported).
// are not supported).
if (!String.IsNullOrEmpty(format)) if (!String.IsNullOrEmpty(format))
thisFmt = format.Length > 1 ? format.Substring(0, 1) : format; thisFmt = format.Length > 1 ? format.Substring(0, 1) : format;
@@ -140,5 +125,19 @@ namespace IOB_UT_NEXT
} }
#endregion Public Methods #endregion Public Methods
#region Private Methods
private string HandleOtherFormats(string format, object arg)
{
if (arg is IFormattable)
return ((IFormattable)arg).ToString(format, CultureInfo.CurrentCulture);
else if (arg != null)
return arg.ToString();
else
return String.Empty;
}
#endregion Private Methods
} }
} }
+56 -51
View File
@@ -1,7 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace IOB_UT_NEXT namespace IOB_UT_NEXT
{ {
@@ -11,7 +8,7 @@ namespace IOB_UT_NEXT
public enum boolCheckMode public enum boolCheckMode
{ {
/// <summary> /// <summary>
/// AND: tutte vere -> true /// AND: tutte vere -&gt; true
/// </summary> /// </summary>
AND = 0, AND = 0,
@@ -21,17 +18,6 @@ namespace IOB_UT_NEXT
OR OR
} }
/// <summary>
/// Modalità gestione setup macchina
/// </summary>
public enum MachineSetupMode
{
ND=0,
// Modalità Mecolpress (3 parametri IN, se variati --> porto a 1 la variabile di controllo)
MECOLPRESS = 1
}
/// <summary> /// <summary>
/// Elenco MODI CNC /// Elenco MODI CNC
/// </summary> /// </summary>
@@ -182,6 +168,18 @@ namespace IOB_UT_NEXT
VLF VLF
} }
/// <summary>
/// Modalità gestione setup macchina
/// </summary>
public enum MachineSetupMode
{
ND = 0,
/// <summary>
/// Modalità Mecolpress (3 parametri IN, se variati --> porto a 1 la variabile di controllo)
/// </summary>
MECOLPRESS = 1
}
/// <summary> /// <summary>
/// StFlag32: set di 32 bit (4 word) contente semaforo di variabili /// StFlag32: set di 32 bit (4 word) contente semaforo di variabili
/// </summary> /// </summary>
@@ -281,10 +279,20 @@ namespace IOB_UT_NEXT
//FILE_XYLOG, //FILE_XYLOG,
/// <summary> /// <summary>
/// adapter KAWASAKI e-controller /// Adapter KAWASAKI e-controller
/// </summary> /// </summary>
KAWASAKI, KAWASAKI,
/// <summary>
/// Adapter Icoel per DB (barcode, tracciatura, produzione,...)
/// </summary>
IcoelDb,
/// <summary>
/// Adapter Icoel per WS SOAP (sizer)
/// </summary>
IcoelSoap,
/// <summary> /// <summary>
/// Adapter non specificato /// Adapter non specificato
/// </summary> /// </summary>
@@ -300,6 +308,11 @@ namespace IOB_UT_NEXT
/// </summary> /// </summary>
MODBUS_TCP_CEDAX, MODBUS_TCP_CEDAX,
/// <summary>
/// Adapter ModBus TCP versione Centerfrigo (Giacovelli)
/// </summary>
MODBUS_TCP_CENTERFRIGO,
/// <summary> /// <summary>
/// Adapter ModBus TCP versione HAM (Pizzaferri) /// Adapter ModBus TCP versione HAM (Pizzaferri)
/// </summary> /// </summary>
@@ -330,11 +343,6 @@ namespace IOB_UT_NEXT
/// </summary> /// </summary>
OpcUaCMS, OpcUaCMS,
/// <summary>
/// Adapter OPC-UA SCM
/// </summary>
OpcUaSCM,
/// <summary> /// <summary>
/// Adapter OPC-UA per Ewon /// Adapter OPC-UA per Ewon
/// </summary> /// </summary>
@@ -365,6 +373,21 @@ namespace IOB_UT_NEXT
/// </summary> /// </summary>
OpcUaOmronIcoel, OpcUaOmronIcoel,
/// <summary>
/// Adapter OPC-UA SCM
/// </summary>
OpcUaSCM,
/// <summary>
/// Adapter OPC-UA Siemens generico
/// </summary>
OpcUaSiemens,
/// <summary>
/// Adapter OPC-UA Siemens OMP
/// </summary>
OpcUaSiemensOMP,
/// <summary> /// <summary>
/// Adapter OSAI CNDEX (Cndex) /// Adapter OSAI CNDEX (Cndex)
/// </summary> /// </summary>
@@ -396,7 +419,7 @@ namespace IOB_UT_NEXT
SIEMENS_APROCHIM, SIEMENS_APROCHIM,
/// <summary> /// <summary>
/// Adapter SIEMENS, interfaccia versione VIPA @2001 /// Adapter SIEMENS, interfaccia versione VIPA @2001
/// </summary> /// </summary>
SIEMENS_AT2001, SIEMENS_AT2001,
@@ -430,6 +453,11 @@ namespace IOB_UT_NEXT
/// </summary> /// </summary>
SIEMENS_LASCO, SIEMENS_LASCO,
/// <summary>
/// Adapter SIEMENS, interfaccia versione NWSE (Giacovelli, impianto filtrazione NWS)
/// </summary>
SIEMENS_NWSE,
/// <summary> /// <summary>
/// Adapter SIEMENS, interfaccia versione PRESSOIL + CEI (Valvital, Pressa Idraulica) /// Adapter SIEMENS, interfaccia versione PRESSOIL + CEI (Valvital, Pressa Idraulica)
/// </summary> /// </summary>
@@ -461,35 +489,6 @@ namespace IOB_UT_NEXT
WPS WPS
} }
#if false
/// <summary>
/// Enumerazione tipi di semaforo
/// </summary>
public enum Semaforo
{
/// <summary>
/// Stato non definito
/// </summary>
ND,
/// <summary>
/// Verde
/// </summary>
SV,
/// <summary>
/// Giallo
/// </summary>
SG,
/// <summary>
/// Rosso
/// </summary>
SR,
/// <summary>
/// Grigio/Spento
/// </summary>
SS
}
#endif
/// <summary> /// <summary>
/// Enumerazione tipi di tipi di URL x invio /// Enumerazione tipi di tipi di URL x invio
/// </summary> /// </summary>
@@ -505,9 +504,15 @@ namespace IOB_UT_NEXT
/// </summary> /// </summary>
SignIN, SignIN,
/// <summary>
/// Salvataggio RawTransf (valori raw da decodificare a valle)
/// </summary>
RawTransf,
/// <summary> /// <summary>
/// Salvataggio UserLog (valori log attività utente) /// Salvataggio UserLog (valori log attività utente)
/// </summary> /// </summary>
ULog ULog
} }
} }
+7 -7
View File
@@ -1,8 +1,5 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace IOB_UT_NEXT namespace IOB_UT_NEXT
{ {
@@ -39,7 +36,8 @@ namespace IOB_UT_NEXT
TimeSet, TimeSet,
/// <summary> /// <summary>
/// Verificato il canale di comunicazione è OK, fatta pulizia con AbortAll, NON ci sono report attivi /// Verificato il canale di comunicazione è OK, fatta pulizia con AbortAll, NON ci sono
/// report attivi
/// </summary> /// </summary>
ChannelOk, ChannelOk,
@@ -135,7 +133,8 @@ namespace IOB_UT_NEXT
public int PzPallet { get; set; } = 1; public int PzPallet { get; set; } = 1;
/// <summary> /// <summary>
/// Indica se sia possibile impostare i pezzi pallet dal server, ed in tal caso moltiplica i pezzi letti dalla macchina per il valore pzPallet (vedi sopra) /// Indica se sia possibile impostare i pezzi pallet dal server, ed in tal caso
/// moltiplica i pezzi letti dalla macchina per il valore pzPallet (vedi sopra)
/// </summary> /// </summary>
public bool SetPzPalletFromSrv { get; set; } = false; public bool SetPzPalletFromSrv { get; set; } = false;
@@ -170,7 +169,8 @@ namespace IOB_UT_NEXT
public List<FileTask> FileList { get; set; } = new List<FileTask>(); public List<FileTask> FileList { get; set; } = new List<FileTask>();
/// <summary> /// <summary>
/// Numero MAX di esecuzioni da mantenere in HIST prima di eliminare i + vecchi (fare folder HIST\SESSnnnn) /// Numero MAX di esecuzioni da mantenere in HIST prima di eliminare i + vecchi (fare
/// folder HIST\SESSnnnn)
/// </summary> /// </summary>
public int Max2Keep { get; set; } = 50; public int Max2Keep { get; set; } = 50;
@@ -190,7 +190,7 @@ namespace IOB_UT_NEXT
public string RespOk { get; set; } = "PROCESSED"; public string RespOk { get; set; } = "PROCESSED";
/// <summary> /// <summary>
/// Seconds before do a new retry (default = 0 --> no veto) /// Seconds before do a new retry (default = 0 --&gt; no veto)
/// </summary> /// </summary>
public double RetrySec { get; set; } = 0; public double RetrySec { get; set; } = 0;
+23 -3
View File
@@ -55,12 +55,31 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Remote_DEBUG|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Remote_DEBUG\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Remote_DEBUG|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Remote_DEBUG\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="ICSharpCode.SharpZipLib, Version=1.3.1.9, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL"> <Reference Include="ICSharpCode.SharpZipLib, Version=1.3.1.9, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\packages\SharpZipLib.1.3.1\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath> <HintPath>..\packages\SharpZipLib.1.3.1\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="MapoSDK, Version=6.14.2204.2115, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="MapoSDK, Version=6.14.2207.2913, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MapoSDK.6.14.2204.2115\lib\net40\MapoSDK.dll</HintPath> <HintPath>..\packages\MapoSDK.6.14.2207.2913\lib\MapoSDK.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <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> <HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
@@ -123,7 +142,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Eurom63.cs" /> <Compile Include="Eurom63.cs" />
<Compile Include="IobWinStatus.cs" />
<Compile Include="TCMan.cs" /> <Compile Include="TCMan.cs" />
<Compile Include="TimeUtils.cs" />
<Compile Include="ToMapo.cs" /> <Compile Include="ToMapo.cs" />
<Compile Include="baseUtils.cs" /> <Compile Include="baseUtils.cs" />
<Compile Include="BinaryFormatter.cs" /> <Compile Include="BinaryFormatter.cs" />
@@ -134,7 +155,6 @@
<Compile Include="Objects.cs" /> <Compile Include="Objects.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RedisMan.cs" /> <Compile Include="RedisMan.cs" />
<Compile Include="val.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="ExtLib\krcc.dll" /> <Content Include="ExtLib\krcc.dll" />
+67 -24
View File
@@ -1,7 +1,7 @@
using System; using System;
using System.Globalization;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using System.Globalization;
namespace IOB_UT_NEXT namespace IOB_UT_NEXT
{ {
@@ -16,9 +16,6 @@ namespace IOB_UT_NEXT
#endregion Public Fields #endregion Public Fields
// INI filename
// import windows dll functions
#region Public Constructors #region Public Constructors
@@ -33,25 +30,6 @@ namespace IOB_UT_NEXT
#endregion Public Constructors #endregion Public Constructors
#region Private Methods
[DllImport("kernel32")]
private static extern int GetPrivateProfileInt(string section, string key, int def, string filePath);
[DllImport("kernel32")]
private static extern int GetPrivateProfileSection(string section, IntPtr retVal, uint size, string filePath);
[DllImport("kernel32")]
private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);
[DllImport("kernel32")]
private static extern bool WritePrivateProfileSection(string section, string value, string filePath);
[DllImport("kernel32", CharSet = CharSet.Auto, BestFitMapping = false)]
private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
#endregion Private Methods
#region Public Methods #region Public Methods
/// <summary> /// <summary>
@@ -149,7 +127,9 @@ namespace IOB_UT_NEXT
/// </summary> /// </summary>
/// <param name="Section"></param> /// <param name="Section"></param>
/// Section name /// Section name
/// <returns>restituisce delle stringhe keys=values da suddividere appunto come key/val successivamente</returns> /// <returns>
/// restituisce delle stringhe keys=values da suddividere appunto come key/val successivamente
/// </returns>
public string[] ReadSection(string Section) public string[] ReadSection(string Section)
{ {
const int bufferSize = 2048; // max is 32767 const int bufferSize = 2048; // max is 32767
@@ -270,5 +250,68 @@ namespace IOB_UT_NEXT
} }
#endregion Public Methods #endregion Public Methods
#region Private Methods
// INI filename
/// <summary>
/// GetPrivateProfileInt: import windows dll functions
/// </summary>
/// <param name="section"></param>
/// <param name="key"></param>
/// <param name="def"></param>
/// <param name="filePath"></param>
/// <returns></returns>
[DllImport("kernel32")]
private static extern int GetPrivateProfileInt(string section, string key, int def, string filePath);
/// <summary>
/// GetPrivateProfileSection: import windows dll functions
/// </summary>
/// <param name="section"></param>
/// <param name="retVal"></param>
/// <param name="size"></param>
/// <param name="filePath"></param>
/// <returns></returns>
[DllImport("kernel32")]
private static extern int GetPrivateProfileSection(string section, IntPtr retVal, uint size, string filePath);
/// <summary>
/// GetPrivateProfileString: import windows dll functions
/// </summary>
/// <param name="section"></param>
/// <param name="key"></param>
/// <param name="def"></param>
/// <param name="retVal"></param>
/// <param name="size"></param>
/// <param name="filePath"></param>
/// <returns></returns>
[DllImport("kernel32")]
private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);
/// <summary>
/// WritePrivateProfileSection: import windows dll functions
/// </summary>
/// <param name="section"></param>
/// <param name="value"></param>
/// <param name="filePath"></param>
/// <returns></returns>
[DllImport("kernel32")]
private static extern bool WritePrivateProfileSection(string section, string value, string filePath);
/// <summary>
/// WritePrivateProfileString: import windows dll functions
/// </summary>
/// <param name="section"></param>
/// <param name="key"></param>
/// <param name="val"></param>
/// <param name="filePath"></param>
/// <returns></returns>
[DllImport("kernel32", CharSet = CharSet.Auto, BestFitMapping = false)]
private static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
#endregion Private Methods
} }
} }
+188
View File
@@ -0,0 +1,188 @@
using System;
using System.Collections.Generic;
namespace IOB_UT_NEXT
{
/// <summary>
/// Rappresentazione dello stato corrente dell'IOB
/// </summary>
public class IobWinStatus
{
#region Public Properties
/// <summary>
/// ID univoco
/// </summary>
public string CodIob { get; set; } = "0";
/// <summary>
/// Contatore IOB
/// </summary>
public float counterIOB { get; set; } = 0;
/// <summary>
/// Contatore Macchina
/// </summary>
public float counterMAC { get; set; } = 0;
/// <summary>
/// Ultimo stato noto dei parametri in memoria letti dalla macchina
/// </summary>
public Dictionary<string, string> currParams { get; set; } = new Dictionary<string, string>();
/// <summary>
/// Note (libere) da child a controller
/// </summary>
public string freeNotes { get; set; } = "";
/// <summary>
/// Tipo IOB
/// </summary>
public string IobType { get; set; } = "";
/// <summary>
/// DataOra ultima comunicazione IN (con PLC)
/// </summary>
public DateTime lastDataIn { get; set; } = DateTime.Now.AddMinutes(-1);
/// <summary>
/// DataOra ultima comunicazione OUT (con MP Server)
/// </summary>
public DateTime lastDataOut { get; set; } = DateTime.Now.AddDays(-1);
/// <summary>
/// DataOra ultima comunicazione OUT (con MP Server)
/// </summary>
public DateTime lastUpdate { get; set; } = DateTime.Now.AddDays(-1);
/// <summary>
/// Status del SINGOLO IOB
/// </summary>
public bool online { get; set; } = false;
/// <summary>
/// Lungh coda ALLARMI in uscita
/// </summary>
public int queueAlLen { get; set; } = 0;
/// <summary>
/// Lunghezza coda EVENTI in uscita
/// </summary>
public int queueEvLen { get; set; } = 0;
/// <summary>
/// Lunghezza coda FluxLog in uscita
/// </summary>
public int queueFlLen { get; set; } = 0;
/// <summary>
/// Lungh coda MESSAGGI in uscita
/// </summary>
public int queueMsLen { get; set; } = 0;
/// <summary>
/// Lungh coda UserLog in uscita
/// </summary>
public int queueRawTransfLen { get; set; } = 0;
/// <summary>
/// Lungh coda UserLog in uscita
/// </summary>
public int queueUlLen { get; set; } = 0;
/// <summary>
/// Semaforo IN (IOB-Macchina)
/// </summary>
public string semIn { get; set; } = "ND";
/// <summary>
/// Semaforo OUT (IOB-MPServer)
/// </summary>
public string semOut { get; set; } = "ND";
/// <summary>
/// Parametri configurazione (es IP target, porta, ...)
/// </summary>
public Dictionary<string, string> setupParams { get; set; } = new Dictionary<string, string>();
/// <summary>
/// Valore minimo da considerare come delta secondi x indicare variazione sui dati temporali
/// </summary>
public int minDeltaSec { get; set; } = 5;
#endregion Public Properties
#region Public Methods
/// <summary>
/// Override metodo di equality
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
public override bool Equals(object obj)
{
if (!(obj is IobWinStatus item))
return false;
if (online != item.online)
return false;
// controllo se sia ALMENO 10 sec...
if (lastUpdate != item.lastUpdate)
{
if (lastUpdate.Subtract(item.lastUpdate).TotalSeconds > minDeltaSec)
return false;
}
// controllo se sia ALMENO 3 sec...
if (lastDataIn != item.lastDataIn)
{
if (lastDataIn.Subtract(item.lastDataIn).TotalSeconds > minDeltaSec)
return false;
}
// controllo se sia ALMENO 5 sec...
if (lastDataOut != item.lastDataOut)
{
if (lastDataOut.Subtract(item.lastDataOut).TotalSeconds > minDeltaSec)
return false;
}
if (semIn != item.semIn)
return false;
if (semOut != item.semOut)
return false;
//if (!currParams.Equals(item.currParams))
// return false;
if (counterIOB != item.counterIOB)
return false;
if (counterMAC != item.counterMAC)
return false;
if (queueAlLen != item.queueAlLen)
return false;
if (queueEvLen != item.queueEvLen)
return false;
if (queueFlLen != item.queueFlLen)
return false;
if (queueMsLen != item.queueMsLen)
return false;
if (queueRawTransfLen != item.queueRawTransfLen)
return false;
if (queueUlLen != item.queueUlLen)
return false;
if (freeNotes != item.freeNotes)
return false;
//if (setupParams != item.setupParams)
// return false;
if (IobType != item.IobType)
return false;
if (CodIob != item.CodIob)
return false;
return true;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
#endregion Public Methods
}
}
+1 -6
View File
@@ -1,15 +1,10 @@
using NLog; using NLog;
using NLog.Config; using NLog.Config;
using NLog.Targets; using NLog.Targets;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace IOB_UT_NEXT namespace IOB_UT_NEXT
{/// <summary> {/// <summary>
/// Classe helper x LOG basata su NLog /// Classe helper x LOG basata su NLog </summary>
/// </summary>
public static class Logging public static class Logging
{ {
#region Public Constructors #region Public Constructors
+196 -94
View File
@@ -2,7 +2,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
namespace IOB_UT_NEXT namespace IOB_UT_NEXT
{ {
@@ -60,6 +59,56 @@ namespace IOB_UT_NEXT
#endregion Public Methods #endregion Public Methods
} }
#if false
/// <summary>
/// Classe di base per trasferimento informazioni di tipo RawTransfer
/// </summary>
public class BaseRawTransf
{
#region Public Properties
/// <summary>
/// Data-Ora riferimento (x ordinamento fifo)
/// </summary>
public DateTime dataRif { get; set; } = DateTime.Now;
/// <summary>
/// Messaggio in modalità raw/stringa
/// </summary>
public object mesContent { get; set; } = new object();
/// <summary>
/// Tipo di messaggio trasmesso
/// </summary>
public rawTransfType mesType { get; set; } = rawTransfType.ND;
/// <summary>
/// Costruttore senza parametri
/// </summary>
public BaseRawTransf()
{
this.dataRif = DateTime.Now;
this.mesContent = new object();
this.mesType = rawTransfType.ND;
}
/// <summary>
/// Costruttore oggetto
/// </summary>
/// <param name="dataRif"></param>
/// <param name="mesContent"></param>
/// <param name="mesType"></param>
public BaseRawTransf(DateTime dataRif, object mesContent, rawTransfType mesType)
{
this.dataRif = dataRif;
this.mesContent = mesContent;
this.mesType = mesType;
}
#endregion Public Properties
}
#endif
/// <summary> /// <summary>
/// Gestione dati di timing /// Gestione dati di timing
/// </summary> /// </summary>
@@ -206,13 +255,12 @@ namespace IOB_UT_NEXT
#endregion Public Properties #endregion Public Properties
} }
#if false
/// <summary> /// <summary>
/// Rappresentazione dello stato corrente dell'IOB /// Rappresentazione dello stato corrente dell'IOB
/// </summary> /// </summary>
public class IobWinStatus public class IobWinStatus
{ {
#region Public Properties
/// <summary> /// <summary>
/// ID univoco /// ID univoco
/// </summary> /// </summary>
@@ -268,9 +316,56 @@ namespace IOB_UT_NEXT
/// </summary> /// </summary>
public int queueMsLen { get; set; } = 0; public int queueMsLen { get; set; } = 0;
#endregion Public Properties /// <summary>
/// Lungh coda UserLog in uscita
/// </summary>
public int queueRawTransfLen { get; set; } = 0;
/// <summary>
/// Lungh coda UserLog in uscita
/// </summary>
public int queueUlLen { get; set; } = 0;
/// <summary>
/// Override metodo di equality
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
public override bool Equals(object obj)
{
if (!(obj is IobWinStatus item))
return false;
if (online != item.online)
return false;
if (lastDataIn != item.lastDataIn)
return false;
if (counterIOB != item.counterIOB)
return false;
if (counterMAC != item.counterMAC)
return false;
if (queueAlLen != item.queueAlLen)
return false;
if (queueEvLen != item.queueEvLen)
return false;
if (queueFlLen != item.queueFlLen)
return false;
if (queueMsLen != item.queueMsLen)
return false;
if (queueRawTransfLen != item.queueRawTransfLen)
return false;
if (queueUlLen != item.queueUlLen)
return false;
return true;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
} }
#endif
/// <summary> /// <summary>
/// Elenco oggetti del monitoraggio (DynData, Status) per WPS /// Elenco oggetti del monitoraggio (DynData, Status) per WPS
@@ -398,6 +493,97 @@ namespace IOB_UT_NEXT
/// </summary> /// </summary>
public class sampleVect public class sampleVect
{ {
#region Public Constructors
/// <summary>
/// Inizializzo l'oggetto
/// </summary>
public sampleVect()
{
// init valori default...
windSize = baseUtils.CRI("countWindSize") > 0 ? baseUtils.CRI("countWindSize") : 60;
lTime = new List<DateTime>();
lVal = new List<int>();
}
#endregion Public Constructors
#region Public Properties
/// <summary>
/// Calcola il valore mediano...
/// </summary>
public double vcMedian
{
get
{
double answ = 0;
// restituisce la mediana SE valida, altrimenti null...
if (numElem > 2 && flWindSize > windSize)
{
try
{
// calcolo mediana!
//answ = Statistics.Median(lVal.ToArray());
// rif: https://blogs.msmvps.com/deborahk/linq-mean-median-and-mode/
var sortedNumbers = lVal.OrderBy(n => n);
int numCount = lVal.Count;
int indice50 = lVal.Count / 2;
if ((numCount % 2) == 0)
{
answ = ((sortedNumbers.ElementAt(indice50) + sortedNumbers.ElementAt(indice50 - 1)) / 2);
}
else
{
answ = sortedNumbers.ElementAt(indice50);
}
}
catch
{ }
}
return answ;
}
}
/// <summary>
/// Verifica se la vc sia valida (ovvero almeno 2 valori e intervallo &gt; window richiesta)
/// </summary>
public bool vcValid
{
get
{
return (flWindSize > windSize && numElem > 1);
}
}
#endregion Public Properties
#region Public Methods
/// <summary>
/// Aggiunge un valore alla serie ed eventualmente elimina i valori superflui a garantirne
/// una finestra temporale valida
/// </summary>
/// <param name="tempo"></param>
/// <param name="valore"></param>
public void addValue(DateTime tempo, int valore)
{
lTime.Add(tempo);
lVal.Add(valore);
// verifico se siano da accorciare le serie... ovvero i 2 intervalli ENTRAMBI sono
// superiori al periodo minimo (in tal caso riduco..
while (flWindSize > windSize && slWindSize > windSize)
{
// elimino i 2 valori + vecchi
lTime.RemoveAt(0);
lVal.RemoveAt(0);
// ora ricontrollo...
}
}
#endregion Public Methods
#region Protected Fields #region Protected Fields
/// <summary> /// <summary>
@@ -417,21 +603,6 @@ namespace IOB_UT_NEXT
#endregion Protected Fields #endregion Protected Fields
#region Public Constructors
/// <summary>
/// Inizializzo l'oggetto
/// </summary>
public sampleVect()
{
// init valori default...
windSize = baseUtils.CRI("countWindSize") > 0 ? baseUtils.CRI("countWindSize") : 60;
lTime = new List<DateTime>();
lVal = new List<int>();
}
#endregion Public Constructors
#region Protected Properties #region Protected Properties
/// <summary> /// <summary>
@@ -485,80 +656,6 @@ namespace IOB_UT_NEXT
} }
#endregion Protected Properties #endregion Protected Properties
#region Public Properties
/// <summary>
/// Calcola il valore mediano...
/// </summary>
public double vcMedian
{
get
{
double answ = 0;
// restituisce la mediana SE valida, altrimenti null...
if (numElem > 2 && flWindSize > windSize)
{
try
{
// calcolo mediana!
//answ = Statistics.Median(lVal.ToArray());
// rif: https://blogs.msmvps.com/deborahk/linq-mean-median-and-mode/
var sortedNumbers = lVal.OrderBy(n => n);
int numCount = lVal.Count;
int indice50 = lVal.Count / 2;
if ((numCount % 2) == 0)
{
answ = ((sortedNumbers.ElementAt(indice50) + sortedNumbers.ElementAt(indice50 - 1)) / 2);
}
else
{
answ = sortedNumbers.ElementAt(indice50);
}
}
catch
{ }
}
return answ;
}
}
/// <summary>
/// Verifica se la vc sia valida (ovvero almeno 2 valori e intervallo > window richiesta)
/// </summary>
public bool vcValid
{
get
{
return (flWindSize > windSize && numElem > 1);
}
}
#endregion Public Properties
#region Public Methods
/// <summary>
/// Aggiunge un valore alla serie ed eventualmente elimina i valori superflui a garantirne una finestra temporale valida
/// </summary>
/// <param name="tempo"></param>
/// <param name="valore"></param>
public void addValue(DateTime tempo, int valore)
{
lTime.Add(tempo);
lVal.Add(valore);
// verifico se siano da accorciare le serie... ovvero i 2 intervalli ENTRAMBI sono superiori al periodo minimo (in tal caso riduco..
while (flWindSize > windSize && slWindSize > windSize)
{
// elimino i 2 valori + vecchi
lTime.RemoveAt(0);
lVal.RemoveAt(0);
// ora ricontrollo...
}
}
#endregion Public Methods
} }
/// <summary> /// <summary>
@@ -625,7 +722,7 @@ namespace IOB_UT_NEXT
/// <summary> /// <summary>
/// Codice univoco chiamata: tipo R4 (read 4 byte), W2 (write 2 Byte) /// Codice univoco chiamata: tipo R4 (read 4 byte), W2 (write 2 Byte)
/// </summary> /// </summary>
public string codCall; public string codCall;
/// <summary> /// <summary>
@@ -715,6 +812,11 @@ namespace IOB_UT_NEXT
/// </summary> /// </summary>
public int Period { get; set; } = 60; public int Period { get; set; } = 60;
/// <summary>
/// UM parametro, impiegato anche x conversione (es epoch --> datetime)
/// </summary>
public string UM { get; set; } = "";
#endregion Public Properties #endregion Public Properties
} }
} }
+196 -113
View File
@@ -2,68 +2,12 @@
using StackExchange.Redis; using StackExchange.Redis;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text; using System.Text;
namespace IOB_UT_NEXT namespace IOB_UT_NEXT
{ {
public class RedisIobCache public class RedisIobCache
{ {
#region Private Fields
/// <summary>
/// Connessione lazy a redis...
/// </summary>
private Lazy<ConnectionMultiplexer> lazyConnection = new Lazy<ConnectionMultiplexer>(() =>
{
string RedisConn = baseUtils.CRS("RedisConn");
if (string.IsNullOrEmpty(RedisConn))
{
RedisConn = "localhost,abortConnect=false,ssl=false";
}
return ConnectionMultiplexer.Connect(RedisConn);
});
/// <summary>
/// Connessione lazy a redis...
/// </summary>
private Lazy<ConnectionMultiplexer> lazyConnectionAdmin = new Lazy<ConnectionMultiplexer>(() =>
{
string RedisConnAdmin = baseUtils.CRS("RedisConnAdmin");
if (string.IsNullOrEmpty(RedisConnAdmin))
{
RedisConnAdmin = "localhost,abortConnect=false,ssl=false,allowAdmin=true";
}
return ConnectionMultiplexer.Connect(RedisConnAdmin);
});
#endregion Private Fields
#region Protected Fields
/// <summary>
/// Cod IOB
/// </summary>
protected string currCodIob = "000";
/// <summary>
/// Tipo IOB
/// </summary>
protected string currIobType = "ND";
/// <summary>
/// Hash redis x dati IOB
/// </summary>
protected string redIobKey = "";
/// <summary>
/// Hash redis x dati server
/// </summary>
protected string redServKey = "";
#endregion Protected Fields
#region Public Constructors #region Public Constructors
/// <summary> /// <summary>
@@ -79,9 +23,11 @@ namespace IOB_UT_NEXT
/// <summary> /// <summary>
/// init classe gestione dati IOB su Redis /// init classe gestione dati IOB su Redis
/// </summary> /// </summary>
/// <param name="codServer"></param> /// <param name="codServer">IP/nome server</param>
/// <param name="codIob"></param> /// <param name="codIob">Cod IOB</param>
public RedisIobCache(string codServer, string codIob, string tipoIob) /// <param name="tipoIob">Tipo di IOB</param>
/// <param name="minDeltaS">Minima differenza in secondi x considerare variazione dati DataOra</param>
public RedisIobCache(string codServer, string codIob, string tipoIob, int minDeltaS)
{ {
// init dati di base... // init dati di base...
currCodIob = codIob; currCodIob = codIob;
@@ -97,8 +43,9 @@ namespace IOB_UT_NEXT
IobWinStatus newIobStatus = new IobWinStatus() IobWinStatus newIobStatus = new IobWinStatus()
{ {
CodIob = currCodIob, CodIob = currCodIob,
IobType= currIobType, IobType = currIobType,
online = false online = false,
minDeltaSec = minDeltaS
}; };
// salvo in area REDIS // salvo in area REDIS
servStatus = newSrvStatus; servStatus = newSrvStatus;
@@ -137,15 +84,6 @@ namespace IOB_UT_NEXT
#endregion Public Enums #endregion Public Enums
#region Private Properties
/// <summary>
/// Oggetto currentDb locale
/// </summary>
private IDatabase _currDB { get; set; }
#endregion Private Properties
#region Public Properties #region Public Properties
/// <summary> /// <summary>
@@ -216,7 +154,7 @@ namespace IOB_UT_NEXT
answ = new IobWinStatus() answ = new IobWinStatus()
{ {
CodIob = currCodIob, CodIob = currCodIob,
IobType=currIobType, IobType = currIobType,
online = false online = false
}; };
// salvo serializzando... // salvo serializzando...
@@ -233,7 +171,31 @@ namespace IOB_UT_NEXT
set set
{ {
string rawData = JsonConvert.SerializeObject(value); string rawData = JsonConvert.SerializeObject(value);
setRSV(redIobKey, rawData); saveAndSendMessage(redIobKey, redIobChannel, rawData);
}
}
/// <summary>
/// MEssage Dispatcher: oggetto comunicazione pub/sub via REDIS channels corrente
/// </summary>
public ISubscriber messageDisp
{
get
{
ISubscriber answ;
// se già valorizzato uso oggetto private...
if (_currSub != null)
{
answ = _currSub;
}
else
{
// init DB (sullo 0)
answ = connRedis.GetSubscriber();
_currSub = answ;
}
// restituisco oggetto DB
return answ;
} }
} }
@@ -298,39 +260,6 @@ namespace IOB_UT_NEXT
#endregion Public Properties #endregion Public Properties
#region Private Methods
/// <summary>
/// Effettua comaprazione x CHIAVE in KVP ASC
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
private int CompareKey(KeyValuePair<string, int> x, KeyValuePair<string, int> y)
{
return x.Key.CompareTo(y.Key);
}
/// <summary>
/// Effettua comaprazione x CHIAVE in KVP DESC
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
private int CompareKeyDesc(KeyValuePair<string, int> x, KeyValuePair<string, int> y)
{
return y.Key.CompareTo(x.Key);
}
private void initHashKeys()
{
// init dati di base...
redServKey = redHash($"MP");
redIobKey = redHash($"IOB:{currCodIob}");
}
#endregion Private Methods
#region Public Methods #region Public Methods
/// <summary> /// <summary>
@@ -477,8 +406,7 @@ namespace IOB_UT_NEXT
public int redCountKey(string keyPattern) public int redCountKey(string keyPattern)
{ {
int answ = 0; int answ = 0;
// cerco se ci sia valore in redis... // cerco se ci sia valore in redis... se vuoto = ALL...
// se vuoto = ALL...
keyPattern = string.IsNullOrEmpty(keyPattern) ? "**" : keyPattern; keyPattern = string.IsNullOrEmpty(keyPattern) ? "**" : keyPattern;
try try
{ {
@@ -528,8 +456,7 @@ namespace IOB_UT_NEXT
public bool redFlushKey(string keyPattern) public bool redFlushKey(string keyPattern)
{ {
bool answ = false; bool answ = false;
// cerco se ci sia valore in redis... // cerco se ci sia valore in redis... se vuoto = ALL...
// se vuoto = ALL...
keyPattern = string.IsNullOrEmpty(keyPattern) ? "**" : keyPattern; keyPattern = string.IsNullOrEmpty(keyPattern) ? "**" : keyPattern;
try try
{ {
@@ -702,7 +629,8 @@ namespace IOB_UT_NEXT
} }
/// <summary> /// <summary>
/// Nome della variabile HASH da utilizzare (dato CodModulo / Server / DB impiegato da funzionalita' DbConfig) + keyName richiesto... /// Nome della variabile HASH da utilizzare (dato CodModulo / Server / DB impiegato da
/// funzionalita' DbConfig) + keyName richiesto...
/// </summary> /// </summary>
public string redHash(string keyName) public string redHash(string keyName)
{ {
@@ -834,7 +762,9 @@ namespace IOB_UT_NEXT
/// </summary> /// </summary>
/// <param name="hashKey">chiave</param> /// <param name="hashKey">chiave</param>
/// <param name="hashFields">valori</param> /// <param name="hashFields">valori</param>
/// <param name="expireSeconds">scadenza preimpostata hash (secondi) | defaoult = -1 (non scade)</param> /// <param name="expireSeconds">
/// scadenza preimpostata hash (secondi) | defaoult = -1 (non scade)
/// </param>
/// <returns></returns> /// <returns></returns>
public bool redSaveHash(string hashKey, KeyValuePair<string, string>[] hashFields, double expireSeconds = -1) public bool redSaveHash(string hashKey, KeyValuePair<string, string>[] hashFields, double expireSeconds = -1)
{ {
@@ -891,7 +821,9 @@ namespace IOB_UT_NEXT
/// </summary> /// </summary>
/// <param name="hashKey">chiave</param> /// <param name="hashKey">chiave</param>
/// <param name="hashFields">valori</param> /// <param name="hashFields">valori</param>
/// <param name="expireSeconds">scadenza preimpostata hash (secondi) | defaoult = -1 (non scade)</param> /// <param name="expireSeconds">
/// scadenza preimpostata hash (secondi) | defaoult = -1 (non scade)
/// </param>
/// <returns></returns> /// <returns></returns>
public bool redSaveHashDict(string hashKey, Dictionary<string, string> hashFields, double expireSeconds = -1) public bool redSaveHashDict(string hashKey, Dictionary<string, string> hashFields, double expireSeconds = -1)
{ {
@@ -992,6 +924,43 @@ namespace IOB_UT_NEXT
return answ; return answ;
} }
/// <summary>
/// Invia un messaggio tramite notify channel + salva in cache (se scaduto periodo veto)
/// </summary>
/// <param name="memKey"></param>
/// <param name="notifyChannel"></param>
/// <param name="message"></param>
/// <returns></returns>
public bool saveAndSendMessage(string memKey, string notifyChannel, string message)
{
bool fatto = false;
// effettuo la scrittura nell'area di memoria indicata SE passato intervallo minimo
bool doSave = true;
if (LastKeySave.ContainsKey(memKey))
{
if (DateTime.Now.Subtract(LastKeySave[memKey]).TotalSeconds < 1)
{
doSave = false;
}
}
else
{
LastKeySave.Add(memKey, DateTime.Now);
}
if (doSave)
{
cache.StringSet(memKey, message);
LastKeySave[memKey] = DateTime.Now;
Logging.Instance.Trace($"Redis Cache Key: {memKey}");
}
// invio notifica tramite il canale richiesto
messageDisp.Publish(notifyChannel, message);
fatto = true;
// restituisco!
return fatto;
}
/// <summary> /// <summary>
/// Serializzazione di un oggetto generico /// Serializzazione di un oggetto generico
/// </summary> /// </summary>
@@ -1058,7 +1027,7 @@ namespace IOB_UT_NEXT
} }
/// <summary> /// <summary>
/// Salva un set KVP (Key Value Pair) in RedisCache /// Salva un set KVP (Key Value Pair) in RedisCache
/// </summary> /// </summary>
/// <param name="valori">Set KVP chiave-valore da salvare</param> /// <param name="valori">Set KVP chiave-valore da salvare</param>
/// <returns></returns> /// <returns></returns>
@@ -1123,5 +1092,119 @@ namespace IOB_UT_NEXT
} }
#endregion Public Methods #endregion Public Methods
#region Protected Fields
/// <summary>
/// Cod IOB
/// </summary>
protected string currCodIob = "000";
/// <summary>
/// Tipo IOB
/// </summary>
protected string currIobType = "ND";
/// <summary>
/// Hash REDIS x dati IOB
/// </summary>
protected string redIobKey = "";
/// <summary>
/// Nome del channel REDIS x dati IOB
/// </summary>
protected string redIobChannel = "IobChannel";
/// <summary>
/// Hash REDIS x dati server
/// </summary>
protected string redServKey = "";
#endregion Protected Fields
#region Private Fields
/// <summary>
/// Dizionario delle ultime scritture in cache redis dei messaggi
/// </summary>
private Dictionary<string, DateTime> LastKeySave = new Dictionary<string, DateTime>();
/// <summary>
/// Connessione lazy a redis...
/// </summary>
private Lazy<ConnectionMultiplexer> lazyConnection = new Lazy<ConnectionMultiplexer>(() =>
{
string RedisConn = baseUtils.CRS("RedisConn");
if (string.IsNullOrEmpty(RedisConn))
{
RedisConn = "localhost,abortConnect=false,ssl=false";
}
return ConnectionMultiplexer.Connect(RedisConn);
});
/// <summary>
/// Connessione lazy a redis...
/// </summary>
private Lazy<ConnectionMultiplexer> lazyConnectionAdmin = new Lazy<ConnectionMultiplexer>(() =>
{
string RedisConnAdmin = baseUtils.CRS("RedisConnAdmin");
if (string.IsNullOrEmpty(RedisConnAdmin))
{
RedisConnAdmin = "localhost,abortConnect=false,ssl=false,allowAdmin=true";
}
return ConnectionMultiplexer.Connect(RedisConnAdmin);
});
#endregion Private Fields
#region Private Properties
/// <summary>
/// Oggetto currentDb REDIS locale
/// </summary>
private IDatabase _currDB { get; set; }
/// <summary>
/// Oggetto subscriber x pubblicazione/sottoscrizione canali REDIS
/// </summary>
private ISubscriber _currSub { get; set; }
#endregion Private Properties
#region Private Methods
/// <summary>
/// Effettua comaprazione x CHIAVE in KVP ASC
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
private int CompareKey(KeyValuePair<string, int> x, KeyValuePair<string, int> y)
{
return x.Key.CompareTo(y.Key);
}
/// <summary>
/// Effettua comaprazione x CHIAVE in KVP DESC
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
private int CompareKeyDesc(KeyValuePair<string, int> x, KeyValuePair<string, int> y)
{
return y.Key.CompareTo(x.Key);
}
private void initHashKeys()
{
// init dati di base...
redServKey = redHash($"MP");
redIobKey = redHash($"IOB:{currCodIob}");
redIobChannel = $"IobChannel_{currCodIob}";
}
#endregion Private Methods
} }
} }
+44 -47
View File
@@ -1,7 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace IOB_UT_NEXT namespace IOB_UT_NEXT
{ {
@@ -27,50 +24,6 @@ namespace IOB_UT_NEXT
#endregion Public Constructors #endregion Public Constructors
#region Protected Properties
/// <summary>
/// Fattore lambda (innovazione) per calcolo EWMA valore TCiclo corrente
/// </summary>
protected double _lambda { get; set; } = 0.4;
/// <summary>
/// Ultimo TCiclo osservato in SECONDI
/// </summary>
protected double _lastTC { get; set; } = 0;
/// <summary>
/// ULTIMO Contapezzi IOB VALIDO
/// </summary>
protected int _lastValidPzCountIOB { get; set; } = 0;
/// <summary>
/// ULTIMO Contapezzi PLC VALIDO
/// </summary>
protected int _lastValidPzCountPLC { get; set; } = 0;
/// <summary>
/// Fattore massimo ammesso di delay x il TCiclo
/// </summary>
protected double _maxDelayFactor { get; set; } = 1.2;
/// <summary>
/// Incremento amssimo pezzi per cui fare calcolo del tempociclo attuale
/// </summary>
protected double _maxIncrPz { get; set; } = 2;
/// <summary>
/// Contapezzi IOB
/// </summary>
protected int _pzCountIOB { get; set; } = 0;
/// <summary>
/// Contapezzi PLC
/// </summary>
protected int _pzCountPLC { get; set; } = 0;
#endregion Protected Properties
#region Public Properties #region Public Properties
/// <summary> /// <summary>
@@ -171,5 +124,49 @@ namespace IOB_UT_NEXT
} }
#endregion Public Properties #endregion Public Properties
#region Protected Properties
/// <summary>
/// Fattore lambda (innovazione) per calcolo EWMA valore TCiclo corrente
/// </summary>
protected double _lambda { get; set; } = 0.4;
/// <summary>
/// Ultimo TCiclo osservato in SECONDI
/// </summary>
protected double _lastTC { get; set; } = 0;
/// <summary>
/// ULTIMO Contapezzi IOB VALIDO
/// </summary>
protected int _lastValidPzCountIOB { get; set; } = 0;
/// <summary>
/// ULTIMO Contapezzi PLC VALIDO
/// </summary>
protected int _lastValidPzCountPLC { get; set; } = 0;
/// <summary>
/// Fattore massimo ammesso di delay x il TCiclo
/// </summary>
protected double _maxDelayFactor { get; set; } = 1.2;
/// <summary>
/// Incremento amssimo pezzi per cui fare calcolo del tempociclo attuale
/// </summary>
protected double _maxIncrPz { get; set; } = 2;
/// <summary>
/// Contapezzi IOB
/// </summary>
protected int _pzCountIOB { get; set; } = 0;
/// <summary>
/// Contapezzi PLC
/// </summary>
protected int _pzCountPLC { get; set; } = 0;
#endregion Protected Properties
} }
} }
+18
View File
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IOB_UT_NEXT
{
public class TimeUtils
{
public static DateTime epochConvert(double epoch)
{
DateTime date = new DateTime(1970, 1, 1, 0, 0, 0, 0); //from start epoch time
date = date.AddSeconds(epoch);
return date;
}
}
}
+161 -130
View File
@@ -1,11 +1,7 @@
using MapoSDK; using MapoSDK;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Converters; using Newtonsoft.Json.Converters;
using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace IOB_UT_NEXT namespace IOB_UT_NEXT
{ {
@@ -14,7 +10,23 @@ namespace IOB_UT_NEXT
/// </summary> /// </summary>
public class BaseAlarmConf public class BaseAlarmConf
{ {
#region Public Fields #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> /// <summary>
/// valore di partenza x un segnale di blink in caso di fine variazione (fronte discesa) /// valore di partenza x un segnale di blink in caso di fine variazione (fronte discesa)
@@ -26,25 +38,6 @@ namespace IOB_UT_NEXT
/// </summary> /// </summary>
public int blinkUpVal { get; set; } = 3; public int blinkUpVal { get; set; } = 3;
#endregion Public Fields
#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> /// <summary>
/// Descrizione area allarmi /// Descrizione area allarmi
/// </summary> /// </summary>
@@ -177,7 +170,8 @@ namespace IOB_UT_NEXT
alarmsState = new uint[size / 2]; alarmsState = new uint[size / 2];
alarmsMask = new uint[size / 2]; alarmsMask = new uint[size / 2];
// una volta inizializzata la classe di base sistemo vettori allarmi disabilitati ed il contatore blink dei fronti di discesa // una volta inizializzata la classe di base sistemo vettori allarmi disabilitati ed il
// contatore blink dei fronti di discesa
alarmsBlinkCounter = new int[messages.Count]; alarmsBlinkCounter = new int[messages.Count];
int idx = 0; int idx = 0;
int bank = 0; int bank = 0;
@@ -217,7 +211,8 @@ namespace IOB_UT_NEXT
} }
/// <summary> /// <summary>
/// Classe gestione configurazione parametri di base x configuraizone estesa (es MTConnect, OPC-UA, ...) /// Classe gestione configurazione parametri di base x configuraizone estesa (es MTConnect,
/// OPC-UA, ...)
/// </summary> /// </summary>
public class BaseParamConf public class BaseParamConf
{ {
@@ -229,14 +224,13 @@ namespace IOB_UT_NEXT
public List<diCheckCondition> condWork { get; set; } = new List<diCheckCondition>(); public List<diCheckCondition> condWork { get; set; } = new List<diCheckCondition>();
/// <summary> /// <summary>
/// Indica se l'emergenza armata va riportata verso Mapo come bit a TRUE /// Indica se l'emergenza armata va riportata verso Mapo come bit a TRUE True --&gt; armata
/// True --> armata = 1 / triggered = 0 /// = 1 / triggered = 0 False --&gt; triggered = 1 / armata = 0
/// False --> triggered = 1 / armata = 0
/// </summary> /// </summary>
public bool emergencyArmedTrue { get; set; } = true; public bool emergencyArmedTrue { get; set; } = true;
/// <summary> /// <summary>
/// Elenco items FILTRATI da invio come dynData --> FluxLog (events o samples) /// Elenco items FILTRATI da invio come dynData --&gt; FluxLog (events o samples)
/// </summary> /// </summary>
public List<string> fluxLogVeto { get; set; } = new List<string>(); public List<string> fluxLogVeto { get; set; } = new List<string>();
@@ -309,7 +303,8 @@ namespace IOB_UT_NEXT
} }
/// <summary> /// <summary>
/// Classe per rappresentare una lista di oggetti chiave/valore target x controlo condizioni multiple + indicazione modalità di controllo (AND/OR/...) /// Classe per rappresentare una lista di oggetti chiave/valore target x controlo condizioni
/// multiple + indicazione modalità di controllo (AND/OR/...)
/// </summary> /// </summary>
public class diCheckCondSetup public class diCheckCondSetup
{ {
@@ -326,13 +321,75 @@ namespace IOB_UT_NEXT
public boolCheckMode checkMode { get; set; } = boolCheckMode.AND; public boolCheckMode checkMode { get; set; } = boolCheckMode.AND;
/// <summary> /// <summary>
/// indica se il check vada NEGATO (esempio se cerco la condizione opposta, esempio num allarmi 0 --> se true NEGO la condizione HO ALLARMI) /// indica se il check vada NEGATO (esempio se cerco la condizione opposta, esempio num
/// allarmi 0 --&gt; se true NEGO la condizione HO ALLARMI)
/// </summary> /// </summary>
public bool negateValue { get; set; } = false; public bool negateValue { get; set; } = false;
#endregion Public Properties #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 string (key) --> memoria da scrivere tuple<int isEqual,int
/// notEqual> --> valori da scrivere quando uguali o diversi </summary>
public List<MachineSetupAction> writeParAction { get; set; } = new List<MachineSetupAction>();
#endregion Public Properties
}
/// <summary> /// <summary>
/// COnfigurazione blocchi x accesso memoria ottimizzato /// COnfigurazione blocchi x accesso memoria ottimizzato
/// </summary> /// </summary>
@@ -360,84 +417,6 @@ namespace IOB_UT_NEXT
#endregion Public Properties #endregion Public Properties
} }
/// <summary>
/// Definizione parametri watchdog
/// </summary>
public class WatchDogConf
{
/// <summary>
/// Abilitazione WatchDog
/// </summary>
public bool IsEnabled { get; set; } = false;
/// <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; } = "";
/// <summary>
/// Valore max contatore prima di resettare
/// </summary>
public int MaxVal { get; set; } = 9999;
}
/// <summary>
/// Definizione parametri di setup incrociato...
/// </summary>
public class MachineSetupConf
{
/// <summary>
/// Modalità gestione setup
/// </summary>
public MachineSetupMode SetupMode { get; set; } = MachineSetupMode.ND;
/// <summary>
/// Abilitazione gestione Setup Avanzato (= scrittura)
/// </summary>
public bool EnableAdvSetup { get; set; } = false;
/// <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>
/// Dizionario dei parametri da scrivere quando si rilevano differenze tra i parametri MES/Macchina
/// string (key) --> memoria da scrivere
/// tuple<int isEqual,int notEqual> --> valori da scrivere quando uguali o diversi
/// </summary>
public List<MachineSetupAction> writeParAction { get; set; } = new List<MachineSetupAction>();
}
/// <summary>
/// Classe x definizione delle azioni in fase di setup macchina
/// </summary>
public class MachineSetupAction
{
/// <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;
/// <summary>
/// Indica se vada disabilitato il contapezzi quando la condizione NotEqual sia soddisfatta
/// </summary>
public bool DisablePzCountNotEqual { get; set; } = false;
}
/// <summary> /// <summary>
/// Classe gestione configurazione parametri specifici OPC-UA da BaseParamConf /// Classe gestione configurazione parametri specifici OPC-UA da BaseParamConf
/// </summary> /// </summary>
@@ -445,6 +424,24 @@ namespace IOB_UT_NEXT
{ {
#region Public Properties #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> /// <summary>
/// Identificativo nodo iniziale /// Identificativo nodo iniziale
/// </summary> /// </summary>
@@ -470,12 +467,6 @@ namespace IOB_UT_NEXT
/// </summary> /// </summary>
public diCheckCondSetup condError { get; set; } = new diCheckCondSetup(); public diCheckCondSetup condError { get; set; } = new diCheckCondSetup();
/// <summary>
/// Struttura dati x check condizione Errore
/// </summary>
public diCheckCondSetup condWorkOpc { get; set; } = new diCheckCondSetup();
/// <summary> /// <summary>
/// Struttura dati x check condizione Emergenza /// Struttura dati x check condizione Emergenza
/// </summary> /// </summary>
@@ -496,6 +487,11 @@ namespace IOB_UT_NEXT
/// </summary> /// </summary>
public diCheckCondSetup condReady { get; set; } = new diCheckCondSetup(); public diCheckCondSetup condReady { get; set; } = new diCheckCondSetup();
/// <summary>
/// Struttura dati x check condizione Setup
/// </summary>
public diCheckCondSetup condSetup { get; set; } = new diCheckCondSetup();
/// <summary> /// <summary>
/// Struttura dati x check condizione WarmUp - CoolDown /// Struttura dati x check condizione WarmUp - CoolDown
/// </summary> /// </summary>
@@ -505,16 +501,19 @@ namespace IOB_UT_NEXT
/// Struttura dati x check condizione Warning /// Struttura dati x check condizione Warning
/// </summary> /// </summary>
public diCheckCondSetup condWarning { get; set; } = new diCheckCondSetup(); public diCheckCondSetup condWarning { get; set; } = new diCheckCondSetup();
/// <summary> /// <summary>
/// Struttura dati x check condizione Setup /// Struttura dati x check condizione Errore
/// </summary> /// </summary>
public diCheckCondSetup condSetup { get; set; } = new diCheckCondSetup(); public diCheckCondSetup condWorkOpc { get; set; } = new diCheckCondSetup();
/// <summary> /// <summary>
/// Elenco dei NodeId da ignorare intesi come interi rami (se vuoto NON filtro) /// Elenco dei NodeId da ignorare intesi come interi rami (se vuoto NON filtro)
/// </summary> /// </summary>
public List<string> filterItemsNodeId { get; set; } = new List<string>(); public List<string> filterItemsNodeId { get; set; } = new List<string>();
public UserIdent Identity { get; set; } = new UserIdent();
/// <summary> /// <summary>
/// Aree di memoria lettura /// Aree di memoria lettura
/// </summary> /// </summary>
@@ -525,34 +524,66 @@ namespace IOB_UT_NEXT
/// </summary> /// </summary>
public Dictionary<string, dataConf> mMapWrite { get; set; } = new Dictionary<string, dataConf>(); public Dictionary<string, dataConf> mMapWrite { get; set; } = new Dictionary<string, dataConf>();
/// <summary>
/// Elenco dei SOLI item sottoscritti (se vuoto TUTTI)
/// </summary>
public List<string> subscribedItems { get; set; } = new List<string>();
/// <summary> /// <summary>
/// Elenco item RAW sottoscritti e relative configurazioni di decodifica da byte[] /// Elenco item RAW sottoscritti e relative configurazioni di decodifica da byte[]
/// </summary> /// </summary>
public Dictionary<string, string> rawSubscribedItemsConf { get; set; } = new Dictionary<string, string>(); public Dictionary<string, string> rawSubscribedItemsConf { get; set; } = new Dictionary<string, string>();
/// <summary>
/// Conf Gestione WatchDog
/// </summary>
public WatchDogConf WatchDog { get; set; } = new WatchDogConf();
/// <summary> /// <summary>
/// Conf gestione setup macchina /// Conf gestione setup macchina
/// </summary> /// </summary>
public MachineSetupConf SetupConf { get; set; } = new MachineSetupConf(); public MachineSetupConf SetupConf { get; set; } = new MachineSetupConf();
public UserIdent Identity { get; set; } = new UserIdent(); /// <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();
#endregion Public Properties #endregion Public Properties
} }
public class UserIdent public class UserIdent
{ {
public string UserName { get; set; } = ""; #region Public Properties
public string Passwd { get; set; } = ""; 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
} }
} }
+18 -18
View File
@@ -1,39 +1,39 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<runtime> <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/> <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0"/> <bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/> <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0"/> <bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0"/> <bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/> <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.0.0" newVersion="6.0.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/> <assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" 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.0.0" newVersion="6.0.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral"/> <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0"/> <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Threading.Channels" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/> <assemblyIdentity name="System.Threading.Channels" publicKeyToken="cc7b13ffcd2ddd51" 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.0.0" newVersion="6.0.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/> <assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" 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.0.0" newVersion="6.0.0.0" />
</dependentAssembly> </dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /></startup></configuration>
+34 -39
View File
@@ -1,4 +1,3 @@
using MapoSDK;
using NLog; using NLog;
using System; using System;
using System.Collections; using System.Collections;
@@ -42,41 +41,14 @@ namespace IOB_UT_NEXT
/// </summary> /// </summary>
public static bool MPIO_Online = false; public static bool MPIO_Online = false;
#if false
/// <summary> /// <summary>
/// Oggetto connessione REDIS /// Oggetto connessione REDIS
/// </summary> /// </summary>
public static RedisIobCache redisMan = new RedisIobCache(); public static RedisIobCache redisMan = new RedisIobCache();
#endregion Public Fields
#if false
{
get
{
return redisMan.servStatus.dtVetoPing;
}
set
{
var currData = redisMan.servStatus;
currData.dtVetoPing = value;
redisMan.servStatus = currData;
}
}
#endif #endif
#region Protected Properties #endregion Public Fields
/// <summary>
/// Oggetto WebClient BASE da riutilizzare
/// </summary>
protected static WebClientWT client { get; set; }
/// <summary>
/// Oggetto WebClient con PAYLOAD da riutilizzare
/// </summary>
protected static WebClientWT clientPayload { get; set; }
#endregion Protected Properties
#region Public Properties #region Public Properties
@@ -89,10 +61,10 @@ namespace IOB_UT_NEXT
{ {
// parto dal dato std di veto per pauseSendMSec // parto dal dato std di veto per pauseSendMSec
int answ = CRI("pauseSendMSec"); int answ = CRI("pauseSendMSec");
// aggiungo NOISE... +/- 33% // aggiungo NOISE... +/- 50%
Random rnd = new Random(); Random rnd = new Random();
int noise = rnd.Next(1, answ / 3); int noise = rnd.Next(1, answ / 2);
answ += noise - (answ / 6); answ += noise - (answ / 4);
return answ; return answ;
} }
} }
@@ -117,6 +89,7 @@ namespace IOB_UT_NEXT
{ } { }
return answ; return answ;
} }
/// <summary> /// <summary>
/// formatta un numero in forma binaria 0/1 /// formatta un numero in forma binaria 0/1
/// </summary> /// </summary>
@@ -409,7 +382,9 @@ namespace IOB_UT_NEXT
/// number will be formatted as a 32-character binary number in two's compliment. /// number will be formatted as a 32-character binary number in two's compliment.
/// </summary> /// </summary>
/// <param name="theNumber">self-explanatory</param> /// <param name="theNumber">self-explanatory</param>
/// <param name="minimumDigits">if binary number contains fewer characters leading zeros are added</param> /// <param name="minimumDigits">
/// if binary number contains fewer characters leading zeros are added
/// </param>
/// <returns>string as described above</returns> /// <returns>string as described above</returns>
public static string IntToBinStr(int theNumber, int minimumDigits) public static string IntToBinStr(int theNumber, int minimumDigits)
{ {
@@ -420,7 +395,9 @@ namespace IOB_UT_NEXT
/// verifica se un dato bit sia alzato (come flag di strobe) /// verifica se un dato bit sia alzato (come flag di strobe)
/// </summary> /// </summary>
/// <param name="value">valore da testare</param> /// <param name="value">valore da testare</param>
/// <param name="flag">valore cercato, può essere un singolo valore o un insieme in modalità AND</param> /// <param name="flag">
/// valore cercato, può essere un singolo valore o un insieme in modalità AND
/// </param>
/// <returns></returns> /// <returns></returns>
public static bool IsSetAll(StFlag32 value, StFlag32 flag) public static bool IsSetAll(StFlag32 value, StFlag32 flag)
{ {
@@ -431,7 +408,9 @@ namespace IOB_UT_NEXT
/// verifica se un dato bit sia alzato (come flag di strobe) /// verifica se un dato bit sia alzato (come flag di strobe)
/// </summary> /// </summary>
/// <param name="value">valore da testare</param> /// <param name="value">valore da testare</param>
/// <param name="flag">valore cercato, può essere un singolo valore o un insieme in modalità OR</param> /// <param name="flag">
/// valore cercato, può essere un singolo valore o un insieme in modalità OR
/// </param>
/// <returns></returns> /// <returns></returns>
public static bool IsSetAny(StFlag32 value, StFlag32 flag) public static bool IsSetAny(StFlag32 value, StFlag32 flag)
{ {
@@ -586,7 +565,8 @@ namespace IOB_UT_NEXT
} }
/// <summary> /// <summary>
/// provvede a verificare la dim della cartella dei log e cancella i + vecchi fino a restare a dim inferiori a _logMaxMb /// provvede a verificare la dim della cartella dei log e cancella i + vecchi fino a restare
/// a dim inferiori a _logMaxMb
/// </summary> /// </summary>
public static void shrinkDir(string dirPath) public static void shrinkDir(string dirPath)
{ {
@@ -616,7 +596,8 @@ namespace IOB_UT_NEXT
// inizio con eliminare file + vecchi della data indicata... // inizio con eliminare file + vecchi della data indicata...
int maxLogDays = CRI("maxLogDays"); int maxLogDays = CRI("maxLogDays");
fileMover.obj.deleteOlderThan(maxLogDays); fileMover.obj.deleteOlderThan(maxLogDays);
// ora controllo SE sia superata la dim max della directory --> in tal caso cancello dal + vecchio... // ora controllo SE sia superata la dim max della directory --> in tal caso cancello dal
// + vecchio...
dirSizeMb = fileMover.obj.totalMb(); dirSizeMb = fileMover.obj.totalMb();
int maxLogDirSize = CRI("maxLogDirSize"); int maxLogDirSize = CRI("maxLogDirSize");
int maxTry = 100; int maxTry = 100;
@@ -723,6 +704,20 @@ namespace IOB_UT_NEXT
} }
#endregion Public Methods #endregion Public Methods
#region Protected Properties
/// <summary>
/// Oggetto WebClient BASE da riutilizzare
/// </summary>
protected static WebClientWT client { get; set; }
/// <summary>
/// Oggetto WebClient con PAYLOAD da riutilizzare
/// </summary>
protected static WebClientWT clientPayload { get; set; }
#endregion Protected Properties
} }
/// <summary> /// <summary>
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="MapoSDK" version="6.14.2204.2115" targetFramework="net462" /> <package id="MapoSDK" version="6.14.2207.2913" targetFramework="net462" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="6.0.0" targetFramework="net462" /> <package id="Microsoft.Bcl.AsyncInterfaces" version="6.0.0" targetFramework="net462" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net462" /> <package id="Newtonsoft.Json" version="13.0.1" targetFramework="net462" />
<package id="NLog" version="4.7.13" targetFramework="net462" /> <package id="NLog" version="4.7.13" targetFramework="net462" />
-6
View File
@@ -1,6 +0,0 @@
namespace IOB_UT_NEXT
{
internal class val
{
}
}
+14 -14
View File
@@ -18,10 +18,10 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86 Debug|x86 = Debug|x86
FANUC|Any CPU = FANUC|Any CPU
FANUC|x86 = FANUC|x86
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86 Release|x86 = Release|x86
Remote_DEBUG|Any CPU = Remote_DEBUG|Any CPU
Remote_DEBUG|x86 = Remote_DEBUG|x86
SIEMENS|Any CPU = SIEMENS|Any CPU SIEMENS|Any CPU = SIEMENS|Any CPU
SIEMENS|x86 = SIEMENS|x86 SIEMENS|x86 = SIEMENS|x86
EndGlobalSection EndGlobalSection
@@ -30,14 +30,14 @@ Global
{58E399F3-9D4E-49D3-AB35-9ED536543D50}.Debug|Any CPU.Build.0 = Debug|Any CPU {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58E399F3-9D4E-49D3-AB35-9ED536543D50}.Debug|x86.ActiveCfg = Debug|Any CPU {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Debug|x86.ActiveCfg = Debug|Any CPU
{58E399F3-9D4E-49D3-AB35-9ED536543D50}.Debug|x86.Build.0 = Debug|Any CPU {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Debug|x86.Build.0 = Debug|Any CPU
{58E399F3-9D4E-49D3-AB35-9ED536543D50}.FANUC|Any CPU.ActiveCfg = Release|Any CPU
{58E399F3-9D4E-49D3-AB35-9ED536543D50}.FANUC|Any CPU.Build.0 = Release|Any CPU
{58E399F3-9D4E-49D3-AB35-9ED536543D50}.FANUC|x86.ActiveCfg = Debug|Any CPU
{58E399F3-9D4E-49D3-AB35-9ED536543D50}.FANUC|x86.Build.0 = Debug|Any CPU
{58E399F3-9D4E-49D3-AB35-9ED536543D50}.Release|Any CPU.ActiveCfg = Release|Any CPU {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Release|Any CPU.ActiveCfg = Release|Any CPU
{58E399F3-9D4E-49D3-AB35-9ED536543D50}.Release|Any CPU.Build.0 = Release|Any CPU {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Release|Any CPU.Build.0 = Release|Any CPU
{58E399F3-9D4E-49D3-AB35-9ED536543D50}.Release|x86.ActiveCfg = Release|x86 {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Release|x86.ActiveCfg = Release|x86
{58E399F3-9D4E-49D3-AB35-9ED536543D50}.Release|x86.Build.0 = Release|x86 {58E399F3-9D4E-49D3-AB35-9ED536543D50}.Release|x86.Build.0 = Release|x86
{58E399F3-9D4E-49D3-AB35-9ED536543D50}.Remote_DEBUG|Any CPU.ActiveCfg = Debug|Any CPU
{58E399F3-9D4E-49D3-AB35-9ED536543D50}.Remote_DEBUG|Any CPU.Build.0 = Debug|Any CPU
{58E399F3-9D4E-49D3-AB35-9ED536543D50}.Remote_DEBUG|x86.ActiveCfg = Remote_DEBUG|x86
{58E399F3-9D4E-49D3-AB35-9ED536543D50}.Remote_DEBUG|x86.Build.0 = Remote_DEBUG|x86
{58E399F3-9D4E-49D3-AB35-9ED536543D50}.SIEMENS|Any CPU.ActiveCfg = Release|Any CPU {58E399F3-9D4E-49D3-AB35-9ED536543D50}.SIEMENS|Any CPU.ActiveCfg = Release|Any CPU
{58E399F3-9D4E-49D3-AB35-9ED536543D50}.SIEMENS|Any CPU.Build.0 = Release|Any CPU {58E399F3-9D4E-49D3-AB35-9ED536543D50}.SIEMENS|Any CPU.Build.0 = Release|Any CPU
{58E399F3-9D4E-49D3-AB35-9ED536543D50}.SIEMENS|x86.ActiveCfg = Debug|Any CPU {58E399F3-9D4E-49D3-AB35-9ED536543D50}.SIEMENS|x86.ActiveCfg = Debug|Any CPU
@@ -46,14 +46,14 @@ Global
{90512E12-29FC-460D-94CC-648C2A072DBD}.Debug|Any CPU.Build.0 = Debug|Any CPU {90512E12-29FC-460D-94CC-648C2A072DBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{90512E12-29FC-460D-94CC-648C2A072DBD}.Debug|x86.ActiveCfg = Debug|x86 {90512E12-29FC-460D-94CC-648C2A072DBD}.Debug|x86.ActiveCfg = Debug|x86
{90512E12-29FC-460D-94CC-648C2A072DBD}.Debug|x86.Build.0 = Debug|x86 {90512E12-29FC-460D-94CC-648C2A072DBD}.Debug|x86.Build.0 = Debug|x86
{90512E12-29FC-460D-94CC-648C2A072DBD}.FANUC|Any CPU.ActiveCfg = Release|Any CPU
{90512E12-29FC-460D-94CC-648C2A072DBD}.FANUC|Any CPU.Build.0 = Release|Any CPU
{90512E12-29FC-460D-94CC-648C2A072DBD}.FANUC|x86.ActiveCfg = Debug|x86
{90512E12-29FC-460D-94CC-648C2A072DBD}.FANUC|x86.Build.0 = Debug|x86
{90512E12-29FC-460D-94CC-648C2A072DBD}.Release|Any CPU.ActiveCfg = Release|Any CPU {90512E12-29FC-460D-94CC-648C2A072DBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{90512E12-29FC-460D-94CC-648C2A072DBD}.Release|Any CPU.Build.0 = Release|Any CPU {90512E12-29FC-460D-94CC-648C2A072DBD}.Release|Any CPU.Build.0 = Release|Any CPU
{90512E12-29FC-460D-94CC-648C2A072DBD}.Release|x86.ActiveCfg = Release|x86 {90512E12-29FC-460D-94CC-648C2A072DBD}.Release|x86.ActiveCfg = Release|x86
{90512E12-29FC-460D-94CC-648C2A072DBD}.Release|x86.Build.0 = Release|x86 {90512E12-29FC-460D-94CC-648C2A072DBD}.Release|x86.Build.0 = Release|x86
{90512E12-29FC-460D-94CC-648C2A072DBD}.Remote_DEBUG|Any CPU.ActiveCfg = Debug|Any CPU
{90512E12-29FC-460D-94CC-648C2A072DBD}.Remote_DEBUG|Any CPU.Build.0 = Debug|Any CPU
{90512E12-29FC-460D-94CC-648C2A072DBD}.Remote_DEBUG|x86.ActiveCfg = Remote_DEBUG|x86
{90512E12-29FC-460D-94CC-648C2A072DBD}.Remote_DEBUG|x86.Build.0 = Remote_DEBUG|x86
{90512E12-29FC-460D-94CC-648C2A072DBD}.SIEMENS|Any CPU.ActiveCfg = Release|Any CPU {90512E12-29FC-460D-94CC-648C2A072DBD}.SIEMENS|Any CPU.ActiveCfg = Release|Any CPU
{90512E12-29FC-460D-94CC-648C2A072DBD}.SIEMENS|Any CPU.Build.0 = Release|Any CPU {90512E12-29FC-460D-94CC-648C2A072DBD}.SIEMENS|Any CPU.Build.0 = Release|Any CPU
{90512E12-29FC-460D-94CC-648C2A072DBD}.SIEMENS|x86.ActiveCfg = Debug|x86 {90512E12-29FC-460D-94CC-648C2A072DBD}.SIEMENS|x86.ActiveCfg = Debug|x86
@@ -62,14 +62,14 @@ Global
{B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.Debug|Any CPU.Build.0 = Debug|Any CPU {B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.Debug|x86.ActiveCfg = Debug|x86 {B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.Debug|x86.ActiveCfg = Debug|x86
{B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.Debug|x86.Build.0 = Debug|x86 {B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.Debug|x86.Build.0 = Debug|x86
{B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.FANUC|Any CPU.ActiveCfg = Release|Any CPU
{B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.FANUC|Any CPU.Build.0 = Release|Any CPU
{B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.FANUC|x86.ActiveCfg = Debug|x86
{B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.FANUC|x86.Build.0 = Debug|x86
{B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.Release|Any CPU.ActiveCfg = Release|Any CPU {B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.Release|Any CPU.Build.0 = Release|Any CPU {B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.Release|Any CPU.Build.0 = Release|Any CPU
{B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.Release|x86.ActiveCfg = Release|x86 {B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.Release|x86.ActiveCfg = Release|x86
{B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.Release|x86.Build.0 = Release|x86 {B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.Release|x86.Build.0 = Release|x86
{B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.Remote_DEBUG|Any CPU.ActiveCfg = Remote_DEBUG|Any CPU
{B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.Remote_DEBUG|Any CPU.Build.0 = Remote_DEBUG|Any CPU
{B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.Remote_DEBUG|x86.ActiveCfg = Remote_DEBUG|x86
{B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.Remote_DEBUG|x86.Build.0 = Remote_DEBUG|x86
{B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.SIEMENS|Any CPU.ActiveCfg = Release|Any CPU {B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.SIEMENS|Any CPU.ActiveCfg = Release|Any CPU
{B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.SIEMENS|Any CPU.Build.0 = Release|Any CPU {B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.SIEMENS|Any CPU.Build.0 = Release|Any CPU
{B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.SIEMENS|x86.ActiveCfg = Debug|x86 {B2ABB009-C046-4F9C-956C-52DCAA9FE5A9}.SIEMENS|x86.ActiveCfg = Debug|x86
+43 -18
View File
@@ -51,6 +51,8 @@
this.tabMes = new System.Windows.Forms.TabPage(); this.tabMes = new System.Windows.Forms.TabPage();
this.btnForceAutoOdl = new System.Windows.Forms.Button(); this.btnForceAutoOdl = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.label24 = new System.Windows.Forms.Label();
this.lblQueueULog = new System.Windows.Forms.Label();
this.label19 = new System.Windows.Forms.Label(); this.label19 = new System.Windows.Forms.Label();
this.lblQueueAlarmLen = new System.Windows.Forms.Label(); this.lblQueueAlarmLen = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label();
@@ -107,8 +109,8 @@
this.lblOutMessage3 = new System.Windows.Forms.Label(); this.lblOutMessage3 = new System.Windows.Forms.Label();
this.lblOutMessage2 = new System.Windows.Forms.Label(); this.lblOutMessage2 = new System.Windows.Forms.Label();
this.tabData = new System.Windows.Forms.TabControl(); this.tabData = new System.Windows.Forms.TabControl();
this.label24 = new System.Windows.Forms.Label(); this.label25 = new System.Windows.Forms.Label();
this.lblQueueULog = new System.Windows.Forms.Label(); this.lblQueueRwTrLog = new System.Windows.Forms.Label();
this.statusStrip1.SuspendLayout(); this.statusStrip1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout();
this.tabMes.SuspendLayout(); this.tabMes.SuspendLayout();
@@ -364,6 +366,8 @@
// panel1 // panel1
// //
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.panel1.Controls.Add(this.label25);
this.panel1.Controls.Add(this.lblQueueRwTrLog);
this.panel1.Controls.Add(this.label24); this.panel1.Controls.Add(this.label24);
this.panel1.Controls.Add(this.lblQueueULog); this.panel1.Controls.Add(this.lblQueueULog);
this.panel1.Controls.Add(this.label19); this.panel1.Controls.Add(this.label19);
@@ -384,9 +388,28 @@
this.panel1.Location = new System.Drawing.Point(4, 6); this.panel1.Location = new System.Drawing.Point(4, 6);
this.panel1.Margin = new System.Windows.Forms.Padding(2); this.panel1.Margin = new System.Windows.Forms.Padding(2);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(343, 248); this.panel1.Size = new System.Drawing.Size(343, 306);
this.panel1.TabIndex = 88; this.panel1.TabIndex = 88;
// //
// label24
//
this.label24.AutoSize = true;
this.label24.Location = new System.Drawing.Point(10, 236);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(85, 13);
this.label24.TabIndex = 94;
this.label24.Text = "ULog Queue len";
//
// lblQueueULog
//
this.lblQueueULog.AutoSize = true;
this.lblQueueULog.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblQueueULog.Location = new System.Drawing.Point(104, 236);
this.lblQueueULog.Name = "lblQueueULog";
this.lblQueueULog.Size = new System.Drawing.Size(31, 13);
this.lblQueueULog.TabIndex = 95;
this.lblQueueULog.Text = "###";
//
// label19 // label19
// //
this.label19.AutoSize = true; this.label19.AutoSize = true;
@@ -1024,24 +1047,24 @@
this.tabData.TabIndex = 71; this.tabData.TabIndex = 71;
this.tabData.Selected += new System.Windows.Forms.TabControlEventHandler(this.TabData_Selected); this.tabData.Selected += new System.Windows.Forms.TabControlEventHandler(this.TabData_Selected);
// //
// label24 // label25
// //
this.label24.AutoSize = true; this.label25.AutoSize = true;
this.label24.Location = new System.Drawing.Point(15, 214); this.label25.Location = new System.Drawing.Point(10, 213);
this.label24.Name = "label24"; this.label25.Name = "label25";
this.label24.Size = new System.Drawing.Size(85, 13); this.label25.Size = new System.Drawing.Size(85, 13);
this.label24.TabIndex = 94; this.label25.TabIndex = 96;
this.label24.Text = "ULog Queue len"; this.label25.Text = "RwTr Queue len";
// //
// lblQueueULog // lblQueueRwTrLog
// //
this.lblQueueULog.AutoSize = true; this.lblQueueRwTrLog.AutoSize = true;
this.lblQueueULog.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblQueueRwTrLog.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblQueueULog.Location = new System.Drawing.Point(105, 214); this.lblQueueRwTrLog.Location = new System.Drawing.Point(104, 213);
this.lblQueueULog.Name = "lblQueueULog"; this.lblQueueRwTrLog.Name = "lblQueueRwTrLog";
this.lblQueueULog.Size = new System.Drawing.Size(31, 13); this.lblQueueRwTrLog.Size = new System.Drawing.Size(31, 13);
this.lblQueueULog.TabIndex = 95; this.lblQueueRwTrLog.TabIndex = 97;
this.lblQueueULog.Text = "###"; this.lblQueueRwTrLog.Text = "###";
// //
// AdapterForm // AdapterForm
// //
@@ -1168,5 +1191,7 @@
private System.Windows.Forms.TabControl tabData; private System.Windows.Forms.TabControl tabData;
private System.Windows.Forms.Label label24; private System.Windows.Forms.Label label24;
private System.Windows.Forms.Label lblQueueULog; private System.Windows.Forms.Label lblQueueULog;
private System.Windows.Forms.Label label25;
private System.Windows.Forms.Label lblQueueRwTrLog;
} }
} }
+87 -13
View File
@@ -32,7 +32,7 @@ namespace IOB_WIN_NEXT
/// <summary> /// <summary>
/// Oggetto ultimo inviato stato IOB x REDIS /// Oggetto ultimo inviato stato IOB x REDIS
/// </summary> /// </summary>
protected IobWinStatus lastIobStatus = new IobWinStatus(); protected IobWinStatus lastIobStatus = new IobWinStatus() { lastUpdate = DateTime.Now.AddHours(-1), lastDataOut = DateTime.Now.AddHours(-1) };
/// <summary> /// <summary>
/// Oggetto ultimo inviato stato MP-IO x REDIS /// Oggetto ultimo inviato stato MP-IO x REDIS
@@ -122,7 +122,7 @@ namespace IOB_WIN_NEXT
// inizializzo orologi // inizializzo orologi
firstStart = DateTime.Now; firstStart = DateTime.Now;
lastStartTry = DateTime.Now; lastStartTry = DateTime.Now.AddHours(-1);
initDatamonitor(); initDatamonitor();
@@ -275,6 +275,8 @@ namespace IOB_WIN_NEXT
protected int maxMsQueue { get; set; } protected int maxMsQueue { get; set; }
protected int maxRwTrQueue { get; set; }
protected int maxUlQueue { get; set; } protected int maxUlQueue { get; set; }
protected int qAlLen { get; set; } protected int qAlLen { get; set; }
@@ -285,6 +287,8 @@ namespace IOB_WIN_NEXT
protected int qMsLen { get; set; } protected int qMsLen { get; set; }
protected int qRTrLen { get; set; }
protected int qUlLen { get; set; } protected int qUlLen { get; set; }
protected int totQueue protected int totQueue
@@ -643,6 +647,31 @@ namespace IOB_WIN_NEXT
} }
} }
public int rtrQueueLen
{
set
{
qRTrLen = value;
lblQueueRwTrLog.Text = qRTrLen.ToString();
showQueueData();
// se supero max precedente, ed è > 10... loggo!
if (qRTrLen > maxRwTrQueue && qRTrLen > 10)
{
maxRwTrQueue = qRTrLen;
lgInfo($"[WARN] Coda RawTransf di {value} record");
}
else
{
maxRwTrQueue--;
maxRwTrQueue = maxRwTrQueue < qRTrLen ? qRTrLen : maxRwTrQueue;
}
}
get
{
return qRTrLen;
}
}
public int ulQueueLen public int ulQueueLen
{ {
set set
@@ -1100,7 +1129,8 @@ namespace IOB_WIN_NEXT
} }
catch (Exception exc) catch (Exception exc)
{ {
lgError($"Eccezione in conversione tipo adapter: richiesto un tipo non codificato...{Environment.NewLine}{exc}"); string rawVal = fIni.ReadString("IOB", "CNCTYPE", "DEMO");
lgError($"Eccezione in conversione tipo adapter: richiesto {rawVal} | tipo non codificato...{Environment.NewLine}{exc}");
tipoScelto = tipoAdapter.ND; tipoScelto = tipoAdapter.ND;
} }
// carivo vettore parametri opzionai // carivo vettore parametri opzionai
@@ -1132,14 +1162,15 @@ namespace IOB_WIN_NEXT
tipoIob = tipoScelto, tipoIob = tipoScelto,
optPar = optParRead, optPar = optParRead,
versIOB = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(), versIOB = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(),
codIOB = CurrIOB, codIOB = fIni.ReadString("IOB", "IOB_NAME", CurrIOB),
minDeltaSec = fIni.ReadInteger("IOB", "MinDeltaSec", 6),
cncIpAddr = fIni.ReadString("CNC", "IP", "::1"), cncIpAddr = fIni.ReadString("CNC", "IP", "::1"),
cncPort = fIni.ReadString("CNC", "PORT", "0"), cncPort = fIni.ReadString("CNC", "PORT", "0"),
iniFileName = iniConfFile, iniFileName = iniConfFile,
cpuType = fIni.ReadString("CNC", "CPUTYPE", ""), cpuType = fIni.ReadString("CNC", "CPUTYPE", ""),
rack = (short)fIni.ReadInteger("CNC", "RACK", 0), rack = (short)fIni.ReadInteger("CNC", "RACK", 0),
slot = (short)fIni.ReadInteger("CNC", "SLOT", 0), slot = (short)fIni.ReadInteger("CNC", "SLOT", 0),
serverData = new serverMapo(fIni.ReadString("SERVER", "MPIP", "::1"), fIni.ReadString("SERVER", "MPURL", "/MP/IO"), fIni.ReadString("SERVER", "CMDBASE", "/IOB/input/"), fIni.ReadString("SERVER", "CMDFLOG", "/IOB/flog/"), fIni.ReadString("SERVER", "CMDULOG", "/IOB/ulog/"), fIni.ReadString("SERVER", "CMDALIVE", "/"), fIni.ReadString("SERVER", "CMDENABLED", "/"), fIni.ReadString("SERVER", "CMDREBO", "/"), fIni.ReadString("SERVER", "CMD_ODL_STARTED", "/IOB/getCurrOdlStart/"), fIni.ReadString("SERVER", "CLI_INST", "SW_CLI"), fIni.ReadString("SERVER", "CMD_FORCLE_SPLIT_ODL", "/IOB/forceSplitOdlFull/")), serverData = new serverMapo(fIni.ReadString("SERVER", "MPIP", "::1"), fIni.ReadString("SERVER", "MPURL", "/MP/IO"), fIni.ReadString("SERVER", "CMDBASE", "/IOB/input/"), fIni.ReadString("SERVER", "CMDFLOG", "/IOB/flog/"), fIni.ReadString("SERVER", "CMDULOG", "/IOB/ulog/"), fIni.ReadString("SERVER", "CMDALIVE", "/"), fIni.ReadString("SERVER", "CMDENABLED", "/"), fIni.ReadString("SERVER", "CMDREBO", "/"), fIni.ReadString("SERVER", "CMD_ODL_STARTED", "/IOB/getCurrOdlStart/"), fIni.ReadString("SERVER", "CLI_INST", "SW_CLI"), fIni.ReadString("SERVER", "CMD_FORCLE_SPLIT_ODL", "/IOB/forceSplitOdlFull/"), fIni.ReadString("SERVER", "CMD_IDLE_TIME", "/IOB/getIdlePeriod/"), fIni.ReadString("SERVER", "CMDRAWTRANSF", "/IOB/rawTransfJson/")),
MAX_COUNTER_BLINK = Convert.ToInt32(fIni.ReadString("BLINK", "MAX_COUNTER_BLINK", "1")), MAX_COUNTER_BLINK = Convert.ToInt32(fIni.ReadString("BLINK", "MAX_COUNTER_BLINK", "1")),
BLINK_FILT = Convert.ToInt32(fIni.ReadString("BLINK", "BLINK_FILT", "0")), BLINK_FILT = Convert.ToInt32(fIni.ReadString("BLINK", "BLINK_FILT", "0")),
TCMaxDelayFactor = Convert.ToDouble(fIni.ReadString("OPTPAR", "TC_MAX_TC_FACTOR", "1.2").Replace(".", ",")), TCMaxDelayFactor = Convert.ToDouble(fIni.ReadString("OPTPAR", "TC_MAX_TC_FACTOR", "1.2").Replace(".", ",")),
@@ -1210,6 +1241,16 @@ namespace IOB_WIN_NEXT
start.Enabled = true; start.Enabled = true;
break; break;
case tipoAdapter.IcoelDb:
iobObj = new IobIcoelDb(this, IOBConf);
start.Enabled = true;
break;
case tipoAdapter.IcoelSoap:
iobObj = new IobIcoelSoap(this, IOBConf);
start.Enabled = true;
break;
case tipoAdapter.MODBUS_TCP: case tipoAdapter.MODBUS_TCP:
iobObj = new IobModbusTCP(this, IOBConf); iobObj = new IobModbusTCP(this, IOBConf);
start.Enabled = true; start.Enabled = true;
@@ -1220,6 +1261,11 @@ namespace IOB_WIN_NEXT
start.Enabled = true; start.Enabled = true;
break; break;
case tipoAdapter.MODBUS_TCP_CENTERFRIGO:
iobObj = new IobModbusTCPCenterfrigo(this, IOBConf);
start.Enabled = true;
break;
case tipoAdapter.MODBUS_TCP_HAM: case tipoAdapter.MODBUS_TCP_HAM:
iobObj = new IobModbusTCPHam(this, IOBConf); iobObj = new IobModbusTCPHam(this, IOBConf);
start.Enabled = true; start.Enabled = true;
@@ -1280,7 +1326,17 @@ namespace IOB_WIN_NEXT
iobObj = new IobOpcUaOmronIcoel(this, IOBConf); iobObj = new IobOpcUaOmronIcoel(this, IOBConf);
start.Enabled = true; start.Enabled = true;
break; break;
case tipoAdapter.OpcUaSiemens:
iobObj = new IobOpcUaSiemens(this, IOBConf);
start.Enabled = true;
break;
case tipoAdapter.OpcUaSiemensOMP:
iobObj = new IobOpcUaSiemensOMP(this, IOBConf);
start.Enabled = true;
break;
case tipoAdapter.PingWatchdog: case tipoAdapter.PingWatchdog:
iobObj = new IobPing(this, IOBConf); iobObj = new IobPing(this, IOBConf);
start.Enabled = true; start.Enabled = true;
@@ -1339,6 +1395,11 @@ namespace IOB_WIN_NEXT
start.Enabled = true; start.Enabled = true;
break; break;
case tipoAdapter.SIEMENS_NWSE:
iobObj = new IobSiemensNWSE(this, IOBConf);
start.Enabled = true;
break;
case tipoAdapter.SIEMENS_PRESSOIL_CEI: case tipoAdapter.SIEMENS_PRESSOIL_CEI:
iobObj = new IobSiemensPressoilCei(this, IOBConf); iobObj = new IobSiemensPressoilCei(this, IOBConf);
start.Enabled = true; start.Enabled = true;
@@ -1445,31 +1506,41 @@ namespace IOB_WIN_NEXT
private void refreshFormData() private void refreshFormData()
{ {
// aggiorno visualizzazioni varie in form... // aggiorno visualizzazioni varie in form...
alQueueLen = iobObj.QueueAlarm.Count;
evQueueLen = iobObj.QueueIN.Count; evQueueLen = iobObj.QueueIN.Count;
flQueueLen = iobObj.QueueFLog.Count; flQueueLen = iobObj.QueueFLog.Count;
alQueueLen = iobObj.QueueAlarm.Count;
msQueueLen = iobObj.QueueMessages.Count; msQueueLen = iobObj.QueueMessages.Count;
ulQueueLen = iobObj.QueueMessages.Count; rtrQueueLen = iobObj.QueueRawTransf.Count;
ulQueueLen = iobObj.QueueULog.Count;
// aggiorno labels counters... // aggiorno labels counters...
counterIob = $"pz IOB {iobObj.contapezziIOB}"; counterIob = $"pz IOB {iobObj.contapezziIOB}";
counterMac = $"pz PLC {iobObj.contapezziPLC}"; counterMac = $"pz PLC {iobObj.contapezziPLC}";
Dictionary<string, string> setPar = new Dictionary<string, string>();
setPar.Add("IP", iobObj.cIobConf.cncIpAddr);
setPar.Add("PORT", iobObj.cIobConf.cncPort);
string note = $"DT ultimo avvio: {iobObj.dtAvvioAdp}";
// verifico IOB status // verifico IOB status
IobWinStatus currIobStatus = new IobWinStatus() IobWinStatus currIobStatus = new IobWinStatus()
{ {
CodIob = iobObj.cIobConf.codIOB, CodIob = iobObj.cIobConf.codIOB,
IobType = iobObj.cIobConf.tipoIob.ToString(), IobType = iobObj.cIobConf.tipoIob.ToString(),
queueAlLen = alQueueLen,
queueEvLen = evQueueLen, queueEvLen = evQueueLen,
queueFlLen = flQueueLen, queueFlLen = flQueueLen,
queueAlLen = alQueueLen,
queueMsLen = msQueueLen, queueMsLen = msQueueLen,
queueRawTransfLen = rtrQueueLen,
queueUlLen = ulQueueLen,
counterIOB = iobObj.contapezziIOB, counterIOB = iobObj.contapezziIOB,
counterMAC = iobObj.contapezziPLC, counterMAC = iobObj.contapezziPLC,
lastUpdate = lastIobStatus.lastUpdate, lastUpdate = lastIobStatus.lastUpdate > iobObj.lastWatchDog ? lastIobStatus.lastUpdate : iobObj.lastWatchDog,
online = utils.IOB_Online, online = utils.IOB_Online,
lastDataIn = iobObj.lastReadPLC lastDataIn = iobObj.lastReadPLC,
lastDataOut = iobObj.lastIobOnline,
setupParams = setPar,
freeNotes = note
}; };
// se diverso SALVO! // se diverso SALVO!
if (lastIobStatus.online != currIobStatus.online || lastIobStatus.lastDataIn != currIobStatus.lastDataIn || lastIobStatus.counterIOB != currIobStatus.counterIOB || lastIobStatus.counterMAC != currIobStatus.counterMAC || lastIobStatus.queueEvLen != currIobStatus.queueEvLen || lastIobStatus.queueFlLen != currIobStatus.queueFlLen || lastIobStatus.queueAlLen != currIobStatus.queueAlLen || lastIobStatus.queueMsLen != currIobStatus.queueMsLen) if (!currIobStatus.Equals(lastIobStatus))
{ {
// aggiorno data // aggiorno data
currIobStatus.lastUpdate = DateTime.Now; currIobStatus.lastUpdate = DateTime.Now;
@@ -1531,8 +1602,11 @@ namespace IOB_WIN_NEXT
{ {
stop.Enabled = false; stop.Enabled = false;
evQueueLen = 0; alQueueLen = 0;
flQueueLen = 0; flQueueLen = 0;
msQueueLen = 0;
rtrQueueLen = 0;
ulQueueLen = 0;
nLine2show = utils.CRI("numRowConsole"); nLine2show = utils.CRI("numRowConsole");
} }
+172 -150
View File
@@ -1,152 +1,174 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<startup> <configSections>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /> <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</startup> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<appSettings> </configSections>
<add key="appName" value="IOB-WIN-NEXT" /> <startup>
<!--<add key="appVers" value="develop" />--> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
<add key="enableTest" value="true" /> </startup>
<add key="enableContapezzi" value="true" /> <appSettings>
<add key="enableMode" value="true" /> <add key="appName" value="IOB-WIN-NEXT" />
<add key="enableOverrides" value="false" /> <!--<add key="appVers" value="develop" />-->
<add key="enableTSVC" value="true" /> <add key="enableTest" value="true" />
<add key="enableDynData" value="false" /> <add key="enableContapezzi" value="true" />
<add key="enableSysInfo" value="false" /> <add key="enableMode" value="true" />
<add key="enableAlarms" value="true" /> <add key="enableOverrides" value="false" />
<add key="doStartMemDump" value="false" /> <add key="enableTSVC" value="true" />
<add key="doSampleMemory" value="false" /> <add key="enableDynData" value="false" />
<add key="basePrgMemPath" value="CNCMEMUSER" /> <add key="enableSysInfo" value="false" />
<add key="pingMsTimeout" value="1500" /> <add key="enableAlarms" value="true" />
<add key="serverPingDisabled" value="false" /> <add key="doStartMemDump" value="false" />
<add key="urlCallTOut" value="9999" /> <add key="doSampleMemory" value="false" />
<add key="urlRandWait" value="200" /> <add key="basePrgMemPath" value="CNCMEMUSER" />
<!-- ciclo corto x invio a server: ms --> <add key="pingMsTimeout" value="1500" />
<add key="timerIntMs" value="10" /> <add key="serverPingDisabled" value="false" />
<add key="fastCount" value="20" /> <add key="urlCallTOut" value="9999" />
<add key="normCount" value="200" /> <add key="urlRandWait" value="200" />
<add key="slowCount" value="500" /> <!-- ciclo corto x invio a server: ms -->
<add key="verySlowCount" value="3000" /> <add key="timerIntMs" value="10" />
<add key="sampleMemCount" value="6000" /> <add key="fastCount" value="20" />
<add key="waitEndCycle" value="0" /> <add key="normCount" value="200" />
<add key="comCheckTOut" value="10" /> <add key="slowCount" value="500" />
<!-- watchdog, ping, check disconnesso --> <add key="verySlowCount" value="3000" />
<add key="nMaxSend" value="10" /> <add key="sampleMemCount" value="6000" />
<add key="pingTestSec" value="5" /> <add key="waitEndCycle" value="0" />
<add key="watchdogMaxSec" value="90" /> <add key="comCheckTOut" value="10" />
<add key="disconMaxSec" value="30" /> <!-- watchdog, ping, check disconnesso -->
<add key="defIOB" value="2999" /> <add key="nMaxSend" value="10" />
<add key="pauseSendMSec" value="1000" /> <add key="pingTestSec" value="5" />
<!--gestione coda--> <add key="watchdogMaxSec" value="90" />
<add key="maxQueueFLog" value="16384" /> <add key="disconMaxSec" value="30" />
<!--gestione max num errori--> <add key="defIOB" value="2999" />
<add key="maxAliveErrors" value="1000" /> <add key="pauseSendMSec" value="2000" />
<add key="maxSendErrors" value="100" /> <!--gestione coda-->
<add key="maxReadErrors" value="20" /> <add key="maxQueueFLog" value="16384" />
<!--parametri SIM--> <add key="maxQueueRawTransf" value="1024" />
<add key="waitSimPar" value="30" /> <!--gestione max num errori-->
<!--<add key="waitSimPar" value="45" />--> <add key="maxAliveErrors" value="1000" />
<!--gestione REDIS--> <add key="maxSendErrors" value="100" />
<add key="RedisConn" value="localhost,abortConnect=false,ssl=false" /> <add key="maxReadErrors" value="20" />
<add key="RedisConnAdmin" value="localhost,abortConnect=false,ssl=false" /> <!--parametri SIM-->
<add key="redisDb" value="10" /> <add key="waitSimPar" value="30" />
<!--gestione invio dati in blocchi Json--> <!--<add key="waitSimPar" value="45" />-->
<add key="minJsonData" value="2" /> <!--gestione REDIS-->
<add key="maxJsonData" value="100" /> <add key="RedisConn" value="localhost,abortConnect=false,ssl=false" />
<add key="maxJsonDataEv" value="25" /> <add key="RedisConnAdmin" value="localhost,abortConnect=false,ssl=false" />
<!--gestione multithread--> <add key="redisDb" value="10" />
<add key="sendDataByThread" value="false" /> <!--gestione invio dati in blocchi Json-->
<!--Modalità DEMO: DemoOUT indica che NON invia davvero al server e DemoIN che simula e NON legge da PLC--> <add key="minJsonData" value="2" />
<add key="DemoIn" value="false" /> <add key="maxJsonData" value="100" />
<add key="DemoInSample" value="false" /> <add key="maxJsonDataEv" value="25" />
<add key="DemoOut" value="false" /> <!--gestione multithread-->
<!--definizione invio dati molto variabili--> <add key="sendDataByThread" value="false" />
<add key="SendAxPos" value="false" /> <!--Modalità DEMO: DemoOUT indica che NON invia davvero al server e DemoIN che simula e NON legge da PLC-->
<add key="SendFeedSpeed" value="false" /> <add key="DemoIn" value="false" />
<!--Definizione avvio Adapter--> <add key="DemoInSample" value="false" />
<add key="autoLoadConf" value="true" /> <add key="DemoOut" value="false" />
<add key="autoStartOnLoad" value="true" /> <!--definizione invio dati molto variabili-->
<add key="startMinimized" value="false" /> <add key="SendAxPos" value="false" />
<add key="windowCanMax" value="true" /> <add key="SendFeedSpeed" value="false" />
<add key="trayClose" value="true" /> <!--Definizione avvio Adapter-->
<add key="autoSaveSec" value="60" /> <add key="autoLoadConf" value="true" />
<add key="waitRecMSec" value="60000" /> <add key="autoStartOnLoad" value="true" />
<add key="testCharSep" value="|" /> <add key="startMinimized" value="false" />
<add key="delayShowLogMs" value="500" /> <add key="windowCanMax" value="true" />
<add key="vetoSeconds" value="5" /> <add key="trayClose" value="true" />
<!--conf file--> <add key="autoSaveSec" value="60" />
<add key="dataPath" value="DATA" /> <add key="waitRecMSec" value="60000" />
<add key="dataConfPath" value="DATA\CONF" /> <add key="testCharSep" value="|" />
<add key="dataDatPath" value="DATA\DAT" /> <add key="delayShowLogMs" value="500" />
<add key="resxPath" value="Resources" /> <add key="vetoSeconds" value="5" />
<add key="mainConfFile" value="MAIN.ini" /> <!--conf file-->
<add key="defaultPersLayerFile" value="PersistData.dat" /> <add key="dataPath" value="DATA" />
<add key="simDataFile" value="SimData.dat" /> <add key="dataConfPath" value="DATA\CONF" />
<add key="memDumpFile" value="MemoryDump.dat" /> <add key="dataDatPath" value="DATA\DAT" />
<add key="numSim" value="1" /> <add key="resxPath" value="Resources" />
<add key="MMapR" value="MMapR.map" /> <add key="mainConfFile" value="MAIN.ini" />
<add key="MMapW" value="MMapW.map" /> <add key="defaultPersLayerFile" value="PersistData.dat" />
<add key="AUpdAsAdm" value="true" /> <add key="simDataFile" value="SimData.dat" />
<add key="ConfToCloud" value="true" /> <add key="memDumpFile" value="MemoryDump.dat" />
<!--logging--> <add key="numSim" value="1" />
<add key="recTime" value="true" /> <add key="MMapR" value="MMapR.map" />
<add key="verbose" value="false" /> <add key="MMapW" value="MMapW.map" />
<add key="logEvery" value="100" /> <add key="AUpdAsAdm" value="true" />
<add key="zipLogOldDay" value="1" /> <add key="ConfToCloud" value="true" />
<add key="maxLogDirSize" value="300" /> <!--logging-->
<add key="maxLogDays" value="120" /> <add key="recTime" value="true" />
<add key="numRowConsole" value="50" /> <add key="verbose" value="false" />
<add key="verboseLogTOut" value="60" /> <add key="logEvery" value="100" />
<!--conf x FANUC--> <add key="zipLogOldDay" value="1" />
<add key="ClientSettingsProvider.ServiceUri" value="" /> <add key="maxLogDirSize" value="300" />
<add key="pzCountDelay" value="2000" /> <add key="maxLogDays" value="400" />
</appSettings> <add key="numRowConsole" value="50" />
<runtime> <add key="verboseLogTOut" value="60" />
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <!--conf x FANUC-->
<probing privatePath="lib;libs" /> <add key="ClientSettingsProvider.ServiceUri" value="" />
<probing privatePath="lib;libs" xmlns="" /> <add key="pzCountDelay" value="2000" />
<dependentAssembly> </appSettings>
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" /> <runtime>
<bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" /> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
</dependentAssembly> <probing privatePath="lib;libs" />
<dependentAssembly> <probing privatePath="lib;libs" xmlns="" />
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <dependentAssembly>
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
</dependentAssembly> <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
<dependentAssembly> </dependentAssembly>
<assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <dependentAssembly>
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
</dependentAssembly> <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
<dependentAssembly> </dependentAssembly>
<assemblyIdentity name="System.Threading.Channels" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <dependentAssembly>
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> <assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
</dependentAssembly> <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
<dependentAssembly> </dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <dependentAssembly>
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> <assemblyIdentity name="System.Threading.Channels" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
</dependentAssembly> <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</assemblyBinding> </dependentAssembly>
</runtime> <dependentAssembly>
<system.web> <assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<membership defaultProvider="ClientAuthenticationMembershipProvider"> <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
<providers> </dependentAssembly>
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" /> </assemblyBinding>
</providers> </runtime>
</membership> <system.web>
<roleManager defaultProvider="ClientRoleProvider" enabled="true"> <membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers> <providers>
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" /> <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
</providers> </providers>
</roleManager> </membership>
</system.web> <roleManager defaultProvider="ClientRoleProvider" enabled="true">
<system.serviceModel> <providers>
<bindings> <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
<basicHttpBinding> </providers>
<binding name="OPENcontrol" /> </roleManager>
</basicHttpBinding> </system.web>
</bindings> <system.serviceModel>
<client> <bindings>
<endpoint address="http://192.168.20.2:8080" binding="basicHttpBinding" bindingConfiguration="OPENcontrol" contract="OpenControl.OPENcontrolPortType" name="OPENcontrol" /> <basicHttpBinding>
</client> <binding name="OPENcontrol" />
</system.serviceModel> </basicHttpBinding>
</configuration> <netNamedPipeBinding>
<binding name="NetNamedPipeBinding_ISizerService">
<security mode="None" />
</binding>
</netNamedPipeBinding>
<wsHttpBinding>
<binding name="WSHttpBinding_ISizerService" maxReceivedMessageSize="2147483647">
<security mode="None" />
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://192.168.20.2:8080" binding="basicHttpBinding" bindingConfiguration="OPENcontrol" contract="OpenControl.OPENcontrolPortType" name="OPENcontrol" />
<endpoint address="http://localhost:8001/SizerService/" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ISizerService" contract="SizerService.ISizerService" name="WSHttpBinding_ISizerService" />
<endpoint address="net.pipe://localhost/Compac/8001/SizerService" binding="netNamedPipeBinding" bindingConfiguration="NetNamedPipeBinding_ISizerService" contract="SizerService.ISizerService" name="NetNamedPipeBinding_ISizerService" />
</client>
</system.serviceModel>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>
+1 -1
View File
@@ -4,7 +4,7 @@
CNCTYPE=SIEMENS_COSMAP CNCTYPE=SIEMENS_COSMAP
PING_MS_TIMEOUT=500 PING_MS_TIMEOUT=500
[MACHINE] [MACHINE]
VENDOR=COSMAP VENDOR=COSMAP
MODEL=02 MODEL=02
+1 -1
View File
@@ -4,7 +4,7 @@
CNCTYPE=SIEMENS_ROBOTSERVICE CNCTYPE=SIEMENS_ROBOTSERVICE
PING_MS_TIMEOUT=500 PING_MS_TIMEOUT=500
[MACHINE] [MACHINE]
VENDOR=RobotService VENDOR=RobotService
MODEL=SMER12 MODEL=SMER12
+1 -1
View File
@@ -4,7 +4,7 @@
CNCTYPE=SIEMENS_ROBOTSERVICE CNCTYPE=SIEMENS_ROBOTSERVICE
PING_MS_TIMEOUT=500 PING_MS_TIMEOUT=500
[MACHINE] [MACHINE]
VENDOR=RobotService VENDOR=RobotService
MODEL=SCAT06 MODEL=SCAT06
+1 -1
View File
@@ -4,7 +4,7 @@
CNCTYPE=SIEMENS_ROBOTSERVICE CNCTYPE=SIEMENS_ROBOTSERVICE
PING_MS_TIMEOUT=500 PING_MS_TIMEOUT=500
[MACHINE] [MACHINE]
VENDOR=RobotService VENDOR=RobotService
MODEL=SCAT05 MODEL=SCAT05
+1 -1
View File
@@ -4,7 +4,7 @@
CNCTYPE=SIEMENS_APROCHIM CNCTYPE=SIEMENS_APROCHIM
PING_MS_TIMEOUT=500 PING_MS_TIMEOUT=500
[MACHINE] [MACHINE]
VENDOR=Aprochim VENDOR=Aprochim
MODEL=Micro4000 MODEL=Micro4000
+1 -1
View File
@@ -4,7 +4,7 @@
CNCTYPE=WPS CNCTYPE=WPS
PING_MS_TIMEOUT=500 PING_MS_TIMEOUT=500
[MACHINE] [MACHINE]
VENDOR=Atlas Copco VENDOR=Atlas Copco
MODEL=GA18VP_13 MODEL=GA18VP_13
+1 -1
View File
@@ -4,7 +4,7 @@
CNCTYPE=WPS CNCTYPE=WPS
PING_MS_TIMEOUT=500 PING_MS_TIMEOUT=500
[MACHINE] [MACHINE]
VENDOR=Atlas Copco VENDOR=Atlas Copco
MODEL=GA18VP_12 MODEL=GA18VP_12
+6 -4
View File
@@ -26,7 +26,7 @@ CMDREBO=/sendReboot.aspx?idxMacchina=
; Red: Y31.4 | Yellow: Y31.5 | Green Y31.6 | riscaldamento Y7.4 ??? ; Red: Y31.4 | Yellow: Y31.5 | Green Y31.6 | riscaldamento Y7.4 ???
;BIT0=CONN ;BIT0=CONN
BIT1=Y31.6 BIT1=Y31.6
BIT2=PZCOUNT.PAR.6711 BIT2=PZCOUNT.MACRO.10100
BIT3=Y31.4 BIT3=Y31.4
BIT4=Y31.5 BIT4=Y31.5
BIT5=Y7.4 BIT5=Y7.4
@@ -58,10 +58,12 @@ BLINK_FILT=0
;BLINK_FILT=16 ;BLINK_FILT=16
[OPTPAR] [OPTPAR]
;PZCOUNT_MODE=STD|BIT ;PZCOUNT_MODE=STD.PAR.6711
PZCOUNT_MODE=STD.PAR.6711 ;PZREQ_MODE=STD.PAR.6713
PZCOUNT_MODE=STD.MACRO.10100
PZREQ_MODE=STD.MACRO.10000
PZGTOT_MODE=STD.PAR.6712 PZGTOT_MODE=STD.PAR.6712
PZREQ_MODE=STD.PAR.6713 ;PZREQ_MODE=STD.PAR.6713
;PZCAD_MODE=STD.D.6408.DW ;PZCAD_MODE=STD.D.6408.DW
ENABLE_PZ_RESET=TRUE ENABLE_PZ_RESET=TRUE
ENABLE_PZ_RESET_stopSetup=TRUE ENABLE_PZ_RESET_stopSetup=TRUE
+3 -3
View File
@@ -4,15 +4,15 @@
CNCTYPE=FILE_EUROM63 CNCTYPE=FILE_EUROM63
PING_MS_TIMEOUT=500 PING_MS_TIMEOUT=500
[MACHINE] [MACHINE]
VENDOR=PlasticMetal VENDOR=PlasticMetal
MODEL=MPW280SP MODEL=MPW280SP
[CNC] [CNC]
IP=10.74.82.253 IP=10.74.82.253
;IP=192.168.1.151 ;IP=192.168.1.151
[SERVER] [SERVER]
MPIP=http://10.74.82.218 MPIP=http://10.74.82.218
;MPIP=http://192.168.1.150 ;MPIP=http://192.168.1.150
MPURL=/MP/IO MPURL=/MP/IO
+15 -11
View File
@@ -1,35 +1,36 @@
;Configurazione IOB-WIN ;Configurazione IOB-WIN
[IOB] [IOB]
;Impianto Helpi x impacchettatrice - Finassi ;Impianto Helpi x impacchettatrice - Finassi
CNCTYPE=MODBUS_TCP_HELPI CNCTYPE=MODBUS_TCP_HELPI
PING_MS_TIMEOUT=1000 PING_MS_TIMEOUT=1000
MinDeltaSec=5
[MACHINE] [MACHINE]
VENDOR=HELPI VENDOR=HELPI
MODEL=HELPI MODEL=HELPI
[CNC] [CNC]
IP=10.74.82.65 IP=10.150.0.20
PORT=502 PORT=502
[SERVER] [SERVER]
MPIP=https://iis01.egalware.com MPIP=http://10.150.0.1
;MPIP=https://gwms.egalware.com
MPURL=/MP/IO MPURL=/MP/IO
CMDBASE=/IOB/input/ CMDBASE=/IOB/input/
CMDFLOG=/IOB/flog/ CMDFLOG=/IOB/flog/
CMDALIVE=/IOB CMDALIVE=/IOB
CMDENABLED=/IOB/enabled/ CMDENABLED=/IOB/enabled/
CMDADV1=?valore= CMDADV1=?valore=
CMDREBO=/IOB/sendReboot?idxMacchina= CMDREBO=/sendReboot.aspx?idxMacchina=
;CMDREBO=/sendReboot.aspx?idxMacchina=
[MEMORY] [MEMORY]
ADDR_READ=41060 ADDR_READ=41050
ADDR_WRITE=41060 ADDR_WRITE=41060
SIZE_READ=0 SIZE_READ=60
SIZE_WRITE=0 SIZE_WRITE=50
HR_BASE_ADDR=40000 HR_BASE_ADDR=0
;HR_BASE_ADDR=40000
DELTA_BASE=0
[BLINK] [BLINK]
@@ -71,5 +72,8 @@ MEM_BLOCK=FINASSI_HELPI_01_MBlock.json
; conf aree allarme ; conf aree allarme
ALARM_CONF=FINASSI_HELPI_01_alarm.json ALARM_CONF=FINASSI_HELPI_01_alarm.json
; rimozione check limiti min/max dynData
disDynDataRangeCheck=true
[BRANCH] [BRANCH]
NAME=master NAME=master
+18 -18
View File
@@ -44,7 +44,7 @@
"name": "NumPacchi", "name": "NumPacchi",
"description": "Numero Pacchi Richiesti", "description": "Numero Pacchi Richiesti",
"memAddr": "41098", "memAddr": "41098",
"tipoMem": "INT", "tipoMem": "IntLH",
"index": 1098, "index": 1098,
"size": 2, "size": 2,
"unit": "#" "unit": "#"
@@ -61,7 +61,7 @@
"minVal": 0, "minVal": 0,
"maxVal": 32767, "maxVal": 32767,
"unit": "#", "unit": "#",
"func": "MEDIAN", "func": "POINT",
"period": 90, "period": 90,
"factor": 1 "factor": 1
}, },
@@ -75,7 +75,7 @@
"minVal": 0, "minVal": 0,
"maxVal": 1, "maxVal": 1,
"unit": "#", "unit": "#",
"func": "MEDIAN", "func": "POINT",
"period": 90, "period": 90,
"factor": 1 "factor": 1
}, },
@@ -87,7 +87,7 @@
"index": 1062, "index": 1062,
"size": 16, "size": 16,
"unit": "#", "unit": "#",
"func": "LAST", "func": "POINT",
"period": 90 "period": 90
}, },
"LOTTO": { "LOTTO": {
@@ -98,18 +98,18 @@
"index": 1078, "index": 1078,
"size": 16, "size": 16,
"unit": "#", "unit": "#",
"func": "LAST", "func": "POINT",
"period": 90 "period": 90
}, },
"NumPacchi": { "NumPacchi": {
"name": "NumPacchi", "name": "NumPacchi",
"description": "Numero Pacchi Richiesti", "description": "Numero Pacchi Richiesti",
"memAddr": "41098", "memAddr": "41098",
"tipoMem": "INT", "tipoMem": "IntLH",
"index": 1098, "index": 1098,
"size": 2, "size": 2,
"unit": "#", "unit": "#",
"func": "MEDIAN", "func": "POINT",
"period": 90, "period": 90,
"factor": 1 "factor": 1
}, },
@@ -117,11 +117,11 @@
"name": "NumPacchiFatti", "name": "NumPacchiFatti",
"description": "Numero Pacchi Fatti", "description": "Numero Pacchi Fatti",
"memAddr": "41100", "memAddr": "41100",
"tipoMem": "INT", "tipoMem": "IntLH",
"index": 1100, "index": 1100,
"size": 2, "size": 2,
"unit": "#", "unit": "#",
"func": "MEDIAN", "func": "POINT",
"period": 90, "period": 90,
"factor": 1 "factor": 1
}, },
@@ -129,11 +129,11 @@
"name": "EpochStart", "name": "EpochStart",
"description": "DateTime inizio lavorazione formato EPOCH", "description": "DateTime inizio lavorazione formato EPOCH",
"memAddr": "41102", "memAddr": "41102",
"tipoMem": "INT", "tipoMem": "IntLH",
"index": 1102, "index": 1102,
"size": 2, "size": 2,
"unit": "#", "unit": "EPOCH",
"func": "LAST", "func": "POINT",
"period": 90, "period": 90,
"factor": 1 "factor": 1
}, },
@@ -141,23 +141,23 @@
"name": "EpochStop", "name": "EpochStop",
"description": "DateTime fine lavorazione formato EPOCH", "description": "DateTime fine lavorazione formato EPOCH",
"memAddr": "41104", "memAddr": "41104",
"tipoMem": "INT", "tipoMem": "IntLH",
"index": 1104, "index": 1104,
"size": 2, "size": 2,
"unit": "#", "unit": "EPOCH",
"func": "LAST", "func": "POINT",
"period": 90, "period": 90,
"factor": 1 "factor": 1
}, },
"PPM": { "PPM": {
"name": "PPM", "name": "PPM",
"description": "Velocità espressa come Pacchi Per Minuto", "description": "Velocita espressa come Pacchi Per Minuto",
"memAddr": "41106", "memAddr": "41106",
"tipoMem": "Real", "tipoMem": "RealLH",
"index": 1106, "index": 1106,
"size": 2, "size": 2,
"unit": "#", "unit": "#",
"func": "LAST", "func": "POINT",
"period": 90, "period": 90,
"factor": 1 "factor": 1
} }
@@ -4,7 +4,7 @@
"tipoMem": "DInt", "tipoMem": "DInt",
"memAddr": "41094", "memAddr": "41094",
"index": 1094, "index": 1094,
"size": 2, "size": 4,
"messages": [ "messages": [
"AUSILIARI NON INSERITI", "AUSILIARI NON INSERITI",
"TERMICA SBOBINATORI", "TERMICA SBOBINATORI",
@@ -37,8 +37,7 @@
"BYPASS SPORTELLI INSERITO", "BYPASS SPORTELLI INSERITO",
"BARRA SALDANTE NON IN POSIZIONE, EFFETTUARE SALDATURA MANUALE", "BARRA SALDANTE NON IN POSIZIONE, EFFETTUARE SALDATURA MANUALE",
"GESTIONALE: MACCHINA IN CICLO", "GESTIONALE: MACCHINA IN CICLO",
"GESTIONALE: RICETTA NON TROVATA", "GESTIONALE: RICETTA NON TROVATA"
"PROBLEMA FC BYPASS EMERGENZA BARRA"
] ]
}, },
{ {
@@ -46,8 +45,9 @@
"tipoMem": "DInt", "tipoMem": "DInt",
"memAddr": "41096", "memAddr": "41096",
"index": 1096, "index": 1096,
"size": 2, "size": 4,
"messages": [ "messages": [
"PROBLEMA FC BYPASS EMERGENZA BARRA",
"PROBLEMA FC EMERGENZA BARRA", "PROBLEMA FC EMERGENZA BARRA",
"##", "##",
"##", "##",
@@ -78,7 +78,6 @@
"##", "##",
"##", "##",
"##", "##",
"##",
"##" "##"
] ]
} }
+66
View File
@@ -0,0 +1,66 @@
;Configurazione IOB-WIN
[IOB]
;Centro di lavoro OMP (https://omp.it/) con controllo siemens S7-1200 + OpcUa
CNCTYPE=OpcUaSiemensOMP
PING_MS_TIMEOUT=500
[MACHINE]
VENDOR=OMP
MODEL=Infilatrice
[CNC]
IP=10.150.0.41
PORT=4840
GETPRGNAME=true
[SERVER]
MPIP=http://10.150.0.1
MPURL=/MP/IO
CMDBASE=/IOB/input/
CMDFLOG=/IOB/flog/
CMDALIVE=/IOB
CMDENABLED=/IOB/enabled/
CMDADV1=?valore=
CMDREBO=/sendReboot.aspx?idxMacchina=
[MEMORY]
ADDR_READ=DB9999.DBB0
ADDR_WRITE=DB9999.DBB0
SIZE_READ=0
SIZE_WRITE=0
[BLINK]
;MAX_COUNTER_BLINK = 30
MAX_COUNTER_BLINK = 15
;bit0 = 0
;bit1 = 0
;bit2 = 1
;bit3 = 1
;bit4 = 1
;bit5 = 0
;bit6 = 0
;bit7 = 0
BLINK_FILT=0
;BLINK_FILT=28
[OPTPAR]
AUTO_CHANGE_ODL=false
CHANGE_ODL_MODE=TIME
CHANGE_ODL_HOURS=24
CHANGE_ODL_IDLE_MIN=5
PZCOUNT_MODE=OPC
DISABLE_PZCOUNT=FALSE
ENABLE_SEND_PZC_BLOCK=TRUE
MIN_SEND_PZC_BLOCK=0
MAX_SEND_PZC_BLOCK=100
ENABLE_DYN_DATA=FALSE
FORCE_DYN_DATA=TRUE
ENABLE_DATA_FILTER=TRUE
ENABLE_CLI_RESTART=TRUE
; conf parametri memoria READ/WRITE
OPC_PARAM_CONF=FINASSI_OMP_01.json
[BRANCH]
NAME=master
+131
View File
@@ -0,0 +1,131 @@
{
"BrowseFullVal": "ns=3;s=ServerInterfaces",
"BrowseNSIndex": 4,
"BrowseValue": 1,
"keyPartCount": "Conteggio",
"keyPartReq": "Set Quantità Lotto",
"keyPartId": "Generale: Nome Ricetta",
"keyProgName": "Generale: Nome Ricetta",
"keyRunMode": "",
"pingAsPowerOn": true,
"condWork": [
{
"keyName": "Selettore in Automatico",
"targetValue": "True"
},
{
"keyName": "Memoria Ciclo Automatico",
"targetValue": "True"
}
],
"condPowerOn": {
"checkMode": "AND",
"checkList": []
},
"condReady": {
"checkMode": "AND",
"checkList": []
},
"condManual": {
"checkMode": "AND",
"checkList": [
{
"keyName": "Selettore in Manuale",
"targetValue": "True"
}
]
},
"condEStop": {
"checkMode": "AND",
"checkList": []
},
"condError": {
"checkMode": "AND",
"checkList": [
{
"keyName": "Memoria Allarme Attivo",
"targetValue": "True"
}
]
},
"condCountEnabled": {
"checkMode": "AND",
"checkList": []
},
"condWarmUpCoolDown": {
"checkMode": "OR",
"checkList": []
},
"condWarning": {
"checkMode": "AND",
"checkList": []
},
"condSetup": {
"checkMode": "AND",
"checkList": [
{
"keyName": "Fine Lotto (1=Stop Ciclo)",
"targetValue": "1"
}
]
},
"fluxLogVeto": [
""
],
"itemTranslation": {
"fdovrd": "PATH FEED OVERRIDE",
"rovrd": "PATH RAPID OVERRIDE"
},
"paramsEndThresh": {
"InvDDone": 50
},
"mMapWrite": {
"setPzComm": {
"name": "setPzComm",
"description": "Qty",
"tipoMem": "Int",
"memAddr": "ns=4;i=11",
"index": 0,
"size": 4
},
"setProg": {
"name": "setProg",
"description": "Programma",
"tipoMem": "String",
"memAddr": "ns=4;i=9",
"index": 0,
"size": 30
}
},
"subscribedItems": [
"ns=4;i=1",
"ns=4;i=2",
"ns=4;i=3",
"ns=4;i=4",
"ns=4;i=5",
"ns=4;i=6",
"ns=4;i=7",
"ns=4;i=8",
"ns=4;i=9",
"ns=4;i=10",
"ns=4;i=11",
"ns=4;i=12",
"ns=4;i=13",
"ns=4;i=14"
],
"WatchDog": {
"IsEnabled": false,
"MemConfRead": "ns=4;s=tomes_1_Watchdog",
"MemConfWrite": "ns=4;s=tomach_1_watchdog",
"MaxVal": 9999
},
"actStopProd": {
"ns=4;i=14": "1"
},
"actSetRecipe": {
"ns=4;i=10": "1"
},
"actResetCounter": {
"ns=4;i=13": "1"
}
}
+1 -1
View File
@@ -5,7 +5,7 @@ CNCTYPE=OpcUaCMS
;CNCTYPE=OpcUa ;CNCTYPE=OpcUa
PING_MS_TIMEOUT=500 PING_MS_TIMEOUT=500
[MACHINE] [MACHINE]
VENDOR=CMS VENDOR=CMS
MODEL=Eidos MODEL=Eidos
@@ -0,0 +1,77 @@
;Configurazione IOB-WIN
[IOB]
;Impianto Cedax di Turi (test) - Giacovelli
CNCTYPE=MODBUS_TCP_CEDAX
PING_MS_TIMEOUT=1000
MinDeltaSec=5
[MACHINE]
VENDOR=CEDAX
MODEL=CEDAX Hydrocooler
[CNC]
IP=192.168.2.60
PORT=502
[SERVER]
MPIP=http://192.168.1.14
MPURL=/MP/IO
CMDBASE=/IOB/input/
CMDFLOG=/IOB/flog/
CMDALIVE=/IOB
CMDENABLED=/IOB/enabled/
CMDADV1=?valore=
CMDREBO=/sendReboot.aspx?idxMacchina=
[MEMORY]
ADDR_READ=41001
ADDR_WRITE=41021
SIZE_READ=20
SIZE_WRITE=0
HR_BASE_ADDR=40000
[BLINK]
;MAX_COUNTER_BLINK = 30
MAX_COUNTER_BLINK = 15
;bit0 = 0
;bit1 = 0
;bit2 = 1
;bit3 = 1
;bit4 = 1
;bit5 = 0
;bit6 = 0
;bit7 = 0
BLINK_FILT=0
;BLINK_FILT=28
[OPTPAR]
;PZCOUNT_MODE=STD.[PAR/MEM].info|BIT.indice
PZCOUNT_MODE=STD.DB85.DBRE16
DISABLE_PZCOUNT=TRUE
ENABLE_SEND_PZC_BLOCK=TRUE
MIN_SEND_PZC_BLOCK=0
MAX_SEND_PZC_BLOCK=100
; GEST DATI DYN
ENABLE_DYN_DATA=TRUE
FORCE_DYN_DATA=TRUE
; gestione delta minimo accettabile tra min/MAX
DELTA_VAL=0.1
; clock base (da 10ms)
timerIntMs=10
; conf parametri memoria READ/WRITE
PARAM_CONF=GIACO_CEDAX_001.json
NO_PING=FALSE
; conf blocchi memoria x READ
MEM_BLOCK=GIACO_CEDAX_001_MBlock.json
; conf aree allarme
ALARM_CONF=GIACO_CEDAX_001_alarm.json
; rimozione check limiti min/max dynData
disDynDataRangeCheck=true
[BRANCH]
NAME=master
+258
View File
@@ -0,0 +1,258 @@
{
"mMapWrite": {
"Dose_Staz_1": {
"name": "Dose_Staz_1",
"description": "Dose Stazione 1",
"memAddr": "40024",
"tipoMem": "Int",
"index": 24,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
},
"Dose_Staz_2": {
"name": "Dose_Staz_2",
"description": "Dose Stazione 2",
"memAddr": "40025",
"tipoMem": "Int",
"index": 25,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
},
"Dose_Staz_3": {
"name": "Dose_Staz_3",
"description": "Dose Stazione 3",
"memAddr": "40026",
"tipoMem": "Int",
"index": 26,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
},
"Dose_Staz_4": {
"name": "Dose_Staz_4",
"description": "Dose Stazione 4",
"memAddr": "40027",
"tipoMem": "Int",
"index": 27,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
}
},
"mMapRead": {
"Stag_H2O": {
"name": "Stag_H2O",
"description": "Totale H2O Stagione",
"memAddr": "41001",
"tipoMem": "HLPInt",
"index": 1001,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 1,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"Stag_Prod1": {
"name": "Stag_Prod1",
"description": "Totale Prodotto 1 Stagione",
"memAddr": "41003",
"tipoMem": "HLPInt",
"index": 1003,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 1,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"Stag_Prod2": {
"name": "Stag_Prod2",
"description": "Totale Prodotto 2 Stagione",
"memAddr": "41005",
"tipoMem": "HLPInt",
"index": 1005,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 1,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"Stag_Prod3": {
"name": "Stag_Prod3",
"description": "Totale Prodotto 3 Stagione",
"memAddr": "41007",
"tipoMem": "HLPInt",
"index": 1007,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"Stag_Prod4": {
"name": "Stag_Prod4",
"description": "Totale Prodotto 4 Stagione",
"memAddr": "41009",
"tipoMem": "HLPInt",
"index": 1009,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"Giorno_H2O": {
"name": "Giorno_H2O",
"description": "Totale H2O Giorno",
"memAddr": "41011",
"tipoMem": "HLPInt",
"index": 1011,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 1,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"Giorno_Prod1": {
"name": "Giorno_Prod1",
"description": "Totale Prodotto 1 Giorno",
"memAddr": "41013",
"tipoMem": "HLPInt",
"index": 1013,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 1,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"Giorno_Prod2": {
"name": "Giorno_Prod2",
"description": "Totale Prodotto 2 Giorno",
"memAddr": "41015",
"tipoMem": "HLPInt",
"index": 1015,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 1,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"Giorno_Prod3": {
"name": "Giorno_Prod3",
"description": "Totale Prodotto 3 Giorno",
"memAddr": "41017",
"tipoMem": "HLPInt",
"index": 1017,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"Giorno_Prod4": {
"name": "Giorno_Prod4",
"description": "Totale Prodotto 4 Giorno",
"memAddr": "41019",
"tipoMem": "HLPInt",
"index": 1019,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"Dose_Staz_1": {
"name": "Dose_Staz_1",
"description": "Dose Stazione 1",
"memAddr": "40024",
"tipoMem": "Int",
"index": 24,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
},
"Dose_Staz_2": {
"name": "Dose_Staz_2",
"description": "Dose Stazione 2",
"memAddr": "40025",
"tipoMem": "Int",
"index": 25,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
},
"Dose_Staz_3": {
"name": "Dose_Staz_3",
"description": "Dose Stazione 3",
"memAddr": "40026",
"tipoMem": "Int",
"index": 26,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
},
"Dose_Staz_4": {
"name": "Dose_Staz_4",
"description": "Dose Stazione 4",
"memAddr": "40027",
"tipoMem": "Int",
"index": 27,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
}
}
}
@@ -0,0 +1,6 @@
{
"ReadBlocks": {
"40016": 16,
"40999": 32
}
}
@@ -3,26 +3,25 @@
;Impianto Cedax di Turi (test) - Giacovelli ;Impianto Cedax di Turi (test) - Giacovelli
CNCTYPE=MODBUS_TCP_CEDAX CNCTYPE=MODBUS_TCP_CEDAX
PING_MS_TIMEOUT=1000 PING_MS_TIMEOUT=1000
MinDeltaSec=5
[MACHINE] [MACHINE]
VENDOR=CEDAX VENDOR=CEDAX
MODEL=CEDAX MODEL=CEDAX Scarico
[CNC] [CNC]
IP=10.74.82.65 IP=192.168.2.61
PORT=502 PORT=502
[SERVER] [SERVER]
MPIP=https://iis01.egalware.com MPIP=http://192.168.1.14
;MPIP=https://gwms.egalware.com
MPURL=/MP/IO MPURL=/MP/IO
CMDBASE=/IOB/input/ CMDBASE=/IOB/input/
CMDFLOG=/IOB/flog/ CMDFLOG=/IOB/flog/
CMDALIVE=/IOB CMDALIVE=/IOB
CMDENABLED=/IOB/enabled/ CMDENABLED=/IOB/enabled/
CMDADV1=?valore= CMDADV1=?valore=
CMDREBO=/IOB/sendReboot?idxMacchina= CMDREBO=/sendReboot.aspx?idxMacchina=
;CMDREBO=/sendReboot.aspx?idxMacchina=
[MEMORY] [MEMORY]
ADDR_READ=41001 ADDR_READ=41001
@@ -63,13 +62,16 @@ DELTA_VAL=0.1
timerIntMs=10 timerIntMs=10
; conf parametri memoria READ/WRITE ; conf parametri memoria READ/WRITE
PARAM_CONF=GIACO_CEDAX_01.json PARAM_CONF=GIACO_CEDAX_002.json
NO_PING=TRUE NO_PING=TRUE
; conf blocchi memoria x READ ; conf blocchi memoria x READ
MEM_BLOCK=GIACO_CEDAX_01_MBlock.json MEM_BLOCK=GIACO_CEDAX_002_MBlock.json
; conf aree allarme ; conf aree allarme
ALARM_CONF=GIACO_CEDAX_01_alarm.json ALARM_CONF=GIACO_CEDAX_002_alarm.json
; rimozione check limiti min/max dynData
disDynDataRangeCheck=true
[BRANCH] [BRANCH]
NAME=master NAME=master
+286
View File
@@ -0,0 +1,286 @@
{
"mMapWrite": {
"Dose_Staz_1": {
"name": "Dose_Staz_1",
"description": "Dose Stazione 1",
"memAddr": "40024",
"tipoMem": "Int",
"index": 24,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
},
"Dose_Staz_2": {
"name": "Dose_Staz_2",
"description": "Dose Stazione 2",
"memAddr": "40025",
"tipoMem": "Int",
"index": 25,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
},
"Dose_Staz_3": {
"name": "Dose_Staz_3",
"description": "Dose Stazione 3",
"memAddr": "40026",
"tipoMem": "Int",
"index": 26,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
},
"Dose_Staz_4": {
"name": "Dose_Staz_4",
"description": "Dose Stazione 4",
"memAddr": "40027",
"tipoMem": "Int",
"index": 27,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
}
},
"mMapRead": {
"A_Stag_H2O": {
"name": "A_Stag_H2O",
"description": "Linea A Totale H2O Stagione",
"memAddr": "41001",
"tipoMem": "HLPInt",
"index": 1001,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 1,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"A_Stag_Prod1": {
"name": "A_Stag_Prod1",
"description": "Linea A Totale Prodotto 1 Stagione",
"memAddr": "40003",
"tipoMem": "HLPInt",
"index": 1003,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"A_Stag_Prod2": {
"name": "A_Stag_Prod2",
"description": "Linea A Totale Prodotto 2 Stagione",
"memAddr": "40005",
"tipoMem": "HLPInt",
"index": 1005,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"A_Giorno_H2O": {
"name": "A_Giorno_H2O",
"description": "Linea A Totale H2O Giorno",
"memAddr": "41007",
"tipoMem": "HLPInt",
"index": 1007,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 1,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"A_Giorno_Prod1": {
"name": "A_Giorno_Prod1",
"description": "Linea A Totale Prodotto 1 Giorno",
"memAddr": "40009",
"tipoMem": "HLPInt",
"index": 1009,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"A_Giorno_Prod2": {
"name": "A_Giorno_Prod2",
"description": "Linea A Totale Prodotto 2 Giorno",
"memAddr": "40011",
"tipoMem": "HLPInt",
"index": 1011,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"B_Stag_H2O": {
"name": "B_Stag_H2O",
"description": "Linea B Totale H2O Stagione",
"memAddr": "41013",
"tipoMem": "HLPInt",
"index": 1013,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 1,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"B_Stag_Prod1": {
"name": "B_Stag_Prod1",
"description": "Linea B Totale Prodotto 1 Stagione",
"memAddr": "40015",
"tipoMem": "HLPInt",
"index": 1015,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"B_Stag_Prod2": {
"name": "B_Stag_Prod2",
"description": "Linea B Totale Prodotto 2 Stagione",
"memAddr": "40017",
"tipoMem": "HLPInt",
"index": 1009,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"B_Giorno_H2O": {
"name": "B_Giorno_H2O",
"description": "Linea B Totale H2O Giorno",
"memAddr": "41019",
"tipoMem": "HLPInt",
"index": 1019,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 1,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"B_Giorno_Prod1": {
"name": "B_Giorno_Prod1",
"description": "Linea B Totale Prodotto 1 Giorno",
"memAddr": "40021",
"tipoMem": "HLPInt",
"index": 1021,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"B_Giorno_Prod2": {
"name": "B_Giorno_Prod2",
"description": "Linea B Totale Prodotto 2 Giorno",
"memAddr": "40023",
"tipoMem": "HLPInt",
"index": 1023,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"Dose_Staz_1": {
"name": "Dose_Staz_1",
"description": "Dose Stazione 1",
"memAddr": "40024",
"tipoMem": "Int",
"index": 24,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
},
"Dose_Staz_2": {
"name": "Dose_Staz_2",
"description": "Dose Stazione 2",
"memAddr": "40025",
"tipoMem": "Int",
"index": 25,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
},
"Dose_Staz_3": {
"name": "Dose_Staz_3",
"description": "Dose Stazione 3",
"memAddr": "40026",
"tipoMem": "Int",
"index": 26,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
},
"Dose_Staz_4": {
"name": "Dose_Staz_4",
"description": "Dose Stazione 4",
"memAddr": "40027",
"tipoMem": "Int",
"index": 27,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
}
}
}
@@ -0,0 +1,6 @@
{
"ReadBlocks": {
"40016": 16,
"40999": 32
}
}
@@ -0,0 +1,27 @@
[
{
"description": "Allarmi Impianto",
"tipoMem": "DInt",
"memAddr": "40999",
"index": 999,
"size": 2,
"messages": [
"##On Pompa 1",
"Allarme Pompa 1",
"##On Pompa 2",
"Allarme Pompa 2",
"##On Pompa 3",
"Allarme Pompa 3",
"##On Pompa 4",
"Allarme Pompa 4",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##"
]
}
]
@@ -0,0 +1,77 @@
;Configurazione IOB-WIN
[IOB]
;Impianto Cedax di Turi (test) - Giacovelli
CNCTYPE=MODBUS_TCP_CEDAX
PING_MS_TIMEOUT=1000
MinDeltaSec=5
[MACHINE]
VENDOR=CEDAX
MODEL=CEDAX Lavorazione
[CNC]
IP=192.168.2.62
PORT=502
[SERVER]
MPIP=http://192.168.1.14
MPURL=/MP/IO
CMDBASE=/IOB/input/
CMDFLOG=/IOB/flog/
CMDALIVE=/IOB
CMDENABLED=/IOB/enabled/
CMDADV1=?valore=
CMDREBO=/sendReboot.aspx?idxMacchina=
[MEMORY]
ADDR_READ=41001
ADDR_WRITE=41021
SIZE_READ=20
SIZE_WRITE=0
HR_BASE_ADDR=40000
[BLINK]
;MAX_COUNTER_BLINK = 30
MAX_COUNTER_BLINK = 15
;bit0 = 0
;bit1 = 0
;bit2 = 1
;bit3 = 1
;bit4 = 1
;bit5 = 0
;bit6 = 0
;bit7 = 0
BLINK_FILT=0
;BLINK_FILT=28
[OPTPAR]
;PZCOUNT_MODE=STD.[PAR/MEM].info|BIT.indice
PZCOUNT_MODE=STD.DB85.DBRE16
DISABLE_PZCOUNT=TRUE
ENABLE_SEND_PZC_BLOCK=TRUE
MIN_SEND_PZC_BLOCK=0
MAX_SEND_PZC_BLOCK=100
; GEST DATI DYN
ENABLE_DYN_DATA=TRUE
FORCE_DYN_DATA=TRUE
; gestione delta minimo accettabile tra min/MAX
DELTA_VAL=0.1
; clock base (da 10ms)
timerIntMs=10
; conf parametri memoria READ/WRITE
PARAM_CONF=GIACO_CEDAX_003.json
NO_PING=TRUE
; conf blocchi memoria x READ
MEM_BLOCK=GIACO_CEDAX_003_MBlock.json
; conf aree allarme
ALARM_CONF=GIACO_CEDAX_003_alarm.json
; rimozione check limiti min/max dynData
disDynDataRangeCheck=true
[BRANCH]
NAME=master
@@ -1,5 +1,47 @@
{ {
"mMapWrite": { "mMapWrite": {
"Dose_Staz_1": {
"name": "Dose_Staz_1",
"description": "Dose Stazione 1",
"memAddr": "40024",
"tipoMem": "Int",
"index": 24,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
},
"Dose_Staz_2": {
"name": "Dose_Staz_2",
"description": "Dose Stazione 2",
"memAddr": "40025",
"tipoMem": "Int",
"index": 25,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
},
"Dose_Staz_3": {
"name": "Dose_Staz_3",
"description": "Dose Stazione 3",
"memAddr": "40026",
"tipoMem": "Int",
"index": 26,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
}
}, },
"mMapRead": { "mMapRead": {
"Stag_H2O": { "Stag_H2O": {
@@ -58,26 +100,12 @@
"maxVal": 999999999, "maxVal": 999999999,
"unit": "l" "unit": "l"
}, },
"Stag_Prod4": {
"name": "Stag_Prod4",
"description": "Totale Prodotto 4 Stagione",
"memAddr": "40009",
"tipoMem": "HLPInt",
"index": 1009,
"size": 2,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "l"
},
"Giorno_H2O": { "Giorno_H2O": {
"name": "Giorno_H2O", "name": "Giorno_H2O",
"description": "Totale H2O Giorno", "description": "Totale H2O Giorno",
"memAddr": "41011", "memAddr": "41009",
"tipoMem": "HLPInt", "tipoMem": "HLPInt",
"index": 1011, "index": 1009,
"size": 2, "size": 2,
"func": "MEDIAN", "func": "MEDIAN",
"period": 90, "period": 90,
@@ -89,9 +117,9 @@
"Giorno_Prod1": { "Giorno_Prod1": {
"name": "Giorno_Prod1", "name": "Giorno_Prod1",
"description": "Totale Prodotto 1 Giorno", "description": "Totale Prodotto 1 Giorno",
"memAddr": "40013", "memAddr": "40011",
"tipoMem": "HLPInt", "tipoMem": "HLPInt",
"index": 1013, "index": 1011,
"size": 2, "size": 2,
"func": "MEDIAN", "func": "MEDIAN",
"period": 90, "period": 90,
@@ -103,9 +131,9 @@
"Giorno_Prod2": { "Giorno_Prod2": {
"name": "Giorno_Prod2", "name": "Giorno_Prod2",
"description": "Totale Prodotto 2 Giorno", "description": "Totale Prodotto 2 Giorno",
"memAddr": "40015", "memAddr": "40013",
"tipoMem": "HLPInt", "tipoMem": "HLPInt",
"index": 1015, "index": 1013,
"size": 2, "size": 2,
"func": "MEDIAN", "func": "MEDIAN",
"period": 90, "period": 90,
@@ -117,9 +145,9 @@
"Giorno_Prod3": { "Giorno_Prod3": {
"name": "Giorno_Prod3", "name": "Giorno_Prod3",
"description": "Totale Prodotto 3 Giorno", "description": "Totale Prodotto 3 Giorno",
"memAddr": "40017", "memAddr": "40015",
"tipoMem": "HLPInt", "tipoMem": "HLPInt",
"index": 1017, "index": 1015,
"size": 2, "size": 2,
"func": "MEDIAN", "func": "MEDIAN",
"period": 90, "period": 90,
@@ -128,19 +156,47 @@
"maxVal": 999999999, "maxVal": 999999999,
"unit": "l" "unit": "l"
}, },
"Giorno_Prod4": { "Dose_Staz_1": {
"name": "Giorno_Prod4", "name": "Dose_Staz_1",
"description": "Totale Prodotto 4 Giorno", "description": "Dose Stazione 1",
"memAddr": "40021", "memAddr": "40024",
"tipoMem": "HLPInt", "tipoMem": "Int",
"index": 1021, "index": 24,
"size": 2, "size": 1,
"func": "MEDIAN", "func": "MEDIAN",
"period": 90, "period": 90,
"factor": 0.01, "factor": 0.01,
"minVal": 0, "minVal": 0,
"maxVal": 999999999, "maxVal": 999999999,
"unit": "l" "unit": "%"
},
"Dose_Staz_2": {
"name": "Dose_Staz_2",
"description": "Dose Stazione 2",
"memAddr": "40025",
"tipoMem": "Int",
"index": 25,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
},
"Dose_Staz_3": {
"name": "Dose_Staz_3",
"description": "Dose Stazione 3",
"memAddr": "40026",
"tipoMem": "Int",
"index": 26,
"size": 1,
"func": "MEDIAN",
"period": 90,
"factor": 0.01,
"minVal": 0,
"maxVal": 999999999,
"unit": "%"
} }
} }
} }
@@ -0,0 +1,6 @@
{
"ReadBlocks": {
"40016": 16,
"40999": 32
}
}
@@ -0,0 +1,27 @@
[
{
"description": "Allarmi Impianto",
"tipoMem": "DInt",
"memAddr": "40999",
"index": 999,
"size": 2,
"messages": [
"##On Pompa 1",
"Allarme Pompa 1",
"##On Pompa 2",
"Allarme Pompa 2",
"##On Pompa 3",
"Allarme Pompa 3",
"##On Pompa 4",
"Allarme Pompa 4",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##"
]
}
]
@@ -1,5 +0,0 @@
{
"ReadBlocks": {
"40999": 30
}
}
@@ -0,0 +1,80 @@
;Configurazione IOB-WIN
[IOB]
;Impianto Cedax di Turi (test) - Giacovelli
CNCTYPE=MODBUS_TCP_CENTERFRIGO
PING_MS_TIMEOUT=1000
MinDeltaSec=5
[MACHINE]
VENDOR=Centerfrigo
MODEL=Impianto Turi
[CNC]
IP=192.168.4.161
PORT=502
[SERVER]
MPIP=http://192.168.1.14
MPURL=/MP/IO
CMDBASE=/IOB/input/
CMDFLOG=/IOB/flog/
CMDALIVE=/IOB
CMDENABLED=/IOB/enabled/
CMDADV1=?valore=
CMDREBO=/sendReboot.aspx?idxMacchina=
[MEMORY]
ADDR_READ=40001
ADDR_WRITE=41000
SIZE_READ=2400
SIZE_WRITE=0
HR_BASE_ADDR=40000
DELTA_BASE=0
[BLINK]
;MAX_COUNTER_BLINK = 30
MAX_COUNTER_BLINK = 15
;bit0 = 0
;bit1 = 0
;bit2 = 1
;bit3 = 1
;bit4 = 1
;bit5 = 0
;bit6 = 0
;bit7 = 0
BLINK_FILT=0
;BLINK_FILT=28
[OPTPAR]
;PZCOUNT_MODE=STD.[PAR/MEM].info|BIT.indice
PZCOUNT_MODE=STD.DB85.DBRE16
DISABLE_PZCOUNT=TRUE
ENABLE_SEND_PZC_BLOCK=TRUE
MIN_SEND_PZC_BLOCK=0
MAX_SEND_PZC_BLOCK=100
; GEST DATI DYN
ENABLE_DYN_DATA=TRUE
FORCE_DYN_DATA=TRUE
; gestione delta minimo accettabile tra min/MAX
DELTA_VAL=0.1
; clock base (da 10ms)
timerIntMs=100
minWait=50
maxWait=150
; conf parametri memoria READ/WRITE
PARAM_CONF=GIACO_CENTERFRIGO.json
NO_PING=FALSE
; conf blocchi memoria x READ
MEM_BLOCK=GIACO_CENTERFRIGO_MBlock.json
; conf aree allarme
ALARM_CONF=GIACO_CENTERFRIGO_alarm.json
; rimozione check limiti min/max dynData
disDynDataRangeCheck=true
[BRANCH]
NAME=master
@@ -0,0 +1,458 @@
{
"mMapWrite": {
"SetPoint_Tunnel_Req": {
"name": "SetPoint_Tunnel_Req",
"description": "Setpoint Tunnel",
"memAddr": "44010",
"tipoMem": "RealLH",
"index": 4010,
"size": 2,
"factor": 1,
"minVal": -5,
"maxVal": 15,
"unit": "°C"
},
"SetPoint_Cella_01_Req": {
"name": "SetPoint_Cella_01_Req",
"description": "Setpoint Cella 01",
"memAddr": "44012",
"tipoMem": "RealLH",
"index": 4012,
"size": 2,
"factor": 1,
"minVal": -5,
"maxVal": 15,
"unit": "°C"
},
"SetPoint_Cella_02_Req": {
"name": "SetPoint_Cella_02_Req",
"description": "Setpoint Cella 02",
"memAddr": "44014",
"tipoMem": "RealLH",
"index": 4014,
"size": 2,
"factor": 1,
"minVal": -5,
"maxVal": 15,
"unit": "°C"
},
"SetPoint_Cella_03_Req": {
"name": "SetPoint_Cella_03_Req",
"description": "Setpoint Cella 03",
"memAddr": "44016",
"tipoMem": "RealLH",
"index": 4016,
"size": 2,
"factor": 1,
"minVal": -5,
"maxVal": 15,
"unit": "°C"
},
"SetPoint_Cella_04_Req": {
"name": "SetPoint_Cella_04_Req",
"description": "Setpoint Cella 04",
"memAddr": "44018",
"tipoMem": "RealLH",
"index": 4018,
"size": 2,
"factor": 1,
"minVal": -5,
"maxVal": 15,
"unit": "°C"
}
},
"mMapRead": {
"Temp_Tunnel": {
"name": "Temp_Tunnel",
"description": "Temperatura Tunnel",
"memAddr": "41520",
"tipoMem": "Real",
"index": 1520,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"SetPoint_Tunnel": {
"name": "SetPoint_Tunnel",
"description": "Setpoint Tunnel",
"memAddr": "41560",
"tipoMem": "Real",
"index": 1560,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"Temp_Cella_01": {
"name": "Temp_Cella_01",
"description": "Temperatura Cella 01",
"memAddr": "41660",
"tipoMem": "Real",
"index": 1660,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"SetPoint_Cella_01": {
"name": "SetPoint_Cella_01",
"description": "Setpoint Cella 01",
"memAddr": "41700",
"tipoMem": "Real",
"index": 1700,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"Temp_Cella_02": {
"name": "Temp_Cella_02",
"description": "Temperatura Cella 02",
"memAddr": "41810",
"tipoMem": "Real",
"index": 1810,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"SetPoint_Cella_02": {
"name": "SetPoint_Cella_02",
"description": "Setpoint Cella 02",
"memAddr": "41840",
"tipoMem": "Real",
"index": 1840,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"Temp_Cella_03": {
"name": "Temp_Cella_03",
"description": "Temperatura Cella 03",
"memAddr": "41930",
"tipoMem": "Real",
"index": 1930,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"SetPoint_Cella_03": {
"name": "SetPoint_Cella_03",
"description": "Setpoint Cella 03",
"memAddr": "41960",
"tipoMem": "Real",
"index": 1960,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"Temp_Cella_04": {
"name": "Temp_Cella_04",
"description": "Temperatura Cella 04",
"memAddr": "42050",
"tipoMem": "Real",
"index": 2050,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"SetPoint_Cella_04": {
"name": "SetPoint_Cella_04",
"description": "Setpoint Cella 04",
"memAddr": "41840",
"tipoMem": "Real",
"index": 1840,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"Temp_Sala_Bassa": {
"name": "Temp_Sala_Bassa",
"description": "Temperatura Sala Zona Bassa",
"memAddr": "42290",
"tipoMem": "Real",
"index": 2290,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"SetPoint_Sala_Bassa": {
"name": "SetPoint_Sala_Bassa",
"description": "Setpoint Sala Zona Bassa",
"memAddr": "42330",
"tipoMem": "Real",
"index": 2330,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"Temp_Sala_Alta": {
"name": "Temp_Sala_Alta",
"description": "Temperatura Sala Zona Alta",
"memAddr": "42420",
"tipoMem": "Real",
"index": 2420,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"SetPoint_Sala_Alta": {
"name": "SetPoint_Sala_Alta",
"description": "Setpoint Sala Zona Alta",
"memAddr": "42460",
"tipoMem": "Real",
"index": 2460,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"Temp_Hydrocooler": {
"name": "Temp_Hydrocooler",
"description": "Temperatura Hydrocooler",
"memAddr": "42550",
"tipoMem": "Real",
"index": 2550,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"SetPoint_Hydrocooler": {
"name": "SetPoint_Hydrocooler",
"description": "Setpoint Hydrocooler",
"memAddr": "42580",
"tipoMem": "Real",
"index": 2580,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"Temp_Calibr_01": {
"name": "Temp_Calibr_01",
"description": "Temperatura Calibratrice 01",
"memAddr": "42670",
"tipoMem": "Real",
"index": 2670,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"SetPoint_Calibr_01": {
"name": "SetPoint_Calibr_01",
"description": "SetPoint Calibratrice 01",
"memAddr": "42710",
"tipoMem": "Real",
"index": 2710,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"Temp_Calibr_02": {
"name": "Temp_Calibr_02",
"description": "Temperatura Calibratrice 02",
"memAddr": "42800",
"tipoMem": "Real",
"index": 2800,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"SetPoint_Calibr_02": {
"name": "SetPoint_Calibr_02",
"description": "SetPoint Calibratrice 02",
"memAddr": "42830",
"tipoMem": "Real",
"index": 2830,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"Temp_Calibr_03": {
"name": "Temp_Calibr_03",
"description": "Temperatura Calibratrice 03",
"memAddr": "42920",
"tipoMem": "Real",
"index": 2920,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"SetPoint_Calibr_03": {
"name": "SetPoint_Calibr_03",
"description": "SetPoint Calibratrice 03",
"memAddr": "42950",
"tipoMem": "Real",
"index": 2950,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"Temp_Calibr_04": {
"name": "Temp_Calibr_04",
"description": "Temperatura Calibratrice 04",
"memAddr": "43050",
"tipoMem": "Real",
"index": 3050,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"SetPoint_Calibr_04": {
"name": "SetPoint_Calibr_04",
"description": "SetPoint Calibratrice 04",
"memAddr": "43080",
"tipoMem": "Real",
"index": 3080,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"Temp_Serbatoi": {
"name": "Temp_Serbatoi",
"description": "Temperatura Searbatoi",
"memAddr": "43170",
"tipoMem": "Real",
"index": 3170,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"SetPoint_Searbatoi": {
"name": "SetPoint_Searbatoi",
"description": "SetPoint Searbatoi",
"memAddr": "43200",
"tipoMem": "Real",
"index": 3200,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"Temp_Serpentine": {
"name": "Temp_Serpentine",
"description": "Temperatura Serpentine",
"memAddr": "43290",
"tipoMem": "Real",
"index": 3290,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
},
"SetPoint_Serpentine": {
"name": "SetPoint_Serpentine",
"description": "SetPoint Serpentine",
"memAddr": "43320",
"tipoMem": "Real",
"index": 3320,
"size": 2,
"func": "MEDIAN",
"period": 60,
"factor": 1,
"minVal": -100,
"maxVal": 100,
"unit": "°C"
}
}
}
@@ -0,0 +1,25 @@
{
"ReadBlocks": {
"41500": 32,
"41532": 32,
"41616": 32,
"41650": 32,
"41682": 32,
"41800": 32,
"41832": 32,
"41920": 44,
"42040": 44,
"42160": 8,
"42290": 44,
"42410": 32,
"42442": 32,
"42540": 44,
"42660": 32,
"42692": 32,
"42790": 44,
"42910": 44,
"43040": 44,
"43160": 44,
"43280": 44
}
}
@@ -0,0 +1,227 @@
[
{
"description": "Centrale Frigorifera",
"tipoMem": "DInt",
"memAddr": "41508",
"index": 1508,
"size": 2,
"messages": [
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"ALLARME CENTRALE FRIGORIFERA",
"ALLARME GENERICO IMPIANTO",
"##",
"##",
"##",
"##",
"##",
"##",
"##"
]
},
{
"description": "Allarmi Tunnel",
"tipoMem": "DInt",
"memAddr": "41654",
"index": 1654,
"size": 2,
"messages": [
"ALLARME ALTA TEMPERATURA AMBIENTE TUNNEL",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"ALLARME CUMULATIVO TUNNEL",
"##",
"##",
"##",
"##",
"##"
]
},
{
"description": "Allarmi Cella 01",
"tipoMem": "DInt",
"memAddr": "41804",
"index": 1804,
"size": 2,
"messages": [
"ALLARME ALTA TEMPERATURA AMBIENTE CELLA 01",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"ALLARME CUMULATIVO CELLA 01",
"##",
"##",
"##",
"##",
"##"
]
},
{
"description": "Allarmi Cella 02",
"tipoMem": "DInt",
"memAddr": "41924",
"index": 1924,
"size": 2,
"messages": [
"ALLARME ALTA TEMPERATURA AMBIENTE CELLA 02",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"ALLARME CUMULATIVO CELLA 02",
"##",
"##",
"##",
"##",
"##"
]
},
{
"description": "Allarmi Cella 03",
"tipoMem": "DInt",
"memAddr": "42044",
"index": 2044,
"size": 2,
"messages": [
"ALLARME ALTA TEMPERATURA AMBIENTE CELLA 03",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"ALLARME CUMULATIVO CELLA 03",
"##",
"##",
"##",
"##",
"##"
]
},
// {
// "description": "Allarmi Cella 04",
// "tipoMem": "DInt",
// "memAddr": "42164",
// "index": 2164,
// "size": 2,
// "messages": [
// "ALLARME ALTA TEMPERATURA AMBIENTE CELLA 04",
// "##",
// "##",
// "##",
// "##",
// "##",
// "##",
// "##",
// "##",
// "##",
// "ALLARME CUMULATIVO CELLA 04",
// "##",
// "##",
// "##",
// "##",
// "##"
// ]
// },
{
"description": "Allarmi Sala Bassa",
"tipoMem": "DInt",
"memAddr": "42414",
"index": 2414,
"size": 2,
"messages": [
"ALLARME ALTA TEMPERATURA AMBIENTE SALA BASSA",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"ALLARME CUMULATIVO SALA BASSA",
"##",
"##",
"##",
"##",
"##"
]
},
{
"description": "Allarmi Sala Alta",
"tipoMem": "DInt",
"memAddr": "42544",
"index": 2544,
"size": 2,
"messages": [
"ALLARME ALTA TEMPERATURA AMBIENTE SALA ALTA",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"ALLARME CUMULATIVO SALA ALTA",
"##",
"##",
"##",
"##",
"##"
]
},
{
"description": "Allarmi Hydrocooler",
"tipoMem": "DInt",
"memAddr": "42664",
"index": 2664,
"size": 2,
"messages": [
"ALLARME ALTA TEMPERATURA AMBIENTE HYDROCOOLER",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"##",
"ALLARME CUMULATIVO HYDROCOOLER",
"##",
"##",
"##",
"##",
"##"
]
}
]

Some files were not shown because too many files have changed in this diff Show More