From fc5164fa1cf0ef665464697014ec63ad810b1047 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 8 May 2023 16:58:45 +0200 Subject: [PATCH 1/4] Aggiunta state machine fluitek senza contapezzi --- StateMachine/Fluitek/10049_LVF_FANUC.csv | 449 +++ StateMachine/Fluitek/10049_LVF_FANUC.rul | 96 + .../Fluitek/10063_SEGHETTO_DANOBAT.csv | 3585 +++++++++++++++++ .../Fluitek/10063_SEGHETTO_DANOBAT.rul | 111 + .../Fluitek/10066_FLUITEK_SEMAPHORE.csv | 81 + .../Fluitek/10066_FLUITEK_SEMAPHORE.rul | 92 + StateMachine/Fluitek/10067_FLUITEK_FEMCO.csv | 193 + StateMachine/Fluitek/10067_FLUITEK_FEMCO.rul | 94 + 8 files changed, 4701 insertions(+) create mode 100644 StateMachine/Fluitek/10049_LVF_FANUC.csv create mode 100644 StateMachine/Fluitek/10049_LVF_FANUC.rul create mode 100644 StateMachine/Fluitek/10063_SEGHETTO_DANOBAT.csv create mode 100644 StateMachine/Fluitek/10063_SEGHETTO_DANOBAT.rul create mode 100644 StateMachine/Fluitek/10066_FLUITEK_SEMAPHORE.csv create mode 100644 StateMachine/Fluitek/10066_FLUITEK_SEMAPHORE.rul create mode 100644 StateMachine/Fluitek/10067_FLUITEK_FEMCO.csv create mode 100644 StateMachine/Fluitek/10067_FLUITEK_FEMCO.rul diff --git a/StateMachine/Fluitek/10049_LVF_FANUC.csv b/StateMachine/Fluitek/10049_LVF_FANUC.csv new file mode 100644 index 0000000..a3f6653 --- /dev/null +++ b/StateMachine/Fluitek/10049_LVF_FANUC.csv @@ -0,0 +1,449 @@ +IdxFamigliaIngresso;IdxMicroStato;ValoreIngresso;IdxTipoEvento;next_IdxMicroStato +10049;0;0;14;1 +10049;0;1;30;7 +10049;0;2;14;1 +10049;0;3;30;7 +10049;0;4;14;1 +10049;0;5;30;7 +10049;0;6;14;1 +10049;0;7;30;7 +10049;0;8;14;1 +10049;0;9;30;7 +10049;0;10;14;1 +10049;0;11;30;7 +10049;0;12;14;1 +10049;0;13;30;7 +10049;0;14;14;1 +10049;0;15;30;7 +10049;0;16;14;1 +10049;0;17;24;6 +10049;0;18;14;1 +10049;0;19;24;6 +10049;0;20;14;1 +10049;0;21;24;6 +10049;0;22;14;1 +10049;0;23;24;6 +10049;0;24;14;1 +10049;0;25;24;6 +10049;0;26;14;1 +10049;0;27;24;6 +10049;0;28;14;1 +10049;0;29;24;6 +10049;0;30;14;1 +10049;0;31;24;6 +10049;0;32;14;1 +10049;0;33;15;2 +10049;0;34;14;1 +10049;0;35;16;3 +10049;0;36;14;1 +10049;0;37;15;2 +10049;0;38;14;1 +10049;0;39;16;3 +10049;0;40;14;1 +10049;0;41;18;5 +10049;0;42;14;1 +10049;0;43;18;5 +10049;0;44;14;1 +10049;0;45;18;5 +10049;0;46;14;1 +10049;0;47;18;5 +10049;0;48;14;1 +10049;0;49;24;6 +10049;0;50;14;1 +10049;0;51;24;6 +10049;0;52;14;1 +10049;0;53;24;6 +10049;0;54;14;1 +10049;0;55;24;6 +10049;0;56;14;1 +10049;0;57;24;6 +10049;0;58;14;1 +10049;0;59;24;6 +10049;0;60;14;1 +10049;0;61;24;6 +10049;0;62;14;1 +10049;0;63;24;6 +10049;1;1;30;7 +10049;1;3;30;7 +10049;1;5;30;7 +10049;1;7;30;7 +10049;1;9;30;7 +10049;1;11;30;7 +10049;1;13;30;7 +10049;1;15;30;7 +10049;1;17;24;6 +10049;1;19;24;6 +10049;1;21;24;6 +10049;1;23;24;6 +10049;1;25;24;6 +10049;1;27;24;6 +10049;1;29;24;6 +10049;1;31;24;6 +10049;1;33;15;2 +10049;1;35;16;3 +10049;1;37;15;2 +10049;1;39;16;3 +10049;1;41;18;5 +10049;1;43;18;5 +10049;1;45;18;5 +10049;1;47;18;5 +10049;1;49;24;6 +10049;1;51;24;6 +10049;1;53;24;6 +10049;1;55;24;6 +10049;1;57;24;6 +10049;1;59;24;6 +10049;1;61;24;6 +10049;1;63;24;6 +10049;2;0;14;1 +10049;2;1;30;7 +10049;2;2;14;1 +10049;2;3;30;7 +10049;2;4;14;1 +10049;2;5;30;7 +10049;2;6;14;1 +10049;2;7;30;7 +10049;2;8;14;1 +10049;2;9;30;7 +10049;2;10;14;1 +10049;2;11;30;7 +10049;2;12;14;1 +10049;2;13;30;7 +10049;2;14;14;1 +10049;2;15;30;7 +10049;2;16;14;1 +10049;2;17;24;6 +10049;2;18;14;1 +10049;2;19;24;6 +10049;2;20;14;1 +10049;2;21;24;6 +10049;2;22;14;1 +10049;2;23;24;6 +10049;2;24;14;1 +10049;2;25;24;6 +10049;2;26;14;1 +10049;2;27;24;6 +10049;2;28;14;1 +10049;2;29;24;6 +10049;2;30;14;1 +10049;2;31;24;6 +10049;2;32;14;1 +10049;2;34;14;1 +10049;2;35;16;3 +10049;2;36;14;1 +10049;2;38;14;1 +10049;2;39;16;3 +10049;2;40;14;1 +10049;2;41;18;5 +10049;2;42;14;1 +10049;2;43;18;5 +10049;2;44;14;1 +10049;2;45;18;5 +10049;2;46;14;1 +10049;2;47;18;5 +10049;2;48;14;1 +10049;2;49;24;6 +10049;2;50;14;1 +10049;2;51;24;6 +10049;2;52;14;1 +10049;2;53;24;6 +10049;2;54;14;1 +10049;2;55;24;6 +10049;2;56;14;1 +10049;2;57;24;6 +10049;2;58;14;1 +10049;2;59;24;6 +10049;2;60;14;1 +10049;2;61;24;6 +10049;2;62;14;1 +10049;2;63;24;6 +10049;3;0;14;1 +10049;3;1;30;7 +10049;3;2;14;1 +10049;3;3;30;7 +10049;3;4;14;1 +10049;3;5;30;7 +10049;3;6;14;1 +10049;3;7;30;7 +10049;3;8;14;1 +10049;3;9;30;7 +10049;3;10;14;1 +10049;3;11;30;7 +10049;3;12;14;1 +10049;3;13;30;7 +10049;3;14;14;1 +10049;3;15;30;7 +10049;3;16;14;1 +10049;3;17;24;6 +10049;3;18;14;1 +10049;3;19;24;6 +10049;3;20;14;1 +10049;3;21;24;6 +10049;3;22;14;1 +10049;3;23;24;6 +10049;3;24;14;1 +10049;3;25;24;6 +10049;3;26;14;1 +10049;3;27;24;6 +10049;3;28;14;1 +10049;3;29;24;6 +10049;3;30;14;1 +10049;3;31;24;6 +10049;3;32;14;1 +10049;3;33;15;2 +10049;3;34;14;1 +10049;3;36;14;1 +10049;3;37;15;2 +10049;3;38;14;1 +10049;3;40;14;1 +10049;3;41;18;5 +10049;3;42;14;1 +10049;3;43;18;5 +10049;3;44;14;1 +10049;3;45;18;5 +10049;3;46;14;1 +10049;3;47;18;5 +10049;3;48;14;1 +10049;3;49;24;6 +10049;3;50;14;1 +10049;3;51;24;6 +10049;3;52;14;1 +10049;3;53;24;6 +10049;3;54;14;1 +10049;3;55;24;6 +10049;3;56;14;1 +10049;3;57;24;6 +10049;3;58;14;1 +10049;3;59;24;6 +10049;3;60;14;1 +10049;3;61;24;6 +10049;3;62;14;1 +10049;3;63;24;6 +10049;4;0;14;1 +10049;4;1;30;7 +10049;4;2;14;1 +10049;4;3;30;7 +10049;4;4;14;1 +10049;4;5;30;7 +10049;4;6;14;1 +10049;4;7;30;7 +10049;4;8;14;1 +10049;4;9;30;7 +10049;4;10;14;1 +10049;4;11;30;7 +10049;4;12;14;1 +10049;4;13;30;7 +10049;4;14;14;1 +10049;4;15;30;7 +10049;4;16;14;1 +10049;4;17;24;6 +10049;4;18;14;1 +10049;4;19;24;6 +10049;4;20;14;1 +10049;4;21;24;6 +10049;4;22;14;1 +10049;4;23;24;6 +10049;4;24;14;1 +10049;4;25;24;6 +10049;4;26;14;1 +10049;4;27;24;6 +10049;4;28;14;1 +10049;4;29;24;6 +10049;4;30;14;1 +10049;4;31;24;6 +10049;4;32;14;1 +10049;4;33;15;2 +10049;4;34;14;1 +10049;4;35;16;3 +10049;4;36;14;1 +10049;4;37;15;2 +10049;4;38;14;1 +10049;4;39;16;3 +10049;4;40;14;1 +10049;4;41;18;5 +10049;4;42;14;1 +10049;4;43;18;5 +10049;4;44;14;1 +10049;4;45;18;5 +10049;4;46;14;1 +10049;4;47;18;5 +10049;4;48;14;1 +10049;4;49;24;6 +10049;4;50;14;1 +10049;4;51;24;6 +10049;4;52;14;1 +10049;4;53;24;6 +10049;4;54;14;1 +10049;4;55;24;6 +10049;4;56;14;1 +10049;4;57;24;6 +10049;4;58;14;1 +10049;4;59;24;6 +10049;4;60;14;1 +10049;4;61;24;6 +10049;4;62;14;1 +10049;4;63;24;6 +10049;5;0;14;1 +10049;5;1;30;7 +10049;5;2;14;1 +10049;5;3;30;7 +10049;5;4;14;1 +10049;5;5;30;7 +10049;5;6;14;1 +10049;5;7;30;7 +10049;5;8;14;1 +10049;5;9;30;7 +10049;5;10;14;1 +10049;5;11;30;7 +10049;5;12;14;1 +10049;5;13;30;7 +10049;5;14;14;1 +10049;5;15;30;7 +10049;5;16;14;1 +10049;5;17;24;6 +10049;5;18;14;1 +10049;5;19;24;6 +10049;5;20;14;1 +10049;5;21;24;6 +10049;5;22;14;1 +10049;5;23;24;6 +10049;5;24;14;1 +10049;5;25;24;6 +10049;5;26;14;1 +10049;5;27;24;6 +10049;5;28;14;1 +10049;5;29;24;6 +10049;5;30;14;1 +10049;5;31;24;6 +10049;5;32;14;1 +10049;5;33;15;2 +10049;5;34;14;1 +10049;5;35;16;3 +10049;5;36;14;1 +10049;5;37;15;2 +10049;5;38;14;1 +10049;5;39;16;3 +10049;5;40;14;1 +10049;5;42;14;1 +10049;5;44;14;1 +10049;5;46;14;1 +10049;5;48;14;1 +10049;5;49;24;6 +10049;5;50;14;1 +10049;5;51;24;6 +10049;5;52;14;1 +10049;5;53;24;6 +10049;5;54;14;1 +10049;5;55;24;6 +10049;5;56;14;1 +10049;5;57;24;6 +10049;5;58;14;1 +10049;5;59;24;6 +10049;5;60;14;1 +10049;5;61;24;6 +10049;5;62;14;1 +10049;5;63;24;6 +10049;6;0;14;1 +10049;6;1;30;7 +10049;6;2;14;1 +10049;6;3;30;7 +10049;6;4;14;1 +10049;6;5;30;7 +10049;6;6;14;1 +10049;6;7;30;7 +10049;6;8;14;1 +10049;6;9;30;7 +10049;6;10;14;1 +10049;6;11;30;7 +10049;6;12;14;1 +10049;6;13;30;7 +10049;6;14;14;1 +10049;6;15;30;7 +10049;6;16;14;1 +10049;6;18;14;1 +10049;6;20;14;1 +10049;6;22;14;1 +10049;6;24;14;1 +10049;6;26;14;1 +10049;6;28;14;1 +10049;6;30;14;1 +10049;6;32;14;1 +10049;6;33;15;2 +10049;6;34;14;1 +10049;6;35;16;3 +10049;6;36;14;1 +10049;6;37;15;2 +10049;6;38;14;1 +10049;6;39;16;3 +10049;6;40;14;1 +10049;6;41;18;5 +10049;6;42;14;1 +10049;6;43;18;5 +10049;6;44;14;1 +10049;6;45;18;5 +10049;6;46;14;1 +10049;6;47;18;5 +10049;6;48;14;1 +10049;6;50;14;1 +10049;6;52;14;1 +10049;6;54;14;1 +10049;6;56;14;1 +10049;6;58;14;1 +10049;6;60;14;1 +10049;6;62;14;1 +10049;7;0;14;1 +10049;7;2;14;1 +10049;7;4;14;1 +10049;7;6;14;1 +10049;7;8;14;1 +10049;7;10;14;1 +10049;7;12;14;1 +10049;7;14;14;1 +10049;7;16;14;1 +10049;7;17;24;6 +10049;7;18;14;1 +10049;7;19;24;6 +10049;7;20;14;1 +10049;7;21;24;6 +10049;7;22;14;1 +10049;7;23;24;6 +10049;7;24;14;1 +10049;7;25;24;6 +10049;7;26;14;1 +10049;7;27;24;6 +10049;7;28;14;1 +10049;7;29;24;6 +10049;7;30;14;1 +10049;7;31;24;6 +10049;7;32;14;1 +10049;7;33;15;2 +10049;7;34;14;1 +10049;7;35;16;3 +10049;7;36;14;1 +10049;7;37;15;2 +10049;7;38;14;1 +10049;7;39;16;3 +10049;7;40;14;1 +10049;7;41;18;5 +10049;7;42;14;1 +10049;7;43;18;5 +10049;7;44;14;1 +10049;7;45;18;5 +10049;7;46;14;1 +10049;7;47;18;5 +10049;7;48;14;1 +10049;7;49;24;6 +10049;7;50;14;1 +10049;7;51;24;6 +10049;7;52;14;1 +10049;7;53;24;6 +10049;7;54;14;1 +10049;7;55;24;6 +10049;7;56;14;1 +10049;7;57;24;6 +10049;7;58;14;1 +10049;7;59;24;6 +10049;7;60;14;1 +10049;7;61;24;6 +10049;7;62;14;1 +10049;7;63;24;6 diff --git a/StateMachine/Fluitek/10049_LVF_FANUC.rul b/StateMachine/Fluitek/10049_LVF_FANUC.rul new file mode 100644 index 0000000..4f55042 --- /dev/null +++ b/StateMachine/Fluitek/10049_LVF_FANUC.rul @@ -0,0 +1,96 @@ +# +# LVF torni FANUC con contapezzi SEMPRE attivo (anche in attrezzaggio) +# +# partenza da IdxFam 42, COMMENTATO CONTAPEZZI +# +# 2020.09.24: cambiato emergenza in emergenza negata/armata +# +$DEFINITIONS + +$NAME : FANUC +$IDX : 10049 +$N_STATES : 8 +$N_BITS : 6 + +#definizione bit : obbligatorio iniziare da 0 + +$BIT : 0 : power_on +$BIT : 1 : run +$BIT : 2 : end_cycle +$BIT : 3 : alarm +$BIT : 4 : manual +$BIT : 5 : armedEmerg +#$BIT : 6 : alarm_air_oil +#$BIT : 7 : auto_mode + +#definizione stati : obbligatorio iniziare da 0 + +$STATE : 0 : ST_Init +$STATE : 1 : ST_Power_off +$STATE : 2 : ST_Machine_ready +$STATE : 3 : ST_Run +$STATE : 4 : ST_Cycle_end +$STATE : 5 : ST_Alarm +$STATE : 6 : ST_Manual +$STATE : 7 : ST_Emergency + + +#definizione eventi : obbligatorio iniziare da 0 + +$EVENT : 00 : EV_00 +$EVENT : 01 : EV_01 +$EVENT : 02 : EV_02 +$EVENT : 03 : EV_03 +$EVENT : 04 : EV_04 +$EVENT : 05 : EV_05 +$EVENT : 06 : EV_06 +$EVENT : 07 : EV_07 +$EVENT : 08 : EV_08 +$EVENT : 09 : EV_09 +$EVENT : 10 : EV_10 +$EVENT : 11 : EV_11 +$EVENT : 12 : EV_12 +$EVENT : 13 : HW_init +$EVENT : 14 : HW_power_off +$EVENT : 15 : HW_power_on +$EVENT : 16 : HW_machining +$EVENT : 17 : HW_end_machining +$EVENT : 18 : HW_error +$EVENT : 19 : EV_19 +$EVENT : 20 : Contapezzi +$EVENT : 21 : HW_start_pallet +$EVENT : 22 : HW_end_pallet +$EVENT : 23 : HW_rottura_nastro_abrasivo +$EVENT : 24 : HW_manuale +$EVENT : 25 : HW_nastro_scarico_pieno +$EVENT : 26 : EV_26 +$EVENT : 27 : Timer_timeout_tempo_ciclo +$EVENT : 28 : Timer_timeout_TURNO_by_tempo_ciclo +$EVENT : 29 : HW_magazzino_grezzi_vuoto +$EVENT : 30 : HW_emergenza +$EVENT : 31 : EV_31 +$EVENT : 32 : EV_32 +$EVENT : 33 : HW_Allarme Macchina +$EVENT : 34 : HW_deposito_robot +$EVENT : 35 : HW_start_tavola +$EVENT : 36 : HW_end_tavola +$EVENT : 37 : EV_37 +$EVENT : 38 : EV_38 +$EVENT : 39 : EV_39 +#$EVENT : 999 : Commento + +$RULES + +# state : input : next state : event + +ALL_STATES : NOT power_on : ST_Power_off : HW_power_off +#ALL_STATES : end_cycle : ST_Cycle_end : HW_end_pallet +ALL_STATES : manual : ST_Manual : HW_manuale +ALL_STATES : NOT armedEmerg : ST_Emergency : HW_emergenza +ALL_STATES : alarm : ST_Alarm : HW_error +ALL_STATES : run : ST_Run : HW_machining +ALL_STATES : power_on : ST_Machine_ready : HW_power_on + +#-------------------------------------------------------------------------- + +$DO diff --git a/StateMachine/Fluitek/10063_SEGHETTO_DANOBAT.csv b/StateMachine/Fluitek/10063_SEGHETTO_DANOBAT.csv new file mode 100644 index 0000000..cb66fa4 --- /dev/null +++ b/StateMachine/Fluitek/10063_SEGHETTO_DANOBAT.csv @@ -0,0 +1,3585 @@ +IdxFamigliaIngresso;IdxMicroStato;ValoreIngresso;IdxTipoEvento;next_IdxMicroStato +10063;0;0;14;1 +10063;0;1;24;4 +10063;0;2;14;1 +10063;0;3;16;3 +10063;0;4;14;1 +10063;0;5;24;4 +10063;0;6;14;1 +10063;0;7;16;3 +10063;0;8;14;1 +10063;0;9;29;7 +10063;0;10;14;1 +10063;0;11;29;7 +10063;0;12;14;1 +10063;0;13;29;7 +10063;0;14;14;1 +10063;0;15;29;7 +10063;0;16;14;1 +10063;0;17;24;4 +10063;0;18;14;1 +10063;0;19;18;6 +10063;0;20;14;1 +10063;0;21;24;4 +10063;0;22;14;1 +10063;0;23;18;6 +10063;0;24;14;1 +10063;0;25;29;7 +10063;0;26;14;1 +10063;0;27;29;7 +10063;0;28;14;1 +10063;0;29;29;7 +10063;0;30;14;1 +10063;0;31;29;7 +10063;0;32;14;1 +10063;0;33;24;4 +10063;0;34;14;1 +10063;0;35;18;6 +10063;0;36;14;1 +10063;0;37;24;4 +10063;0;38;14;1 +10063;0;39;18;6 +10063;0;40;14;1 +10063;0;41;29;7 +10063;0;42;14;1 +10063;0;43;29;7 +10063;0;44;14;1 +10063;0;45;29;7 +10063;0;46;14;1 +10063;0;47;29;7 +10063;0;48;14;1 +10063;0;49;24;4 +10063;0;50;14;1 +10063;0;51;18;6 +10063;0;52;14;1 +10063;0;53;24;4 +10063;0;54;14;1 +10063;0;55;18;6 +10063;0;56;14;1 +10063;0;57;29;7 +10063;0;58;14;1 +10063;0;59;29;7 +10063;0;60;14;1 +10063;0;61;29;7 +10063;0;62;14;1 +10063;0;63;29;7 +10063;0;64;14;1 +10063;0;65;24;4 +10063;0;66;14;1 +10063;0;67;18;6 +10063;0;68;14;1 +10063;0;69;24;4 +10063;0;70;14;1 +10063;0;71;18;6 +10063;0;72;14;1 +10063;0;73;29;7 +10063;0;74;14;1 +10063;0;75;29;7 +10063;0;76;14;1 +10063;0;77;29;7 +10063;0;78;14;1 +10063;0;79;29;7 +10063;0;80;14;1 +10063;0;81;24;4 +10063;0;82;14;1 +10063;0;83;18;6 +10063;0;84;14;1 +10063;0;85;24;4 +10063;0;86;14;1 +10063;0;87;18;6 +10063;0;88;14;1 +10063;0;89;29;7 +10063;0;90;14;1 +10063;0;91;29;7 +10063;0;92;14;1 +10063;0;93;29;7 +10063;0;94;14;1 +10063;0;95;29;7 +10063;0;96;14;1 +10063;0;97;24;4 +10063;0;98;14;1 +10063;0;99;18;6 +10063;0;100;14;1 +10063;0;101;24;4 +10063;0;102;14;1 +10063;0;103;18;6 +10063;0;104;14;1 +10063;0;105;29;7 +10063;0;106;14;1 +10063;0;107;29;7 +10063;0;108;14;1 +10063;0;109;29;7 +10063;0;110;14;1 +10063;0;111;29;7 +10063;0;112;14;1 +10063;0;113;24;4 +10063;0;114;14;1 +10063;0;115;18;6 +10063;0;116;14;1 +10063;0;117;24;4 +10063;0;118;14;1 +10063;0;119;18;6 +10063;0;120;14;1 +10063;0;121;29;7 +10063;0;122;14;1 +10063;0;123;29;7 +10063;0;124;14;1 +10063;0;125;29;7 +10063;0;126;14;1 +10063;0;127;29;7 +10063;0;128;14;1 +10063;0;129;24;4 +10063;0;130;14;1 +10063;0;131;18;6 +10063;0;132;14;1 +10063;0;133;24;4 +10063;0;134;14;1 +10063;0;135;18;6 +10063;0;136;14;1 +10063;0;137;29;7 +10063;0;138;14;1 +10063;0;139;29;7 +10063;0;140;14;1 +10063;0;141;29;7 +10063;0;142;14;1 +10063;0;143;29;7 +10063;0;144;14;1 +10063;0;145;24;4 +10063;0;146;14;1 +10063;0;147;18;6 +10063;0;148;14;1 +10063;0;149;24;4 +10063;0;150;14;1 +10063;0;151;18;6 +10063;0;152;14;1 +10063;0;153;29;7 +10063;0;154;14;1 +10063;0;155;29;7 +10063;0;156;14;1 +10063;0;157;29;7 +10063;0;158;14;1 +10063;0;159;29;7 +10063;0;160;14;1 +10063;0;161;24;4 +10063;0;162;14;1 +10063;0;163;18;6 +10063;0;164;14;1 +10063;0;165;24;4 +10063;0;166;14;1 +10063;0;167;18;6 +10063;0;168;14;1 +10063;0;169;29;7 +10063;0;170;14;1 +10063;0;171;29;7 +10063;0;172;14;1 +10063;0;173;29;7 +10063;0;174;14;1 +10063;0;175;29;7 +10063;0;176;14;1 +10063;0;177;24;4 +10063;0;178;14;1 +10063;0;179;18;6 +10063;0;180;14;1 +10063;0;181;24;4 +10063;0;182;14;1 +10063;0;183;18;6 +10063;0;184;14;1 +10063;0;185;29;7 +10063;0;186;14;1 +10063;0;187;29;7 +10063;0;188;14;1 +10063;0;189;29;7 +10063;0;190;14;1 +10063;0;191;29;7 +10063;0;192;14;1 +10063;0;193;24;4 +10063;0;194;14;1 +10063;0;195;18;6 +10063;0;196;14;1 +10063;0;197;24;4 +10063;0;198;14;1 +10063;0;199;18;6 +10063;0;200;14;1 +10063;0;201;29;7 +10063;0;202;14;1 +10063;0;203;29;7 +10063;0;204;14;1 +10063;0;205;29;7 +10063;0;206;14;1 +10063;0;207;29;7 +10063;0;208;14;1 +10063;0;209;24;4 +10063;0;210;14;1 +10063;0;211;18;6 +10063;0;212;14;1 +10063;0;213;24;4 +10063;0;214;14;1 +10063;0;215;18;6 +10063;0;216;14;1 +10063;0;217;29;7 +10063;0;218;14;1 +10063;0;219;29;7 +10063;0;220;14;1 +10063;0;221;29;7 +10063;0;222;14;1 +10063;0;223;29;7 +10063;0;224;14;1 +10063;0;225;24;4 +10063;0;226;14;1 +10063;0;227;18;6 +10063;0;228;14;1 +10063;0;229;24;4 +10063;0;230;14;1 +10063;0;231;18;6 +10063;0;232;14;1 +10063;0;233;29;7 +10063;0;234;14;1 +10063;0;235;29;7 +10063;0;236;14;1 +10063;0;237;29;7 +10063;0;238;14;1 +10063;0;239;29;7 +10063;0;240;14;1 +10063;0;241;24;4 +10063;0;242;14;1 +10063;0;243;18;6 +10063;0;244;14;1 +10063;0;245;24;4 +10063;0;246;14;1 +10063;0;247;18;6 +10063;0;248;14;1 +10063;0;249;29;7 +10063;0;250;14;1 +10063;0;251;29;7 +10063;0;252;14;1 +10063;0;253;29;7 +10063;0;254;14;1 +10063;0;255;29;7 +10063;0;256;14;1 +10063;0;257;24;4 +10063;0;258;14;1 +10063;0;259;18;6 +10063;0;260;14;1 +10063;0;261;24;4 +10063;0;262;14;1 +10063;0;263;18;6 +10063;0;264;14;1 +10063;0;265;29;7 +10063;0;266;14;1 +10063;0;267;29;7 +10063;0;268;14;1 +10063;0;269;29;7 +10063;0;270;14;1 +10063;0;271;29;7 +10063;0;272;14;1 +10063;0;273;24;4 +10063;0;274;14;1 +10063;0;275;18;6 +10063;0;276;14;1 +10063;0;277;24;4 +10063;0;278;14;1 +10063;0;279;18;6 +10063;0;280;14;1 +10063;0;281;29;7 +10063;0;282;14;1 +10063;0;283;29;7 +10063;0;284;14;1 +10063;0;285;29;7 +10063;0;286;14;1 +10063;0;287;29;7 +10063;0;288;14;1 +10063;0;289;24;4 +10063;0;290;14;1 +10063;0;291;18;6 +10063;0;292;14;1 +10063;0;293;24;4 +10063;0;294;14;1 +10063;0;295;18;6 +10063;0;296;14;1 +10063;0;297;29;7 +10063;0;298;14;1 +10063;0;299;29;7 +10063;0;300;14;1 +10063;0;301;29;7 +10063;0;302;14;1 +10063;0;303;29;7 +10063;0;304;14;1 +10063;0;305;24;4 +10063;0;306;14;1 +10063;0;307;18;6 +10063;0;308;14;1 +10063;0;309;24;4 +10063;0;310;14;1 +10063;0;311;18;6 +10063;0;312;14;1 +10063;0;313;29;7 +10063;0;314;14;1 +10063;0;315;29;7 +10063;0;316;14;1 +10063;0;317;29;7 +10063;0;318;14;1 +10063;0;319;29;7 +10063;0;320;14;1 +10063;0;321;24;4 +10063;0;322;14;1 +10063;0;323;18;6 +10063;0;324;14;1 +10063;0;325;24;4 +10063;0;326;14;1 +10063;0;327;18;6 +10063;0;328;14;1 +10063;0;329;29;7 +10063;0;330;14;1 +10063;0;331;29;7 +10063;0;332;14;1 +10063;0;333;29;7 +10063;0;334;14;1 +10063;0;335;29;7 +10063;0;336;14;1 +10063;0;337;24;4 +10063;0;338;14;1 +10063;0;339;18;6 +10063;0;340;14;1 +10063;0;341;24;4 +10063;0;342;14;1 +10063;0;343;18;6 +10063;0;344;14;1 +10063;0;345;29;7 +10063;0;346;14;1 +10063;0;347;29;7 +10063;0;348;14;1 +10063;0;349;29;7 +10063;0;350;14;1 +10063;0;351;29;7 +10063;0;352;14;1 +10063;0;353;24;4 +10063;0;354;14;1 +10063;0;355;18;6 +10063;0;356;14;1 +10063;0;357;24;4 +10063;0;358;14;1 +10063;0;359;18;6 +10063;0;360;14;1 +10063;0;361;29;7 +10063;0;362;14;1 +10063;0;363;29;7 +10063;0;364;14;1 +10063;0;365;29;7 +10063;0;366;14;1 +10063;0;367;29;7 +10063;0;368;14;1 +10063;0;369;24;4 +10063;0;370;14;1 +10063;0;371;18;6 +10063;0;372;14;1 +10063;0;373;24;4 +10063;0;374;14;1 +10063;0;375;18;6 +10063;0;376;14;1 +10063;0;377;29;7 +10063;0;378;14;1 +10063;0;379;29;7 +10063;0;380;14;1 +10063;0;381;29;7 +10063;0;382;14;1 +10063;0;383;29;7 +10063;0;384;14;1 +10063;0;385;24;4 +10063;0;386;14;1 +10063;0;387;18;6 +10063;0;388;14;1 +10063;0;389;24;4 +10063;0;390;14;1 +10063;0;391;18;6 +10063;0;392;14;1 +10063;0;393;29;7 +10063;0;394;14;1 +10063;0;395;29;7 +10063;0;396;14;1 +10063;0;397;29;7 +10063;0;398;14;1 +10063;0;399;29;7 +10063;0;400;14;1 +10063;0;401;24;4 +10063;0;402;14;1 +10063;0;403;18;6 +10063;0;404;14;1 +10063;0;405;24;4 +10063;0;406;14;1 +10063;0;407;18;6 +10063;0;408;14;1 +10063;0;409;29;7 +10063;0;410;14;1 +10063;0;411;29;7 +10063;0;412;14;1 +10063;0;413;29;7 +10063;0;414;14;1 +10063;0;415;29;7 +10063;0;416;14;1 +10063;0;417;24;4 +10063;0;418;14;1 +10063;0;419;18;6 +10063;0;420;14;1 +10063;0;421;24;4 +10063;0;422;14;1 +10063;0;423;18;6 +10063;0;424;14;1 +10063;0;425;29;7 +10063;0;426;14;1 +10063;0;427;29;7 +10063;0;428;14;1 +10063;0;429;29;7 +10063;0;430;14;1 +10063;0;431;29;7 +10063;0;432;14;1 +10063;0;433;24;4 +10063;0;434;14;1 +10063;0;435;18;6 +10063;0;436;14;1 +10063;0;437;24;4 +10063;0;438;14;1 +10063;0;439;18;6 +10063;0;440;14;1 +10063;0;441;29;7 +10063;0;442;14;1 +10063;0;443;29;7 +10063;0;444;14;1 +10063;0;445;29;7 +10063;0;446;14;1 +10063;0;447;29;7 +10063;0;448;14;1 +10063;0;449;24;4 +10063;0;450;14;1 +10063;0;451;18;6 +10063;0;452;14;1 +10063;0;453;24;4 +10063;0;454;14;1 +10063;0;455;18;6 +10063;0;456;14;1 +10063;0;457;29;7 +10063;0;458;14;1 +10063;0;459;29;7 +10063;0;460;14;1 +10063;0;461;29;7 +10063;0;462;14;1 +10063;0;463;29;7 +10063;0;464;14;1 +10063;0;465;24;4 +10063;0;466;14;1 +10063;0;467;18;6 +10063;0;468;14;1 +10063;0;469;24;4 +10063;0;470;14;1 +10063;0;471;18;6 +10063;0;472;14;1 +10063;0;473;29;7 +10063;0;474;14;1 +10063;0;475;29;7 +10063;0;476;14;1 +10063;0;477;29;7 +10063;0;478;14;1 +10063;0;479;29;7 +10063;0;480;14;1 +10063;0;481;24;4 +10063;0;482;14;1 +10063;0;483;18;6 +10063;0;484;14;1 +10063;0;485;24;4 +10063;0;486;14;1 +10063;0;487;18;6 +10063;0;488;14;1 +10063;0;489;29;7 +10063;0;490;14;1 +10063;0;491;29;7 +10063;0;492;14;1 +10063;0;493;29;7 +10063;0;494;14;1 +10063;0;495;29;7 +10063;0;496;14;1 +10063;0;497;24;4 +10063;0;498;14;1 +10063;0;499;18;6 +10063;0;500;14;1 +10063;0;501;24;4 +10063;0;502;14;1 +10063;0;503;18;6 +10063;0;504;14;1 +10063;0;505;29;7 +10063;0;506;14;1 +10063;0;507;29;7 +10063;0;508;14;1 +10063;0;509;29;7 +10063;0;510;14;1 +10063;0;511;29;7 +10063;1;1;24;4 +10063;1;3;16;3 +10063;1;5;24;4 +10063;1;7;16;3 +10063;1;9;29;7 +10063;1;11;29;7 +10063;1;13;29;7 +10063;1;15;29;7 +10063;1;17;24;4 +10063;1;19;18;6 +10063;1;21;24;4 +10063;1;23;18;6 +10063;1;25;29;7 +10063;1;27;29;7 +10063;1;29;29;7 +10063;1;31;29;7 +10063;1;33;24;4 +10063;1;35;18;6 +10063;1;37;24;4 +10063;1;39;18;6 +10063;1;41;29;7 +10063;1;43;29;7 +10063;1;45;29;7 +10063;1;47;29;7 +10063;1;49;24;4 +10063;1;51;18;6 +10063;1;53;24;4 +10063;1;55;18;6 +10063;1;57;29;7 +10063;1;59;29;7 +10063;1;61;29;7 +10063;1;63;29;7 +10063;1;65;24;4 +10063;1;67;18;6 +10063;1;69;24;4 +10063;1;71;18;6 +10063;1;73;29;7 +10063;1;75;29;7 +10063;1;77;29;7 +10063;1;79;29;7 +10063;1;81;24;4 +10063;1;83;18;6 +10063;1;85;24;4 +10063;1;87;18;6 +10063;1;89;29;7 +10063;1;91;29;7 +10063;1;93;29;7 +10063;1;95;29;7 +10063;1;97;24;4 +10063;1;99;18;6 +10063;1;101;24;4 +10063;1;103;18;6 +10063;1;105;29;7 +10063;1;107;29;7 +10063;1;109;29;7 +10063;1;111;29;7 +10063;1;113;24;4 +10063;1;115;18;6 +10063;1;117;24;4 +10063;1;119;18;6 +10063;1;121;29;7 +10063;1;123;29;7 +10063;1;125;29;7 +10063;1;127;29;7 +10063;1;129;24;4 +10063;1;131;18;6 +10063;1;133;24;4 +10063;1;135;18;6 +10063;1;137;29;7 +10063;1;139;29;7 +10063;1;141;29;7 +10063;1;143;29;7 +10063;1;145;24;4 +10063;1;147;18;6 +10063;1;149;24;4 +10063;1;151;18;6 +10063;1;153;29;7 +10063;1;155;29;7 +10063;1;157;29;7 +10063;1;159;29;7 +10063;1;161;24;4 +10063;1;163;18;6 +10063;1;165;24;4 +10063;1;167;18;6 +10063;1;169;29;7 +10063;1;171;29;7 +10063;1;173;29;7 +10063;1;175;29;7 +10063;1;177;24;4 +10063;1;179;18;6 +10063;1;181;24;4 +10063;1;183;18;6 +10063;1;185;29;7 +10063;1;187;29;7 +10063;1;189;29;7 +10063;1;191;29;7 +10063;1;193;24;4 +10063;1;195;18;6 +10063;1;197;24;4 +10063;1;199;18;6 +10063;1;201;29;7 +10063;1;203;29;7 +10063;1;205;29;7 +10063;1;207;29;7 +10063;1;209;24;4 +10063;1;211;18;6 +10063;1;213;24;4 +10063;1;215;18;6 +10063;1;217;29;7 +10063;1;219;29;7 +10063;1;221;29;7 +10063;1;223;29;7 +10063;1;225;24;4 +10063;1;227;18;6 +10063;1;229;24;4 +10063;1;231;18;6 +10063;1;233;29;7 +10063;1;235;29;7 +10063;1;237;29;7 +10063;1;239;29;7 +10063;1;241;24;4 +10063;1;243;18;6 +10063;1;245;24;4 +10063;1;247;18;6 +10063;1;249;29;7 +10063;1;251;29;7 +10063;1;253;29;7 +10063;1;255;29;7 +10063;1;257;24;4 +10063;1;259;18;6 +10063;1;261;24;4 +10063;1;263;18;6 +10063;1;265;29;7 +10063;1;267;29;7 +10063;1;269;29;7 +10063;1;271;29;7 +10063;1;273;24;4 +10063;1;275;18;6 +10063;1;277;24;4 +10063;1;279;18;6 +10063;1;281;29;7 +10063;1;283;29;7 +10063;1;285;29;7 +10063;1;287;29;7 +10063;1;289;24;4 +10063;1;291;18;6 +10063;1;293;24;4 +10063;1;295;18;6 +10063;1;297;29;7 +10063;1;299;29;7 +10063;1;301;29;7 +10063;1;303;29;7 +10063;1;305;24;4 +10063;1;307;18;6 +10063;1;309;24;4 +10063;1;311;18;6 +10063;1;313;29;7 +10063;1;315;29;7 +10063;1;317;29;7 +10063;1;319;29;7 +10063;1;321;24;4 +10063;1;323;18;6 +10063;1;325;24;4 +10063;1;327;18;6 +10063;1;329;29;7 +10063;1;331;29;7 +10063;1;333;29;7 +10063;1;335;29;7 +10063;1;337;24;4 +10063;1;339;18;6 +10063;1;341;24;4 +10063;1;343;18;6 +10063;1;345;29;7 +10063;1;347;29;7 +10063;1;349;29;7 +10063;1;351;29;7 +10063;1;353;24;4 +10063;1;355;18;6 +10063;1;357;24;4 +10063;1;359;18;6 +10063;1;361;29;7 +10063;1;363;29;7 +10063;1;365;29;7 +10063;1;367;29;7 +10063;1;369;24;4 +10063;1;371;18;6 +10063;1;373;24;4 +10063;1;375;18;6 +10063;1;377;29;7 +10063;1;379;29;7 +10063;1;381;29;7 +10063;1;383;29;7 +10063;1;385;24;4 +10063;1;387;18;6 +10063;1;389;24;4 +10063;1;391;18;6 +10063;1;393;29;7 +10063;1;395;29;7 +10063;1;397;29;7 +10063;1;399;29;7 +10063;1;401;24;4 +10063;1;403;18;6 +10063;1;405;24;4 +10063;1;407;18;6 +10063;1;409;29;7 +10063;1;411;29;7 +10063;1;413;29;7 +10063;1;415;29;7 +10063;1;417;24;4 +10063;1;419;18;6 +10063;1;421;24;4 +10063;1;423;18;6 +10063;1;425;29;7 +10063;1;427;29;7 +10063;1;429;29;7 +10063;1;431;29;7 +10063;1;433;24;4 +10063;1;435;18;6 +10063;1;437;24;4 +10063;1;439;18;6 +10063;1;441;29;7 +10063;1;443;29;7 +10063;1;445;29;7 +10063;1;447;29;7 +10063;1;449;24;4 +10063;1;451;18;6 +10063;1;453;24;4 +10063;1;455;18;6 +10063;1;457;29;7 +10063;1;459;29;7 +10063;1;461;29;7 +10063;1;463;29;7 +10063;1;465;24;4 +10063;1;467;18;6 +10063;1;469;24;4 +10063;1;471;18;6 +10063;1;473;29;7 +10063;1;475;29;7 +10063;1;477;29;7 +10063;1;479;29;7 +10063;1;481;24;4 +10063;1;483;18;6 +10063;1;485;24;4 +10063;1;487;18;6 +10063;1;489;29;7 +10063;1;491;29;7 +10063;1;493;29;7 +10063;1;495;29;7 +10063;1;497;24;4 +10063;1;499;18;6 +10063;1;501;24;4 +10063;1;503;18;6 +10063;1;505;29;7 +10063;1;507;29;7 +10063;1;509;29;7 +10063;1;511;29;7 +10063;2;0;14;1 +10063;2;1;24;4 +10063;2;2;14;1 +10063;2;3;16;3 +10063;2;4;14;1 +10063;2;5;24;4 +10063;2;6;14;1 +10063;2;7;16;3 +10063;2;8;14;1 +10063;2;9;29;7 +10063;2;10;14;1 +10063;2;11;29;7 +10063;2;12;14;1 +10063;2;13;29;7 +10063;2;14;14;1 +10063;2;15;29;7 +10063;2;16;14;1 +10063;2;17;24;4 +10063;2;18;14;1 +10063;2;19;18;6 +10063;2;20;14;1 +10063;2;21;24;4 +10063;2;22;14;1 +10063;2;23;18;6 +10063;2;24;14;1 +10063;2;25;29;7 +10063;2;26;14;1 +10063;2;27;29;7 +10063;2;28;14;1 +10063;2;29;29;7 +10063;2;30;14;1 +10063;2;31;29;7 +10063;2;32;14;1 +10063;2;33;24;4 +10063;2;34;14;1 +10063;2;35;18;6 +10063;2;36;14;1 +10063;2;37;24;4 +10063;2;38;14;1 +10063;2;39;18;6 +10063;2;40;14;1 +10063;2;41;29;7 +10063;2;42;14;1 +10063;2;43;29;7 +10063;2;44;14;1 +10063;2;45;29;7 +10063;2;46;14;1 +10063;2;47;29;7 +10063;2;48;14;1 +10063;2;49;24;4 +10063;2;50;14;1 +10063;2;51;18;6 +10063;2;52;14;1 +10063;2;53;24;4 +10063;2;54;14;1 +10063;2;55;18;6 +10063;2;56;14;1 +10063;2;57;29;7 +10063;2;58;14;1 +10063;2;59;29;7 +10063;2;60;14;1 +10063;2;61;29;7 +10063;2;62;14;1 +10063;2;63;29;7 +10063;2;64;14;1 +10063;2;65;24;4 +10063;2;66;14;1 +10063;2;67;18;6 +10063;2;68;14;1 +10063;2;69;24;4 +10063;2;70;14;1 +10063;2;71;18;6 +10063;2;72;14;1 +10063;2;73;29;7 +10063;2;74;14;1 +10063;2;75;29;7 +10063;2;76;14;1 +10063;2;77;29;7 +10063;2;78;14;1 +10063;2;79;29;7 +10063;2;80;14;1 +10063;2;81;24;4 +10063;2;82;14;1 +10063;2;83;18;6 +10063;2;84;14;1 +10063;2;85;24;4 +10063;2;86;14;1 +10063;2;87;18;6 +10063;2;88;14;1 +10063;2;89;29;7 +10063;2;90;14;1 +10063;2;91;29;7 +10063;2;92;14;1 +10063;2;93;29;7 +10063;2;94;14;1 +10063;2;95;29;7 +10063;2;96;14;1 +10063;2;97;24;4 +10063;2;98;14;1 +10063;2;99;18;6 +10063;2;100;14;1 +10063;2;101;24;4 +10063;2;102;14;1 +10063;2;103;18;6 +10063;2;104;14;1 +10063;2;105;29;7 +10063;2;106;14;1 +10063;2;107;29;7 +10063;2;108;14;1 +10063;2;109;29;7 +10063;2;110;14;1 +10063;2;111;29;7 +10063;2;112;14;1 +10063;2;113;24;4 +10063;2;114;14;1 +10063;2;115;18;6 +10063;2;116;14;1 +10063;2;117;24;4 +10063;2;118;14;1 +10063;2;119;18;6 +10063;2;120;14;1 +10063;2;121;29;7 +10063;2;122;14;1 +10063;2;123;29;7 +10063;2;124;14;1 +10063;2;125;29;7 +10063;2;126;14;1 +10063;2;127;29;7 +10063;2;128;14;1 +10063;2;129;24;4 +10063;2;130;14;1 +10063;2;131;18;6 +10063;2;132;14;1 +10063;2;133;24;4 +10063;2;134;14;1 +10063;2;135;18;6 +10063;2;136;14;1 +10063;2;137;29;7 +10063;2;138;14;1 +10063;2;139;29;7 +10063;2;140;14;1 +10063;2;141;29;7 +10063;2;142;14;1 +10063;2;143;29;7 +10063;2;144;14;1 +10063;2;145;24;4 +10063;2;146;14;1 +10063;2;147;18;6 +10063;2;148;14;1 +10063;2;149;24;4 +10063;2;150;14;1 +10063;2;151;18;6 +10063;2;152;14;1 +10063;2;153;29;7 +10063;2;154;14;1 +10063;2;155;29;7 +10063;2;156;14;1 +10063;2;157;29;7 +10063;2;158;14;1 +10063;2;159;29;7 +10063;2;160;14;1 +10063;2;161;24;4 +10063;2;162;14;1 +10063;2;163;18;6 +10063;2;164;14;1 +10063;2;165;24;4 +10063;2;166;14;1 +10063;2;167;18;6 +10063;2;168;14;1 +10063;2;169;29;7 +10063;2;170;14;1 +10063;2;171;29;7 +10063;2;172;14;1 +10063;2;173;29;7 +10063;2;174;14;1 +10063;2;175;29;7 +10063;2;176;14;1 +10063;2;177;24;4 +10063;2;178;14;1 +10063;2;179;18;6 +10063;2;180;14;1 +10063;2;181;24;4 +10063;2;182;14;1 +10063;2;183;18;6 +10063;2;184;14;1 +10063;2;185;29;7 +10063;2;186;14;1 +10063;2;187;29;7 +10063;2;188;14;1 +10063;2;189;29;7 +10063;2;190;14;1 +10063;2;191;29;7 +10063;2;192;14;1 +10063;2;193;24;4 +10063;2;194;14;1 +10063;2;195;18;6 +10063;2;196;14;1 +10063;2;197;24;4 +10063;2;198;14;1 +10063;2;199;18;6 +10063;2;200;14;1 +10063;2;201;29;7 +10063;2;202;14;1 +10063;2;203;29;7 +10063;2;204;14;1 +10063;2;205;29;7 +10063;2;206;14;1 +10063;2;207;29;7 +10063;2;208;14;1 +10063;2;209;24;4 +10063;2;210;14;1 +10063;2;211;18;6 +10063;2;212;14;1 +10063;2;213;24;4 +10063;2;214;14;1 +10063;2;215;18;6 +10063;2;216;14;1 +10063;2;217;29;7 +10063;2;218;14;1 +10063;2;219;29;7 +10063;2;220;14;1 +10063;2;221;29;7 +10063;2;222;14;1 +10063;2;223;29;7 +10063;2;224;14;1 +10063;2;225;24;4 +10063;2;226;14;1 +10063;2;227;18;6 +10063;2;228;14;1 +10063;2;229;24;4 +10063;2;230;14;1 +10063;2;231;18;6 +10063;2;232;14;1 +10063;2;233;29;7 +10063;2;234;14;1 +10063;2;235;29;7 +10063;2;236;14;1 +10063;2;237;29;7 +10063;2;238;14;1 +10063;2;239;29;7 +10063;2;240;14;1 +10063;2;241;24;4 +10063;2;242;14;1 +10063;2;243;18;6 +10063;2;244;14;1 +10063;2;245;24;4 +10063;2;246;14;1 +10063;2;247;18;6 +10063;2;248;14;1 +10063;2;249;29;7 +10063;2;250;14;1 +10063;2;251;29;7 +10063;2;252;14;1 +10063;2;253;29;7 +10063;2;254;14;1 +10063;2;255;29;7 +10063;2;256;14;1 +10063;2;257;24;4 +10063;2;258;14;1 +10063;2;259;18;6 +10063;2;260;14;1 +10063;2;261;24;4 +10063;2;262;14;1 +10063;2;263;18;6 +10063;2;264;14;1 +10063;2;265;29;7 +10063;2;266;14;1 +10063;2;267;29;7 +10063;2;268;14;1 +10063;2;269;29;7 +10063;2;270;14;1 +10063;2;271;29;7 +10063;2;272;14;1 +10063;2;273;24;4 +10063;2;274;14;1 +10063;2;275;18;6 +10063;2;276;14;1 +10063;2;277;24;4 +10063;2;278;14;1 +10063;2;279;18;6 +10063;2;280;14;1 +10063;2;281;29;7 +10063;2;282;14;1 +10063;2;283;29;7 +10063;2;284;14;1 +10063;2;285;29;7 +10063;2;286;14;1 +10063;2;287;29;7 +10063;2;288;14;1 +10063;2;289;24;4 +10063;2;290;14;1 +10063;2;291;18;6 +10063;2;292;14;1 +10063;2;293;24;4 +10063;2;294;14;1 +10063;2;295;18;6 +10063;2;296;14;1 +10063;2;297;29;7 +10063;2;298;14;1 +10063;2;299;29;7 +10063;2;300;14;1 +10063;2;301;29;7 +10063;2;302;14;1 +10063;2;303;29;7 +10063;2;304;14;1 +10063;2;305;24;4 +10063;2;306;14;1 +10063;2;307;18;6 +10063;2;308;14;1 +10063;2;309;24;4 +10063;2;310;14;1 +10063;2;311;18;6 +10063;2;312;14;1 +10063;2;313;29;7 +10063;2;314;14;1 +10063;2;315;29;7 +10063;2;316;14;1 +10063;2;317;29;7 +10063;2;318;14;1 +10063;2;319;29;7 +10063;2;320;14;1 +10063;2;321;24;4 +10063;2;322;14;1 +10063;2;323;18;6 +10063;2;324;14;1 +10063;2;325;24;4 +10063;2;326;14;1 +10063;2;327;18;6 +10063;2;328;14;1 +10063;2;329;29;7 +10063;2;330;14;1 +10063;2;331;29;7 +10063;2;332;14;1 +10063;2;333;29;7 +10063;2;334;14;1 +10063;2;335;29;7 +10063;2;336;14;1 +10063;2;337;24;4 +10063;2;338;14;1 +10063;2;339;18;6 +10063;2;340;14;1 +10063;2;341;24;4 +10063;2;342;14;1 +10063;2;343;18;6 +10063;2;344;14;1 +10063;2;345;29;7 +10063;2;346;14;1 +10063;2;347;29;7 +10063;2;348;14;1 +10063;2;349;29;7 +10063;2;350;14;1 +10063;2;351;29;7 +10063;2;352;14;1 +10063;2;353;24;4 +10063;2;354;14;1 +10063;2;355;18;6 +10063;2;356;14;1 +10063;2;357;24;4 +10063;2;358;14;1 +10063;2;359;18;6 +10063;2;360;14;1 +10063;2;361;29;7 +10063;2;362;14;1 +10063;2;363;29;7 +10063;2;364;14;1 +10063;2;365;29;7 +10063;2;366;14;1 +10063;2;367;29;7 +10063;2;368;14;1 +10063;2;369;24;4 +10063;2;370;14;1 +10063;2;371;18;6 +10063;2;372;14;1 +10063;2;373;24;4 +10063;2;374;14;1 +10063;2;375;18;6 +10063;2;376;14;1 +10063;2;377;29;7 +10063;2;378;14;1 +10063;2;379;29;7 +10063;2;380;14;1 +10063;2;381;29;7 +10063;2;382;14;1 +10063;2;383;29;7 +10063;2;384;14;1 +10063;2;385;24;4 +10063;2;386;14;1 +10063;2;387;18;6 +10063;2;388;14;1 +10063;2;389;24;4 +10063;2;390;14;1 +10063;2;391;18;6 +10063;2;392;14;1 +10063;2;393;29;7 +10063;2;394;14;1 +10063;2;395;29;7 +10063;2;396;14;1 +10063;2;397;29;7 +10063;2;398;14;1 +10063;2;399;29;7 +10063;2;400;14;1 +10063;2;401;24;4 +10063;2;402;14;1 +10063;2;403;18;6 +10063;2;404;14;1 +10063;2;405;24;4 +10063;2;406;14;1 +10063;2;407;18;6 +10063;2;408;14;1 +10063;2;409;29;7 +10063;2;410;14;1 +10063;2;411;29;7 +10063;2;412;14;1 +10063;2;413;29;7 +10063;2;414;14;1 +10063;2;415;29;7 +10063;2;416;14;1 +10063;2;417;24;4 +10063;2;418;14;1 +10063;2;419;18;6 +10063;2;420;14;1 +10063;2;421;24;4 +10063;2;422;14;1 +10063;2;423;18;6 +10063;2;424;14;1 +10063;2;425;29;7 +10063;2;426;14;1 +10063;2;427;29;7 +10063;2;428;14;1 +10063;2;429;29;7 +10063;2;430;14;1 +10063;2;431;29;7 +10063;2;432;14;1 +10063;2;433;24;4 +10063;2;434;14;1 +10063;2;435;18;6 +10063;2;436;14;1 +10063;2;437;24;4 +10063;2;438;14;1 +10063;2;439;18;6 +10063;2;440;14;1 +10063;2;441;29;7 +10063;2;442;14;1 +10063;2;443;29;7 +10063;2;444;14;1 +10063;2;445;29;7 +10063;2;446;14;1 +10063;2;447;29;7 +10063;2;448;14;1 +10063;2;449;24;4 +10063;2;450;14;1 +10063;2;451;18;6 +10063;2;452;14;1 +10063;2;453;24;4 +10063;2;454;14;1 +10063;2;455;18;6 +10063;2;456;14;1 +10063;2;457;29;7 +10063;2;458;14;1 +10063;2;459;29;7 +10063;2;460;14;1 +10063;2;461;29;7 +10063;2;462;14;1 +10063;2;463;29;7 +10063;2;464;14;1 +10063;2;465;24;4 +10063;2;466;14;1 +10063;2;467;18;6 +10063;2;468;14;1 +10063;2;469;24;4 +10063;2;470;14;1 +10063;2;471;18;6 +10063;2;472;14;1 +10063;2;473;29;7 +10063;2;474;14;1 +10063;2;475;29;7 +10063;2;476;14;1 +10063;2;477;29;7 +10063;2;478;14;1 +10063;2;479;29;7 +10063;2;480;14;1 +10063;2;481;24;4 +10063;2;482;14;1 +10063;2;483;18;6 +10063;2;484;14;1 +10063;2;485;24;4 +10063;2;486;14;1 +10063;2;487;18;6 +10063;2;488;14;1 +10063;2;489;29;7 +10063;2;490;14;1 +10063;2;491;29;7 +10063;2;492;14;1 +10063;2;493;29;7 +10063;2;494;14;1 +10063;2;495;29;7 +10063;2;496;14;1 +10063;2;497;24;4 +10063;2;498;14;1 +10063;2;499;18;6 +10063;2;500;14;1 +10063;2;501;24;4 +10063;2;502;14;1 +10063;2;503;18;6 +10063;2;504;14;1 +10063;2;505;29;7 +10063;2;506;14;1 +10063;2;507;29;7 +10063;2;508;14;1 +10063;2;509;29;7 +10063;2;510;14;1 +10063;2;511;29;7 +10063;3;0;14;1 +10063;3;1;24;4 +10063;3;2;14;1 +10063;3;4;14;1 +10063;3;5;24;4 +10063;3;6;14;1 +10063;3;8;14;1 +10063;3;9;29;7 +10063;3;10;14;1 +10063;3;11;29;7 +10063;3;12;14;1 +10063;3;13;29;7 +10063;3;14;14;1 +10063;3;15;29;7 +10063;3;16;14;1 +10063;3;17;24;4 +10063;3;18;14;1 +10063;3;19;18;6 +10063;3;20;14;1 +10063;3;21;24;4 +10063;3;22;14;1 +10063;3;23;18;6 +10063;3;24;14;1 +10063;3;25;29;7 +10063;3;26;14;1 +10063;3;27;29;7 +10063;3;28;14;1 +10063;3;29;29;7 +10063;3;30;14;1 +10063;3;31;29;7 +10063;3;32;14;1 +10063;3;33;24;4 +10063;3;34;14;1 +10063;3;35;18;6 +10063;3;36;14;1 +10063;3;37;24;4 +10063;3;38;14;1 +10063;3;39;18;6 +10063;3;40;14;1 +10063;3;41;29;7 +10063;3;42;14;1 +10063;3;43;29;7 +10063;3;44;14;1 +10063;3;45;29;7 +10063;3;46;14;1 +10063;3;47;29;7 +10063;3;48;14;1 +10063;3;49;24;4 +10063;3;50;14;1 +10063;3;51;18;6 +10063;3;52;14;1 +10063;3;53;24;4 +10063;3;54;14;1 +10063;3;55;18;6 +10063;3;56;14;1 +10063;3;57;29;7 +10063;3;58;14;1 +10063;3;59;29;7 +10063;3;60;14;1 +10063;3;61;29;7 +10063;3;62;14;1 +10063;3;63;29;7 +10063;3;64;14;1 +10063;3;65;24;4 +10063;3;66;14;1 +10063;3;67;18;6 +10063;3;68;14;1 +10063;3;69;24;4 +10063;3;70;14;1 +10063;3;71;18;6 +10063;3;72;14;1 +10063;3;73;29;7 +10063;3;74;14;1 +10063;3;75;29;7 +10063;3;76;14;1 +10063;3;77;29;7 +10063;3;78;14;1 +10063;3;79;29;7 +10063;3;80;14;1 +10063;3;81;24;4 +10063;3;82;14;1 +10063;3;83;18;6 +10063;3;84;14;1 +10063;3;85;24;4 +10063;3;86;14;1 +10063;3;87;18;6 +10063;3;88;14;1 +10063;3;89;29;7 +10063;3;90;14;1 +10063;3;91;29;7 +10063;3;92;14;1 +10063;3;93;29;7 +10063;3;94;14;1 +10063;3;95;29;7 +10063;3;96;14;1 +10063;3;97;24;4 +10063;3;98;14;1 +10063;3;99;18;6 +10063;3;100;14;1 +10063;3;101;24;4 +10063;3;102;14;1 +10063;3;103;18;6 +10063;3;104;14;1 +10063;3;105;29;7 +10063;3;106;14;1 +10063;3;107;29;7 +10063;3;108;14;1 +10063;3;109;29;7 +10063;3;110;14;1 +10063;3;111;29;7 +10063;3;112;14;1 +10063;3;113;24;4 +10063;3;114;14;1 +10063;3;115;18;6 +10063;3;116;14;1 +10063;3;117;24;4 +10063;3;118;14;1 +10063;3;119;18;6 +10063;3;120;14;1 +10063;3;121;29;7 +10063;3;122;14;1 +10063;3;123;29;7 +10063;3;124;14;1 +10063;3;125;29;7 +10063;3;126;14;1 +10063;3;127;29;7 +10063;3;128;14;1 +10063;3;129;24;4 +10063;3;130;14;1 +10063;3;131;18;6 +10063;3;132;14;1 +10063;3;133;24;4 +10063;3;134;14;1 +10063;3;135;18;6 +10063;3;136;14;1 +10063;3;137;29;7 +10063;3;138;14;1 +10063;3;139;29;7 +10063;3;140;14;1 +10063;3;141;29;7 +10063;3;142;14;1 +10063;3;143;29;7 +10063;3;144;14;1 +10063;3;145;24;4 +10063;3;146;14;1 +10063;3;147;18;6 +10063;3;148;14;1 +10063;3;149;24;4 +10063;3;150;14;1 +10063;3;151;18;6 +10063;3;152;14;1 +10063;3;153;29;7 +10063;3;154;14;1 +10063;3;155;29;7 +10063;3;156;14;1 +10063;3;157;29;7 +10063;3;158;14;1 +10063;3;159;29;7 +10063;3;160;14;1 +10063;3;161;24;4 +10063;3;162;14;1 +10063;3;163;18;6 +10063;3;164;14;1 +10063;3;165;24;4 +10063;3;166;14;1 +10063;3;167;18;6 +10063;3;168;14;1 +10063;3;169;29;7 +10063;3;170;14;1 +10063;3;171;29;7 +10063;3;172;14;1 +10063;3;173;29;7 +10063;3;174;14;1 +10063;3;175;29;7 +10063;3;176;14;1 +10063;3;177;24;4 +10063;3;178;14;1 +10063;3;179;18;6 +10063;3;180;14;1 +10063;3;181;24;4 +10063;3;182;14;1 +10063;3;183;18;6 +10063;3;184;14;1 +10063;3;185;29;7 +10063;3;186;14;1 +10063;3;187;29;7 +10063;3;188;14;1 +10063;3;189;29;7 +10063;3;190;14;1 +10063;3;191;29;7 +10063;3;192;14;1 +10063;3;193;24;4 +10063;3;194;14;1 +10063;3;195;18;6 +10063;3;196;14;1 +10063;3;197;24;4 +10063;3;198;14;1 +10063;3;199;18;6 +10063;3;200;14;1 +10063;3;201;29;7 +10063;3;202;14;1 +10063;3;203;29;7 +10063;3;204;14;1 +10063;3;205;29;7 +10063;3;206;14;1 +10063;3;207;29;7 +10063;3;208;14;1 +10063;3;209;24;4 +10063;3;210;14;1 +10063;3;211;18;6 +10063;3;212;14;1 +10063;3;213;24;4 +10063;3;214;14;1 +10063;3;215;18;6 +10063;3;216;14;1 +10063;3;217;29;7 +10063;3;218;14;1 +10063;3;219;29;7 +10063;3;220;14;1 +10063;3;221;29;7 +10063;3;222;14;1 +10063;3;223;29;7 +10063;3;224;14;1 +10063;3;225;24;4 +10063;3;226;14;1 +10063;3;227;18;6 +10063;3;228;14;1 +10063;3;229;24;4 +10063;3;230;14;1 +10063;3;231;18;6 +10063;3;232;14;1 +10063;3;233;29;7 +10063;3;234;14;1 +10063;3;235;29;7 +10063;3;236;14;1 +10063;3;237;29;7 +10063;3;238;14;1 +10063;3;239;29;7 +10063;3;240;14;1 +10063;3;241;24;4 +10063;3;242;14;1 +10063;3;243;18;6 +10063;3;244;14;1 +10063;3;245;24;4 +10063;3;246;14;1 +10063;3;247;18;6 +10063;3;248;14;1 +10063;3;249;29;7 +10063;3;250;14;1 +10063;3;251;29;7 +10063;3;252;14;1 +10063;3;253;29;7 +10063;3;254;14;1 +10063;3;255;29;7 +10063;3;256;14;1 +10063;3;257;24;4 +10063;3;258;14;1 +10063;3;259;18;6 +10063;3;260;14;1 +10063;3;261;24;4 +10063;3;262;14;1 +10063;3;263;18;6 +10063;3;264;14;1 +10063;3;265;29;7 +10063;3;266;14;1 +10063;3;267;29;7 +10063;3;268;14;1 +10063;3;269;29;7 +10063;3;270;14;1 +10063;3;271;29;7 +10063;3;272;14;1 +10063;3;273;24;4 +10063;3;274;14;1 +10063;3;275;18;6 +10063;3;276;14;1 +10063;3;277;24;4 +10063;3;278;14;1 +10063;3;279;18;6 +10063;3;280;14;1 +10063;3;281;29;7 +10063;3;282;14;1 +10063;3;283;29;7 +10063;3;284;14;1 +10063;3;285;29;7 +10063;3;286;14;1 +10063;3;287;29;7 +10063;3;288;14;1 +10063;3;289;24;4 +10063;3;290;14;1 +10063;3;291;18;6 +10063;3;292;14;1 +10063;3;293;24;4 +10063;3;294;14;1 +10063;3;295;18;6 +10063;3;296;14;1 +10063;3;297;29;7 +10063;3;298;14;1 +10063;3;299;29;7 +10063;3;300;14;1 +10063;3;301;29;7 +10063;3;302;14;1 +10063;3;303;29;7 +10063;3;304;14;1 +10063;3;305;24;4 +10063;3;306;14;1 +10063;3;307;18;6 +10063;3;308;14;1 +10063;3;309;24;4 +10063;3;310;14;1 +10063;3;311;18;6 +10063;3;312;14;1 +10063;3;313;29;7 +10063;3;314;14;1 +10063;3;315;29;7 +10063;3;316;14;1 +10063;3;317;29;7 +10063;3;318;14;1 +10063;3;319;29;7 +10063;3;320;14;1 +10063;3;321;24;4 +10063;3;322;14;1 +10063;3;323;18;6 +10063;3;324;14;1 +10063;3;325;24;4 +10063;3;326;14;1 +10063;3;327;18;6 +10063;3;328;14;1 +10063;3;329;29;7 +10063;3;330;14;1 +10063;3;331;29;7 +10063;3;332;14;1 +10063;3;333;29;7 +10063;3;334;14;1 +10063;3;335;29;7 +10063;3;336;14;1 +10063;3;337;24;4 +10063;3;338;14;1 +10063;3;339;18;6 +10063;3;340;14;1 +10063;3;341;24;4 +10063;3;342;14;1 +10063;3;343;18;6 +10063;3;344;14;1 +10063;3;345;29;7 +10063;3;346;14;1 +10063;3;347;29;7 +10063;3;348;14;1 +10063;3;349;29;7 +10063;3;350;14;1 +10063;3;351;29;7 +10063;3;352;14;1 +10063;3;353;24;4 +10063;3;354;14;1 +10063;3;355;18;6 +10063;3;356;14;1 +10063;3;357;24;4 +10063;3;358;14;1 +10063;3;359;18;6 +10063;3;360;14;1 +10063;3;361;29;7 +10063;3;362;14;1 +10063;3;363;29;7 +10063;3;364;14;1 +10063;3;365;29;7 +10063;3;366;14;1 +10063;3;367;29;7 +10063;3;368;14;1 +10063;3;369;24;4 +10063;3;370;14;1 +10063;3;371;18;6 +10063;3;372;14;1 +10063;3;373;24;4 +10063;3;374;14;1 +10063;3;375;18;6 +10063;3;376;14;1 +10063;3;377;29;7 +10063;3;378;14;1 +10063;3;379;29;7 +10063;3;380;14;1 +10063;3;381;29;7 +10063;3;382;14;1 +10063;3;383;29;7 +10063;3;384;14;1 +10063;3;385;24;4 +10063;3;386;14;1 +10063;3;387;18;6 +10063;3;388;14;1 +10063;3;389;24;4 +10063;3;390;14;1 +10063;3;391;18;6 +10063;3;392;14;1 +10063;3;393;29;7 +10063;3;394;14;1 +10063;3;395;29;7 +10063;3;396;14;1 +10063;3;397;29;7 +10063;3;398;14;1 +10063;3;399;29;7 +10063;3;400;14;1 +10063;3;401;24;4 +10063;3;402;14;1 +10063;3;403;18;6 +10063;3;404;14;1 +10063;3;405;24;4 +10063;3;406;14;1 +10063;3;407;18;6 +10063;3;408;14;1 +10063;3;409;29;7 +10063;3;410;14;1 +10063;3;411;29;7 +10063;3;412;14;1 +10063;3;413;29;7 +10063;3;414;14;1 +10063;3;415;29;7 +10063;3;416;14;1 +10063;3;417;24;4 +10063;3;418;14;1 +10063;3;419;18;6 +10063;3;420;14;1 +10063;3;421;24;4 +10063;3;422;14;1 +10063;3;423;18;6 +10063;3;424;14;1 +10063;3;425;29;7 +10063;3;426;14;1 +10063;3;427;29;7 +10063;3;428;14;1 +10063;3;429;29;7 +10063;3;430;14;1 +10063;3;431;29;7 +10063;3;432;14;1 +10063;3;433;24;4 +10063;3;434;14;1 +10063;3;435;18;6 +10063;3;436;14;1 +10063;3;437;24;4 +10063;3;438;14;1 +10063;3;439;18;6 +10063;3;440;14;1 +10063;3;441;29;7 +10063;3;442;14;1 +10063;3;443;29;7 +10063;3;444;14;1 +10063;3;445;29;7 +10063;3;446;14;1 +10063;3;447;29;7 +10063;3;448;14;1 +10063;3;449;24;4 +10063;3;450;14;1 +10063;3;451;18;6 +10063;3;452;14;1 +10063;3;453;24;4 +10063;3;454;14;1 +10063;3;455;18;6 +10063;3;456;14;1 +10063;3;457;29;7 +10063;3;458;14;1 +10063;3;459;29;7 +10063;3;460;14;1 +10063;3;461;29;7 +10063;3;462;14;1 +10063;3;463;29;7 +10063;3;464;14;1 +10063;3;465;24;4 +10063;3;466;14;1 +10063;3;467;18;6 +10063;3;468;14;1 +10063;3;469;24;4 +10063;3;470;14;1 +10063;3;471;18;6 +10063;3;472;14;1 +10063;3;473;29;7 +10063;3;474;14;1 +10063;3;475;29;7 +10063;3;476;14;1 +10063;3;477;29;7 +10063;3;478;14;1 +10063;3;479;29;7 +10063;3;480;14;1 +10063;3;481;24;4 +10063;3;482;14;1 +10063;3;483;18;6 +10063;3;484;14;1 +10063;3;485;24;4 +10063;3;486;14;1 +10063;3;487;18;6 +10063;3;488;14;1 +10063;3;489;29;7 +10063;3;490;14;1 +10063;3;491;29;7 +10063;3;492;14;1 +10063;3;493;29;7 +10063;3;494;14;1 +10063;3;495;29;7 +10063;3;496;14;1 +10063;3;497;24;4 +10063;3;498;14;1 +10063;3;499;18;6 +10063;3;500;14;1 +10063;3;501;24;4 +10063;3;502;14;1 +10063;3;503;18;6 +10063;3;504;14;1 +10063;3;505;29;7 +10063;3;506;14;1 +10063;3;507;29;7 +10063;3;508;14;1 +10063;3;509;29;7 +10063;3;510;14;1 +10063;3;511;29;7 +10063;4;0;14;1 +10063;4;2;14;1 +10063;4;3;16;3 +10063;4;4;14;1 +10063;4;6;14;1 +10063;4;7;16;3 +10063;4;8;14;1 +10063;4;9;29;7 +10063;4;10;14;1 +10063;4;11;29;7 +10063;4;12;14;1 +10063;4;13;29;7 +10063;4;14;14;1 +10063;4;15;29;7 +10063;4;16;14;1 +10063;4;18;14;1 +10063;4;19;18;6 +10063;4;20;14;1 +10063;4;22;14;1 +10063;4;23;18;6 +10063;4;24;14;1 +10063;4;25;29;7 +10063;4;26;14;1 +10063;4;27;29;7 +10063;4;28;14;1 +10063;4;29;29;7 +10063;4;30;14;1 +10063;4;31;29;7 +10063;4;32;14;1 +10063;4;34;14;1 +10063;4;35;18;6 +10063;4;36;14;1 +10063;4;38;14;1 +10063;4;39;18;6 +10063;4;40;14;1 +10063;4;41;29;7 +10063;4;42;14;1 +10063;4;43;29;7 +10063;4;44;14;1 +10063;4;45;29;7 +10063;4;46;14;1 +10063;4;47;29;7 +10063;4;48;14;1 +10063;4;50;14;1 +10063;4;51;18;6 +10063;4;52;14;1 +10063;4;54;14;1 +10063;4;55;18;6 +10063;4;56;14;1 +10063;4;57;29;7 +10063;4;58;14;1 +10063;4;59;29;7 +10063;4;60;14;1 +10063;4;61;29;7 +10063;4;62;14;1 +10063;4;63;29;7 +10063;4;64;14;1 +10063;4;66;14;1 +10063;4;67;18;6 +10063;4;68;14;1 +10063;4;70;14;1 +10063;4;71;18;6 +10063;4;72;14;1 +10063;4;73;29;7 +10063;4;74;14;1 +10063;4;75;29;7 +10063;4;76;14;1 +10063;4;77;29;7 +10063;4;78;14;1 +10063;4;79;29;7 +10063;4;80;14;1 +10063;4;82;14;1 +10063;4;83;18;6 +10063;4;84;14;1 +10063;4;86;14;1 +10063;4;87;18;6 +10063;4;88;14;1 +10063;4;89;29;7 +10063;4;90;14;1 +10063;4;91;29;7 +10063;4;92;14;1 +10063;4;93;29;7 +10063;4;94;14;1 +10063;4;95;29;7 +10063;4;96;14;1 +10063;4;98;14;1 +10063;4;99;18;6 +10063;4;100;14;1 +10063;4;102;14;1 +10063;4;103;18;6 +10063;4;104;14;1 +10063;4;105;29;7 +10063;4;106;14;1 +10063;4;107;29;7 +10063;4;108;14;1 +10063;4;109;29;7 +10063;4;110;14;1 +10063;4;111;29;7 +10063;4;112;14;1 +10063;4;114;14;1 +10063;4;115;18;6 +10063;4;116;14;1 +10063;4;118;14;1 +10063;4;119;18;6 +10063;4;120;14;1 +10063;4;121;29;7 +10063;4;122;14;1 +10063;4;123;29;7 +10063;4;124;14;1 +10063;4;125;29;7 +10063;4;126;14;1 +10063;4;127;29;7 +10063;4;128;14;1 +10063;4;130;14;1 +10063;4;131;18;6 +10063;4;132;14;1 +10063;4;134;14;1 +10063;4;135;18;6 +10063;4;136;14;1 +10063;4;137;29;7 +10063;4;138;14;1 +10063;4;139;29;7 +10063;4;140;14;1 +10063;4;141;29;7 +10063;4;142;14;1 +10063;4;143;29;7 +10063;4;144;14;1 +10063;4;146;14;1 +10063;4;147;18;6 +10063;4;148;14;1 +10063;4;150;14;1 +10063;4;151;18;6 +10063;4;152;14;1 +10063;4;153;29;7 +10063;4;154;14;1 +10063;4;155;29;7 +10063;4;156;14;1 +10063;4;157;29;7 +10063;4;158;14;1 +10063;4;159;29;7 +10063;4;160;14;1 +10063;4;162;14;1 +10063;4;163;18;6 +10063;4;164;14;1 +10063;4;166;14;1 +10063;4;167;18;6 +10063;4;168;14;1 +10063;4;169;29;7 +10063;4;170;14;1 +10063;4;171;29;7 +10063;4;172;14;1 +10063;4;173;29;7 +10063;4;174;14;1 +10063;4;175;29;7 +10063;4;176;14;1 +10063;4;178;14;1 +10063;4;179;18;6 +10063;4;180;14;1 +10063;4;182;14;1 +10063;4;183;18;6 +10063;4;184;14;1 +10063;4;185;29;7 +10063;4;186;14;1 +10063;4;187;29;7 +10063;4;188;14;1 +10063;4;189;29;7 +10063;4;190;14;1 +10063;4;191;29;7 +10063;4;192;14;1 +10063;4;194;14;1 +10063;4;195;18;6 +10063;4;196;14;1 +10063;4;198;14;1 +10063;4;199;18;6 +10063;4;200;14;1 +10063;4;201;29;7 +10063;4;202;14;1 +10063;4;203;29;7 +10063;4;204;14;1 +10063;4;205;29;7 +10063;4;206;14;1 +10063;4;207;29;7 +10063;4;208;14;1 +10063;4;210;14;1 +10063;4;211;18;6 +10063;4;212;14;1 +10063;4;214;14;1 +10063;4;215;18;6 +10063;4;216;14;1 +10063;4;217;29;7 +10063;4;218;14;1 +10063;4;219;29;7 +10063;4;220;14;1 +10063;4;221;29;7 +10063;4;222;14;1 +10063;4;223;29;7 +10063;4;224;14;1 +10063;4;226;14;1 +10063;4;227;18;6 +10063;4;228;14;1 +10063;4;230;14;1 +10063;4;231;18;6 +10063;4;232;14;1 +10063;4;233;29;7 +10063;4;234;14;1 +10063;4;235;29;7 +10063;4;236;14;1 +10063;4;237;29;7 +10063;4;238;14;1 +10063;4;239;29;7 +10063;4;240;14;1 +10063;4;242;14;1 +10063;4;243;18;6 +10063;4;244;14;1 +10063;4;246;14;1 +10063;4;247;18;6 +10063;4;248;14;1 +10063;4;249;29;7 +10063;4;250;14;1 +10063;4;251;29;7 +10063;4;252;14;1 +10063;4;253;29;7 +10063;4;254;14;1 +10063;4;255;29;7 +10063;4;256;14;1 +10063;4;258;14;1 +10063;4;259;18;6 +10063;4;260;14;1 +10063;4;262;14;1 +10063;4;263;18;6 +10063;4;264;14;1 +10063;4;265;29;7 +10063;4;266;14;1 +10063;4;267;29;7 +10063;4;268;14;1 +10063;4;269;29;7 +10063;4;270;14;1 +10063;4;271;29;7 +10063;4;272;14;1 +10063;4;274;14;1 +10063;4;275;18;6 +10063;4;276;14;1 +10063;4;278;14;1 +10063;4;279;18;6 +10063;4;280;14;1 +10063;4;281;29;7 +10063;4;282;14;1 +10063;4;283;29;7 +10063;4;284;14;1 +10063;4;285;29;7 +10063;4;286;14;1 +10063;4;287;29;7 +10063;4;288;14;1 +10063;4;290;14;1 +10063;4;291;18;6 +10063;4;292;14;1 +10063;4;294;14;1 +10063;4;295;18;6 +10063;4;296;14;1 +10063;4;297;29;7 +10063;4;298;14;1 +10063;4;299;29;7 +10063;4;300;14;1 +10063;4;301;29;7 +10063;4;302;14;1 +10063;4;303;29;7 +10063;4;304;14;1 +10063;4;306;14;1 +10063;4;307;18;6 +10063;4;308;14;1 +10063;4;310;14;1 +10063;4;311;18;6 +10063;4;312;14;1 +10063;4;313;29;7 +10063;4;314;14;1 +10063;4;315;29;7 +10063;4;316;14;1 +10063;4;317;29;7 +10063;4;318;14;1 +10063;4;319;29;7 +10063;4;320;14;1 +10063;4;322;14;1 +10063;4;323;18;6 +10063;4;324;14;1 +10063;4;326;14;1 +10063;4;327;18;6 +10063;4;328;14;1 +10063;4;329;29;7 +10063;4;330;14;1 +10063;4;331;29;7 +10063;4;332;14;1 +10063;4;333;29;7 +10063;4;334;14;1 +10063;4;335;29;7 +10063;4;336;14;1 +10063;4;338;14;1 +10063;4;339;18;6 +10063;4;340;14;1 +10063;4;342;14;1 +10063;4;343;18;6 +10063;4;344;14;1 +10063;4;345;29;7 +10063;4;346;14;1 +10063;4;347;29;7 +10063;4;348;14;1 +10063;4;349;29;7 +10063;4;350;14;1 +10063;4;351;29;7 +10063;4;352;14;1 +10063;4;354;14;1 +10063;4;355;18;6 +10063;4;356;14;1 +10063;4;358;14;1 +10063;4;359;18;6 +10063;4;360;14;1 +10063;4;361;29;7 +10063;4;362;14;1 +10063;4;363;29;7 +10063;4;364;14;1 +10063;4;365;29;7 +10063;4;366;14;1 +10063;4;367;29;7 +10063;4;368;14;1 +10063;4;370;14;1 +10063;4;371;18;6 +10063;4;372;14;1 +10063;4;374;14;1 +10063;4;375;18;6 +10063;4;376;14;1 +10063;4;377;29;7 +10063;4;378;14;1 +10063;4;379;29;7 +10063;4;380;14;1 +10063;4;381;29;7 +10063;4;382;14;1 +10063;4;383;29;7 +10063;4;384;14;1 +10063;4;386;14;1 +10063;4;387;18;6 +10063;4;388;14;1 +10063;4;390;14;1 +10063;4;391;18;6 +10063;4;392;14;1 +10063;4;393;29;7 +10063;4;394;14;1 +10063;4;395;29;7 +10063;4;396;14;1 +10063;4;397;29;7 +10063;4;398;14;1 +10063;4;399;29;7 +10063;4;400;14;1 +10063;4;402;14;1 +10063;4;403;18;6 +10063;4;404;14;1 +10063;4;406;14;1 +10063;4;407;18;6 +10063;4;408;14;1 +10063;4;409;29;7 +10063;4;410;14;1 +10063;4;411;29;7 +10063;4;412;14;1 +10063;4;413;29;7 +10063;4;414;14;1 +10063;4;415;29;7 +10063;4;416;14;1 +10063;4;418;14;1 +10063;4;419;18;6 +10063;4;420;14;1 +10063;4;422;14;1 +10063;4;423;18;6 +10063;4;424;14;1 +10063;4;425;29;7 +10063;4;426;14;1 +10063;4;427;29;7 +10063;4;428;14;1 +10063;4;429;29;7 +10063;4;430;14;1 +10063;4;431;29;7 +10063;4;432;14;1 +10063;4;434;14;1 +10063;4;435;18;6 +10063;4;436;14;1 +10063;4;438;14;1 +10063;4;439;18;6 +10063;4;440;14;1 +10063;4;441;29;7 +10063;4;442;14;1 +10063;4;443;29;7 +10063;4;444;14;1 +10063;4;445;29;7 +10063;4;446;14;1 +10063;4;447;29;7 +10063;4;448;14;1 +10063;4;450;14;1 +10063;4;451;18;6 +10063;4;452;14;1 +10063;4;454;14;1 +10063;4;455;18;6 +10063;4;456;14;1 +10063;4;457;29;7 +10063;4;458;14;1 +10063;4;459;29;7 +10063;4;460;14;1 +10063;4;461;29;7 +10063;4;462;14;1 +10063;4;463;29;7 +10063;4;464;14;1 +10063;4;466;14;1 +10063;4;467;18;6 +10063;4;468;14;1 +10063;4;470;14;1 +10063;4;471;18;6 +10063;4;472;14;1 +10063;4;473;29;7 +10063;4;474;14;1 +10063;4;475;29;7 +10063;4;476;14;1 +10063;4;477;29;7 +10063;4;478;14;1 +10063;4;479;29;7 +10063;4;480;14;1 +10063;4;482;14;1 +10063;4;483;18;6 +10063;4;484;14;1 +10063;4;486;14;1 +10063;4;487;18;6 +10063;4;488;14;1 +10063;4;489;29;7 +10063;4;490;14;1 +10063;4;491;29;7 +10063;4;492;14;1 +10063;4;493;29;7 +10063;4;494;14;1 +10063;4;495;29;7 +10063;4;496;14;1 +10063;4;498;14;1 +10063;4;499;18;6 +10063;4;500;14;1 +10063;4;502;14;1 +10063;4;503;18;6 +10063;4;504;14;1 +10063;4;505;29;7 +10063;4;506;14;1 +10063;4;507;29;7 +10063;4;508;14;1 +10063;4;509;29;7 +10063;4;510;14;1 +10063;4;511;29;7 +10063;5;0;14;1 +10063;5;1;24;4 +10063;5;2;14;1 +10063;5;3;16;3 +10063;5;4;14;1 +10063;5;5;24;4 +10063;5;6;14;1 +10063;5;7;16;3 +10063;5;8;14;1 +10063;5;9;29;7 +10063;5;10;14;1 +10063;5;11;29;7 +10063;5;12;14;1 +10063;5;13;29;7 +10063;5;14;14;1 +10063;5;15;29;7 +10063;5;16;14;1 +10063;5;17;24;4 +10063;5;18;14;1 +10063;5;19;18;6 +10063;5;20;14;1 +10063;5;21;24;4 +10063;5;22;14;1 +10063;5;23;18;6 +10063;5;24;14;1 +10063;5;25;29;7 +10063;5;26;14;1 +10063;5;27;29;7 +10063;5;28;14;1 +10063;5;29;29;7 +10063;5;30;14;1 +10063;5;31;29;7 +10063;5;32;14;1 +10063;5;33;24;4 +10063;5;34;14;1 +10063;5;35;18;6 +10063;5;36;14;1 +10063;5;37;24;4 +10063;5;38;14;1 +10063;5;39;18;6 +10063;5;40;14;1 +10063;5;41;29;7 +10063;5;42;14;1 +10063;5;43;29;7 +10063;5;44;14;1 +10063;5;45;29;7 +10063;5;46;14;1 +10063;5;47;29;7 +10063;5;48;14;1 +10063;5;49;24;4 +10063;5;50;14;1 +10063;5;51;18;6 +10063;5;52;14;1 +10063;5;53;24;4 +10063;5;54;14;1 +10063;5;55;18;6 +10063;5;56;14;1 +10063;5;57;29;7 +10063;5;58;14;1 +10063;5;59;29;7 +10063;5;60;14;1 +10063;5;61;29;7 +10063;5;62;14;1 +10063;5;63;29;7 +10063;5;64;14;1 +10063;5;65;24;4 +10063;5;66;14;1 +10063;5;67;18;6 +10063;5;68;14;1 +10063;5;69;24;4 +10063;5;70;14;1 +10063;5;71;18;6 +10063;5;72;14;1 +10063;5;73;29;7 +10063;5;74;14;1 +10063;5;75;29;7 +10063;5;76;14;1 +10063;5;77;29;7 +10063;5;78;14;1 +10063;5;79;29;7 +10063;5;80;14;1 +10063;5;81;24;4 +10063;5;82;14;1 +10063;5;83;18;6 +10063;5;84;14;1 +10063;5;85;24;4 +10063;5;86;14;1 +10063;5;87;18;6 +10063;5;88;14;1 +10063;5;89;29;7 +10063;5;90;14;1 +10063;5;91;29;7 +10063;5;92;14;1 +10063;5;93;29;7 +10063;5;94;14;1 +10063;5;95;29;7 +10063;5;96;14;1 +10063;5;97;24;4 +10063;5;98;14;1 +10063;5;99;18;6 +10063;5;100;14;1 +10063;5;101;24;4 +10063;5;102;14;1 +10063;5;103;18;6 +10063;5;104;14;1 +10063;5;105;29;7 +10063;5;106;14;1 +10063;5;107;29;7 +10063;5;108;14;1 +10063;5;109;29;7 +10063;5;110;14;1 +10063;5;111;29;7 +10063;5;112;14;1 +10063;5;113;24;4 +10063;5;114;14;1 +10063;5;115;18;6 +10063;5;116;14;1 +10063;5;117;24;4 +10063;5;118;14;1 +10063;5;119;18;6 +10063;5;120;14;1 +10063;5;121;29;7 +10063;5;122;14;1 +10063;5;123;29;7 +10063;5;124;14;1 +10063;5;125;29;7 +10063;5;126;14;1 +10063;5;127;29;7 +10063;5;128;14;1 +10063;5;129;24;4 +10063;5;130;14;1 +10063;5;131;18;6 +10063;5;132;14;1 +10063;5;133;24;4 +10063;5;134;14;1 +10063;5;135;18;6 +10063;5;136;14;1 +10063;5;137;29;7 +10063;5;138;14;1 +10063;5;139;29;7 +10063;5;140;14;1 +10063;5;141;29;7 +10063;5;142;14;1 +10063;5;143;29;7 +10063;5;144;14;1 +10063;5;145;24;4 +10063;5;146;14;1 +10063;5;147;18;6 +10063;5;148;14;1 +10063;5;149;24;4 +10063;5;150;14;1 +10063;5;151;18;6 +10063;5;152;14;1 +10063;5;153;29;7 +10063;5;154;14;1 +10063;5;155;29;7 +10063;5;156;14;1 +10063;5;157;29;7 +10063;5;158;14;1 +10063;5;159;29;7 +10063;5;160;14;1 +10063;5;161;24;4 +10063;5;162;14;1 +10063;5;163;18;6 +10063;5;164;14;1 +10063;5;165;24;4 +10063;5;166;14;1 +10063;5;167;18;6 +10063;5;168;14;1 +10063;5;169;29;7 +10063;5;170;14;1 +10063;5;171;29;7 +10063;5;172;14;1 +10063;5;173;29;7 +10063;5;174;14;1 +10063;5;175;29;7 +10063;5;176;14;1 +10063;5;177;24;4 +10063;5;178;14;1 +10063;5;179;18;6 +10063;5;180;14;1 +10063;5;181;24;4 +10063;5;182;14;1 +10063;5;183;18;6 +10063;5;184;14;1 +10063;5;185;29;7 +10063;5;186;14;1 +10063;5;187;29;7 +10063;5;188;14;1 +10063;5;189;29;7 +10063;5;190;14;1 +10063;5;191;29;7 +10063;5;192;14;1 +10063;5;193;24;4 +10063;5;194;14;1 +10063;5;195;18;6 +10063;5;196;14;1 +10063;5;197;24;4 +10063;5;198;14;1 +10063;5;199;18;6 +10063;5;200;14;1 +10063;5;201;29;7 +10063;5;202;14;1 +10063;5;203;29;7 +10063;5;204;14;1 +10063;5;205;29;7 +10063;5;206;14;1 +10063;5;207;29;7 +10063;5;208;14;1 +10063;5;209;24;4 +10063;5;210;14;1 +10063;5;211;18;6 +10063;5;212;14;1 +10063;5;213;24;4 +10063;5;214;14;1 +10063;5;215;18;6 +10063;5;216;14;1 +10063;5;217;29;7 +10063;5;218;14;1 +10063;5;219;29;7 +10063;5;220;14;1 +10063;5;221;29;7 +10063;5;222;14;1 +10063;5;223;29;7 +10063;5;224;14;1 +10063;5;225;24;4 +10063;5;226;14;1 +10063;5;227;18;6 +10063;5;228;14;1 +10063;5;229;24;4 +10063;5;230;14;1 +10063;5;231;18;6 +10063;5;232;14;1 +10063;5;233;29;7 +10063;5;234;14;1 +10063;5;235;29;7 +10063;5;236;14;1 +10063;5;237;29;7 +10063;5;238;14;1 +10063;5;239;29;7 +10063;5;240;14;1 +10063;5;241;24;4 +10063;5;242;14;1 +10063;5;243;18;6 +10063;5;244;14;1 +10063;5;245;24;4 +10063;5;246;14;1 +10063;5;247;18;6 +10063;5;248;14;1 +10063;5;249;29;7 +10063;5;250;14;1 +10063;5;251;29;7 +10063;5;252;14;1 +10063;5;253;29;7 +10063;5;254;14;1 +10063;5;255;29;7 +10063;5;256;14;1 +10063;5;257;24;4 +10063;5;258;14;1 +10063;5;259;18;6 +10063;5;260;14;1 +10063;5;261;24;4 +10063;5;262;14;1 +10063;5;263;18;6 +10063;5;264;14;1 +10063;5;265;29;7 +10063;5;266;14;1 +10063;5;267;29;7 +10063;5;268;14;1 +10063;5;269;29;7 +10063;5;270;14;1 +10063;5;271;29;7 +10063;5;272;14;1 +10063;5;273;24;4 +10063;5;274;14;1 +10063;5;275;18;6 +10063;5;276;14;1 +10063;5;277;24;4 +10063;5;278;14;1 +10063;5;279;18;6 +10063;5;280;14;1 +10063;5;281;29;7 +10063;5;282;14;1 +10063;5;283;29;7 +10063;5;284;14;1 +10063;5;285;29;7 +10063;5;286;14;1 +10063;5;287;29;7 +10063;5;288;14;1 +10063;5;289;24;4 +10063;5;290;14;1 +10063;5;291;18;6 +10063;5;292;14;1 +10063;5;293;24;4 +10063;5;294;14;1 +10063;5;295;18;6 +10063;5;296;14;1 +10063;5;297;29;7 +10063;5;298;14;1 +10063;5;299;29;7 +10063;5;300;14;1 +10063;5;301;29;7 +10063;5;302;14;1 +10063;5;303;29;7 +10063;5;304;14;1 +10063;5;305;24;4 +10063;5;306;14;1 +10063;5;307;18;6 +10063;5;308;14;1 +10063;5;309;24;4 +10063;5;310;14;1 +10063;5;311;18;6 +10063;5;312;14;1 +10063;5;313;29;7 +10063;5;314;14;1 +10063;5;315;29;7 +10063;5;316;14;1 +10063;5;317;29;7 +10063;5;318;14;1 +10063;5;319;29;7 +10063;5;320;14;1 +10063;5;321;24;4 +10063;5;322;14;1 +10063;5;323;18;6 +10063;5;324;14;1 +10063;5;325;24;4 +10063;5;326;14;1 +10063;5;327;18;6 +10063;5;328;14;1 +10063;5;329;29;7 +10063;5;330;14;1 +10063;5;331;29;7 +10063;5;332;14;1 +10063;5;333;29;7 +10063;5;334;14;1 +10063;5;335;29;7 +10063;5;336;14;1 +10063;5;337;24;4 +10063;5;338;14;1 +10063;5;339;18;6 +10063;5;340;14;1 +10063;5;341;24;4 +10063;5;342;14;1 +10063;5;343;18;6 +10063;5;344;14;1 +10063;5;345;29;7 +10063;5;346;14;1 +10063;5;347;29;7 +10063;5;348;14;1 +10063;5;349;29;7 +10063;5;350;14;1 +10063;5;351;29;7 +10063;5;352;14;1 +10063;5;353;24;4 +10063;5;354;14;1 +10063;5;355;18;6 +10063;5;356;14;1 +10063;5;357;24;4 +10063;5;358;14;1 +10063;5;359;18;6 +10063;5;360;14;1 +10063;5;361;29;7 +10063;5;362;14;1 +10063;5;363;29;7 +10063;5;364;14;1 +10063;5;365;29;7 +10063;5;366;14;1 +10063;5;367;29;7 +10063;5;368;14;1 +10063;5;369;24;4 +10063;5;370;14;1 +10063;5;371;18;6 +10063;5;372;14;1 +10063;5;373;24;4 +10063;5;374;14;1 +10063;5;375;18;6 +10063;5;376;14;1 +10063;5;377;29;7 +10063;5;378;14;1 +10063;5;379;29;7 +10063;5;380;14;1 +10063;5;381;29;7 +10063;5;382;14;1 +10063;5;383;29;7 +10063;5;384;14;1 +10063;5;385;24;4 +10063;5;386;14;1 +10063;5;387;18;6 +10063;5;388;14;1 +10063;5;389;24;4 +10063;5;390;14;1 +10063;5;391;18;6 +10063;5;392;14;1 +10063;5;393;29;7 +10063;5;394;14;1 +10063;5;395;29;7 +10063;5;396;14;1 +10063;5;397;29;7 +10063;5;398;14;1 +10063;5;399;29;7 +10063;5;400;14;1 +10063;5;401;24;4 +10063;5;402;14;1 +10063;5;403;18;6 +10063;5;404;14;1 +10063;5;405;24;4 +10063;5;406;14;1 +10063;5;407;18;6 +10063;5;408;14;1 +10063;5;409;29;7 +10063;5;410;14;1 +10063;5;411;29;7 +10063;5;412;14;1 +10063;5;413;29;7 +10063;5;414;14;1 +10063;5;415;29;7 +10063;5;416;14;1 +10063;5;417;24;4 +10063;5;418;14;1 +10063;5;419;18;6 +10063;5;420;14;1 +10063;5;421;24;4 +10063;5;422;14;1 +10063;5;423;18;6 +10063;5;424;14;1 +10063;5;425;29;7 +10063;5;426;14;1 +10063;5;427;29;7 +10063;5;428;14;1 +10063;5;429;29;7 +10063;5;430;14;1 +10063;5;431;29;7 +10063;5;432;14;1 +10063;5;433;24;4 +10063;5;434;14;1 +10063;5;435;18;6 +10063;5;436;14;1 +10063;5;437;24;4 +10063;5;438;14;1 +10063;5;439;18;6 +10063;5;440;14;1 +10063;5;441;29;7 +10063;5;442;14;1 +10063;5;443;29;7 +10063;5;444;14;1 +10063;5;445;29;7 +10063;5;446;14;1 +10063;5;447;29;7 +10063;5;448;14;1 +10063;5;449;24;4 +10063;5;450;14;1 +10063;5;451;18;6 +10063;5;452;14;1 +10063;5;453;24;4 +10063;5;454;14;1 +10063;5;455;18;6 +10063;5;456;14;1 +10063;5;457;29;7 +10063;5;458;14;1 +10063;5;459;29;7 +10063;5;460;14;1 +10063;5;461;29;7 +10063;5;462;14;1 +10063;5;463;29;7 +10063;5;464;14;1 +10063;5;465;24;4 +10063;5;466;14;1 +10063;5;467;18;6 +10063;5;468;14;1 +10063;5;469;24;4 +10063;5;470;14;1 +10063;5;471;18;6 +10063;5;472;14;1 +10063;5;473;29;7 +10063;5;474;14;1 +10063;5;475;29;7 +10063;5;476;14;1 +10063;5;477;29;7 +10063;5;478;14;1 +10063;5;479;29;7 +10063;5;480;14;1 +10063;5;481;24;4 +10063;5;482;14;1 +10063;5;483;18;6 +10063;5;484;14;1 +10063;5;485;24;4 +10063;5;486;14;1 +10063;5;487;18;6 +10063;5;488;14;1 +10063;5;489;29;7 +10063;5;490;14;1 +10063;5;491;29;7 +10063;5;492;14;1 +10063;5;493;29;7 +10063;5;494;14;1 +10063;5;495;29;7 +10063;5;496;14;1 +10063;5;497;24;4 +10063;5;498;14;1 +10063;5;499;18;6 +10063;5;500;14;1 +10063;5;501;24;4 +10063;5;502;14;1 +10063;5;503;18;6 +10063;5;504;14;1 +10063;5;505;29;7 +10063;5;506;14;1 +10063;5;507;29;7 +10063;5;508;14;1 +10063;5;509;29;7 +10063;5;510;14;1 +10063;5;511;29;7 +10063;6;0;14;1 +10063;6;1;24;4 +10063;6;2;14;1 +10063;6;3;16;3 +10063;6;4;14;1 +10063;6;5;24;4 +10063;6;6;14;1 +10063;6;7;16;3 +10063;6;8;14;1 +10063;6;9;29;7 +10063;6;10;14;1 +10063;6;11;29;7 +10063;6;12;14;1 +10063;6;13;29;7 +10063;6;14;14;1 +10063;6;15;29;7 +10063;6;16;14;1 +10063;6;17;24;4 +10063;6;18;14;1 +10063;6;20;14;1 +10063;6;21;24;4 +10063;6;22;14;1 +10063;6;24;14;1 +10063;6;25;29;7 +10063;6;26;14;1 +10063;6;27;29;7 +10063;6;28;14;1 +10063;6;29;29;7 +10063;6;30;14;1 +10063;6;31;29;7 +10063;6;32;14;1 +10063;6;33;24;4 +10063;6;34;14;1 +10063;6;36;14;1 +10063;6;37;24;4 +10063;6;38;14;1 +10063;6;40;14;1 +10063;6;41;29;7 +10063;6;42;14;1 +10063;6;43;29;7 +10063;6;44;14;1 +10063;6;45;29;7 +10063;6;46;14;1 +10063;6;47;29;7 +10063;6;48;14;1 +10063;6;49;24;4 +10063;6;50;14;1 +10063;6;52;14;1 +10063;6;53;24;4 +10063;6;54;14;1 +10063;6;56;14;1 +10063;6;57;29;7 +10063;6;58;14;1 +10063;6;59;29;7 +10063;6;60;14;1 +10063;6;61;29;7 +10063;6;62;14;1 +10063;6;63;29;7 +10063;6;64;14;1 +10063;6;65;24;4 +10063;6;66;14;1 +10063;6;68;14;1 +10063;6;69;24;4 +10063;6;70;14;1 +10063;6;72;14;1 +10063;6;73;29;7 +10063;6;74;14;1 +10063;6;75;29;7 +10063;6;76;14;1 +10063;6;77;29;7 +10063;6;78;14;1 +10063;6;79;29;7 +10063;6;80;14;1 +10063;6;81;24;4 +10063;6;82;14;1 +10063;6;84;14;1 +10063;6;85;24;4 +10063;6;86;14;1 +10063;6;88;14;1 +10063;6;89;29;7 +10063;6;90;14;1 +10063;6;91;29;7 +10063;6;92;14;1 +10063;6;93;29;7 +10063;6;94;14;1 +10063;6;95;29;7 +10063;6;96;14;1 +10063;6;97;24;4 +10063;6;98;14;1 +10063;6;100;14;1 +10063;6;101;24;4 +10063;6;102;14;1 +10063;6;104;14;1 +10063;6;105;29;7 +10063;6;106;14;1 +10063;6;107;29;7 +10063;6;108;14;1 +10063;6;109;29;7 +10063;6;110;14;1 +10063;6;111;29;7 +10063;6;112;14;1 +10063;6;113;24;4 +10063;6;114;14;1 +10063;6;116;14;1 +10063;6;117;24;4 +10063;6;118;14;1 +10063;6;120;14;1 +10063;6;121;29;7 +10063;6;122;14;1 +10063;6;123;29;7 +10063;6;124;14;1 +10063;6;125;29;7 +10063;6;126;14;1 +10063;6;127;29;7 +10063;6;128;14;1 +10063;6;129;24;4 +10063;6;130;14;1 +10063;6;132;14;1 +10063;6;133;24;4 +10063;6;134;14;1 +10063;6;136;14;1 +10063;6;137;29;7 +10063;6;138;14;1 +10063;6;139;29;7 +10063;6;140;14;1 +10063;6;141;29;7 +10063;6;142;14;1 +10063;6;143;29;7 +10063;6;144;14;1 +10063;6;145;24;4 +10063;6;146;14;1 +10063;6;148;14;1 +10063;6;149;24;4 +10063;6;150;14;1 +10063;6;152;14;1 +10063;6;153;29;7 +10063;6;154;14;1 +10063;6;155;29;7 +10063;6;156;14;1 +10063;6;157;29;7 +10063;6;158;14;1 +10063;6;159;29;7 +10063;6;160;14;1 +10063;6;161;24;4 +10063;6;162;14;1 +10063;6;164;14;1 +10063;6;165;24;4 +10063;6;166;14;1 +10063;6;168;14;1 +10063;6;169;29;7 +10063;6;170;14;1 +10063;6;171;29;7 +10063;6;172;14;1 +10063;6;173;29;7 +10063;6;174;14;1 +10063;6;175;29;7 +10063;6;176;14;1 +10063;6;177;24;4 +10063;6;178;14;1 +10063;6;180;14;1 +10063;6;181;24;4 +10063;6;182;14;1 +10063;6;184;14;1 +10063;6;185;29;7 +10063;6;186;14;1 +10063;6;187;29;7 +10063;6;188;14;1 +10063;6;189;29;7 +10063;6;190;14;1 +10063;6;191;29;7 +10063;6;192;14;1 +10063;6;193;24;4 +10063;6;194;14;1 +10063;6;196;14;1 +10063;6;197;24;4 +10063;6;198;14;1 +10063;6;200;14;1 +10063;6;201;29;7 +10063;6;202;14;1 +10063;6;203;29;7 +10063;6;204;14;1 +10063;6;205;29;7 +10063;6;206;14;1 +10063;6;207;29;7 +10063;6;208;14;1 +10063;6;209;24;4 +10063;6;210;14;1 +10063;6;212;14;1 +10063;6;213;24;4 +10063;6;214;14;1 +10063;6;216;14;1 +10063;6;217;29;7 +10063;6;218;14;1 +10063;6;219;29;7 +10063;6;220;14;1 +10063;6;221;29;7 +10063;6;222;14;1 +10063;6;223;29;7 +10063;6;224;14;1 +10063;6;225;24;4 +10063;6;226;14;1 +10063;6;228;14;1 +10063;6;229;24;4 +10063;6;230;14;1 +10063;6;232;14;1 +10063;6;233;29;7 +10063;6;234;14;1 +10063;6;235;29;7 +10063;6;236;14;1 +10063;6;237;29;7 +10063;6;238;14;1 +10063;6;239;29;7 +10063;6;240;14;1 +10063;6;241;24;4 +10063;6;242;14;1 +10063;6;244;14;1 +10063;6;245;24;4 +10063;6;246;14;1 +10063;6;248;14;1 +10063;6;249;29;7 +10063;6;250;14;1 +10063;6;251;29;7 +10063;6;252;14;1 +10063;6;253;29;7 +10063;6;254;14;1 +10063;6;255;29;7 +10063;6;256;14;1 +10063;6;257;24;4 +10063;6;258;14;1 +10063;6;260;14;1 +10063;6;261;24;4 +10063;6;262;14;1 +10063;6;264;14;1 +10063;6;265;29;7 +10063;6;266;14;1 +10063;6;267;29;7 +10063;6;268;14;1 +10063;6;269;29;7 +10063;6;270;14;1 +10063;6;271;29;7 +10063;6;272;14;1 +10063;6;273;24;4 +10063;6;274;14;1 +10063;6;276;14;1 +10063;6;277;24;4 +10063;6;278;14;1 +10063;6;280;14;1 +10063;6;281;29;7 +10063;6;282;14;1 +10063;6;283;29;7 +10063;6;284;14;1 +10063;6;285;29;7 +10063;6;286;14;1 +10063;6;287;29;7 +10063;6;288;14;1 +10063;6;289;24;4 +10063;6;290;14;1 +10063;6;292;14;1 +10063;6;293;24;4 +10063;6;294;14;1 +10063;6;296;14;1 +10063;6;297;29;7 +10063;6;298;14;1 +10063;6;299;29;7 +10063;6;300;14;1 +10063;6;301;29;7 +10063;6;302;14;1 +10063;6;303;29;7 +10063;6;304;14;1 +10063;6;305;24;4 +10063;6;306;14;1 +10063;6;308;14;1 +10063;6;309;24;4 +10063;6;310;14;1 +10063;6;312;14;1 +10063;6;313;29;7 +10063;6;314;14;1 +10063;6;315;29;7 +10063;6;316;14;1 +10063;6;317;29;7 +10063;6;318;14;1 +10063;6;319;29;7 +10063;6;320;14;1 +10063;6;321;24;4 +10063;6;322;14;1 +10063;6;324;14;1 +10063;6;325;24;4 +10063;6;326;14;1 +10063;6;328;14;1 +10063;6;329;29;7 +10063;6;330;14;1 +10063;6;331;29;7 +10063;6;332;14;1 +10063;6;333;29;7 +10063;6;334;14;1 +10063;6;335;29;7 +10063;6;336;14;1 +10063;6;337;24;4 +10063;6;338;14;1 +10063;6;340;14;1 +10063;6;341;24;4 +10063;6;342;14;1 +10063;6;344;14;1 +10063;6;345;29;7 +10063;6;346;14;1 +10063;6;347;29;7 +10063;6;348;14;1 +10063;6;349;29;7 +10063;6;350;14;1 +10063;6;351;29;7 +10063;6;352;14;1 +10063;6;353;24;4 +10063;6;354;14;1 +10063;6;356;14;1 +10063;6;357;24;4 +10063;6;358;14;1 +10063;6;360;14;1 +10063;6;361;29;7 +10063;6;362;14;1 +10063;6;363;29;7 +10063;6;364;14;1 +10063;6;365;29;7 +10063;6;366;14;1 +10063;6;367;29;7 +10063;6;368;14;1 +10063;6;369;24;4 +10063;6;370;14;1 +10063;6;372;14;1 +10063;6;373;24;4 +10063;6;374;14;1 +10063;6;376;14;1 +10063;6;377;29;7 +10063;6;378;14;1 +10063;6;379;29;7 +10063;6;380;14;1 +10063;6;381;29;7 +10063;6;382;14;1 +10063;6;383;29;7 +10063;6;384;14;1 +10063;6;385;24;4 +10063;6;386;14;1 +10063;6;388;14;1 +10063;6;389;24;4 +10063;6;390;14;1 +10063;6;392;14;1 +10063;6;393;29;7 +10063;6;394;14;1 +10063;6;395;29;7 +10063;6;396;14;1 +10063;6;397;29;7 +10063;6;398;14;1 +10063;6;399;29;7 +10063;6;400;14;1 +10063;6;401;24;4 +10063;6;402;14;1 +10063;6;404;14;1 +10063;6;405;24;4 +10063;6;406;14;1 +10063;6;408;14;1 +10063;6;409;29;7 +10063;6;410;14;1 +10063;6;411;29;7 +10063;6;412;14;1 +10063;6;413;29;7 +10063;6;414;14;1 +10063;6;415;29;7 +10063;6;416;14;1 +10063;6;417;24;4 +10063;6;418;14;1 +10063;6;420;14;1 +10063;6;421;24;4 +10063;6;422;14;1 +10063;6;424;14;1 +10063;6;425;29;7 +10063;6;426;14;1 +10063;6;427;29;7 +10063;6;428;14;1 +10063;6;429;29;7 +10063;6;430;14;1 +10063;6;431;29;7 +10063;6;432;14;1 +10063;6;433;24;4 +10063;6;434;14;1 +10063;6;436;14;1 +10063;6;437;24;4 +10063;6;438;14;1 +10063;6;440;14;1 +10063;6;441;29;7 +10063;6;442;14;1 +10063;6;443;29;7 +10063;6;444;14;1 +10063;6;445;29;7 +10063;6;446;14;1 +10063;6;447;29;7 +10063;6;448;14;1 +10063;6;449;24;4 +10063;6;450;14;1 +10063;6;452;14;1 +10063;6;453;24;4 +10063;6;454;14;1 +10063;6;456;14;1 +10063;6;457;29;7 +10063;6;458;14;1 +10063;6;459;29;7 +10063;6;460;14;1 +10063;6;461;29;7 +10063;6;462;14;1 +10063;6;463;29;7 +10063;6;464;14;1 +10063;6;465;24;4 +10063;6;466;14;1 +10063;6;468;14;1 +10063;6;469;24;4 +10063;6;470;14;1 +10063;6;472;14;1 +10063;6;473;29;7 +10063;6;474;14;1 +10063;6;475;29;7 +10063;6;476;14;1 +10063;6;477;29;7 +10063;6;478;14;1 +10063;6;479;29;7 +10063;6;480;14;1 +10063;6;481;24;4 +10063;6;482;14;1 +10063;6;484;14;1 +10063;6;485;24;4 +10063;6;486;14;1 +10063;6;488;14;1 +10063;6;489;29;7 +10063;6;490;14;1 +10063;6;491;29;7 +10063;6;492;14;1 +10063;6;493;29;7 +10063;6;494;14;1 +10063;6;495;29;7 +10063;6;496;14;1 +10063;6;497;24;4 +10063;6;498;14;1 +10063;6;500;14;1 +10063;6;501;24;4 +10063;6;502;14;1 +10063;6;504;14;1 +10063;6;505;29;7 +10063;6;506;14;1 +10063;6;507;29;7 +10063;6;508;14;1 +10063;6;509;29;7 +10063;6;510;14;1 +10063;6;511;29;7 +10063;7;0;14;1 +10063;7;1;24;4 +10063;7;2;14;1 +10063;7;3;16;3 +10063;7;4;14;1 +10063;7;5;24;4 +10063;7;6;14;1 +10063;7;7;16;3 +10063;7;8;14;1 +10063;7;10;14;1 +10063;7;12;14;1 +10063;7;14;14;1 +10063;7;16;14;1 +10063;7;17;24;4 +10063;7;18;14;1 +10063;7;19;18;6 +10063;7;20;14;1 +10063;7;21;24;4 +10063;7;22;14;1 +10063;7;23;18;6 +10063;7;24;14;1 +10063;7;26;14;1 +10063;7;28;14;1 +10063;7;30;14;1 +10063;7;32;14;1 +10063;7;33;24;4 +10063;7;34;14;1 +10063;7;35;18;6 +10063;7;36;14;1 +10063;7;37;24;4 +10063;7;38;14;1 +10063;7;39;18;6 +10063;7;40;14;1 +10063;7;42;14;1 +10063;7;44;14;1 +10063;7;46;14;1 +10063;7;48;14;1 +10063;7;49;24;4 +10063;7;50;14;1 +10063;7;51;18;6 +10063;7;52;14;1 +10063;7;53;24;4 +10063;7;54;14;1 +10063;7;55;18;6 +10063;7;56;14;1 +10063;7;58;14;1 +10063;7;60;14;1 +10063;7;62;14;1 +10063;7;64;14;1 +10063;7;65;24;4 +10063;7;66;14;1 +10063;7;67;18;6 +10063;7;68;14;1 +10063;7;69;24;4 +10063;7;70;14;1 +10063;7;71;18;6 +10063;7;72;14;1 +10063;7;74;14;1 +10063;7;76;14;1 +10063;7;78;14;1 +10063;7;80;14;1 +10063;7;81;24;4 +10063;7;82;14;1 +10063;7;83;18;6 +10063;7;84;14;1 +10063;7;85;24;4 +10063;7;86;14;1 +10063;7;87;18;6 +10063;7;88;14;1 +10063;7;90;14;1 +10063;7;92;14;1 +10063;7;94;14;1 +10063;7;96;14;1 +10063;7;97;24;4 +10063;7;98;14;1 +10063;7;99;18;6 +10063;7;100;14;1 +10063;7;101;24;4 +10063;7;102;14;1 +10063;7;103;18;6 +10063;7;104;14;1 +10063;7;106;14;1 +10063;7;108;14;1 +10063;7;110;14;1 +10063;7;112;14;1 +10063;7;113;24;4 +10063;7;114;14;1 +10063;7;115;18;6 +10063;7;116;14;1 +10063;7;117;24;4 +10063;7;118;14;1 +10063;7;119;18;6 +10063;7;120;14;1 +10063;7;122;14;1 +10063;7;124;14;1 +10063;7;126;14;1 +10063;7;128;14;1 +10063;7;129;24;4 +10063;7;130;14;1 +10063;7;131;18;6 +10063;7;132;14;1 +10063;7;133;24;4 +10063;7;134;14;1 +10063;7;135;18;6 +10063;7;136;14;1 +10063;7;138;14;1 +10063;7;140;14;1 +10063;7;142;14;1 +10063;7;144;14;1 +10063;7;145;24;4 +10063;7;146;14;1 +10063;7;147;18;6 +10063;7;148;14;1 +10063;7;149;24;4 +10063;7;150;14;1 +10063;7;151;18;6 +10063;7;152;14;1 +10063;7;154;14;1 +10063;7;156;14;1 +10063;7;158;14;1 +10063;7;160;14;1 +10063;7;161;24;4 +10063;7;162;14;1 +10063;7;163;18;6 +10063;7;164;14;1 +10063;7;165;24;4 +10063;7;166;14;1 +10063;7;167;18;6 +10063;7;168;14;1 +10063;7;170;14;1 +10063;7;172;14;1 +10063;7;174;14;1 +10063;7;176;14;1 +10063;7;177;24;4 +10063;7;178;14;1 +10063;7;179;18;6 +10063;7;180;14;1 +10063;7;181;24;4 +10063;7;182;14;1 +10063;7;183;18;6 +10063;7;184;14;1 +10063;7;186;14;1 +10063;7;188;14;1 +10063;7;190;14;1 +10063;7;192;14;1 +10063;7;193;24;4 +10063;7;194;14;1 +10063;7;195;18;6 +10063;7;196;14;1 +10063;7;197;24;4 +10063;7;198;14;1 +10063;7;199;18;6 +10063;7;200;14;1 +10063;7;202;14;1 +10063;7;204;14;1 +10063;7;206;14;1 +10063;7;208;14;1 +10063;7;209;24;4 +10063;7;210;14;1 +10063;7;211;18;6 +10063;7;212;14;1 +10063;7;213;24;4 +10063;7;214;14;1 +10063;7;215;18;6 +10063;7;216;14;1 +10063;7;218;14;1 +10063;7;220;14;1 +10063;7;222;14;1 +10063;7;224;14;1 +10063;7;225;24;4 +10063;7;226;14;1 +10063;7;227;18;6 +10063;7;228;14;1 +10063;7;229;24;4 +10063;7;230;14;1 +10063;7;231;18;6 +10063;7;232;14;1 +10063;7;234;14;1 +10063;7;236;14;1 +10063;7;238;14;1 +10063;7;240;14;1 +10063;7;241;24;4 +10063;7;242;14;1 +10063;7;243;18;6 +10063;7;244;14;1 +10063;7;245;24;4 +10063;7;246;14;1 +10063;7;247;18;6 +10063;7;248;14;1 +10063;7;250;14;1 +10063;7;252;14;1 +10063;7;254;14;1 +10063;7;256;14;1 +10063;7;257;24;4 +10063;7;258;14;1 +10063;7;259;18;6 +10063;7;260;14;1 +10063;7;261;24;4 +10063;7;262;14;1 +10063;7;263;18;6 +10063;7;264;14;1 +10063;7;266;14;1 +10063;7;268;14;1 +10063;7;270;14;1 +10063;7;272;14;1 +10063;7;273;24;4 +10063;7;274;14;1 +10063;7;275;18;6 +10063;7;276;14;1 +10063;7;277;24;4 +10063;7;278;14;1 +10063;7;279;18;6 +10063;7;280;14;1 +10063;7;282;14;1 +10063;7;284;14;1 +10063;7;286;14;1 +10063;7;288;14;1 +10063;7;289;24;4 +10063;7;290;14;1 +10063;7;291;18;6 +10063;7;292;14;1 +10063;7;293;24;4 +10063;7;294;14;1 +10063;7;295;18;6 +10063;7;296;14;1 +10063;7;298;14;1 +10063;7;300;14;1 +10063;7;302;14;1 +10063;7;304;14;1 +10063;7;305;24;4 +10063;7;306;14;1 +10063;7;307;18;6 +10063;7;308;14;1 +10063;7;309;24;4 +10063;7;310;14;1 +10063;7;311;18;6 +10063;7;312;14;1 +10063;7;314;14;1 +10063;7;316;14;1 +10063;7;318;14;1 +10063;7;320;14;1 +10063;7;321;24;4 +10063;7;322;14;1 +10063;7;323;18;6 +10063;7;324;14;1 +10063;7;325;24;4 +10063;7;326;14;1 +10063;7;327;18;6 +10063;7;328;14;1 +10063;7;330;14;1 +10063;7;332;14;1 +10063;7;334;14;1 +10063;7;336;14;1 +10063;7;337;24;4 +10063;7;338;14;1 +10063;7;339;18;6 +10063;7;340;14;1 +10063;7;341;24;4 +10063;7;342;14;1 +10063;7;343;18;6 +10063;7;344;14;1 +10063;7;346;14;1 +10063;7;348;14;1 +10063;7;350;14;1 +10063;7;352;14;1 +10063;7;353;24;4 +10063;7;354;14;1 +10063;7;355;18;6 +10063;7;356;14;1 +10063;7;357;24;4 +10063;7;358;14;1 +10063;7;359;18;6 +10063;7;360;14;1 +10063;7;362;14;1 +10063;7;364;14;1 +10063;7;366;14;1 +10063;7;368;14;1 +10063;7;369;24;4 +10063;7;370;14;1 +10063;7;371;18;6 +10063;7;372;14;1 +10063;7;373;24;4 +10063;7;374;14;1 +10063;7;375;18;6 +10063;7;376;14;1 +10063;7;378;14;1 +10063;7;380;14;1 +10063;7;382;14;1 +10063;7;384;14;1 +10063;7;385;24;4 +10063;7;386;14;1 +10063;7;387;18;6 +10063;7;388;14;1 +10063;7;389;24;4 +10063;7;390;14;1 +10063;7;391;18;6 +10063;7;392;14;1 +10063;7;394;14;1 +10063;7;396;14;1 +10063;7;398;14;1 +10063;7;400;14;1 +10063;7;401;24;4 +10063;7;402;14;1 +10063;7;403;18;6 +10063;7;404;14;1 +10063;7;405;24;4 +10063;7;406;14;1 +10063;7;407;18;6 +10063;7;408;14;1 +10063;7;410;14;1 +10063;7;412;14;1 +10063;7;414;14;1 +10063;7;416;14;1 +10063;7;417;24;4 +10063;7;418;14;1 +10063;7;419;18;6 +10063;7;420;14;1 +10063;7;421;24;4 +10063;7;422;14;1 +10063;7;423;18;6 +10063;7;424;14;1 +10063;7;426;14;1 +10063;7;428;14;1 +10063;7;430;14;1 +10063;7;432;14;1 +10063;7;433;24;4 +10063;7;434;14;1 +10063;7;435;18;6 +10063;7;436;14;1 +10063;7;437;24;4 +10063;7;438;14;1 +10063;7;439;18;6 +10063;7;440;14;1 +10063;7;442;14;1 +10063;7;444;14;1 +10063;7;446;14;1 +10063;7;448;14;1 +10063;7;449;24;4 +10063;7;450;14;1 +10063;7;451;18;6 +10063;7;452;14;1 +10063;7;453;24;4 +10063;7;454;14;1 +10063;7;455;18;6 +10063;7;456;14;1 +10063;7;458;14;1 +10063;7;460;14;1 +10063;7;462;14;1 +10063;7;464;14;1 +10063;7;465;24;4 +10063;7;466;14;1 +10063;7;467;18;6 +10063;7;468;14;1 +10063;7;469;24;4 +10063;7;470;14;1 +10063;7;471;18;6 +10063;7;472;14;1 +10063;7;474;14;1 +10063;7;476;14;1 +10063;7;478;14;1 +10063;7;480;14;1 +10063;7;481;24;4 +10063;7;482;14;1 +10063;7;483;18;6 +10063;7;484;14;1 +10063;7;485;24;4 +10063;7;486;14;1 +10063;7;487;18;6 +10063;7;488;14;1 +10063;7;490;14;1 +10063;7;492;14;1 +10063;7;494;14;1 +10063;7;496;14;1 +10063;7;497;24;4 +10063;7;498;14;1 +10063;7;499;18;6 +10063;7;500;14;1 +10063;7;501;24;4 +10063;7;502;14;1 +10063;7;503;18;6 +10063;7;504;14;1 +10063;7;506;14;1 +10063;7;508;14;1 +10063;7;510;14;1 diff --git a/StateMachine/Fluitek/10063_SEGHETTO_DANOBAT.rul b/StateMachine/Fluitek/10063_SEGHETTO_DANOBAT.rul new file mode 100644 index 0000000..724dc59 --- /dev/null +++ b/StateMachine/Fluitek/10063_SEGHETTO_DANOBAT.rul @@ -0,0 +1,111 @@ +# +# Macchine SEGHETTO DANOBAT (es Jetco e Fluitek) +# +# partenza da IdxFam 42, COMMENTATO CONTAPEZZI +# +# v2: invertiti segnali all'origine x bit 3+ +# +$DEFINITIONS + +$NAME : DANOBAT +$IDX : 10063 +$N_STATES : 8 +$N_BITS : 9 + +#definizione bit : obbligatorio iniziare da 0 +$BIT : 0 : bPowerOn +$BIT : 1 : bAuto +$BIT : 2 : bEndCut +$BIT : 3 : bLackMat +$BIT : 4 : bErrInvLama +$BIT : 5 : bErrBladeBroken +$BIT : 6 : bErrInverter +$BIT : 7 : bErrOverload +$BIT : 8 : bErrBladeStuck + +#definizione stati : obbligatorio iniziare da 0 +$STATE : 0 : ST_Init +$STATE : 1 : ST_Power_off +$STATE : 2 : ST_Machine_ready +$STATE : 3 : ST_machining +$STATE : 4 : ST_manuale +$STATE : 5 : ST_EndCut +$STATE : 6 : ST_Error +$STATE : 7 : ST_Material + +#definizione eventi : obbligatorio iniziare da 0 +$EVENT : 00 : EV_00 +$EVENT : 01 : EV_01 +$EVENT : 02 : EV_02 +$EVENT : 03 : EV_03 +$EVENT : 04 : EV_04 +$EVENT : 05 : EV_05 +$EVENT : 06 : EV_06 +$EVENT : 07 : EV_07 +$EVENT : 08 : EV_08 +$EVENT : 09 : EV_09 +$EVENT : 10 : EV_10 +$EVENT : 11 : EV_11 +$EVENT : 12 : EV_12 +$EVENT : 13 : HW_init +$EVENT : 14 : HW_power_off +$EVENT : 15 : HW_PowerOn +$EVENT : 16 : HW_machining +$EVENT : 17 : HW_end_machining +$EVENT : 18 : HW_error +$EVENT : 19 : Barcode_cambio operatore +$EVENT : 20 : Contapezzi +$EVENT : 21 : HW_start_pallet +$EVENT : 22 : HW_end_pallet +$EVENT : 23 : HW_rottura_nastro_abrasivo +$EVENT : 24 : HW_manuale +$EVENT : 25 : HW_OUT_full +$EVENT : 26 : Barcode_Manca_Riforn_MPD +$EVENT : 27 : Timer_timeout_tempo_ciclo +$EVENT : 28 : Timer_timeout_TURNO_by_tempo_ciclo +$EVENT : 29 : HW_IN_empty +$EVENT : 30 : HW_emergenza +$EVENT : 31 : Barcode_Modifica_Programmi +$EVENT : 32 : Barcode_Sostituzione_Utensile +$EVENT : 33 : HW_Allarme Macchina +$EVENT : 34 : HW_end_pallet_1 +$EVENT : 35 : HW_end_pallet_2 +$EVENT : 36 : HW_deposito_robot +$EVENT : 37 : Barcode_Riempimento_Vasca +$EVENT : 38 : Barcode_Riscaldamento +$EVENT : 39 : Barcode_Anomalia_Macchina +$EVENT : 40 : HW_WarmUp_CoolDown +$EVENT : 41 : HW_machining_SLOW +$EVENT : 42 : HW_Warn_Livello_Vasca +$EVENT : 43 : HW_Warn_Livello_Cell +$EVENT : 44 : HW_Warn_a_Vuoto +$EVENT : 45 : HW_Warn_Riserva +$EVENT : 46 : HW_Carico +$EVENT : 47 : HW_Mismatch +$EVENT : 48 : HW_preparing +#EVENT : 120 : IncrementoPezzi +#EVENT : 121 : RettificaPezzi +#$EVENT : 999 : Commento + + +$RULES +# state : input : next state : event +ALL_STATES : NOT bPowerOn : ST_Power_off : HW_power_off +#ST_machining : bEndCut : ST_EndCut : Contapezzi +ALL_STATES : bLackMat : ST_Material : HW_IN_empty +ALL_STATES : NOT bAuto : ST_manuale : HW_manuale + +ALL_STATES : bErrInvLama : ST_Error : HW_error +ALL_STATES : bErrBladeBroken : ST_Error : HW_error +ALL_STATES : bErrInverter : ST_Error : HW_error +ALL_STATES : bErrOverload : ST_Error : HW_error +ALL_STATES : bErrBladeStuck : ST_Error : HW_error + +ALL_STATES : bAuto : ST_machining : HW_machining +ALL_STATES : bPowerOn : ST_Machine_ready : HW_PowerOn + +#-------------------------------------------------------------------------- + + + +$DO diff --git a/StateMachine/Fluitek/10066_FLUITEK_SEMAPHORE.csv b/StateMachine/Fluitek/10066_FLUITEK_SEMAPHORE.csv new file mode 100644 index 0000000..a6cc2e4 --- /dev/null +++ b/StateMachine/Fluitek/10066_FLUITEK_SEMAPHORE.csv @@ -0,0 +1,81 @@ +IdxFamigliaIngresso;IdxMicroStato;ValoreIngresso;IdxTipoEvento;next_IdxMicroStato +10066;0;0;14;1 +10066;0;1;15;2 +10066;0;2;14;1 +10066;0;3;16;3 +10066;0;4;14;1 +10066;0;5;15;2 +10066;0;6;14;1 +10066;0;7;16;3 +10066;0;8;14;1 +10066;0;9;18;5 +10066;0;10;14;1 +10066;0;11;18;5 +10066;0;12;14;1 +10066;0;13;18;5 +10066;0;14;14;1 +10066;0;15;18;5 +10066;1;1;15;2 +10066;1;3;16;3 +10066;1;5;15;2 +10066;1;7;16;3 +10066;1;9;18;5 +10066;1;11;18;5 +10066;1;13;18;5 +10066;1;15;18;5 +10066;2;0;14;1 +10066;2;2;14;1 +10066;2;3;16;3 +10066;2;4;14;1 +10066;2;6;14;1 +10066;2;7;16;3 +10066;2;8;14;1 +10066;2;9;18;5 +10066;2;10;14;1 +10066;2;11;18;5 +10066;2;12;14;1 +10066;2;13;18;5 +10066;2;14;14;1 +10066;2;15;18;5 +10066;3;0;14;1 +10066;3;1;15;2 +10066;3;2;14;1 +10066;3;4;14;1 +10066;3;5;15;2 +10066;3;6;14;1 +10066;3;8;14;1 +10066;3;9;18;5 +10066;3;10;14;1 +10066;3;11;18;5 +10066;3;12;14;1 +10066;3;13;18;5 +10066;3;14;14;1 +10066;3;15;18;5 +10066;4;0;14;1 +10066;4;1;15;2 +10066;4;2;14;1 +10066;4;3;16;3 +10066;4;4;14;1 +10066;4;5;15;2 +10066;4;6;14;1 +10066;4;7;16;3 +10066;4;8;14;1 +10066;4;9;18;5 +10066;4;10;14;1 +10066;4;11;18;5 +10066;4;12;14;1 +10066;4;13;18;5 +10066;4;14;14;1 +10066;4;15;18;5 +10066;5;0;14;1 +10066;5;1;15;2 +10066;5;2;14;1 +10066;5;3;16;3 +10066;5;4;14;1 +10066;5;5;15;2 +10066;5;6;14;1 +10066;5;7;16;3 +10066;5;8;14;1 +10066;5;10;14;1 +10066;5;12;14;1 +10066;5;14;14;1 diff --git a/StateMachine/Fluitek/10066_FLUITEK_SEMAPHORE.rul b/StateMachine/Fluitek/10066_FLUITEK_SEMAPHORE.rul new file mode 100644 index 0000000..c049545 --- /dev/null +++ b/StateMachine/Fluitek/10066_FLUITEK_SEMAPHORE.rul @@ -0,0 +1,92 @@ +# +# FLUITEK torni con semaforo diretto + contapezzi SEMPRE attivo (anche in attrezzaggio) - ove presente +# +# partenza da IdxFam 57, COMMENTATO CONTAPEZZI +# +# +$DEFINITIONS + +$NAME : SEMAPHORE +$IDX : 10066 +$N_STATES : 6 +$N_BITS : 4 + +#definizione bit : obbligatorio iniziare da 0 + +$BIT : 0 : power_on +$BIT : 1 : run +$BIT : 2 : end_cycle +$BIT : 3 : alarm +#$BIT : 4 : manual +#$BIT : 5 : not_emergency +#$BIT : 6 : alarm_air_oil +#$BIT : 7 : auto_mode + +#definizione stati : obbligatorio iniziare da 0 + +$STATE : 0 : ST_Init +$STATE : 1 : ST_Power_off +$STATE : 2 : ST_Machine_ready +$STATE : 3 : ST_Run +$STATE : 4 : ST_Cycle_end +$STATE : 5 : ST_Alarm +#$STATE : 6 : ST_Manual + + +#definizione eventi : obbligatorio iniziare da 0 + +$EVENT : 00 : EV_00 +$EVENT : 01 : EV_01 +$EVENT : 02 : EV_02 +$EVENT : 03 : EV_03 +$EVENT : 04 : EV_04 +$EVENT : 05 : EV_05 +$EVENT : 06 : EV_06 +$EVENT : 07 : EV_07 +$EVENT : 08 : EV_08 +$EVENT : 09 : EV_09 +$EVENT : 10 : EV_10 +$EVENT : 11 : EV_11 +$EVENT : 12 : EV_12 +$EVENT : 13 : HW_init +$EVENT : 14 : HW_power_off +$EVENT : 15 : HW_power_on +$EVENT : 16 : HW_machining +$EVENT : 17 : HW_end_machining +$EVENT : 18 : HW_error +$EVENT : 19 : EV_19 +$EVENT : 20 : Contapezzi +$EVENT : 21 : HW_start_pallet +$EVENT : 22 : HW_end_pallet +$EVENT : 23 : HW_rottura_nastro_abrasivo +$EVENT : 24 : HW_manuale +$EVENT : 25 : HW_nastro_scarico_pieno +$EVENT : 26 : EV_26 +$EVENT : 27 : Timer_timeout_tempo_ciclo +$EVENT : 28 : Timer_timeout_TURNO_by_tempo_ciclo +$EVENT : 29 : HW_magazzino_grezzi_vuoto +$EVENT : 30 : HW_emergenza +$EVENT : 31 : EV_31 +$EVENT : 32 : EV_32 +$EVENT : 33 : HW_Allarme Macchina +$EVENT : 34 : HW_deposito_robot +$EVENT : 35 : HW_start_tavola +$EVENT : 36 : HW_end_tavola +$EVENT : 37 : EV_37 +$EVENT : 38 : EV_38 +$EVENT : 39 : EV_39 +#$EVENT : 999 : Commento + +$RULES + +# state : input : next state : event + +ALL_STATES : NOT power_on : ST_Power_off : HW_power_off +#ST_Run : end_cycle : ST_Cycle_end : HW_end_pallet +ALL_STATES : alarm : ST_Alarm : HW_error +ALL_STATES : run : ST_Run : HW_machining +ALL_STATES : power_on : ST_Machine_ready : HW_power_on + +#-------------------------------------------------------------------------- + +$DO diff --git a/StateMachine/Fluitek/10067_FLUITEK_FEMCO.csv b/StateMachine/Fluitek/10067_FLUITEK_FEMCO.csv new file mode 100644 index 0000000..97bf327 --- /dev/null +++ b/StateMachine/Fluitek/10067_FLUITEK_FEMCO.csv @@ -0,0 +1,193 @@ +IdxFamigliaIngresso;IdxMicroStato;ValoreIngresso;IdxTipoEvento;next_IdxMicroStato +10067;0;0;14;1 +10067;0;1;30;6 +10067;0;2;14;1 +10067;0;3;30;6 +10067;0;4;14;1 +10067;0;5;30;6 +10067;0;6;14;1 +10067;0;7;30;6 +10067;0;8;14;1 +10067;0;9;30;6 +10067;0;10;14;1 +10067;0;11;30;6 +10067;0;12;14;1 +10067;0;13;30;6 +10067;0;14;14;1 +10067;0;15;30;6 +10067;0;16;14;1 +10067;0;17;15;2 +10067;0;18;14;1 +10067;0;19;16;3 +10067;0;20;14;1 +10067;0;21;15;2 +10067;0;22;14;1 +10067;0;23;16;3 +10067;0;24;14;1 +10067;0;25;18;5 +10067;0;26;14;1 +10067;0;27;18;5 +10067;0;28;14;1 +10067;0;29;18;5 +10067;0;30;14;1 +10067;0;31;18;5 +10067;1;1;30;6 +10067;1;3;30;6 +10067;1;5;30;6 +10067;1;7;30;6 +10067;1;9;30;6 +10067;1;11;30;6 +10067;1;13;30;6 +10067;1;15;30;6 +10067;1;17;15;2 +10067;1;19;16;3 +10067;1;21;15;2 +10067;1;23;16;3 +10067;1;25;18;5 +10067;1;27;18;5 +10067;1;29;18;5 +10067;1;31;18;5 +10067;2;0;14;1 +10067;2;1;30;6 +10067;2;2;14;1 +10067;2;3;30;6 +10067;2;4;14;1 +10067;2;5;30;6 +10067;2;6;14;1 +10067;2;7;30;6 +10067;2;8;14;1 +10067;2;9;30;6 +10067;2;10;14;1 +10067;2;11;30;6 +10067;2;12;14;1 +10067;2;13;30;6 +10067;2;14;14;1 +10067;2;15;30;6 +10067;2;16;14;1 +10067;2;18;14;1 +10067;2;19;16;3 +10067;2;20;14;1 +10067;2;22;14;1 +10067;2;23;16;3 +10067;2;24;14;1 +10067;2;25;18;5 +10067;2;26;14;1 +10067;2;27;18;5 +10067;2;28;14;1 +10067;2;29;18;5 +10067;2;30;14;1 +10067;2;31;18;5 +10067;3;0;14;1 +10067;3;1;30;6 +10067;3;2;14;1 +10067;3;3;30;6 +10067;3;4;14;1 +10067;3;5;30;6 +10067;3;6;14;1 +10067;3;7;30;6 +10067;3;8;14;1 +10067;3;9;30;6 +10067;3;10;14;1 +10067;3;11;30;6 +10067;3;12;14;1 +10067;3;13;30;6 +10067;3;14;14;1 +10067;3;15;30;6 +10067;3;16;14;1 +10067;3;17;15;2 +10067;3;18;14;1 +10067;3;20;14;1 +10067;3;21;15;2 +10067;3;22;14;1 +10067;3;24;14;1 +10067;3;25;18;5 +10067;3;26;14;1 +10067;3;27;18;5 +10067;3;28;14;1 +10067;3;29;18;5 +10067;3;30;14;1 +10067;3;31;18;5 +10067;4;0;14;1 +10067;4;1;30;6 +10067;4;2;14;1 +10067;4;3;30;6 +10067;4;4;14;1 +10067;4;5;30;6 +10067;4;6;14;1 +10067;4;7;30;6 +10067;4;8;14;1 +10067;4;9;30;6 +10067;4;10;14;1 +10067;4;11;30;6 +10067;4;12;14;1 +10067;4;13;30;6 +10067;4;14;14;1 +10067;4;15;30;6 +10067;4;16;14;1 +10067;4;17;15;2 +10067;4;18;14;1 +10067;4;19;16;3 +10067;4;20;14;1 +10067;4;21;15;2 +10067;4;22;14;1 +10067;4;23;16;3 +10067;4;24;14;1 +10067;4;25;18;5 +10067;4;26;14;1 +10067;4;27;18;5 +10067;4;28;14;1 +10067;4;29;18;5 +10067;4;30;14;1 +10067;4;31;18;5 +10067;5;0;14;1 +10067;5;1;30;6 +10067;5;2;14;1 +10067;5;3;30;6 +10067;5;4;14;1 +10067;5;5;30;6 +10067;5;6;14;1 +10067;5;7;30;6 +10067;5;8;14;1 +10067;5;9;30;6 +10067;5;10;14;1 +10067;5;11;30;6 +10067;5;12;14;1 +10067;5;13;30;6 +10067;5;14;14;1 +10067;5;15;30;6 +10067;5;16;14;1 +10067;5;17;15;2 +10067;5;18;14;1 +10067;5;19;16;3 +10067;5;20;14;1 +10067;5;21;15;2 +10067;5;22;14;1 +10067;5;23;16;3 +10067;5;24;14;1 +10067;5;26;14;1 +10067;5;28;14;1 +10067;5;30;14;1 +10067;6;0;14;1 +10067;6;2;14;1 +10067;6;4;14;1 +10067;6;6;14;1 +10067;6;8;14;1 +10067;6;10;14;1 +10067;6;12;14;1 +10067;6;14;14;1 +10067;6;16;14;1 +10067;6;17;15;2 +10067;6;18;14;1 +10067;6;19;16;3 +10067;6;20;14;1 +10067;6;21;15;2 +10067;6;22;14;1 +10067;6;23;16;3 +10067;6;24;14;1 +10067;6;25;18;5 +10067;6;26;14;1 +10067;6;27;18;5 +10067;6;28;14;1 +10067;6;29;18;5 +10067;6;30;14;1 +10067;6;31;18;5 diff --git a/StateMachine/Fluitek/10067_FLUITEK_FEMCO.rul b/StateMachine/Fluitek/10067_FLUITEK_FEMCO.rul new file mode 100644 index 0000000..53e2e5c --- /dev/null +++ b/StateMachine/Fluitek/10067_FLUITEK_FEMCO.rul @@ -0,0 +1,94 @@ +# +# Fluitek tornio FANUC con contapezzi SEMPRE attivo (anche in attrezzaggio) +# +# partenza da IdxFam 49, COMMENTATO CONTAPEZZI +# +# 2020.09.24: cambiato emergenza in emergenza negata/armata +# 2021.02.24: tolto segnale manuale non presente +$DEFINITIONS + +$NAME : FANUC +$IDX : 10067 +$N_STATES : 7 +$N_BITS : 5 + +#definizione bit : obbligatorio iniziare da 0 + +$BIT : 0 : power_on +$BIT : 1 : run +$BIT : 2 : end_cycle +$BIT : 3 : alarm +$BIT : 4 : armedEmerg +#$BIT : 5 : armedEmerg +#$BIT : 6 : alarm_air_oil +#$BIT : 7 : auto_mode + +#definizione stati : obbligatorio iniziare da 0 + +$STATE : 0 : ST_Init +$STATE : 1 : ST_Power_off +$STATE : 2 : ST_Machine_ready +$STATE : 3 : ST_Run +$STATE : 4 : ST_Cycle_end +$STATE : 5 : ST_Alarm +$STATE : 6 : ST_Emergency + + +#definizione eventi : obbligatorio iniziare da 0 + +$EVENT : 00 : EV_00 +$EVENT : 01 : EV_01 +$EVENT : 02 : EV_02 +$EVENT : 03 : EV_03 +$EVENT : 04 : EV_04 +$EVENT : 05 : EV_05 +$EVENT : 06 : EV_06 +$EVENT : 07 : EV_07 +$EVENT : 08 : EV_08 +$EVENT : 09 : EV_09 +$EVENT : 10 : EV_10 +$EVENT : 11 : EV_11 +$EVENT : 12 : EV_12 +$EVENT : 13 : HW_init +$EVENT : 14 : HW_power_off +$EVENT : 15 : HW_power_on +$EVENT : 16 : HW_machining +$EVENT : 17 : HW_end_machining +$EVENT : 18 : HW_error +$EVENT : 19 : EV_19 +$EVENT : 20 : Contapezzi +$EVENT : 21 : HW_start_pallet +$EVENT : 22 : HW_end_pallet +$EVENT : 23 : HW_rottura_nastro_abrasivo +$EVENT : 24 : HW_manuale +$EVENT : 25 : HW_nastro_scarico_pieno +$EVENT : 26 : EV_26 +$EVENT : 27 : Timer_timeout_tempo_ciclo +$EVENT : 28 : Timer_timeout_TURNO_by_tempo_ciclo +$EVENT : 29 : HW_magazzino_grezzi_vuoto +$EVENT : 30 : HW_emergenza +$EVENT : 31 : EV_31 +$EVENT : 32 : EV_32 +$EVENT : 33 : HW_Allarme Macchina +$EVENT : 34 : HW_deposito_robot +$EVENT : 35 : HW_start_tavola +$EVENT : 36 : HW_end_tavola +$EVENT : 37 : EV_37 +$EVENT : 38 : EV_38 +$EVENT : 39 : EV_39 +#$EVENT : 999 : Commento + +$RULES + +# state : input : next state : event + +ALL_STATES : NOT power_on : ST_Power_off : HW_power_off +#ST_Run : end_cycle : ST_Cycle_end : HW_end_pallet +ALL_STATES : NOT armedEmerg : ST_Emergency : HW_emergenza +ALL_STATES : alarm : ST_Alarm : HW_error +ALL_STATES : run : ST_Run : HW_machining +ALL_STATES : power_on : ST_Machine_ready : HW_power_on + +#-------------------------------------------------------------------------- + +$DO From ac3534469ea93c0e43b38c6bbfe57ce96596cfdc Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 18 May 2023 10:30:57 +0200 Subject: [PATCH 2/4] Aggiornamento ramo 2.5 con log corretto x PI --- IOB-PI/vers2.5 12bit/IOB.cfg | 68 ++ IOB-PI/vers2.5 12bit/IOB.cfg.donati | 35 + IOB-PI/vers2.5 12bit/IOB.cfg.steamware | 35 + IOB-PI/vers2.5 12bit/MapoIOB | 41 ++ IOB-PI/vers2.5 12bit/MapoIOB.service | 22 + IOB-PI/vers2.5 12bit/MapoIOB_logrot | 28 + IOB-PI/vers2.5 12bit/checkAlive.sh | 20 + IOB-PI/vers2.5 12bit/cleanPython.sh | 14 + IOB-PI/vers2.5 12bit/convertLogFile.py | 46 ++ IOB-PI/vers2.5 12bit/crontab | 1 + IOB-PI/vers2.5 12bit/install-RPI-IOB.sh | 54 ++ IOB-PI/vers2.5 12bit/readFile.py | 152 +++++ IOB-PI/vers2.5 12bit/readParallela.py | 720 +++++++++++++++++++++ IOB-PI/vers2.5 12bit/readSeriale.py | 363 +++++++++++ IOB-PI/vers2.5 12bit/saveTemp.sh | 17 + IOB-PI/vers2.5 12bit/sendReboot.py | 130 ++++ IOB-PI/vers2.5 12bit/sendRebootIOB | 33 + IOB-PI/vers2.5 12bit/sendRebootIOB.service | 22 + IOB-PI/vers2.5 12bit/setIobConf.sh | 26 + IOB-PI/vers2.5 12bit/unix.py | 31 + IOB-PI/vers2.5 12bit/unix.pyc | Bin 0 -> 669 bytes IOB-PI/vers2.5 12bit/update-RPI-IOB.sh | 54 ++ IOB-PI/vers2.5 12bit/win.py | 32 + IOB-PI/vers2.5 8bit/IOB.cfg | 56 ++ IOB-PI/vers2.5 8bit/IOB.cfg.donati | 35 + IOB-PI/vers2.5 8bit/IOB.cfg.steamware | 35 + IOB-PI/vers2.5 8bit/MapoIOB | 41 ++ IOB-PI/vers2.5 8bit/MapoIOB.service | 22 + IOB-PI/vers2.5 8bit/MapoIOB_logrot | 28 + IOB-PI/vers2.5 8bit/checkAlive.sh | 20 + IOB-PI/vers2.5 8bit/cleanPython.sh | 14 + IOB-PI/vers2.5 8bit/convertLogFile.py | 46 ++ IOB-PI/vers2.5 8bit/crontab | 1 + IOB-PI/vers2.5 8bit/install-RPI-IOB.sh | 54 ++ IOB-PI/vers2.5 8bit/readFile.py | 152 +++++ IOB-PI/vers2.5 8bit/readParallela.py | 720 +++++++++++++++++++++ IOB-PI/vers2.5 8bit/readSeriale.py | 363 +++++++++++ IOB-PI/vers2.5 8bit/saveTemp.sh | 17 + IOB-PI/vers2.5 8bit/sendReboot.py | 130 ++++ IOB-PI/vers2.5 8bit/sendRebootIOB | 33 + IOB-PI/vers2.5 8bit/sendRebootIOB.service | 22 + IOB-PI/vers2.5 8bit/setIobConf.sh | 26 + IOB-PI/vers2.5 8bit/unix.py | 31 + IOB-PI/vers2.5 8bit/unix.pyc | Bin 0 -> 669 bytes IOB-PI/vers2.5 8bit/update-RPI-IOB.sh | 54 ++ IOB-PI/vers2.5 8bit/win.py | 32 + 46 files changed, 3876 insertions(+) create mode 100644 IOB-PI/vers2.5 12bit/IOB.cfg create mode 100644 IOB-PI/vers2.5 12bit/IOB.cfg.donati create mode 100644 IOB-PI/vers2.5 12bit/IOB.cfg.steamware create mode 100644 IOB-PI/vers2.5 12bit/MapoIOB create mode 100644 IOB-PI/vers2.5 12bit/MapoIOB.service create mode 100644 IOB-PI/vers2.5 12bit/MapoIOB_logrot create mode 100644 IOB-PI/vers2.5 12bit/checkAlive.sh create mode 100644 IOB-PI/vers2.5 12bit/cleanPython.sh create mode 100644 IOB-PI/vers2.5 12bit/convertLogFile.py create mode 100644 IOB-PI/vers2.5 12bit/crontab create mode 100644 IOB-PI/vers2.5 12bit/install-RPI-IOB.sh create mode 100644 IOB-PI/vers2.5 12bit/readFile.py create mode 100644 IOB-PI/vers2.5 12bit/readParallela.py create mode 100644 IOB-PI/vers2.5 12bit/readSeriale.py create mode 100644 IOB-PI/vers2.5 12bit/saveTemp.sh create mode 100644 IOB-PI/vers2.5 12bit/sendReboot.py create mode 100644 IOB-PI/vers2.5 12bit/sendRebootIOB create mode 100644 IOB-PI/vers2.5 12bit/sendRebootIOB.service create mode 100644 IOB-PI/vers2.5 12bit/setIobConf.sh create mode 100644 IOB-PI/vers2.5 12bit/unix.py create mode 100644 IOB-PI/vers2.5 12bit/unix.pyc create mode 100644 IOB-PI/vers2.5 12bit/update-RPI-IOB.sh create mode 100644 IOB-PI/vers2.5 12bit/win.py create mode 100644 IOB-PI/vers2.5 8bit/IOB.cfg create mode 100644 IOB-PI/vers2.5 8bit/IOB.cfg.donati create mode 100644 IOB-PI/vers2.5 8bit/IOB.cfg.steamware create mode 100644 IOB-PI/vers2.5 8bit/MapoIOB create mode 100644 IOB-PI/vers2.5 8bit/MapoIOB.service create mode 100644 IOB-PI/vers2.5 8bit/MapoIOB_logrot create mode 100644 IOB-PI/vers2.5 8bit/checkAlive.sh create mode 100644 IOB-PI/vers2.5 8bit/cleanPython.sh create mode 100644 IOB-PI/vers2.5 8bit/convertLogFile.py create mode 100644 IOB-PI/vers2.5 8bit/crontab create mode 100644 IOB-PI/vers2.5 8bit/install-RPI-IOB.sh create mode 100644 IOB-PI/vers2.5 8bit/readFile.py create mode 100644 IOB-PI/vers2.5 8bit/readParallela.py create mode 100644 IOB-PI/vers2.5 8bit/readSeriale.py create mode 100644 IOB-PI/vers2.5 8bit/saveTemp.sh create mode 100644 IOB-PI/vers2.5 8bit/sendReboot.py create mode 100644 IOB-PI/vers2.5 8bit/sendRebootIOB create mode 100644 IOB-PI/vers2.5 8bit/sendRebootIOB.service create mode 100644 IOB-PI/vers2.5 8bit/setIobConf.sh create mode 100644 IOB-PI/vers2.5 8bit/unix.py create mode 100644 IOB-PI/vers2.5 8bit/unix.pyc create mode 100644 IOB-PI/vers2.5 8bit/update-RPI-IOB.sh create mode 100644 IOB-PI/vers2.5 8bit/win.py diff --git a/IOB-PI/vers2.5 12bit/IOB.cfg b/IOB-PI/vers2.5 12bit/IOB.cfg new file mode 100644 index 0000000..26771f4 --- /dev/null +++ b/IOB-PI/vers2.5 12bit/IOB.cfg @@ -0,0 +1,68 @@ +[id] +idxMacchina = 0001 + +[web] +URLBASE = http://10.74.82.219/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.219/MP/IO/IOB +URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLADV1 = ?valore= +URLREBO = http://10.74.82.219/MP/IO/sendReboot.aspx?idxMacchina= + +[time] +SAMPLETIME = 0.05 +TIMEOUTSHORT = 0.30 +TIMEOUTLONG = 50 +SENDURLTIME = 0.15 +NMAXSEND = 5 + +[log] +LOGLEVEL = 10 +LOGFILE = logfile.txt +LOGREBO = logReboot.txt + +[comm] +port = /dev/ttyAMA0 + +[blink] +MAX_COUNTER_BLINK = 30 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 +bit8 = 0 +bit9 = 0 +bit10 = 0 +bit11 = 0 + +[invert] +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 +bit8 = 0 +bit9 = 0 +bit10 = 0 +bit11 = 0 + +[filter] +MAX_COUNTER_FILTER = 8 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 +bit8 = 0 +bit9 = 0 +bit10 = 0 +bit11 = 0 diff --git a/IOB-PI/vers2.5 12bit/IOB.cfg.donati b/IOB-PI/vers2.5 12bit/IOB.cfg.donati new file mode 100644 index 0000000..29c3d61 --- /dev/null +++ b/IOB-PI/vers2.5 12bit/IOB.cfg.donati @@ -0,0 +1,35 @@ +[id] +idxMacchina = 2007 + +[web] +URLBASE = http://192.168.51.77/MP/IO/IOB/input/ +URLALIVE = http://192.168.51.77/MP/IO/IOB +URLENABLED = http://192.168.51.77/MP/IO/IOB/enabled/ +URLADV1 = ?valore= +URLREBO = http://192.168.51.77/MP/IO/sendReboot.aspx?idxMacchina= + +[time] +SAMPLETIME = 0.05 +TIMEOUTSHORT = 0.30 +TIMEOUTLONG = 50 +SENDURLTIME = 0.15 +NMAXSEND = 5 + +[log] +LOGLEVEL = 10 +LOGFILE = logfile.txt +LOGREBO = logReboot.txt + +[comm] +port = /dev/ttyAMA0 + +[blink] +MAX_COUNTER_BLINK = 30 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 1 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 diff --git a/IOB-PI/vers2.5 12bit/IOB.cfg.steamware b/IOB-PI/vers2.5 12bit/IOB.cfg.steamware new file mode 100644 index 0000000..ac044d0 --- /dev/null +++ b/IOB-PI/vers2.5 12bit/IOB.cfg.steamware @@ -0,0 +1,35 @@ +[id] +idxMacchina = 1005 + +[web] +URLBASE = http://10.74.82.219/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.219/MP/IO/IOB +URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLADV1 = ?valore= +URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= + +[time] +SAMPLETIME = 0.05 +TIMEOUTSHORT = 0.30 +TIMEOUTLONG = 50 +SENDURLTIME = 0.15 +NMAXSEND = 5 + +[log] +LOGLEVEL = 10 +LOGFILE = logfile.txt +LOGREBO = logReboot.txt + +[comm] +port = /dev/ttyAMA0 + +[blink] +MAX_COUNTER_BLINK = 30 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 1 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 diff --git a/IOB-PI/vers2.5 12bit/MapoIOB b/IOB-PI/vers2.5 12bit/MapoIOB new file mode 100644 index 0000000..1213dc7 --- /dev/null +++ b/IOB-PI/vers2.5 12bit/MapoIOB @@ -0,0 +1,41 @@ +#! /bin/bash +### BEGIN INIT INFO +# Provides: MapoIOB: script Steamware per avvio driver IOB +# Required-Start: $remote_fs $syslog ramlog +# Required-Stop: $remote_fs $syslog ramlog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Steamware's MapoIOB driver +# Description: Steamware's MapoIOB driver, versione lettura porta parallela +### END INIT INFO + +# /etc/init.d/MapoIOB + +export HOME +case "$1" in + start) + echo "Starting readParallela" + cd /home/pi/steamware + /usr/bin/python ./readParallela.py 2>&1 & + ;; + stop) + echo "Stopping readParallela" + RS_PID=`ps auxwww | grep readParallela.py | head -1 | awk '{print $2}'` + kill -9 $RS_PID + cd /home/pi/steamware + rm .lockfile + ;; + restart) + ## Stop the service and regardless of whether it was + ## running or not, start it again. + $0 stop + killall python + $0 start + ;; + *) + echo "Usage: /etc/init.d/MapoIOB {start|stop|restart}" + exit 1 + ;; +esac +exit 0 + diff --git a/IOB-PI/vers2.5 12bit/MapoIOB.service b/IOB-PI/vers2.5 12bit/MapoIOB.service new file mode 100644 index 0000000..8f86fdb --- /dev/null +++ b/IOB-PI/vers2.5 12bit/MapoIOB.service @@ -0,0 +1,22 @@ +[Unit] +SourcePath=/etc/init.d/MapoIOB +Description=LSB: Steamware's MapoIOB driver +Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target shutdown.target +Wants=network-online.target +After=network.target network-online.target auditd.service +Conflicts=shutdown.target + +[Service] +Type=forking +Restart=no +TimeoutSec=5min +IgnoreSIGPIPE=no +KillMode=process +GuessMainPID=no +RemainAfterExit=yes +SysVStartPriority=1 +ExecStart=/etc/init.d/MapoIOB start +ExecStop=/etc/init.d/MapoIOB stop + +[Install] +WantedBy=multi-user.target diff --git a/IOB-PI/vers2.5 12bit/MapoIOB_logrot b/IOB-PI/vers2.5 12bit/MapoIOB_logrot new file mode 100644 index 0000000..13410b9 --- /dev/null +++ b/IOB-PI/vers2.5 12bit/MapoIOB_logrot @@ -0,0 +1,28 @@ +/var/log/MapoIOB.log { + size 8M + copytruncate + create 700 pi pi + dateext + rotate 100 + compress + maxage 366 + missingok +} +/var/log/logReboot.txt { + size 1M + copytruncate + create 700 pi pi + dateext + rotate 30 + compress + missingok +} +/var/log/logTemp.txt { + size 1M + copytruncate + create 700 pi pi + dateext + rotate 30 + compress + missingok +} diff --git a/IOB-PI/vers2.5 12bit/checkAlive.sh b/IOB-PI/vers2.5 12bit/checkAlive.sh new file mode 100644 index 0000000..aace73d --- /dev/null +++ b/IOB-PI/vers2.5 12bit/checkAlive.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# controlla se il logfile è correntemente scritto (quindi MapoIOB è alive) altrimenti riavvia! + +DATE=`date +%Y-%m-%d` +cd /var/log +if [ -f MapoIOB.log ] + then + # controllo SE sia stato acceduto da meno di 2 minuti (=alive da log...) + trovato=`find . -name 'MapoIOB*' -cmin -1` + if [[ $trovato != './MapoIOB.log' ]] + then + /etc/init.d/MapoIOB restart + echo $date + "riavvio!" + fi +else + # in questo caso AVVIO il processo MapoIOB + /etc/init.d/MapoIOB start + echo $date + "file non trovato, avvio!" +fi diff --git a/IOB-PI/vers2.5 12bit/cleanPython.sh b/IOB-PI/vers2.5 12bit/cleanPython.sh new file mode 100644 index 0000000..c4f616a --- /dev/null +++ b/IOB-PI/vers2.5 12bit/cleanPython.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +DATE=`date +%Y-%m-%d_%T` +# log inizio pulizia +echo $DATE " - INIZIO pulizia processi python" >> clean.log +# effettua pulizia processi: killa tutti i processi python +killall python + +# avvia MapoIob +/etc/init.d/MapoIOB start + +# log fatto! +DATE=`date +%Y-%m-%d_%T` +echo $DATE " - FINE pulizia processi python + riavvio MapoIOB" >> clean.log diff --git a/IOB-PI/vers2.5 12bit/convertLogFile.py b/IOB-PI/vers2.5 12bit/convertLogFile.py new file mode 100644 index 0000000..760c2a9 --- /dev/null +++ b/IOB-PI/vers2.5 12bit/convertLogFile.py @@ -0,0 +1,46 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# readFile v. 0.1 +# - single instance timer +# - invio multiplo x send eventi accodati +#--------------------------------------------------------------- +import os, sys +import argparse +#-------------------------------------------------------------- + +# gestione parser argomenti in input +parser = argparse.ArgumentParser() +parser.add_argument("inFile") +parser.add_argument("outFile") +args = parser.parse_args() + +#with open('logfile.txt', 'r') as inf, open('persMem.dat',"w") as outf: +with open(args.inFile, 'r') as inf, open(args.outFile,"w") as outf: + data = inf.readlines() + + lastDt = "" + lastMs = 0 + stepMs = 200 + + for line in data: + words = line.split() + if words[2] == 'queue': + # recupero dataOra + newDt = words[0].replace("-","") + words[1].replace(":","") + + # verifico se data/ora identica... + if (lastDt == newDt): + # --> aggiungo stepMs + lastMs += stepMs + else: + lastMs = 0 + + lastDt = newDt + + newDt = newDt + '{:03d}'.format(lastMs) #str(lastMs) + #print words[0].replace("-","") + words[1].replace(":","") + " | " + newDt + "\n" + + # print words + # outf.write(words[0].replace("-","") + words[1].replace(":","") + '#' + words[4].replace(">","") + '#' + words[5].replace("[","").replace("]","") +'\n') + outf.write(newDt + '#' + words[4].replace(">","") + '#' + words[5].replace("[","").replace("]","") +'\n') \ No newline at end of file diff --git a/IOB-PI/vers2.5 12bit/crontab b/IOB-PI/vers2.5 12bit/crontab new file mode 100644 index 0000000..74fe381 --- /dev/null +++ b/IOB-PI/vers2.5 12bit/crontab @@ -0,0 +1 @@ +* * * * * /bin/bash /home/pi/steamware/checkAlive.sh >> /home/pi/stdout 2>> /home/pi/stderr diff --git a/IOB-PI/vers2.5 12bit/install-RPI-IOB.sh b/IOB-PI/vers2.5 12bit/install-RPI-IOB.sh new file mode 100644 index 0000000..d521931 --- /dev/null +++ b/IOB-PI/vers2.5 12bit/install-RPI-IOB.sh @@ -0,0 +1,54 @@ +#|/bin/bash + +#installa il necessario per RPI-3-IOB partendo dal contenuto della folder /home/pi/steamware + +#step 1: creo file di log nuovi +rm /var/log/log*.txt +rm /var/log/MapoIOB* +rm /home/pi/steamware/log*.txt + +touch /var/log/logReboot.txt +touch /var/log/logTemp.txt +touch /var/log/MapoIOB.log + +ln -sf /var/log/logReboot.txt /home/pi/steamware/logReboot.txt +ln -sf /var/log/logTemp.txt /home/pi/steamware/logTemp.txt +ln -sf /var/log/MapoIOB.log /home/pi/steamware/logfile.txt + +chown pi:pi /home/pi -R +chmod 666 /var/log/log*.txt +chmod 666 /var/log/MapoIOB.log + +#step 2: copio files in /usr/local/bin +cd /home/pi/steamware +chmod +x *.sh +cp *.sh /usr/local/bin/ + +#step 3: copio files x logrotate... +cd /home/pi/steamware +cp MapoIOB_logrot /etc/logrotate.d/ + +# step 4: copio target systemd in avvio... +cp -f sendRebootIOB /etc/init.d/sendRebootIOB +cp -f sendRebootIOB.service /etc/systemd/system/sendRebootIOB.service +#echo "" +#echo "-----------------------------------------------" +#echo "Completare registrazione servizio avvio: digitare i seguenti comandi" +#echo "systemctl enable sendRebootIOB" +#echo "systemctl daemon-reload" +#echo "systemctl status sendRebootIOB" +#echo "-----------------------------------------------" +#echo "" + +# step 5: copio target MapoIOB in avvio... +cp -f MapoIOB /etc/init.d/MapoIOB +cp -f MapoIOB.service /etc/systemd/system/MapoIOB.service + + +#echo "" +#echo "" +#echo "-----------------------------------------------" +#echo "Infine creare voce crontab che salvi temperatura CPU/GPU ogni 20 minuti..." +#echo "crontab -e" +#echo "*/20 * * * * /usr/local/bin/saveTemp.sh" +#echo "-----------------------------------------------" diff --git a/IOB-PI/vers2.5 12bit/readFile.py b/IOB-PI/vers2.5 12bit/readFile.py new file mode 100644 index 0000000..887118d --- /dev/null +++ b/IOB-PI/vers2.5 12bit/readFile.py @@ -0,0 +1,152 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# readFile v. 0.1 +# - single instance timer +# - invio multiplo x send eventi accodati + +#--------------------------------------------------------------- + +import time + +from datetime import datetime + +import urllib +import ConfigParser +import os, sys + +import logging +import logging.handlers +import Queue + +import argparse +#-------------------------------------------------------------- + +# gestione parser argomenti in input +parser = argparse.ArgumentParser() +parser.add_argument("memFile") +parser.add_argument("logFile") +args = parser.parse_args() + +#definizione variabili BASE +stepQueuePut=25000 +stepQueueGet=250 +NMAXSEND=500000 # limite invio file x fare prove... +idxMacchina = "2003" + +#-------------------------------------------------------------- +# Gestione coda (condivisa) x registrazione eventi ed invio URL +#print "Creazione coda illimitata" +Coda = Queue.Queue(0) + +#--------------------------------------------------------------- +#Funzione di scrittura su coda con try-except + +def accoda(valore): + + try: + Coda.put(valore) + except Queue.Full: + logPro.error( "Queue full" + dtEve + '#' + value + '#' + cont ) + except: + logPro.error( "NETWORK:Errore http-no com rete-timeout" + url ) + + +#-------------------------------------------------------------- +# svuotaCoda x invio dati al server +def svuota_coda(): + + global NMAXSEND + + try: + if not Coda.empty(): + # invio SOLO i primi NMAXSEND eventi... SE minore del num eventi... + if NMAXSEND > Coda.qsize(): + NMAXSEND = Coda.qsize() + + + i = 0 + + with open(args.logFile,"w") as outf: + while i <= NMAXSEND: + if not Coda.empty(): + + # formatto dataOra corrente + dtCurr = datetime.utcnow().strftime('%Y%m%d%H%M%S%f')[:-3] + + #prendo primo elemento dalla coda + resp = Coda.get() + + # recupero valori da elemento coda! + dtEve = resp.split("#")[0] + value = resp.split("#")[1] + cnt = resp.split("#")[2] + url = URLBASE + idxMacchina + URLADV1 + value + url = url + '&dtCurr=' + dtCurr + '&dtEve=' + dtEve + '&cnt=' + cnt + # CHIAMO URL + response3 = urllib.urlopen ( url ) + answ3 = response3.read() + + # registro chiamata + risposta + # outf.write(url + " --> " + answ3 + "\n") + + # incremento e controllo se mostrare output + i += 1 + if (i % stepQueueGet) == 0: + print "Inviati %d valori..." % i + + print "Inviati %d valori..." % i + except: + print "Errore in svuotamento coda!" + + +#--------------------------------------------------------------- +# MAIN + +try: + config = ConfigParser.RawConfigParser() + config.read ( 'IOB.cfg' ) + + # NMAXSEND = config.getint ( 'time' , 'NMAXSEND' ) + # idxMacchina = config.get ( 'id' , 'idxMacchina' ) + + + URLBASE = config.get ( 'web' , 'URLBASE' ) + URLADV1 = config.get ( 'web' , 'URLADV1' ) + + LOGFILE = config.get ( 'log' , 'LOGFILE' ) + LOGLEVEL = config.get ( 'log' , 'LOGLEVEL' ) +except: + print "\n\n" + PROGRAM_NAME + ' - Error 4 - in config file ' 'IOB.cfg' + sys.exit(1) + +#--------------------------------------------------------------- + +dtCurr = datetime.utcnow().strftime('%H:%M:%S.%f')[:-3] +print "Inizio elaborazione: %s" % dtCurr + +# Leggo il file! +i = 0 +with open(args.memFile, 'r') as inf, open(args.logFile,"w") as outf: + data = inf.readlines() + + print "Trovate %d da processare..." % len(data) + +# leggo e metto in QUEUE... + for line in data: + accoda(line) + i += 1 + if (i % stepQueuePut) == 0: + print "Accodati %d valori..." % i + +print "Completata lettura file! %d righe accodate da trasmettere" % Coda.qsize() + +dtCurr = datetime.utcnow().strftime('%H:%M:%S.%f')[:-3] +print "Inizio invio: %s" % dtCurr + + +# chiamo procedura x svuotare coda... +svuota_coda() + +dtCurr = datetime.utcnow().strftime('%H:%M:%S.%f')[:-3] +print "Completato invio: %s" % dtCurr \ No newline at end of file diff --git a/IOB-PI/vers2.5 12bit/readParallela.py b/IOB-PI/vers2.5 12bit/readParallela.py new file mode 100644 index 0000000..4a97022 --- /dev/null +++ b/IOB-PI/vers2.5 12bit/readParallela.py @@ -0,0 +1,720 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# readParallela v. 2.5.1 +# - single instance timer +# - invio multiplo x send eventi accodati +# - gestione segnali BLINKING +# - gestione INVERSIONE segnali cv 10-VII-2018 +# - gestione FILTRAGGIO segnali brevi cv 23-VII-2018 +# - (2.3) gestione 12 bit cv 14-I-2020 +# - (2.4) fix ingressi e conf apertura parallela + gestione vari bit filtraggio x nuovi ingressi + update conf con 12 parametri bit SEL 15-I-2020 +# - (2.4.8) versione adatta a raspberry PI vecchia generazione (GPIO corto, 8bit) +# - (2.5) Fix (hope) ciclo "wait send to complete", gestione timeout (rety infinito se IO riparte in modo anomalo) +# - (2.5.1) Fix numero versione 18.05.2023 + +#--------------------------------------------------------------- +# levare locking +# timer semplificata +# GPIO global + + +import time +import sys + + +from datetime import datetime + +import urllib +import ConfigParser +import os, sys + +import logging +import logging.handlers +import threading +import Queue + +from array import * + +#-------------------------------------------------------------- + +# COSTANTI +MSGLEN = 9 +TIMEOUTSERIALE = 10 +MAXRETRY = 10 + +# numero campioni filtraggio segnale ballerino +MAX_COUNTER_BLINK = 10 + +PROGRAM_NAME ="ReadPar IOB-pi v.2.5.1" + +# DA FILE CONF +idxMacchina = "1001" +SAMPLETIME = 0.1 +TIMEOUTSHORT = (SAMPLETIME*20) +TIMEOUTLONG = (SAMPLETIME*600) +SENDURLTIME = 0.08 +NMAXSEND = 5 # numero massimo di invii per singolo ciclo di svuotamento + +# VAR +to_enable = False +to_short = TIMEOUTSHORT +to_long = TIMEOUTLONG +to_serial = TIMEOUTSERIALE +to_retry = MAXRETRY +errormsglen = 0 + +# VAR + +out_0 = 24 +out_1 = 26 + +in_0 = 11 +in_1 = 12 +in_2 = 13 +in_3 = 15 +in_4 = 16 +in_5 = 18 +in_6 = 22 +in_7 = 7 + +# contatore: serve x match tra accoda ed invia x possibile controllo a posteriori... ogni volta che accodo incremento di 1, va da 0 a 9999 +cont = '0' + +# variabile stato online/offline della macchina +onLine = '1' + +# variabile stato seinding/waiting x la parte invio URL +sending = '0' + +# variabile stato timer thread busy +timer_busy = False + +# +# array per ingressi filtrati + +i_counters = array ( 'i',[0,0,0,0,0,0,0,0]) +B_blinking = array ( 'B',[0,0,0,0,0,0,0,0]) +B_previous = array ( 'B',[0,0,0,0,0,0,0,0]) +B_input = array ( 'B',[0,0,0,0,0,0,0,0]) +B_output = array ( 'B',[0,0,0,0,0,0,0,0]) + +B_inverting = array ( 'B',[0,0,0,0,0,0,0,0]) + +B_filter = array ( 'B',[0,0,0,0,0,0,0,0]) +B_filter_prev = array ( 'B',[0,0,0,0,0,0,0,0]) +B_temp = array ( 'B',[0,0,0,0,0,0,0,0]) +i_filter_counters = array ( 'i',[0,0,0,0,0,0,0,0]) + +#-------------------------------------------------------------- +# Gestione coda (condivisa) x registrazione eventi ed invio URL +#print "Creazione coda illimitata" + +Coda = Queue.Queue(0) + +#queueLock = threading.Lock() + +#--------------------------------------------------------------- +# lettura parallela +# ritorna il byte letto pulito ( due char hex ) + +def readParallelaFiltrata(): + + global in_0 + global in_1 + global in_2 + global in_3 + global in_4 + global in_5 + global in_6 + global in_7 + + global GPIO + + current = '' + + + try: + + if GPIO.input(in_0): + B_input[0] = 0 + else: + B_input[0] = 1 + + if GPIO.input(in_1): + B_input[1] = 0 + else: + B_input[1] = 1 + + if GPIO.input(in_2): + B_input[2] = 0 + else: + B_input[2] = 1 + + if GPIO.input(in_3): + B_input[3] = 0 + else: + B_input[3] = 1 + + if GPIO.input(in_4): + B_input[4] = 0 + else: + B_input[4] = 1 + + if GPIO.input(in_5): + B_input[5] = 0 + else: + B_input[5] = 1 + + if GPIO.input(in_6): + B_input[6] = 0 + else: + B_input[6] = 1 + + if GPIO.input(in_7): + B_input[7] = 0 + else: + B_input[7] = 1 + + + + #ciclo per ogni segnale + for i in xrange(8) : + # print (i) + + # v2.1 gestione inversione bit ingresso + + if ( B_inverting[i] == 1 ) : + if ( B_input[i] == 0 ) : + B_input[i] = 1 + else : + B_input[i] = 0 + + # v2.2 gestione filtro segnali brevi + + if ( B_filter[i] == 1 ) : + + # fronte 0 -> 1 + if ( B_input[i] == 1 ) and ( B_filter_prev [i] == 0 ) : + if ( i_filter_counters[i] == 0 ) : + # vero fronte 0 -> 1 + i_filter_counters[i] = MAX_COUNTER_FILTER + B_temp[i] = 0 # tengo l' ingresso a 0 + #logPro.info("START spike 0->1 on bit " + `i` ) + else : + # fine disturbo breve di uno stato 1 + i_filter_counters[i] = 0 + B_temp[i] = 1 # tengo l' ingresso a 1 + logPro.info("END spike 0->1 on bit " + `i` ) + + # stabile 1 -> 1 + if ( B_input[i] == 1 ) and ( B_filter_prev [i] == 1 ) : + if ( i_filter_counters[i] == 0 ) : + # segnale stabile a 1 + B_temp[i] = 1 # tengo l' ingresso a 1 + else : + # poco dopo il fronte + i_filter_counters[i] = i_filter_counters[i] - 1 + B_temp[i] = 0 # tengo l' ingresso a 0 + + # fronte 1 -> 0 + if ( B_input[i] == 0 ) and ( B_filter_prev [i] == 1 ) : + if ( i_filter_counters[i] == 0 ) : + # vero fronte 1 -> 0 + i_filter_counters[i] = MAX_COUNTER_FILTER + B_temp[i] = 1 # tengo l' ingresso a 1 + #logPro.info("START spike 1->0 on bit " + `i` ) + else : + # fine disturbo breve di uno stato 0 + i_filter_counters[i] = 0 + B_temp[i] = 0 # tengo l' ingresso a 0 + logPro.info("END spike 1->0 on bit " + `i` ) + + # stabile 0 -> 0 + if ( B_input[i] == 0 ) and ( B_filter_prev [i] == 0 ) : + if ( i_filter_counters[i] == 0 ) : + # segnale stabile a 0 + B_temp[i] = 0 # tengo l' ingresso a 0 + else : + # poco dopo il fronte + i_filter_counters[i] = i_filter_counters[i] - 1 + B_temp[i] = 1 # tengo l' ingresso a 1 + + B_filter_prev [i] = B_input[i] + B_input[i] = B_temp[i] + + # fine gestione filtro segnali brevi + + + # se non blinking, copia ingresso + if ( B_blinking[i] == 0 ) : + B_output[i] = B_input[i] + else: + # gestione segnale blinking + # se fronte del segnale + if ( B_previous[i] != B_input[i] ) : + B_previous[i] = B_input[i] + # se fronte di salita + if ( B_input[i] == 1 ) : + # subito uscita = 1 + B_output[i] = 1 + i_counters[i] = MAX_COUNTER_BLINK + #else : + # # loggo che ho rilevato un blink... + # logPro.info("Blink down on bit " + `i`) + else: + # no , segnale eguale a prima + # se input a 0 + if ( B_input[i] == 0 ) : + # E CONTEGGIO IN CORSO + if ( i_counters[i] > 0 ) : + i_counters[i] = i_counters[i] -1 + if ( i_counters[i] == 0 ) : + B_output[i] = 0 + logPro.info("END Blink on bit " + `i` ) + + #Rimettiamo insieme i bit + new_value = 0 + + if ( B_output[0] == 1 ) : + new_value = new_value + 1 + if ( B_output[1] == 1 ) : + new_value = new_value + 2 + if ( B_output[2] == 1 ) : + new_value = new_value + 4 + if ( B_output[3] == 1 ) : + new_value = new_value + 8 + if ( B_output[4] == 1 ) : + new_value = new_value + 16 + if ( B_output[5] == 1 ) : + new_value = new_value + 32 + if ( B_output[6] == 1 ) : + new_value = new_value + 64 + if ( B_output[7] == 1 ) : + new_value = new_value + 128 + + + current = hex( new_value ).replace ( "0x" , "" ).upper() + + except: + pass + + return current + +#--------------------------------------------------------------- +#Funzione di scrittura su coda con try-except + +def accoda(): + + try: + dtEve = datetime.utcnow().strftime('%Y%m%d%H%M%S%f')[:-3] + Coda.put(dtEve + '#' + value + '#' + cont) + + except Queue.Full: + logPro.error( "Queue full" + `dtEve` + '#' + `value` + '#' + `cont` ) + except: + logPro.error( "NETWORK:Errore http-no com rete-timeout" + url ) +# print "Url aforte" , url + + +#-------------------------------------------------------------- +# svuotaCoda x invio dati al server +def svuota_coda(): + + global onLine + global sending + global timer_busy + global NMAXSEND + + #print "start timer " + + if ( timer_busy == False ): + timer_busy = True + #print "start timer ok " + + try: + if not Coda.empty(): + #print "coda da svuotare!" + response = urllib.urlopen(URLALIVE) + answ = response.read() + if answ == 'OK': + #print "OK alive" + response2 = urllib.urlopen(URLENABLED + idxMacchina) + answ2 = response2.read() + if answ2 == 'OK': + # aggiorno stato ad online + if onLine == '0': + logPro.info("IOB ONLINE!") + #print("IOB ONLINE") + + onLine = '1' # imposto comunque online + else: + if onLine == '1': + logPro.error("IOB offline") + #print("IOB offline") + + onLine = '0' + else: + if onLine == '1': + logPro.error("Server offline") + #print("Server offline") + + onLine = '0' + + # ora verifico SE si possa inviare (ovvero sia online server e NON ci siano altri send attivi...) + if onLine == '1': + if sending == '0': + #segnalo che sono in sending! + sending = '1' + + # SAM 2016.12.23: modifica x invio FINO A nMaxSend ELEMENTI ad ogni ciclo di svuotamento + i = NMAXSEND + + while i >= 0: + if not Coda.empty(): + + # formatto dataOra corrente + dtCurr = datetime.utcnow().strftime('%Y%m%d%H%M%S%f')[:-3] + + #prendo primo elemento dalla coda + resp = Coda.get() + + # recupero valori da elemento coda! + dtEve = resp.split("#")[0] + value = resp.split("#")[1] + cnt = resp.split("#")[2] + url = URLBASE + idxMacchina + URLADV1 + value + url = url + '&dtCurr=' + dtCurr + '&dtEve=' + dtEve + '&cnt=' + cnt + # CHIAMO URL + response3 = urllib.urlopen ( url ) + answ3 = response3.read() + #print(url) + + # log valore inviato! + logSnd.info( value + ' ['+ cnt +']' + ' R:' + answ3 ) + #print "Valore smaltito dalla coda" + + # tolgo 1 al contatore + i -= 1 + + # completato invio, riporto sending a zero! + sending = '0' + else: + if to_retry > 0: + to_retry -= 1 + logPro.info("WAIT active send to complete") + else: + sending = '0' + to_retry = MAXRETRY + logPro.info("END WAIT, reset to_retry var") + + else: + pass + + else: + pass + + except: + if onLine == '1': + logPro.error("Server Non raggiungibile") + #print "Non raggiungibile" + + onLine = '0' + +# in ogni caso + + timer_busy = False + #print "end timer ok" + + + #print "end timer " + + +#--------------------------------------------------------------- +# funzione timer thread +#--------------------------------------------------------------- +def do_every (interval, worker_func, iterations = 0): + if iterations != 1: + threading.Timer ( + interval, + do_every, [interval, worker_func, 0 if iterations == 0 else iterations-1] + ).start (); + + worker_func (); + +#--------------------------------------------------------------- +# gestione contatore +#--------------------------------------------------------------- +def contatore(): + + try: + global cont + ctr = int(cont) + ctr +=1 + ctr = ctr % 10000 # round robin 10000 eventi x track + cont = str(ctr) + except: + print("errore incremento contatore") + +#--------------------------------------------------------------- +# avvia porta parallela +#--------------------------------------------------------------- +def avviaParallela(): + + global in_0 + global in_1 + global in_2 + global in_3 + global in_4 + global in_5 + global in_6 + global in_7 + + global GPIO + + try: + + GPIO.setmode(GPIO.BOARD) + + GPIO.setwarnings(False) + + #GPIO.setup(out_0, GPIO.OUT) # output 0 + #GPIO.setup(out_1, GPIO.OUT) # output 1 + + GPIO.setup(in_0, GPIO.IN) # input 0 + GPIO.setup(in_1, GPIO.IN) # input 1 + GPIO.setup(in_2, GPIO.IN) # input 2 + GPIO.setup(in_3, GPIO.IN) # input 3 + GPIO.setup(in_4, GPIO.IN) # input 4 + GPIO.setup(in_5, GPIO.IN) # input 5 + GPIO.setup(in_6, GPIO.IN) # input 6 + GPIO.setup(in_7, GPIO.IN) # input 7 + + except: + print( "\n\n" + PROGRAM_NAME + " - Error 3 on RPi.GPIO ! \n\n") + sys.exit(1) + + + print( "\n\n" + PROGRAM_NAME + " - init ok \n\n") + + +#--------------------------------------------------------------- +#--------------------------------------------------------------- +# MAIN + +try: + config = ConfigParser.RawConfigParser() + config.read ( 'IOB.cfg' ) + + SAMPLETIME = config.getfloat ( 'time' , 'SAMPLETIME' ) + TIMEOUTSHORT = config.getfloat ( 'time' , 'TIMEOUTSHORT' ) + TIMEOUTLONG = config.getfloat ( 'time' , 'TIMEOUTLONG' ) + SENDURLTIME = config.getfloat ( 'time' , 'SENDURLTIME' ) + NMAXSEND = config.getint ( 'time' , 'NMAXSEND' ) + + idxMacchina = config.get ( 'id' , 'idxMacchina' ) + + + URLBASE = config.get ( 'web' , 'URLBASE' ) + URLENABLED = config.get('web' , 'URLENABLED') + URLALIVE = config.get ('web' , 'URLALIVE') + URLADV1 = config.get ( 'web' , 'URLADV1' ) + + LOGFILE = config.get ( 'log' , 'LOGFILE' ) + LOGLEVEL = config.get ( 'log' , 'LOGLEVEL' ) + + B_blinking[0] = config.getint ( 'blink' , 'bit0' ) + B_blinking[1] = config.getint ( 'blink' , 'bit1' ) + B_blinking[2] = config.getint ( 'blink' , 'bit2' ) + B_blinking[3] = config.getint ( 'blink' , 'bit3' ) + B_blinking[4] = config.getint ( 'blink' , 'bit4' ) + B_blinking[5] = config.getint ( 'blink' , 'bit5' ) + B_blinking[6] = config.getint ( 'blink' , 'bit6' ) + B_blinking[7] = config.getint ( 'blink' , 'bit7' ) + + MAX_COUNTER_BLINK = config.getint ( 'blink' , 'MAX_COUNTER_BLINK' ) + + # cv 2.1 se bit = 1 allora inverto segnale in ingresso... + + B_inverting[0] = config.getint ( 'invert' , 'bit0' ) + B_inverting[1] = config.getint ( 'invert' , 'bit1' ) + B_inverting[2] = config.getint ( 'invert' , 'bit2' ) + B_inverting[3] = config.getint ( 'invert' , 'bit3' ) + B_inverting[4] = config.getint ( 'invert' , 'bit4' ) + B_inverting[5] = config.getint ( 'invert' , 'bit5' ) + B_inverting[6] = config.getint ( 'invert' , 'bit6' ) + B_inverting[7] = config.getint ( 'invert' , 'bit7' ) + + # cv 2.2 se bit = 1 allora filtro segnali brevi ... + + B_filter[0] = config.getint ( 'filter' , 'bit0' ) + B_filter[1] = config.getint ( 'filter' , 'bit1' ) + B_filter[2] = config.getint ( 'filter' , 'bit2' ) + B_filter[3] = config.getint ( 'filter' , 'bit3' ) + B_filter[4] = config.getint ( 'filter' , 'bit4' ) + B_filter[5] = config.getint ( 'filter' , 'bit5' ) + B_filter[6] = config.getint ( 'filter' , 'bit6' ) + B_filter[7] = config.getint ( 'filter' , 'bit7' ) + + MAX_COUNTER_FILTER = config.getint ( 'filter' , 'MAX_COUNTER_FILTER' ) + + +except: + print "\n\n" + PROGRAM_NAME + ' - Error 4 - in config file ' 'IOB.cfg' + sys.exit(1) + +#-------------------------------------------- +# oggetto Logger +#-------------------------------------------- +try: + logging.basicConfig(level=logging.DEBUG, + format='%(asctime)s %(name)-8s %(levelname)-8s %(message)s', + datefmt='%Y-%m-%d %H:%M:%S', + filename=LOGFILE, + filemode='a' + ) + + # aggiungo 2 logger specifici x queue e send... + logQue = logging.getLogger('queue') + logSnd = logging.getLogger('sendUrl') + logPro = logging.getLogger('program') + +except: + # manda mail o simili - FARE!!! + print "LOG: Impossibile creare file log con nome " + print (LOGFILE) +#-------------------------------------------- + + +print "\n\n" + PROGRAM_NAME + "\n\n" + +global startstatus +startstatus = 1 + +if startstatus == 1: + logPro.info("Avvio Programma" + PROGRAM_NAME) + +## Verifica l'OS e di conseguenza carica il file relativo con metodo di lockfile appropriato + check singola istanza +if os.name == 'posix': + import unix +else: + import win + +logPro.info( "Start " + PROGRAM_NAME ) + + +# lettura file configurazione + +# [id] +# idxMacchina = 2001 +# [time] +# SAMPLETIME = 0.1 +# TIMEOUTSHORT = 200 +# TIMEOUTLONG = 6000 + + +print ( ' idxMacchina = %s' % ( idxMacchina ) ) +print ( ' SAMPLETIME = %4.2f' % ( SAMPLETIME ) ) +print ( ' TIMEOUTSHORT = %4.2f' % ( TIMEOUTSHORT ) ) +print ( ' TIMEOUTLONG = %4.2f' % ( TIMEOUTLONG ) ) +print ( ' SENDURLTIME = %4.2f' % ( SENDURLTIME ) ) +print ( ' URLBASE = %s' % ( URLBASE ) ) +print ( ' URLADV1 = %s' % ( URLADV1 ) ) +print ( ' LOGFILE = %s' % ( LOGFILE ) ) +print ( ' LOGLEVEL = %s' % ( LOGLEVEL ) ) + +# -sys.stdout.write ( 'idxMacchina ?' + idxMacchina + '\n') + +to_short = TIMEOUTSHORT +to_long = TIMEOUTLONG + + +#-------------------------------------------------------------- +# apertura parallela + +try: + import RPi.GPIO as GPIO +except RuntimeError: + print( "\n\n" + PROGRAM_NAME + " - Error 1 - you need superuser privileges") +except: + print( "\n\n" + PROGRAM_NAME + " - Error 2 - you need superuser privileges. USE 'sudo' to run your script\n\n") + sys.exit(1) + + +avviaParallela() + + +#-------------------------------------------------------------- +# MARCO: qui inserire avvio thread di "svuotaCoda" + +# avviaSvuotaCoda +#print "Avvia svuota coda" + +do_every ( SENDURLTIME , svuota_coda ); + +#--------------------------------------------------------------- +# ciclo forever and ever + +old = '' + +#print "Avvio ciclo" +logPro.info("Avvio loop principale") +while 1: + + try: + time.sleep (SAMPLETIME) + except: + logPro.info("First_SLEEP: errore attesa sampletime") + + # lettura dati da IOB + value = readParallelaFiltrata() + + if ( value != '' ) : + if value != old : + #loggo e invio dati + try: + logQue.info( value + ' ['+ cont +']') + errormsglen = 0 + accoda() + contatore() + except: + logPro.error("URLBROWSER: errore registrazione valore e accoda") + pass + #enable e reset timer + to_enable = True + to_short = TIMEOUTSHORT + to_long = TIMEOUTLONG + + old = value + + + # gestione timeout breve + if ( to_enable ) : + to_short = to_short - SAMPLETIME + if to_short <= 0: + #loggo e invio dati + try: + logQue.info( '>' + value + ' ['+ cont +']') + errormsglen = 0 + accoda() + contatore() + except: + logPro.error("URLBROWSER: errore registrazione valore e accoda TO_short") + pass + to_short = TIMEOUTSHORT + to_enable = False # dopo un colpo il timer breve viene disabilitato + to_long = TIMEOUTLONG + + # gestione timeout lungo + to_long = to_long - SAMPLETIME + if to_long <= 0: + #loggo e invio dati + try: + logQue.info( '>>' + value + ' ['+ cont +']') + errormsglen = 0 + accoda() + contatore() + except: + logPro.error("URLBROWSER: errore registrazione valore e accoda TO_long") + pass + to_long = TIMEOUTLONG diff --git a/IOB-PI/vers2.5 12bit/readSeriale.py b/IOB-PI/vers2.5 12bit/readSeriale.py new file mode 100644 index 0000000..3c00644 --- /dev/null +++ b/IOB-PI/vers2.5 12bit/readSeriale.py @@ -0,0 +1,363 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +#--------------------------------------------------------------- + +import serial +import time +import sys +import datetime +import urllib +import ConfigParser +import os, sys + +#--------------------------------------------------------------- + +# COSTANTI +MSGLEN = 9 +TIMEOUTSERIALE = 10 +MAXRETRY = 3 + +# DA FILE CONF +idxMacchina = "2001" +SAMPLETIME = 0.1 +TIMEOUTSHORT = (SAMPLETIME*20) +TIMEOUTLONG = (SAMPLETIME*600) + +# VAR +to_enable = False +to_short = TIMEOUTSHORT +to_long = TIMEOUTLONG +to_serial = TIMEOUTSERIALE +to_retry = MAXRETRY +errormsglen = 0 + +#--------------------------------------------------------------- +# classe logger + +class Logger: + def __init__(self, filename): + try: + self.filename = filename + except: + logga("LOGGER: errore try su self.filename") + sys.exit(1) + def __call__(self, string): + try: + file = open(self.filename, 'a') + file.write('[' + time.strftime("%Y-%m-%d %H:%M:%S") + '] ') + file.write(string + '\n') + file.close() + except: + logga("LOGGER: errore try su scrittura") + sys.exit(1) + +#--------------------------------------------------------------- +# lettura buffer seriale e pulizia caratteri non stampabili +# ritorna '' se non c'è un messaggio buono o il messaggio pulito ( due bytes hex ) +# il messaggio ha il formato xxi00 00xxx + +def readSeriale(): + + global to_serial + global to_retry + global errormsglen + + ret = '' + current = '' + i = 0 + + # ritorna '' se non ci sono abbastanza caratteri + try: + if ser.inWaiting() < MSGLEN : +# +# to_serial = to_serial - 1 # se non mi risponde, faccio un ' altra richiesta.... +# if to_serial <= 0: +# try: +# requestData () +# except: +# logga("SERIALE: errore su requestData") +# sys.exit(1) +# to_serial = TIMEOUTSERIALE # ripristino timer +# to_retry = to_retry - 1 # contatore retry +# if to_retry <= 0: +# logga ( 'IOB not responding' ) +# return ret + logga("SERIALE: errore msglen < 9 char - Errore no. " + str(errormsglen)) + errormsglen = errormsglen +1 + avviaSeriale() + time.sleep(.2) + if errormsglen > 30: + sys.exit(1) + except: + if startstatus == 0: + logga ("Porta SERIALE non disponibile - ser.inWaiting error - exit... - Errore no. " + str(errormsglen)) + errormsglen = errormsglen +1 + avviaSeriale() + time.sleep(.2) + if errormsglen > 30: + sys.exit(1) + + # finchè c'è robba .. leggi e tieni i buoni + to_serial = TIMEOUTSERIALE + to_retry = MAXRETRY + try: + while ser.inWaiting() > 0 : + try: + c = ser.read(1) + except: + logga("SERIALE: errore su try ser.read") + sys.exit(1) + # filtra caratteri non stampabili + if c > ' ' : + current += c + #sys.stdout.write(current + '<<<<\n') + # ora il messaggio ha il formato xxxxxi00 00xxx : cerco la 'i' iniziale + try: + while i < len(current) and current[i] != 'i': + i = i + 1 + except: + logga("SERIALE: errore su ricerca i iniziale") + sys.exit(1) + # se non ho trovato la 'i' restituisco '' + if i == len(current)-1: + return ret + else: + current = current[i+1:i+3] + # richiesta dati ad IOB + requestData() + #sys.stdout.write ( current + '\n') + except: + if startstatus == 0: + logga ('Porta SERIALE non disponibile - ser.inWaiting e filtraggio error...exit') + sys.exit(1) + return current +#--------------------------------------------------------------- +# richiesta dati ad IOB : scrittura su seriale + +def requestData (): + try : + ser.write ("$i" + '\r\n') + ser.flush() + except : + if startstatus == 0: + logga ( "SERIAL: Errore di scrittura/flush") + + +#--------------------------------------------------------------- +#Funzione di scrittura su url con try-except + +def chiamaUrl(): + try: + url = URLBASE + idxMacchina + URLADV1 + value + urllib.urlopen ( url ) + except: + logga ( "NETWORK:Errore http-no com rete-timeout" + url ) + + +#--------------------------------------------------------------- +# Funzione che verifica possibilità di creare log e include testo corrente + +def logga(message) : + try: + log(message) + except : + pass + +#--------------------------------------------------------------- + + +def avviaSeriale(): + global ser + + try: + ser = serial.Serial( + port = comm_port , + baudrate = 9600 , + parity = serial.PARITY_NONE , + stopbits = serial.STOPBITS_ONE , + bytesize = serial.EIGHTBITS + ) + startstatus = 0 + except serial.serialutil.SerialException , e : + try: + if startstatus == 0: + logga ( "SERIAL:Errore apertura seriale - " + comm_port) + except: + pass + sys.stdout.write ( '\nErrore apertura seriale\n\n%s\n\n' % e ) + if errormsglen > 30: + sys.exit (1) + +#--------------------------------------------------------------- +#--------------------------------------------------------------- +# MAIN + +try: + config = ConfigParser.RawConfigParser() + config.read ( 'readSeriale.cfg' ) + + SAMPLETIME = config.getfloat ( 'time' , 'SAMPLETIME' ) + TIMEOUTSHORT = config.getfloat ( 'time' , 'TIMEOUTSHORT' ) + TIMEOUTLONG = config.getfloat ( 'time' , 'TIMEOUTLONG' ) + + idxMacchina = config.get ( 'id' , 'idxMacchina' ) + comm_port = config.get ( 'comm' , 'port' ) + + URLBASE = config.get ( 'web' , 'URLBASE' ) + URLADV1 = config.get ( 'web' , 'URLADV1' ) + + LOGFILE = config.get ( 'log' , 'LOGFILE' ) + LOGLEVEL = config.get ( 'log' , 'LOGLEVEL' ) +except: + sys.exit(1) + +# oggetto Logger +try: + log = Logger(LOGFILE) +except: + # manda mail o simili - FARE!!! + print "LOG: Impossibile creare file log con nome " + print (LOGFILE) + +print '\n\n Read seriale IOB v.0.2 !!!!\n' + +global startstatus +startstatus = 1 + +if startstatus == 1: + logga("Avvio Programma") + +# Verifica l'OS e di conseguenza carica il file relativo con metodo di lockfile appropriato + check singola istanza +if os.name == 'posix': + import unix +else: + import win + +logga ( "Start Read seriale IOB v.0.2") + + +# lettura file configurazione + +# [comm] +# port = /dev/ttyS0 +# [id] +# idxMacchina = 2001 +# [time] +# SAMPLETIME = 0.1 +# TIMEOUTSHORT = 200 +# TIMEOUTLONG = 6000 + +print ( ' comm_port = %s' % ( comm_port ) ) +print ( ' idxMacchina = %s' % ( idxMacchina ) ) +print ( ' SAMPLETIME = %4.2f' % ( SAMPLETIME ) ) +print ( ' TIMEOUTSHORT = %4.2f' % ( TIMEOUTSHORT ) ) +print ( ' TIMEOUTLONG = %4.2f' % ( TIMEOUTLONG ) ) +print ( ' URLBASE = %s' % ( URLBASE ) ) +print ( ' URLADV1 = %s' % ( URLADV1 ) ) +print ( ' LOGFILE = %s' % ( LOGFILE ) ) +print ( ' LOGLEVEL = %s' % ( LOGLEVEL ) ) + +# -sys.stdout.write ( 'idxMacchina ?' + idxMacchina + '\n') + +to_short = TIMEOUTSHORT +to_long = TIMEOUTLONG + + + +#-------------------------------------------------------------- + + +#--------------------------------------------------------------- +# apertura seriale + +avviaSeriale() + +#try: +# ser = serial.Serial( +# port = comm_port , +# baudrate = 9600 , +# parity = serial.PARITY_NONE , +# stopbits = serial.STOPBITS_ONE , +# bytesize = serial.EIGHTBITS +# ) +# print "Initialized!" +#except serial.serialutil.SerialException , e : +# try: +# logga ( "SERIAL:Errore apertura seriale - " + comm_port) +# except: +# pass +# sys.stdout.write ( '\nErrore apertura seriale\n\n%s\n\n' % e ) +# sys.exit (1) + +#--------------------------------------------------------------- +# ciclo forever and ever + +old = '' + +# richiesta dati ad IOB +try: + requestData() +except: + logga("SERIALE: errore sul try di requestData") + sys.exit(1) + + +while 1: + try: + time.sleep (SAMPLETIME) + except: + logga("SERIALE_SLEEP: errore attesa sampletime") + # lettura dati da IOB + try: + value = readSeriale() + except: + if startstatus == 0: + logga("errore PRIMA LETTURA SERIALE") + sys.exit(1) + if ( value != '' ) : + if value != old : + #loggo e invio dati + try: + logga ( value ) + errormsglen = 0 + chiamaUrl() + except: + logga("URLBROWSER: errore registrazione valore e chiamaUrl") + pass + #enable e reset timer + to_enable = True + to_short = TIMEOUTSHORT + to_long = TIMEOUTLONG + + old = value + + + # gestione timeout breve + if ( to_enable ) : + to_short = to_short - SAMPLETIME + if to_short <= 0: + #loggo e invio dati + try: + logga ( '>' + value ) + errormsglen = 0 + chiamaUrl() + except: + pass + to_short = TIMEOUTSHORT + to_enable = False # dopo un colpo il timer breve viene disabilitato + to_long = TIMEOUTLONG + + # gestione timeout lungo + to_long = to_long - SAMPLETIME + if to_long <= 0: + #loggo e invio dati + try: + logga ( '>>' + value ) + errormsglen = 0 + chiamaUrl() + except: + pass + to_long = TIMEOUTLONG + + diff --git a/IOB-PI/vers2.5 12bit/saveTemp.sh b/IOB-PI/vers2.5 12bit/saveTemp.sh new file mode 100644 index 0000000..a2cd2be --- /dev/null +++ b/IOB-PI/vers2.5 12bit/saveTemp.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +#salva la temperatura CPU e GPU su chiamata... + +# imposto logfile... +logFile="/var/log/logTemp.txt" + +cpuTemp0=$(cat /sys/class/thermal/thermal_zone0/temp) +cpuTemp1=$(($cpuTemp0/1000)) +cpuTemp2=$(($cpuTemp0/100)) +cpuTempM=$(($cpuTemp2 % $cpuTemp1)) + +gpuTemp=`vcgencmd measure_temp` + +loadAvg=`cat /proc/loadavg` + +echo "$(date) | CPU: temp=$cpuTemp1.$cpuTempM ºC | GPU: $gpuTemp | LoadAvg: $loadAvg" >> $logFile diff --git a/IOB-PI/vers2.5 12bit/sendReboot.py b/IOB-PI/vers2.5 12bit/sendReboot.py new file mode 100644 index 0000000..021c400 --- /dev/null +++ b/IOB-PI/vers2.5 12bit/sendReboot.py @@ -0,0 +1,130 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# sendReboot v. 1.8 + +#--------------------------------------------------------------- + + +import time +import sys + + +from datetime import datetime + +import urllib +import ConfigParser +import os, sys + +import logging + +import time + +#--------------------------------------------------------------- + +# COSTANTI +PROGRAM_NAME = "SendReboot IOB-pi v.1.8" + +# DA FILE CONF +idxMacchina = "99" + +# registro se ho fatto chiamata +global numTry +numTry = 1 + + +#--------------------------------------------------------------- +#Funzione di scrittura su url con try-except +#--------------------------------------------------------------- + +def chiamaUrl(numTry): + + try: + urllib.urlopen ( url ) + numTry = numTry + 10 + except Exception, e: + print e + logging.info ( e ) + print "Url aforte" , url + return numTry + + +#--------------------------------------------------------------- +# Funzione di recupero mac address per poterlo inviare a MPIO +#--------------------------------------------------------------- +def getMAC(interface): + # Return the MAC address of interface + try: + str = open('/sys/class/net/' + interface + '/address').read() + except: + str = "00:00:00:00:00:00" + return str[0:17] + +#--------------------------------------------------------------- +# MAIN +#--------------------------------------------------------------- + +try: + config = ConfigParser.RawConfigParser() + config.read ( 'IOB.cfg' ) + + idxMacchina = config.get ( 'id' , 'idxMacchina' ) + + + URLREBO = config.get ( 'web' , 'URLREBO' ) + + LOGFILE = config.get ( 'log' , 'LOGREBO' ) +except: + print "\n\n" + PROGRAM_NAME + ' - Error 4 - in config file ' 'IOB.cfg' + sys.exit(1) + + +#-------------------------------------------- +# oggetto Logger +#-------------------------------------------- +try: +# log = Logger(LOGFILE) + logging.basicConfig(level=logging.DEBUG, + format='%(asctime)s %(name)-8s %(levelname)-8s %(message)s', + datefmt='%Y-%m-%d %H:%M:%S', + filename=LOGFILE, + filemode='a') + +except: + # manda mail o simili - FARE!!! + print "LOG: Impossibile creare file log con nome " + print (LOGFILE) +#-------------------------------------------- + + +print "\n\n" + PROGRAM_NAME + "\n\n" + +global startstatus +startstatus = 1 + +if startstatus == 1: + logging.info("Avvio Programma " + PROGRAM_NAME) + + +# lettura file configurazione +print ( ' idxMacchina = %s' % ( idxMacchina ) ) +print ( ' URLREBO = %s' % ( URLREBO ) ) +print ( ' LOGFILE = %s' % ( LOGFILE ) ) + +# lettura mac address +myMac = getMAC('eth0') +print ( ' MAC Address = %s' % ( myMac ) ) + +# configuro URL da inviare +url = URLREBO + idxMacchina + "&mac=" + myMac + +# modifica: cerco se ho inviato segnale altrimenti ritento invio... +while (numTry < 11): + logging.info("Tentativo invio URL: " + `numTry` ) + numTry = chiamaUrl(numTry) + time.sleep(3) + numTry = numTry + 1 + + +# registro che ho inviato! +logging.info("Inviato segnale di reboot!: " + url ) diff --git a/IOB-PI/vers2.5 12bit/sendRebootIOB b/IOB-PI/vers2.5 12bit/sendRebootIOB new file mode 100644 index 0000000..191bfff --- /dev/null +++ b/IOB-PI/vers2.5 12bit/sendRebootIOB @@ -0,0 +1,33 @@ +#!/bin/sh - +# +### BEGIN INIT INFO +# Provides: sendReboot +# Required-Start: $network $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Steamware's IOB reboot signal +# Description: Steamware's sendReboot segnalazione reboot dispositivo +### END INIT INFO + +#! /bin/sh +# /etc/init.d/sendReboot + + + +export HOME +case "$1" in + start) + cd /home/pi/steamware + echo "Starting sendReboot" + /usr/bin/python ./sendReboot.py 2>&1 & + echo "Verifica Rete e file IOB" + /usr/local/bin/setIobConf.sh + ;; + *) + echo "Usage: /etc/init.d/sendReboot {start}" + exit 1 + ;; +esac +exit 0 + diff --git a/IOB-PI/vers2.5 12bit/sendRebootIOB.service b/IOB-PI/vers2.5 12bit/sendRebootIOB.service new file mode 100644 index 0000000..48e3690 --- /dev/null +++ b/IOB-PI/vers2.5 12bit/sendRebootIOB.service @@ -0,0 +1,22 @@ +[Unit] +SourcePath=/etc/init.d/sendRebootIOB +Description=LSB: Steamware's IOB reboot signal +Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target shutdown.target +Wants=network-online.target +After=network.target network-online.target auditd.service +Conflicts=shutdown.target + +[Service] +Type=forking +Restart=no +TimeoutSec=5min +IgnoreSIGPIPE=no +KillMode=process +GuessMainPID=no +RemainAfterExit=yes +SysVStartPriority=2 +ExecStart=/etc/init.d/sendRebootIOB start +ExecStop=/etc/init.d/sendRebootIOB stop + +[Install] +WantedBy=multi-user.target diff --git a/IOB-PI/vers2.5 12bit/setIobConf.sh b/IOB-PI/vers2.5 12bit/setIobConf.sh new file mode 100644 index 0000000..30b4781 --- /dev/null +++ b/IOB-PI/vers2.5 12bit/setIobConf.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# verifico se sia rete donati o rete steamware o offline... +netStatus=`cat /sys/class/net/eth0/operstate` +iaddr=`ifconfig eth0 | grep "inet addr" | cut -d ':' -f 2 | cut -d ' ' -f 1` + +cd /home/pi/steamware + +if [[ $netStatus != "up" ]] +then + echo "Siamo Offline, pagina demo!" +elif [[ $iaddr == "10.74.82"* ]] +then + cp IOB.cfg.steamware IOB.cfg -f + echo "Siamo in Steamware!" +elif [[ $iaddr == "192.168.51"* ]] +then + cp IOB.cfg.donati IOB.cfg -f + echo "Siamo a Passirano!" +else + echo "Siamo altrove, pagina demo!" +fi + +echo "$iaddr" + +chown pi:pi * \ No newline at end of file diff --git a/IOB-PI/vers2.5 12bit/unix.py b/IOB-PI/vers2.5 12bit/unix.py new file mode 100644 index 0000000..12fb3dc --- /dev/null +++ b/IOB-PI/vers2.5 12bit/unix.py @@ -0,0 +1,31 @@ +import fcntl +import os +import logging + +#--------------------------------------------------------------- +# meccanismo di file lock per evitare multiple instances +# The function will try to lock the file specified , if it success, return True, else return False. +# The nice thing is that the lock will be dropped when the program terminates. +# >>>Use : +# if not lockFile(".lock.pod"): +# sys.exit(0) + +def lockFile ( lockfile ) : + + fd = os.open ( lockfile , os.O_CREAT | os.O_TRUNC | os.O_WRONLY ) + try: + # Request exclusive (EX) non-blocking (NB) advisory lock. + fcntl.lockf ( fd , fcntl.LOCK_EX | fcntl.LOCK_NB ) + except IOError: + return False + + return True + +if not lockFile ( ".lockfile" ) : + print '\n noi non siamo soli ...\n' + logging.error( "LOCK: Piu istanze aperte") + #sys.exit ( 0 ) + +#- print '\n running alone ...\n' + + diff --git a/IOB-PI/vers2.5 12bit/unix.pyc b/IOB-PI/vers2.5 12bit/unix.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f528212e734a67eb0c5153f80c50aace6d1f362a GIT binary patch literal 669 zcma)3%Wl&^6g_urw~d>yU+>A9OYr`N%@ph^{s}cOyT^nX-Q@*l0+qlI zZU`U)Q~_=XCPx+G-H{Yng{UHzqsEV#q&qxT{o$3*iJ_y5*oJI|Szv(`;rbsCJ`6B$ z*${&pf$xN?1K0?w9bA(KyWa2lGMzS$5!wzeVzeh9A{%3JX7@2k9bcYy9f_mW#)fX& z$j0t67@rS|(c9@Qo)#zh(C+#CX)(@^KQSk;m^ZfesMhm~g>OC{4?mob&K__+@c8|B z)V8|y-G^mur01KqTbVk3Kip4Iwe&YyR4M1-oq5Kn|3$B5f1~=w%5wd+Y-NAjsLO0~ zb$|Gf5BIp$I9(9WDG&$Lqez$z$JyO{^OU1FX|!T%5~IqsPK>Tql4V(Jo^aL4c#(Wm z+e8^#Hs54YZe(j^>U0<0F@Tp=>*Z24%i@tsxRP{AA8!BO5?-!#wXNkV_cmTam-vf2 I`(29YFVCEWI{*Lx literal 0 HcmV?d00001 diff --git a/IOB-PI/vers2.5 12bit/update-RPI-IOB.sh b/IOB-PI/vers2.5 12bit/update-RPI-IOB.sh new file mode 100644 index 0000000..d521931 --- /dev/null +++ b/IOB-PI/vers2.5 12bit/update-RPI-IOB.sh @@ -0,0 +1,54 @@ +#|/bin/bash + +#installa il necessario per RPI-3-IOB partendo dal contenuto della folder /home/pi/steamware + +#step 1: creo file di log nuovi +rm /var/log/log*.txt +rm /var/log/MapoIOB* +rm /home/pi/steamware/log*.txt + +touch /var/log/logReboot.txt +touch /var/log/logTemp.txt +touch /var/log/MapoIOB.log + +ln -sf /var/log/logReboot.txt /home/pi/steamware/logReboot.txt +ln -sf /var/log/logTemp.txt /home/pi/steamware/logTemp.txt +ln -sf /var/log/MapoIOB.log /home/pi/steamware/logfile.txt + +chown pi:pi /home/pi -R +chmod 666 /var/log/log*.txt +chmod 666 /var/log/MapoIOB.log + +#step 2: copio files in /usr/local/bin +cd /home/pi/steamware +chmod +x *.sh +cp *.sh /usr/local/bin/ + +#step 3: copio files x logrotate... +cd /home/pi/steamware +cp MapoIOB_logrot /etc/logrotate.d/ + +# step 4: copio target systemd in avvio... +cp -f sendRebootIOB /etc/init.d/sendRebootIOB +cp -f sendRebootIOB.service /etc/systemd/system/sendRebootIOB.service +#echo "" +#echo "-----------------------------------------------" +#echo "Completare registrazione servizio avvio: digitare i seguenti comandi" +#echo "systemctl enable sendRebootIOB" +#echo "systemctl daemon-reload" +#echo "systemctl status sendRebootIOB" +#echo "-----------------------------------------------" +#echo "" + +# step 5: copio target MapoIOB in avvio... +cp -f MapoIOB /etc/init.d/MapoIOB +cp -f MapoIOB.service /etc/systemd/system/MapoIOB.service + + +#echo "" +#echo "" +#echo "-----------------------------------------------" +#echo "Infine creare voce crontab che salvi temperatura CPU/GPU ogni 20 minuti..." +#echo "crontab -e" +#echo "*/20 * * * * /usr/local/bin/saveTemp.sh" +#echo "-----------------------------------------------" diff --git a/IOB-PI/vers2.5 12bit/win.py b/IOB-PI/vers2.5 12bit/win.py new file mode 100644 index 0000000..f679f60 --- /dev/null +++ b/IOB-PI/vers2.5 12bit/win.py @@ -0,0 +1,32 @@ +import win32api +print " Running on WINDOWS\n" +import os +#--------------------------------------------------------------- +# meccanismo di file lock per evitare multiple instances +# The function will try to lock the file specified , if it success, return True, else return False. +# The nice thing is that the lock will be dropped when the program terminates. +# >>>Use : +# if not lockFile(".lock.pod"): +# sys.exit(0) + +def lockFile ( lockfile ) : + try: + fd = os.open ( lockfile , os.O_CREAT | os.O_TRUNC | os.O_WRONLY ) + except: + logga("Errore nel file WIN.PY per FD") + try: + # Request exclusive (EX) non-blocking (NB) advisory lock. + #fcntl.lockf ( fd , fcntl.LOCK_EX | fcntl.LOCK_NB ) + print " Dummy Method! Completa Lockfile\n" + except IOError: + return False + + return True +try: + if not lockFile ( ".lockfile" ) : + print '\n noi non siamo soli ...\n' + logga ( "LOCK: Piu istanze aperte") + sys.exit ( 0 ) +except: + logga("if not lockfile NON RIUSCITO in file WIN.PY") + sys.exit(1) diff --git a/IOB-PI/vers2.5 8bit/IOB.cfg b/IOB-PI/vers2.5 8bit/IOB.cfg new file mode 100644 index 0000000..ad9ef57 --- /dev/null +++ b/IOB-PI/vers2.5 8bit/IOB.cfg @@ -0,0 +1,56 @@ +[id] +idxMacchina = 0001 + +[web] +URLBASE = http://10.74.82.219/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.219/MP/IO/IOB +URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLADV1 = ?valore= +URLREBO = http://10.74.82.219/MP/IO/sendReboot.aspx?idxMacchina= + +[time] +SAMPLETIME = 0.05 +TIMEOUTSHORT = 0.30 +TIMEOUTLONG = 50 +SENDURLTIME = 0.15 +NMAXSEND = 5 + +[log] +LOGLEVEL = 10 +LOGFILE = logfile.txt +LOGREBO = logReboot.txt + +[comm] +port = /dev/ttyAMA0 + +[blink] +MAX_COUNTER_BLINK = 30 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 + +[invert] +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 + +[filter] +MAX_COUNTER_FILTER = 8 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 0 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 diff --git a/IOB-PI/vers2.5 8bit/IOB.cfg.donati b/IOB-PI/vers2.5 8bit/IOB.cfg.donati new file mode 100644 index 0000000..29c3d61 --- /dev/null +++ b/IOB-PI/vers2.5 8bit/IOB.cfg.donati @@ -0,0 +1,35 @@ +[id] +idxMacchina = 2007 + +[web] +URLBASE = http://192.168.51.77/MP/IO/IOB/input/ +URLALIVE = http://192.168.51.77/MP/IO/IOB +URLENABLED = http://192.168.51.77/MP/IO/IOB/enabled/ +URLADV1 = ?valore= +URLREBO = http://192.168.51.77/MP/IO/sendReboot.aspx?idxMacchina= + +[time] +SAMPLETIME = 0.05 +TIMEOUTSHORT = 0.30 +TIMEOUTLONG = 50 +SENDURLTIME = 0.15 +NMAXSEND = 5 + +[log] +LOGLEVEL = 10 +LOGFILE = logfile.txt +LOGREBO = logReboot.txt + +[comm] +port = /dev/ttyAMA0 + +[blink] +MAX_COUNTER_BLINK = 30 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 1 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 diff --git a/IOB-PI/vers2.5 8bit/IOB.cfg.steamware b/IOB-PI/vers2.5 8bit/IOB.cfg.steamware new file mode 100644 index 0000000..ac044d0 --- /dev/null +++ b/IOB-PI/vers2.5 8bit/IOB.cfg.steamware @@ -0,0 +1,35 @@ +[id] +idxMacchina = 1005 + +[web] +URLBASE = http://10.74.82.219/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.219/MP/IO/IOB +URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLADV1 = ?valore= +URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= + +[time] +SAMPLETIME = 0.05 +TIMEOUTSHORT = 0.30 +TIMEOUTLONG = 50 +SENDURLTIME = 0.15 +NMAXSEND = 5 + +[log] +LOGLEVEL = 10 +LOGFILE = logfile.txt +LOGREBO = logReboot.txt + +[comm] +port = /dev/ttyAMA0 + +[blink] +MAX_COUNTER_BLINK = 30 +bit0 = 0 +bit1 = 0 +bit2 = 0 +bit3 = 1 +bit4 = 0 +bit5 = 0 +bit6 = 0 +bit7 = 0 diff --git a/IOB-PI/vers2.5 8bit/MapoIOB b/IOB-PI/vers2.5 8bit/MapoIOB new file mode 100644 index 0000000..1213dc7 --- /dev/null +++ b/IOB-PI/vers2.5 8bit/MapoIOB @@ -0,0 +1,41 @@ +#! /bin/bash +### BEGIN INIT INFO +# Provides: MapoIOB: script Steamware per avvio driver IOB +# Required-Start: $remote_fs $syslog ramlog +# Required-Stop: $remote_fs $syslog ramlog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Steamware's MapoIOB driver +# Description: Steamware's MapoIOB driver, versione lettura porta parallela +### END INIT INFO + +# /etc/init.d/MapoIOB + +export HOME +case "$1" in + start) + echo "Starting readParallela" + cd /home/pi/steamware + /usr/bin/python ./readParallela.py 2>&1 & + ;; + stop) + echo "Stopping readParallela" + RS_PID=`ps auxwww | grep readParallela.py | head -1 | awk '{print $2}'` + kill -9 $RS_PID + cd /home/pi/steamware + rm .lockfile + ;; + restart) + ## Stop the service and regardless of whether it was + ## running or not, start it again. + $0 stop + killall python + $0 start + ;; + *) + echo "Usage: /etc/init.d/MapoIOB {start|stop|restart}" + exit 1 + ;; +esac +exit 0 + diff --git a/IOB-PI/vers2.5 8bit/MapoIOB.service b/IOB-PI/vers2.5 8bit/MapoIOB.service new file mode 100644 index 0000000..8f86fdb --- /dev/null +++ b/IOB-PI/vers2.5 8bit/MapoIOB.service @@ -0,0 +1,22 @@ +[Unit] +SourcePath=/etc/init.d/MapoIOB +Description=LSB: Steamware's MapoIOB driver +Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target shutdown.target +Wants=network-online.target +After=network.target network-online.target auditd.service +Conflicts=shutdown.target + +[Service] +Type=forking +Restart=no +TimeoutSec=5min +IgnoreSIGPIPE=no +KillMode=process +GuessMainPID=no +RemainAfterExit=yes +SysVStartPriority=1 +ExecStart=/etc/init.d/MapoIOB start +ExecStop=/etc/init.d/MapoIOB stop + +[Install] +WantedBy=multi-user.target diff --git a/IOB-PI/vers2.5 8bit/MapoIOB_logrot b/IOB-PI/vers2.5 8bit/MapoIOB_logrot new file mode 100644 index 0000000..13410b9 --- /dev/null +++ b/IOB-PI/vers2.5 8bit/MapoIOB_logrot @@ -0,0 +1,28 @@ +/var/log/MapoIOB.log { + size 8M + copytruncate + create 700 pi pi + dateext + rotate 100 + compress + maxage 366 + missingok +} +/var/log/logReboot.txt { + size 1M + copytruncate + create 700 pi pi + dateext + rotate 30 + compress + missingok +} +/var/log/logTemp.txt { + size 1M + copytruncate + create 700 pi pi + dateext + rotate 30 + compress + missingok +} diff --git a/IOB-PI/vers2.5 8bit/checkAlive.sh b/IOB-PI/vers2.5 8bit/checkAlive.sh new file mode 100644 index 0000000..aace73d --- /dev/null +++ b/IOB-PI/vers2.5 8bit/checkAlive.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# controlla se il logfile è correntemente scritto (quindi MapoIOB è alive) altrimenti riavvia! + +DATE=`date +%Y-%m-%d` +cd /var/log +if [ -f MapoIOB.log ] + then + # controllo SE sia stato acceduto da meno di 2 minuti (=alive da log...) + trovato=`find . -name 'MapoIOB*' -cmin -1` + if [[ $trovato != './MapoIOB.log' ]] + then + /etc/init.d/MapoIOB restart + echo $date + "riavvio!" + fi +else + # in questo caso AVVIO il processo MapoIOB + /etc/init.d/MapoIOB start + echo $date + "file non trovato, avvio!" +fi diff --git a/IOB-PI/vers2.5 8bit/cleanPython.sh b/IOB-PI/vers2.5 8bit/cleanPython.sh new file mode 100644 index 0000000..c4f616a --- /dev/null +++ b/IOB-PI/vers2.5 8bit/cleanPython.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +DATE=`date +%Y-%m-%d_%T` +# log inizio pulizia +echo $DATE " - INIZIO pulizia processi python" >> clean.log +# effettua pulizia processi: killa tutti i processi python +killall python + +# avvia MapoIob +/etc/init.d/MapoIOB start + +# log fatto! +DATE=`date +%Y-%m-%d_%T` +echo $DATE " - FINE pulizia processi python + riavvio MapoIOB" >> clean.log diff --git a/IOB-PI/vers2.5 8bit/convertLogFile.py b/IOB-PI/vers2.5 8bit/convertLogFile.py new file mode 100644 index 0000000..760c2a9 --- /dev/null +++ b/IOB-PI/vers2.5 8bit/convertLogFile.py @@ -0,0 +1,46 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# readFile v. 0.1 +# - single instance timer +# - invio multiplo x send eventi accodati +#--------------------------------------------------------------- +import os, sys +import argparse +#-------------------------------------------------------------- + +# gestione parser argomenti in input +parser = argparse.ArgumentParser() +parser.add_argument("inFile") +parser.add_argument("outFile") +args = parser.parse_args() + +#with open('logfile.txt', 'r') as inf, open('persMem.dat',"w") as outf: +with open(args.inFile, 'r') as inf, open(args.outFile,"w") as outf: + data = inf.readlines() + + lastDt = "" + lastMs = 0 + stepMs = 200 + + for line in data: + words = line.split() + if words[2] == 'queue': + # recupero dataOra + newDt = words[0].replace("-","") + words[1].replace(":","") + + # verifico se data/ora identica... + if (lastDt == newDt): + # --> aggiungo stepMs + lastMs += stepMs + else: + lastMs = 0 + + lastDt = newDt + + newDt = newDt + '{:03d}'.format(lastMs) #str(lastMs) + #print words[0].replace("-","") + words[1].replace(":","") + " | " + newDt + "\n" + + # print words + # outf.write(words[0].replace("-","") + words[1].replace(":","") + '#' + words[4].replace(">","") + '#' + words[5].replace("[","").replace("]","") +'\n') + outf.write(newDt + '#' + words[4].replace(">","") + '#' + words[5].replace("[","").replace("]","") +'\n') \ No newline at end of file diff --git a/IOB-PI/vers2.5 8bit/crontab b/IOB-PI/vers2.5 8bit/crontab new file mode 100644 index 0000000..74fe381 --- /dev/null +++ b/IOB-PI/vers2.5 8bit/crontab @@ -0,0 +1 @@ +* * * * * /bin/bash /home/pi/steamware/checkAlive.sh >> /home/pi/stdout 2>> /home/pi/stderr diff --git a/IOB-PI/vers2.5 8bit/install-RPI-IOB.sh b/IOB-PI/vers2.5 8bit/install-RPI-IOB.sh new file mode 100644 index 0000000..d521931 --- /dev/null +++ b/IOB-PI/vers2.5 8bit/install-RPI-IOB.sh @@ -0,0 +1,54 @@ +#|/bin/bash + +#installa il necessario per RPI-3-IOB partendo dal contenuto della folder /home/pi/steamware + +#step 1: creo file di log nuovi +rm /var/log/log*.txt +rm /var/log/MapoIOB* +rm /home/pi/steamware/log*.txt + +touch /var/log/logReboot.txt +touch /var/log/logTemp.txt +touch /var/log/MapoIOB.log + +ln -sf /var/log/logReboot.txt /home/pi/steamware/logReboot.txt +ln -sf /var/log/logTemp.txt /home/pi/steamware/logTemp.txt +ln -sf /var/log/MapoIOB.log /home/pi/steamware/logfile.txt + +chown pi:pi /home/pi -R +chmod 666 /var/log/log*.txt +chmod 666 /var/log/MapoIOB.log + +#step 2: copio files in /usr/local/bin +cd /home/pi/steamware +chmod +x *.sh +cp *.sh /usr/local/bin/ + +#step 3: copio files x logrotate... +cd /home/pi/steamware +cp MapoIOB_logrot /etc/logrotate.d/ + +# step 4: copio target systemd in avvio... +cp -f sendRebootIOB /etc/init.d/sendRebootIOB +cp -f sendRebootIOB.service /etc/systemd/system/sendRebootIOB.service +#echo "" +#echo "-----------------------------------------------" +#echo "Completare registrazione servizio avvio: digitare i seguenti comandi" +#echo "systemctl enable sendRebootIOB" +#echo "systemctl daemon-reload" +#echo "systemctl status sendRebootIOB" +#echo "-----------------------------------------------" +#echo "" + +# step 5: copio target MapoIOB in avvio... +cp -f MapoIOB /etc/init.d/MapoIOB +cp -f MapoIOB.service /etc/systemd/system/MapoIOB.service + + +#echo "" +#echo "" +#echo "-----------------------------------------------" +#echo "Infine creare voce crontab che salvi temperatura CPU/GPU ogni 20 minuti..." +#echo "crontab -e" +#echo "*/20 * * * * /usr/local/bin/saveTemp.sh" +#echo "-----------------------------------------------" diff --git a/IOB-PI/vers2.5 8bit/readFile.py b/IOB-PI/vers2.5 8bit/readFile.py new file mode 100644 index 0000000..887118d --- /dev/null +++ b/IOB-PI/vers2.5 8bit/readFile.py @@ -0,0 +1,152 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# readFile v. 0.1 +# - single instance timer +# - invio multiplo x send eventi accodati + +#--------------------------------------------------------------- + +import time + +from datetime import datetime + +import urllib +import ConfigParser +import os, sys + +import logging +import logging.handlers +import Queue + +import argparse +#-------------------------------------------------------------- + +# gestione parser argomenti in input +parser = argparse.ArgumentParser() +parser.add_argument("memFile") +parser.add_argument("logFile") +args = parser.parse_args() + +#definizione variabili BASE +stepQueuePut=25000 +stepQueueGet=250 +NMAXSEND=500000 # limite invio file x fare prove... +idxMacchina = "2003" + +#-------------------------------------------------------------- +# Gestione coda (condivisa) x registrazione eventi ed invio URL +#print "Creazione coda illimitata" +Coda = Queue.Queue(0) + +#--------------------------------------------------------------- +#Funzione di scrittura su coda con try-except + +def accoda(valore): + + try: + Coda.put(valore) + except Queue.Full: + logPro.error( "Queue full" + dtEve + '#' + value + '#' + cont ) + except: + logPro.error( "NETWORK:Errore http-no com rete-timeout" + url ) + + +#-------------------------------------------------------------- +# svuotaCoda x invio dati al server +def svuota_coda(): + + global NMAXSEND + + try: + if not Coda.empty(): + # invio SOLO i primi NMAXSEND eventi... SE minore del num eventi... + if NMAXSEND > Coda.qsize(): + NMAXSEND = Coda.qsize() + + + i = 0 + + with open(args.logFile,"w") as outf: + while i <= NMAXSEND: + if not Coda.empty(): + + # formatto dataOra corrente + dtCurr = datetime.utcnow().strftime('%Y%m%d%H%M%S%f')[:-3] + + #prendo primo elemento dalla coda + resp = Coda.get() + + # recupero valori da elemento coda! + dtEve = resp.split("#")[0] + value = resp.split("#")[1] + cnt = resp.split("#")[2] + url = URLBASE + idxMacchina + URLADV1 + value + url = url + '&dtCurr=' + dtCurr + '&dtEve=' + dtEve + '&cnt=' + cnt + # CHIAMO URL + response3 = urllib.urlopen ( url ) + answ3 = response3.read() + + # registro chiamata + risposta + # outf.write(url + " --> " + answ3 + "\n") + + # incremento e controllo se mostrare output + i += 1 + if (i % stepQueueGet) == 0: + print "Inviati %d valori..." % i + + print "Inviati %d valori..." % i + except: + print "Errore in svuotamento coda!" + + +#--------------------------------------------------------------- +# MAIN + +try: + config = ConfigParser.RawConfigParser() + config.read ( 'IOB.cfg' ) + + # NMAXSEND = config.getint ( 'time' , 'NMAXSEND' ) + # idxMacchina = config.get ( 'id' , 'idxMacchina' ) + + + URLBASE = config.get ( 'web' , 'URLBASE' ) + URLADV1 = config.get ( 'web' , 'URLADV1' ) + + LOGFILE = config.get ( 'log' , 'LOGFILE' ) + LOGLEVEL = config.get ( 'log' , 'LOGLEVEL' ) +except: + print "\n\n" + PROGRAM_NAME + ' - Error 4 - in config file ' 'IOB.cfg' + sys.exit(1) + +#--------------------------------------------------------------- + +dtCurr = datetime.utcnow().strftime('%H:%M:%S.%f')[:-3] +print "Inizio elaborazione: %s" % dtCurr + +# Leggo il file! +i = 0 +with open(args.memFile, 'r') as inf, open(args.logFile,"w") as outf: + data = inf.readlines() + + print "Trovate %d da processare..." % len(data) + +# leggo e metto in QUEUE... + for line in data: + accoda(line) + i += 1 + if (i % stepQueuePut) == 0: + print "Accodati %d valori..." % i + +print "Completata lettura file! %d righe accodate da trasmettere" % Coda.qsize() + +dtCurr = datetime.utcnow().strftime('%H:%M:%S.%f')[:-3] +print "Inizio invio: %s" % dtCurr + + +# chiamo procedura x svuotare coda... +svuota_coda() + +dtCurr = datetime.utcnow().strftime('%H:%M:%S.%f')[:-3] +print "Completato invio: %s" % dtCurr \ No newline at end of file diff --git a/IOB-PI/vers2.5 8bit/readParallela.py b/IOB-PI/vers2.5 8bit/readParallela.py new file mode 100644 index 0000000..8ee538d --- /dev/null +++ b/IOB-PI/vers2.5 8bit/readParallela.py @@ -0,0 +1,720 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# readParallela v. 2.5.1 +# - single instance timer +# - invio multiplo x send eventi accodati +# - gestione segnali BLINKING +# - gestione INVERSIONE segnali cv 10-VII-2018 +# - gestione FILTRAGGIO segnali brevi cv 23-VII-2018 +# - (2.3) gestione 12 bit cv 14-I-2020 +# - (2.4) fix ingressi e conf apertura parallela + gestione vari bit filtraggio x nuovi ingressi + update conf con 12 parametri bit SEL 15-I-2020 +# - (2.4.8) versione adatta a raspberry PI vecchia generazione (GPIO corto, 8bit) +# - (2.5) Fix (hope) ciclo "wait send to complete", gestione timeout (rety infinito se IO riparte in modo anomalo) +# - (2.5.1) Fix numero versione 18.05.2023 + +#--------------------------------------------------------------- +# levare locking +# timer semplificata +# GPIO global + + +import time +import sys + + +from datetime import datetime + +import urllib +import ConfigParser +import os, sys + +import logging +import logging.handlers +import threading +import Queue + +from array import * + +#-------------------------------------------------------------- + +# COSTANTI +MSGLEN = 9 +TIMEOUTSERIALE = 10 +MAXRETRY = 10 + +# numero campioni filtraggio segnale ballerino +MAX_COUNTER_BLINK = 10 + +PROGRAM_NAME ="ReadPar IOB-pi v.2.5.1" + +# DA FILE CONF +idxMacchina = "1001" +SAMPLETIME = 0.1 +TIMEOUTSHORT = (SAMPLETIME*20) +TIMEOUTLONG = (SAMPLETIME*600) +SENDURLTIME = 0.08 +NMAXSEND = 5 # numero massimo di invii per singolo ciclo di svuotamento + +# VAR +to_enable = False +to_short = TIMEOUTSHORT +to_long = TIMEOUTLONG +to_serial = TIMEOUTSERIALE +to_retry = MAXRETRY +errormsglen = 0 + +# VAR + +out_0 = 24 +out_1 = 26 + +in_0 = 11 +in_1 = 12 +in_2 = 13 +in_3 = 15 +in_4 = 16 +in_5 = 18 +in_6 = 22 +in_7 = 7 + +# contatore: serve x match tra accoda ed invia x possibile controllo a posteriori... ogni volta che accodo incremento di 1, va da 0 a 9999 +cont = '0' + +# variabile stato online/offline della macchina +onLine = '1' + +# variabile stato seinding/waiting x la parte invio URL +sending = '0' + +# variabile stato timer thread busy +timer_busy = False + +# +# array per ingressi filtrati + +i_counters = array ( 'i',[0,0,0,0,0,0,0,0]) +B_blinking = array ( 'B',[0,0,0,0,0,0,0,0]) +B_previous = array ( 'B',[0,0,0,0,0,0,0,0]) +B_input = array ( 'B',[0,0,0,0,0,0,0,0]) +B_output = array ( 'B',[0,0,0,0,0,0,0,0]) + +B_inverting = array ( 'B',[0,0,0,0,0,0,0,0]) + +B_filter = array ( 'B',[0,0,0,0,0,0,0,0]) +B_filter_prev = array ( 'B',[0,0,0,0,0,0,0,0]) +B_temp = array ( 'B',[0,0,0,0,0,0,0,0]) +i_filter_counters = array ( 'i',[0,0,0,0,0,0,0,0]) + +#-------------------------------------------------------------- +# Gestione coda (condivisa) x registrazione eventi ed invio URL +#print "Creazione coda illimitata" + +Coda = Queue.Queue(0) + +#queueLock = threading.Lock() + +#--------------------------------------------------------------- +# lettura parallela +# ritorna il byte letto pulito ( due char hex ) + +def readParallelaFiltrata(): + + global in_0 + global in_1 + global in_2 + global in_3 + global in_4 + global in_5 + global in_6 + global in_7 + + global GPIO + + current = '' + + + try: + + if GPIO.input(in_0): + B_input[0] = 0 + else: + B_input[0] = 1 + + if GPIO.input(in_1): + B_input[1] = 0 + else: + B_input[1] = 1 + + if GPIO.input(in_2): + B_input[2] = 0 + else: + B_input[2] = 1 + + if GPIO.input(in_3): + B_input[3] = 0 + else: + B_input[3] = 1 + + if GPIO.input(in_4): + B_input[4] = 0 + else: + B_input[4] = 1 + + if GPIO.input(in_5): + B_input[5] = 0 + else: + B_input[5] = 1 + + if GPIO.input(in_6): + B_input[6] = 0 + else: + B_input[6] = 1 + + if GPIO.input(in_7): + B_input[7] = 0 + else: + B_input[7] = 1 + + + + #ciclo per ogni segnale + for i in xrange(8) : + #print (i) + + # v2.1 gestione inversione bit ingresso + + if ( B_inverting[i] == 1 ) : + if ( B_input[i] == 0 ) : + B_input[i] = 1 + else : + B_input[i] = 0 + + # v2.2 gestione filtro segnali brevi + + if ( B_filter[i] == 1 ) : + + # fronte 0 -> 1 + if ( B_input[i] == 1 ) and ( B_filter_prev [i] == 0 ) : + if ( i_filter_counters[i] == 0 ) : + # vero fronte 0 -> 1 + i_filter_counters[i] = MAX_COUNTER_FILTER + B_temp[i] = 0 # tengo l' ingresso a 0 + #logPro.info("START spike 0->1 on bit " + `i` ) + else : + # fine disturbo breve di uno stato 1 + i_filter_counters[i] = 0 + B_temp[i] = 1 # tengo l' ingresso a 1 + logPro.info("END spike 0->1 on bit " + `i` ) + + # stabile 1 -> 1 + if ( B_input[i] == 1 ) and ( B_filter_prev [i] == 1 ) : + if ( i_filter_counters[i] == 0 ) : + # segnale stabile a 1 + B_temp[i] = 1 # tengo l' ingresso a 1 + else : + # poco dopo il fronte + i_filter_counters[i] = i_filter_counters[i] - 1 + B_temp[i] = 0 # tengo l' ingresso a 0 + + # fronte 1 -> 0 + if ( B_input[i] == 0 ) and ( B_filter_prev [i] == 1 ) : + if ( i_filter_counters[i] == 0 ) : + # vero fronte 1 -> 0 + i_filter_counters[i] = MAX_COUNTER_FILTER + B_temp[i] = 1 # tengo l' ingresso a 1 + #logPro.info("START spike 1->0 on bit " + `i` ) + else : + # fine disturbo breve di uno stato 0 + i_filter_counters[i] = 0 + B_temp[i] = 0 # tengo l' ingresso a 0 + logPro.info("END spike 1->0 on bit " + `i` ) + + # stabile 0 -> 0 + if ( B_input[i] == 0 ) and ( B_filter_prev [i] == 0 ) : + if ( i_filter_counters[i] == 0 ) : + # segnale stabile a 0 + B_temp[i] = 0 # tengo l' ingresso a 0 + else : + # poco dopo il fronte + i_filter_counters[i] = i_filter_counters[i] - 1 + B_temp[i] = 1 # tengo l' ingresso a 1 + + B_filter_prev [i] = B_input[i] + B_input[i] = B_temp[i] + + # fine gestione filtro segnali brevi + + + # se non blinking, copia ingresso + if ( B_blinking[i] == 0 ) : + B_output[i] = B_input[i] + else: + # gestione segnale blinking + # se fronte del segnale + if ( B_previous[i] != B_input[i] ) : + B_previous[i] = B_input[i] + # se fronte di salita + if ( B_input[i] == 1 ) : + # subito uscita = 1 + B_output[i] = 1 + i_counters[i] = MAX_COUNTER_BLINK + #else : + # # loggo che ho rilevato un blink... + # logPro.info("Blink down on bit " + `i`) + else: + # no , segnale eguale a prima + # se input a 0 + if ( B_input[i] == 0 ) : + # E CONTEGGIO IN CORSO + if ( i_counters[i] > 0 ) : + i_counters[i] = i_counters[i] -1 + if ( i_counters[i] == 0 ) : + B_output[i] = 0 + logPro.info("END Blink on bit " + `i` ) + + #Rimettiamo insieme i bit + new_value = 0 + + if ( B_output[0] == 1 ) : + new_value = new_value + 1 + if ( B_output[1] == 1 ) : + new_value = new_value + 2 + if ( B_output[2] == 1 ) : + new_value = new_value + 4 + if ( B_output[3] == 1 ) : + new_value = new_value + 8 + if ( B_output[4] == 1 ) : + new_value = new_value + 16 + if ( B_output[5] == 1 ) : + new_value = new_value + 32 + if ( B_output[6] == 1 ) : + new_value = new_value + 64 + if ( B_output[7] == 1 ) : + new_value = new_value + 128 + + + current = hex( new_value ).replace ( "0x" , "" ).upper() + + except: + pass + + return current + +#--------------------------------------------------------------- +#Funzione di scrittura su coda con try-except + +def accoda(): + + try: + dtEve = datetime.utcnow().strftime('%Y%m%d%H%M%S%f')[:-3] + Coda.put(dtEve + '#' + value + '#' + cont) + + except Queue.Full: + logPro.error( "Queue full" + `dtEve` + '#' + `value` + '#' + `cont` ) + except: + logPro.error( "NETWORK:Errore http-no com rete-timeout" + url ) + #print "Url aforte" , url + + +#-------------------------------------------------------------- +# svuotaCoda x invio dati al server +def svuota_coda(): + + global onLine + global sending + global timer_busy + global NMAXSEND + + #print "start timer " + + if ( timer_busy == False ): + timer_busy = True + #print "start timer ok " + + try: + if not Coda.empty(): + #print "coda da svuotare!" + response = urllib.urlopen(URLALIVE) + answ = response.read() + if answ == 'OK': + #print "OK alive" + response2 = urllib.urlopen(URLENABLED + idxMacchina) + answ2 = response2.read() + if answ2 == 'OK': + # aggiorno stato ad online + if onLine == '0': + logPro.info("IOB ONLINE!") + #print("IOB ONLINE") + + onLine = '1' # imposto comunque online + else: + if onLine == '1': + logPro.error("IOB offline") + #print("IOB offline") + + onLine = '0' + else: + if onLine == '1': + logPro.error("Server offline") + #print("Server offline") + + onLine = '0' + + # ora verifico SE si possa inviare (ovvero sia online server e NON ci siano altri send attivi...) + if onLine == '1': + if sending == '0': + #segnalo che sono in sending! + sending = '1' + + # SAM 2016.12.23: modifica x invio FINO A nMaxSend ELEMENTI ad ogni ciclo di svuotamento + i = NMAXSEND + + while i >= 0: + if not Coda.empty(): + + # formatto dataOra corrente + dtCurr = datetime.utcnow().strftime('%Y%m%d%H%M%S%f')[:-3] + + #prendo primo elemento dalla coda + resp = Coda.get() + + # recupero valori da elemento coda! + dtEve = resp.split("#")[0] + value = resp.split("#")[1] + cnt = resp.split("#")[2] + url = URLBASE + idxMacchina + URLADV1 + value + url = url + '&dtCurr=' + dtCurr + '&dtEve=' + dtEve + '&cnt=' + cnt + # CHIAMO URL + response3 = urllib.urlopen ( url ) + answ3 = response3.read() + #print(url) + + # log valore inviato! + logSnd.info( value + ' ['+ cnt +']' + ' R:' + answ3 ) + #print "Valore smaltito dalla coda" + + # tolgo 1 al contatore + i -= 1 + + # completato invio, riporto sending a zero! + sending = '0' + else: + if to_retry > 0: + to_retry -= 1 + logPro.info("WAIT active send to complete") + else: + sending = '0' + to_retry = MAXRETRY + logPro.info("END WAIT, reset to_retry var") + + else: + pass + + else: + pass + + except: + if onLine == '1': + logPro.error("Server Non raggiungibile") + #print "Non raggiungibile" + + onLine = '0' + + # in ogni caso + + timer_busy = False + #print "end timer ok" + + + #print "end timer " + + +#--------------------------------------------------------------- +# funzione timer thread +#--------------------------------------------------------------- +def do_every (interval, worker_func, iterations = 0): + if iterations != 1: + threading.Timer ( + interval, + do_every, [interval, worker_func, 0 if iterations == 0 else iterations-1] + ).start (); + + worker_func (); + +#--------------------------------------------------------------- +# gestione contatore +#--------------------------------------------------------------- +def contatore(): + + try: + global cont + ctr = int(cont) + ctr +=1 + ctr = ctr % 10000 # round robin 10000 eventi x track + cont = str(ctr) + except: + print("errore incremento contatore") + +#--------------------------------------------------------------- +# avvia porta parallela +#--------------------------------------------------------------- +def avviaParallela(): + + global in_0 + global in_1 + global in_2 + global in_3 + global in_4 + global in_5 + global in_6 + global in_7 + + global GPIO + + try: + + GPIO.setmode(GPIO.BOARD) + + GPIO.setwarnings(False) + + #GPIO.setup(out_0, GPIO.OUT) # output 0 + #GPIO.setup(out_1, GPIO.OUT) # output 1 + + GPIO.setup(in_0, GPIO.IN) # input 0 + GPIO.setup(in_1, GPIO.IN) # input 1 + GPIO.setup(in_2, GPIO.IN) # input 2 + GPIO.setup(in_3, GPIO.IN) # input 3 + GPIO.setup(in_4, GPIO.IN) # input 4 + GPIO.setup(in_5, GPIO.IN) # input 5 + GPIO.setup(in_6, GPIO.IN) # input 6 + GPIO.setup(in_7, GPIO.IN) # input 7 + + except: + print( "\n\n" + PROGRAM_NAME + " - Error 3 on RPi.GPIO ! \n\n") + sys.exit(1) + + + print( "\n\n" + PROGRAM_NAME + " - init ok \n\n") + + +#--------------------------------------------------------------- +#--------------------------------------------------------------- +# MAIN + +try: + config = ConfigParser.RawConfigParser() + config.read ( 'IOB.cfg' ) + + SAMPLETIME = config.getfloat ( 'time' , 'SAMPLETIME' ) + TIMEOUTSHORT = config.getfloat ( 'time' , 'TIMEOUTSHORT' ) + TIMEOUTLONG = config.getfloat ( 'time' , 'TIMEOUTLONG' ) + SENDURLTIME = config.getfloat ( 'time' , 'SENDURLTIME' ) + NMAXSEND = config.getint ( 'time' , 'NMAXSEND' ) + + idxMacchina = config.get ( 'id' , 'idxMacchina' ) + + + URLBASE = config.get ( 'web' , 'URLBASE' ) + URLENABLED = config.get('web' , 'URLENABLED') + URLALIVE = config.get ('web' , 'URLALIVE') + URLADV1 = config.get ( 'web' , 'URLADV1' ) + + LOGFILE = config.get ( 'log' , 'LOGFILE' ) + LOGLEVEL = config.get ( 'log' , 'LOGLEVEL' ) + + B_blinking[0] = config.getint ( 'blink' , 'bit0' ) + B_blinking[1] = config.getint ( 'blink' , 'bit1' ) + B_blinking[2] = config.getint ( 'blink' , 'bit2' ) + B_blinking[3] = config.getint ( 'blink' , 'bit3' ) + B_blinking[4] = config.getint ( 'blink' , 'bit4' ) + B_blinking[5] = config.getint ( 'blink' , 'bit5' ) + B_blinking[6] = config.getint ( 'blink' , 'bit6' ) + B_blinking[7] = config.getint ( 'blink' , 'bit7' ) + + MAX_COUNTER_BLINK = config.getint ( 'blink' , 'MAX_COUNTER_BLINK' ) + + # cv 2.1 se bit = 1 allora inverto segnale in ingresso... + + B_inverting[0] = config.getint ( 'invert' , 'bit0' ) + B_inverting[1] = config.getint ( 'invert' , 'bit1' ) + B_inverting[2] = config.getint ( 'invert' , 'bit2' ) + B_inverting[3] = config.getint ( 'invert' , 'bit3' ) + B_inverting[4] = config.getint ( 'invert' , 'bit4' ) + B_inverting[5] = config.getint ( 'invert' , 'bit5' ) + B_inverting[6] = config.getint ( 'invert' , 'bit6' ) + B_inverting[7] = config.getint ( 'invert' , 'bit7' ) + + # cv 2.2 se bit = 1 allora filtro segnali brevi ... + + B_filter[0] = config.getint ( 'filter' , 'bit0' ) + B_filter[1] = config.getint ( 'filter' , 'bit1' ) + B_filter[2] = config.getint ( 'filter' , 'bit2' ) + B_filter[3] = config.getint ( 'filter' , 'bit3' ) + B_filter[4] = config.getint ( 'filter' , 'bit4' ) + B_filter[5] = config.getint ( 'filter' , 'bit5' ) + B_filter[6] = config.getint ( 'filter' , 'bit6' ) + B_filter[7] = config.getint ( 'filter' , 'bit7' ) + + MAX_COUNTER_FILTER = config.getint ( 'filter' , 'MAX_COUNTER_FILTER' ) + + +except: + print "\n\n" + PROGRAM_NAME + ' - Error 4 - in config file ' 'IOB.cfg' + sys.exit(1) + +#-------------------------------------------- +# oggetto Logger +#-------------------------------------------- +try: + logging.basicConfig(level=logging.DEBUG, + format='%(asctime)s %(name)-8s %(levelname)-8s %(message)s', + datefmt='%Y-%m-%d %H:%M:%S', + filename=LOGFILE, + filemode='a' + ) + + # aggiungo 2 logger specifici x queue e send... + logQue = logging.getLogger('queue') + logSnd = logging.getLogger('sendUrl') + logPro = logging.getLogger('program') + +except: + # manda mail o simili - FARE!!! + print "LOG: Impossibile creare file log con nome " + print (LOGFILE) +#-------------------------------------------- + + +print "\n\n" + PROGRAM_NAME + "\n\n" + +global startstatus +startstatus = 1 + +if startstatus == 1: + logPro.info("Avvio Programma" + PROGRAM_NAME) + +## Verifica l'OS e di conseguenza carica il file relativo con metodo di lockfile appropriato + check singola istanza +if os.name == 'posix': + import unix +else: + import win + +logPro.info( "Start " + PROGRAM_NAME ) + + +# lettura file configurazione + +# [id] +# idxMacchina = 2001 +# [time] +# SAMPLETIME = 0.1 +# TIMEOUTSHORT = 200 +# TIMEOUTLONG = 6000 + + +print ( ' idxMacchina = %s' % ( idxMacchina ) ) +print ( ' SAMPLETIME = %4.2f' % ( SAMPLETIME ) ) +print ( ' TIMEOUTSHORT = %4.2f' % ( TIMEOUTSHORT ) ) +print ( ' TIMEOUTLONG = %4.2f' % ( TIMEOUTLONG ) ) +print ( ' SENDURLTIME = %4.2f' % ( SENDURLTIME ) ) +print ( ' URLBASE = %s' % ( URLBASE ) ) +print ( ' URLADV1 = %s' % ( URLADV1 ) ) +print ( ' LOGFILE = %s' % ( LOGFILE ) ) +print ( ' LOGLEVEL = %s' % ( LOGLEVEL ) ) + +# -sys.stdout.write ( 'idxMacchina ?' + idxMacchina + '\n') + +to_short = TIMEOUTSHORT +to_long = TIMEOUTLONG + + +#-------------------------------------------------------------- +# apertura parallela + +try: + import RPi.GPIO as GPIO +except RuntimeError: + print( "\n\n" + PROGRAM_NAME + " - Error 1 - you need superuser privileges") +except: + print( "\n\n" + PROGRAM_NAME + " - Error 2 - you need superuser privileges. USE 'sudo' to run your script\n\n") + sys.exit(1) + + +avviaParallela() + + +#-------------------------------------------------------------- +# MARCO: qui inserire avvio thread di "svuotaCoda" + +# avviaSvuotaCoda +#print "Avvia svuota coda" + +do_every ( SENDURLTIME , svuota_coda ); + +#--------------------------------------------------------------- +# ciclo forever and ever + +old = '' + +#print "Avvio ciclo" +logPro.info("Avvio loop principale") +while 1: + + try: + time.sleep (SAMPLETIME) + except: + logPro.info("First_SLEEP: errore attesa sampletime") + + # lettura dati da IOB + value = readParallelaFiltrata() + + if ( value != '' ) : + if value != old : + #loggo e invio dati + try: + logQue.info( value + ' ['+ cont +']') + errormsglen = 0 + accoda() + contatore() + except: + logPro.error("URLBROWSER: errore registrazione valore e accoda") + pass + #enable e reset timer + to_enable = True + to_short = TIMEOUTSHORT + to_long = TIMEOUTLONG + + old = value + + + # gestione timeout breve + if ( to_enable ) : + to_short = to_short - SAMPLETIME + if to_short <= 0: + #loggo e invio dati + try: + logQue.info( '>' + value + ' ['+ cont +']') + errormsglen = 0 + accoda() + contatore() + except: + logPro.error("URLBROWSER: errore registrazione valore e accoda TO_short") + pass + to_short = TIMEOUTSHORT + to_enable = False # dopo un colpo il timer breve viene disabilitato + to_long = TIMEOUTLONG + + # gestione timeout lungo + to_long = to_long - SAMPLETIME + if to_long <= 0: + #loggo e invio dati + try: + logQue.info( '>>' + value + ' ['+ cont +']') + errormsglen = 0 + accoda() + contatore() + except: + logPro.error("URLBROWSER: errore registrazione valore e accoda TO_long") + pass + to_long = TIMEOUTLONG diff --git a/IOB-PI/vers2.5 8bit/readSeriale.py b/IOB-PI/vers2.5 8bit/readSeriale.py new file mode 100644 index 0000000..3c00644 --- /dev/null +++ b/IOB-PI/vers2.5 8bit/readSeriale.py @@ -0,0 +1,363 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +#--------------------------------------------------------------- + +import serial +import time +import sys +import datetime +import urllib +import ConfigParser +import os, sys + +#--------------------------------------------------------------- + +# COSTANTI +MSGLEN = 9 +TIMEOUTSERIALE = 10 +MAXRETRY = 3 + +# DA FILE CONF +idxMacchina = "2001" +SAMPLETIME = 0.1 +TIMEOUTSHORT = (SAMPLETIME*20) +TIMEOUTLONG = (SAMPLETIME*600) + +# VAR +to_enable = False +to_short = TIMEOUTSHORT +to_long = TIMEOUTLONG +to_serial = TIMEOUTSERIALE +to_retry = MAXRETRY +errormsglen = 0 + +#--------------------------------------------------------------- +# classe logger + +class Logger: + def __init__(self, filename): + try: + self.filename = filename + except: + logga("LOGGER: errore try su self.filename") + sys.exit(1) + def __call__(self, string): + try: + file = open(self.filename, 'a') + file.write('[' + time.strftime("%Y-%m-%d %H:%M:%S") + '] ') + file.write(string + '\n') + file.close() + except: + logga("LOGGER: errore try su scrittura") + sys.exit(1) + +#--------------------------------------------------------------- +# lettura buffer seriale e pulizia caratteri non stampabili +# ritorna '' se non c'è un messaggio buono o il messaggio pulito ( due bytes hex ) +# il messaggio ha il formato xxi00 00xxx + +def readSeriale(): + + global to_serial + global to_retry + global errormsglen + + ret = '' + current = '' + i = 0 + + # ritorna '' se non ci sono abbastanza caratteri + try: + if ser.inWaiting() < MSGLEN : +# +# to_serial = to_serial - 1 # se non mi risponde, faccio un ' altra richiesta.... +# if to_serial <= 0: +# try: +# requestData () +# except: +# logga("SERIALE: errore su requestData") +# sys.exit(1) +# to_serial = TIMEOUTSERIALE # ripristino timer +# to_retry = to_retry - 1 # contatore retry +# if to_retry <= 0: +# logga ( 'IOB not responding' ) +# return ret + logga("SERIALE: errore msglen < 9 char - Errore no. " + str(errormsglen)) + errormsglen = errormsglen +1 + avviaSeriale() + time.sleep(.2) + if errormsglen > 30: + sys.exit(1) + except: + if startstatus == 0: + logga ("Porta SERIALE non disponibile - ser.inWaiting error - exit... - Errore no. " + str(errormsglen)) + errormsglen = errormsglen +1 + avviaSeriale() + time.sleep(.2) + if errormsglen > 30: + sys.exit(1) + + # finchè c'è robba .. leggi e tieni i buoni + to_serial = TIMEOUTSERIALE + to_retry = MAXRETRY + try: + while ser.inWaiting() > 0 : + try: + c = ser.read(1) + except: + logga("SERIALE: errore su try ser.read") + sys.exit(1) + # filtra caratteri non stampabili + if c > ' ' : + current += c + #sys.stdout.write(current + '<<<<\n') + # ora il messaggio ha il formato xxxxxi00 00xxx : cerco la 'i' iniziale + try: + while i < len(current) and current[i] != 'i': + i = i + 1 + except: + logga("SERIALE: errore su ricerca i iniziale") + sys.exit(1) + # se non ho trovato la 'i' restituisco '' + if i == len(current)-1: + return ret + else: + current = current[i+1:i+3] + # richiesta dati ad IOB + requestData() + #sys.stdout.write ( current + '\n') + except: + if startstatus == 0: + logga ('Porta SERIALE non disponibile - ser.inWaiting e filtraggio error...exit') + sys.exit(1) + return current +#--------------------------------------------------------------- +# richiesta dati ad IOB : scrittura su seriale + +def requestData (): + try : + ser.write ("$i" + '\r\n') + ser.flush() + except : + if startstatus == 0: + logga ( "SERIAL: Errore di scrittura/flush") + + +#--------------------------------------------------------------- +#Funzione di scrittura su url con try-except + +def chiamaUrl(): + try: + url = URLBASE + idxMacchina + URLADV1 + value + urllib.urlopen ( url ) + except: + logga ( "NETWORK:Errore http-no com rete-timeout" + url ) + + +#--------------------------------------------------------------- +# Funzione che verifica possibilità di creare log e include testo corrente + +def logga(message) : + try: + log(message) + except : + pass + +#--------------------------------------------------------------- + + +def avviaSeriale(): + global ser + + try: + ser = serial.Serial( + port = comm_port , + baudrate = 9600 , + parity = serial.PARITY_NONE , + stopbits = serial.STOPBITS_ONE , + bytesize = serial.EIGHTBITS + ) + startstatus = 0 + except serial.serialutil.SerialException , e : + try: + if startstatus == 0: + logga ( "SERIAL:Errore apertura seriale - " + comm_port) + except: + pass + sys.stdout.write ( '\nErrore apertura seriale\n\n%s\n\n' % e ) + if errormsglen > 30: + sys.exit (1) + +#--------------------------------------------------------------- +#--------------------------------------------------------------- +# MAIN + +try: + config = ConfigParser.RawConfigParser() + config.read ( 'readSeriale.cfg' ) + + SAMPLETIME = config.getfloat ( 'time' , 'SAMPLETIME' ) + TIMEOUTSHORT = config.getfloat ( 'time' , 'TIMEOUTSHORT' ) + TIMEOUTLONG = config.getfloat ( 'time' , 'TIMEOUTLONG' ) + + idxMacchina = config.get ( 'id' , 'idxMacchina' ) + comm_port = config.get ( 'comm' , 'port' ) + + URLBASE = config.get ( 'web' , 'URLBASE' ) + URLADV1 = config.get ( 'web' , 'URLADV1' ) + + LOGFILE = config.get ( 'log' , 'LOGFILE' ) + LOGLEVEL = config.get ( 'log' , 'LOGLEVEL' ) +except: + sys.exit(1) + +# oggetto Logger +try: + log = Logger(LOGFILE) +except: + # manda mail o simili - FARE!!! + print "LOG: Impossibile creare file log con nome " + print (LOGFILE) + +print '\n\n Read seriale IOB v.0.2 !!!!\n' + +global startstatus +startstatus = 1 + +if startstatus == 1: + logga("Avvio Programma") + +# Verifica l'OS e di conseguenza carica il file relativo con metodo di lockfile appropriato + check singola istanza +if os.name == 'posix': + import unix +else: + import win + +logga ( "Start Read seriale IOB v.0.2") + + +# lettura file configurazione + +# [comm] +# port = /dev/ttyS0 +# [id] +# idxMacchina = 2001 +# [time] +# SAMPLETIME = 0.1 +# TIMEOUTSHORT = 200 +# TIMEOUTLONG = 6000 + +print ( ' comm_port = %s' % ( comm_port ) ) +print ( ' idxMacchina = %s' % ( idxMacchina ) ) +print ( ' SAMPLETIME = %4.2f' % ( SAMPLETIME ) ) +print ( ' TIMEOUTSHORT = %4.2f' % ( TIMEOUTSHORT ) ) +print ( ' TIMEOUTLONG = %4.2f' % ( TIMEOUTLONG ) ) +print ( ' URLBASE = %s' % ( URLBASE ) ) +print ( ' URLADV1 = %s' % ( URLADV1 ) ) +print ( ' LOGFILE = %s' % ( LOGFILE ) ) +print ( ' LOGLEVEL = %s' % ( LOGLEVEL ) ) + +# -sys.stdout.write ( 'idxMacchina ?' + idxMacchina + '\n') + +to_short = TIMEOUTSHORT +to_long = TIMEOUTLONG + + + +#-------------------------------------------------------------- + + +#--------------------------------------------------------------- +# apertura seriale + +avviaSeriale() + +#try: +# ser = serial.Serial( +# port = comm_port , +# baudrate = 9600 , +# parity = serial.PARITY_NONE , +# stopbits = serial.STOPBITS_ONE , +# bytesize = serial.EIGHTBITS +# ) +# print "Initialized!" +#except serial.serialutil.SerialException , e : +# try: +# logga ( "SERIAL:Errore apertura seriale - " + comm_port) +# except: +# pass +# sys.stdout.write ( '\nErrore apertura seriale\n\n%s\n\n' % e ) +# sys.exit (1) + +#--------------------------------------------------------------- +# ciclo forever and ever + +old = '' + +# richiesta dati ad IOB +try: + requestData() +except: + logga("SERIALE: errore sul try di requestData") + sys.exit(1) + + +while 1: + try: + time.sleep (SAMPLETIME) + except: + logga("SERIALE_SLEEP: errore attesa sampletime") + # lettura dati da IOB + try: + value = readSeriale() + except: + if startstatus == 0: + logga("errore PRIMA LETTURA SERIALE") + sys.exit(1) + if ( value != '' ) : + if value != old : + #loggo e invio dati + try: + logga ( value ) + errormsglen = 0 + chiamaUrl() + except: + logga("URLBROWSER: errore registrazione valore e chiamaUrl") + pass + #enable e reset timer + to_enable = True + to_short = TIMEOUTSHORT + to_long = TIMEOUTLONG + + old = value + + + # gestione timeout breve + if ( to_enable ) : + to_short = to_short - SAMPLETIME + if to_short <= 0: + #loggo e invio dati + try: + logga ( '>' + value ) + errormsglen = 0 + chiamaUrl() + except: + pass + to_short = TIMEOUTSHORT + to_enable = False # dopo un colpo il timer breve viene disabilitato + to_long = TIMEOUTLONG + + # gestione timeout lungo + to_long = to_long - SAMPLETIME + if to_long <= 0: + #loggo e invio dati + try: + logga ( '>>' + value ) + errormsglen = 0 + chiamaUrl() + except: + pass + to_long = TIMEOUTLONG + + diff --git a/IOB-PI/vers2.5 8bit/saveTemp.sh b/IOB-PI/vers2.5 8bit/saveTemp.sh new file mode 100644 index 0000000..a2cd2be --- /dev/null +++ b/IOB-PI/vers2.5 8bit/saveTemp.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +#salva la temperatura CPU e GPU su chiamata... + +# imposto logfile... +logFile="/var/log/logTemp.txt" + +cpuTemp0=$(cat /sys/class/thermal/thermal_zone0/temp) +cpuTemp1=$(($cpuTemp0/1000)) +cpuTemp2=$(($cpuTemp0/100)) +cpuTempM=$(($cpuTemp2 % $cpuTemp1)) + +gpuTemp=`vcgencmd measure_temp` + +loadAvg=`cat /proc/loadavg` + +echo "$(date) | CPU: temp=$cpuTemp1.$cpuTempM ºC | GPU: $gpuTemp | LoadAvg: $loadAvg" >> $logFile diff --git a/IOB-PI/vers2.5 8bit/sendReboot.py b/IOB-PI/vers2.5 8bit/sendReboot.py new file mode 100644 index 0000000..021c400 --- /dev/null +++ b/IOB-PI/vers2.5 8bit/sendReboot.py @@ -0,0 +1,130 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# sendReboot v. 1.8 + +#--------------------------------------------------------------- + + +import time +import sys + + +from datetime import datetime + +import urllib +import ConfigParser +import os, sys + +import logging + +import time + +#--------------------------------------------------------------- + +# COSTANTI +PROGRAM_NAME = "SendReboot IOB-pi v.1.8" + +# DA FILE CONF +idxMacchina = "99" + +# registro se ho fatto chiamata +global numTry +numTry = 1 + + +#--------------------------------------------------------------- +#Funzione di scrittura su url con try-except +#--------------------------------------------------------------- + +def chiamaUrl(numTry): + + try: + urllib.urlopen ( url ) + numTry = numTry + 10 + except Exception, e: + print e + logging.info ( e ) + print "Url aforte" , url + return numTry + + +#--------------------------------------------------------------- +# Funzione di recupero mac address per poterlo inviare a MPIO +#--------------------------------------------------------------- +def getMAC(interface): + # Return the MAC address of interface + try: + str = open('/sys/class/net/' + interface + '/address').read() + except: + str = "00:00:00:00:00:00" + return str[0:17] + +#--------------------------------------------------------------- +# MAIN +#--------------------------------------------------------------- + +try: + config = ConfigParser.RawConfigParser() + config.read ( 'IOB.cfg' ) + + idxMacchina = config.get ( 'id' , 'idxMacchina' ) + + + URLREBO = config.get ( 'web' , 'URLREBO' ) + + LOGFILE = config.get ( 'log' , 'LOGREBO' ) +except: + print "\n\n" + PROGRAM_NAME + ' - Error 4 - in config file ' 'IOB.cfg' + sys.exit(1) + + +#-------------------------------------------- +# oggetto Logger +#-------------------------------------------- +try: +# log = Logger(LOGFILE) + logging.basicConfig(level=logging.DEBUG, + format='%(asctime)s %(name)-8s %(levelname)-8s %(message)s', + datefmt='%Y-%m-%d %H:%M:%S', + filename=LOGFILE, + filemode='a') + +except: + # manda mail o simili - FARE!!! + print "LOG: Impossibile creare file log con nome " + print (LOGFILE) +#-------------------------------------------- + + +print "\n\n" + PROGRAM_NAME + "\n\n" + +global startstatus +startstatus = 1 + +if startstatus == 1: + logging.info("Avvio Programma " + PROGRAM_NAME) + + +# lettura file configurazione +print ( ' idxMacchina = %s' % ( idxMacchina ) ) +print ( ' URLREBO = %s' % ( URLREBO ) ) +print ( ' LOGFILE = %s' % ( LOGFILE ) ) + +# lettura mac address +myMac = getMAC('eth0') +print ( ' MAC Address = %s' % ( myMac ) ) + +# configuro URL da inviare +url = URLREBO + idxMacchina + "&mac=" + myMac + +# modifica: cerco se ho inviato segnale altrimenti ritento invio... +while (numTry < 11): + logging.info("Tentativo invio URL: " + `numTry` ) + numTry = chiamaUrl(numTry) + time.sleep(3) + numTry = numTry + 1 + + +# registro che ho inviato! +logging.info("Inviato segnale di reboot!: " + url ) diff --git a/IOB-PI/vers2.5 8bit/sendRebootIOB b/IOB-PI/vers2.5 8bit/sendRebootIOB new file mode 100644 index 0000000..191bfff --- /dev/null +++ b/IOB-PI/vers2.5 8bit/sendRebootIOB @@ -0,0 +1,33 @@ +#!/bin/sh - +# +### BEGIN INIT INFO +# Provides: sendReboot +# Required-Start: $network $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Steamware's IOB reboot signal +# Description: Steamware's sendReboot segnalazione reboot dispositivo +### END INIT INFO + +#! /bin/sh +# /etc/init.d/sendReboot + + + +export HOME +case "$1" in + start) + cd /home/pi/steamware + echo "Starting sendReboot" + /usr/bin/python ./sendReboot.py 2>&1 & + echo "Verifica Rete e file IOB" + /usr/local/bin/setIobConf.sh + ;; + *) + echo "Usage: /etc/init.d/sendReboot {start}" + exit 1 + ;; +esac +exit 0 + diff --git a/IOB-PI/vers2.5 8bit/sendRebootIOB.service b/IOB-PI/vers2.5 8bit/sendRebootIOB.service new file mode 100644 index 0000000..48e3690 --- /dev/null +++ b/IOB-PI/vers2.5 8bit/sendRebootIOB.service @@ -0,0 +1,22 @@ +[Unit] +SourcePath=/etc/init.d/sendRebootIOB +Description=LSB: Steamware's IOB reboot signal +Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target shutdown.target +Wants=network-online.target +After=network.target network-online.target auditd.service +Conflicts=shutdown.target + +[Service] +Type=forking +Restart=no +TimeoutSec=5min +IgnoreSIGPIPE=no +KillMode=process +GuessMainPID=no +RemainAfterExit=yes +SysVStartPriority=2 +ExecStart=/etc/init.d/sendRebootIOB start +ExecStop=/etc/init.d/sendRebootIOB stop + +[Install] +WantedBy=multi-user.target diff --git a/IOB-PI/vers2.5 8bit/setIobConf.sh b/IOB-PI/vers2.5 8bit/setIobConf.sh new file mode 100644 index 0000000..30b4781 --- /dev/null +++ b/IOB-PI/vers2.5 8bit/setIobConf.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# verifico se sia rete donati o rete steamware o offline... +netStatus=`cat /sys/class/net/eth0/operstate` +iaddr=`ifconfig eth0 | grep "inet addr" | cut -d ':' -f 2 | cut -d ' ' -f 1` + +cd /home/pi/steamware + +if [[ $netStatus != "up" ]] +then + echo "Siamo Offline, pagina demo!" +elif [[ $iaddr == "10.74.82"* ]] +then + cp IOB.cfg.steamware IOB.cfg -f + echo "Siamo in Steamware!" +elif [[ $iaddr == "192.168.51"* ]] +then + cp IOB.cfg.donati IOB.cfg -f + echo "Siamo a Passirano!" +else + echo "Siamo altrove, pagina demo!" +fi + +echo "$iaddr" + +chown pi:pi * \ No newline at end of file diff --git a/IOB-PI/vers2.5 8bit/unix.py b/IOB-PI/vers2.5 8bit/unix.py new file mode 100644 index 0000000..12fb3dc --- /dev/null +++ b/IOB-PI/vers2.5 8bit/unix.py @@ -0,0 +1,31 @@ +import fcntl +import os +import logging + +#--------------------------------------------------------------- +# meccanismo di file lock per evitare multiple instances +# The function will try to lock the file specified , if it success, return True, else return False. +# The nice thing is that the lock will be dropped when the program terminates. +# >>>Use : +# if not lockFile(".lock.pod"): +# sys.exit(0) + +def lockFile ( lockfile ) : + + fd = os.open ( lockfile , os.O_CREAT | os.O_TRUNC | os.O_WRONLY ) + try: + # Request exclusive (EX) non-blocking (NB) advisory lock. + fcntl.lockf ( fd , fcntl.LOCK_EX | fcntl.LOCK_NB ) + except IOError: + return False + + return True + +if not lockFile ( ".lockfile" ) : + print '\n noi non siamo soli ...\n' + logging.error( "LOCK: Piu istanze aperte") + #sys.exit ( 0 ) + +#- print '\n running alone ...\n' + + diff --git a/IOB-PI/vers2.5 8bit/unix.pyc b/IOB-PI/vers2.5 8bit/unix.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f528212e734a67eb0c5153f80c50aace6d1f362a GIT binary patch literal 669 zcma)3%Wl&^6g_urw~d>yU+>A9OYr`N%@ph^{s}cOyT^nX-Q@*l0+qlI zZU`U)Q~_=XCPx+G-H{Yng{UHzqsEV#q&qxT{o$3*iJ_y5*oJI|Szv(`;rbsCJ`6B$ z*${&pf$xN?1K0?w9bA(KyWa2lGMzS$5!wzeVzeh9A{%3JX7@2k9bcYy9f_mW#)fX& z$j0t67@rS|(c9@Qo)#zh(C+#CX)(@^KQSk;m^ZfesMhm~g>OC{4?mob&K__+@c8|B z)V8|y-G^mur01KqTbVk3Kip4Iwe&YyR4M1-oq5Kn|3$B5f1~=w%5wd+Y-NAjsLO0~ zb$|Gf5BIp$I9(9WDG&$Lqez$z$JyO{^OU1FX|!T%5~IqsPK>Tql4V(Jo^aL4c#(Wm z+e8^#Hs54YZe(j^>U0<0F@Tp=>*Z24%i@tsxRP{AA8!BO5?-!#wXNkV_cmTam-vf2 I`(29YFVCEWI{*Lx literal 0 HcmV?d00001 diff --git a/IOB-PI/vers2.5 8bit/update-RPI-IOB.sh b/IOB-PI/vers2.5 8bit/update-RPI-IOB.sh new file mode 100644 index 0000000..d521931 --- /dev/null +++ b/IOB-PI/vers2.5 8bit/update-RPI-IOB.sh @@ -0,0 +1,54 @@ +#|/bin/bash + +#installa il necessario per RPI-3-IOB partendo dal contenuto della folder /home/pi/steamware + +#step 1: creo file di log nuovi +rm /var/log/log*.txt +rm /var/log/MapoIOB* +rm /home/pi/steamware/log*.txt + +touch /var/log/logReboot.txt +touch /var/log/logTemp.txt +touch /var/log/MapoIOB.log + +ln -sf /var/log/logReboot.txt /home/pi/steamware/logReboot.txt +ln -sf /var/log/logTemp.txt /home/pi/steamware/logTemp.txt +ln -sf /var/log/MapoIOB.log /home/pi/steamware/logfile.txt + +chown pi:pi /home/pi -R +chmod 666 /var/log/log*.txt +chmod 666 /var/log/MapoIOB.log + +#step 2: copio files in /usr/local/bin +cd /home/pi/steamware +chmod +x *.sh +cp *.sh /usr/local/bin/ + +#step 3: copio files x logrotate... +cd /home/pi/steamware +cp MapoIOB_logrot /etc/logrotate.d/ + +# step 4: copio target systemd in avvio... +cp -f sendRebootIOB /etc/init.d/sendRebootIOB +cp -f sendRebootIOB.service /etc/systemd/system/sendRebootIOB.service +#echo "" +#echo "-----------------------------------------------" +#echo "Completare registrazione servizio avvio: digitare i seguenti comandi" +#echo "systemctl enable sendRebootIOB" +#echo "systemctl daemon-reload" +#echo "systemctl status sendRebootIOB" +#echo "-----------------------------------------------" +#echo "" + +# step 5: copio target MapoIOB in avvio... +cp -f MapoIOB /etc/init.d/MapoIOB +cp -f MapoIOB.service /etc/systemd/system/MapoIOB.service + + +#echo "" +#echo "" +#echo "-----------------------------------------------" +#echo "Infine creare voce crontab che salvi temperatura CPU/GPU ogni 20 minuti..." +#echo "crontab -e" +#echo "*/20 * * * * /usr/local/bin/saveTemp.sh" +#echo "-----------------------------------------------" diff --git a/IOB-PI/vers2.5 8bit/win.py b/IOB-PI/vers2.5 8bit/win.py new file mode 100644 index 0000000..f679f60 --- /dev/null +++ b/IOB-PI/vers2.5 8bit/win.py @@ -0,0 +1,32 @@ +import win32api +print " Running on WINDOWS\n" +import os +#--------------------------------------------------------------- +# meccanismo di file lock per evitare multiple instances +# The function will try to lock the file specified , if it success, return True, else return False. +# The nice thing is that the lock will be dropped when the program terminates. +# >>>Use : +# if not lockFile(".lock.pod"): +# sys.exit(0) + +def lockFile ( lockfile ) : + try: + fd = os.open ( lockfile , os.O_CREAT | os.O_TRUNC | os.O_WRONLY ) + except: + logga("Errore nel file WIN.PY per FD") + try: + # Request exclusive (EX) non-blocking (NB) advisory lock. + #fcntl.lockf ( fd , fcntl.LOCK_EX | fcntl.LOCK_NB ) + print " Dummy Method! Completa Lockfile\n" + except IOError: + return False + + return True +try: + if not lockFile ( ".lockfile" ) : + print '\n noi non siamo soli ...\n' + logga ( "LOCK: Piu istanze aperte") + sys.exit ( 0 ) +except: + logga("if not lockfile NON RIUSCITO in file WIN.PY") + sys.exit(1) From e06da6057b7bac6548f0dad6364b5ef19e349ed8 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 18 Jul 2023 16:48:38 +0200 Subject: [PATCH 3/4] Fix conf x IIS01 (.218) al posto di IIS02 (.219) --- IOB-PI/Donati/1023_185/IOB.cfg.steamware | 8 ++++---- IOB-PI/Donati/1024_177/IOB.cfg.steamware | 8 ++++---- IOB-PI/Donati/1025_178/IOB.cfg.steamware | 8 ++++---- IOB-PI/Donati/1026_180/IOB.cfg.steamware | 8 ++++---- IOB-PI/Donati/1501_172/restartBrowser.sh | 4 ++-- IOB-PI/Donati/1501_172/startBrowser.sh | 4 ++-- IOB-PI/Donati/1502_173/logBrowser.txt | 4 ++-- IOB-PI/Donati/1502_173/startBrowser.sh | 4 ++-- IOB-PI/Donati/1503_174/logBrowser.txt | 4 ++-- IOB-PI/Donati/1503_174/startBrowser.sh | 4 ++-- IOB-PI/Donati/1504_175/logBrowser.txt | 4 ++-- IOB-PI/Donati/1504_175/startBrowser.sh | 4 ++-- IOB-PI/Donati/2001_184/IOB.cfg.steamware | 8 ++++---- IOB-PI/Donati/2002_183/IOB.cfg.steamware | 8 ++++---- IOB-PI/Donati/2003_187/IOB.cfg.steamware | 8 ++++---- IOB-PI/Donati/2004_186/IOB.cfg.steamware | 8 ++++---- IOB-PI/Donati/2005_179/IOB.cfg.steamware | 8 ++++---- IOB-PI/Donati/2006_188/IOB.cfg.steamware | 8 ++++---- IOB-PI/Donati/2007_181/IOB.cfg.steamware | 8 ++++---- IOB-PI/Donati/2008_189/IOB.cfg.steamware | 8 ++++---- IOB-PI/Donati/2009_190/IOB.cfg.steamware | 8 ++++---- IOB-PI/Donati/2010_186/IOB.cfg.steamware | 8 ++++---- IOB-PI/IOB-SER/Testing_Iniziale/IOB.cfg | 8 ++++---- IOB-PI/Jetco/167 - GLD25/steamware/IOB.cfg.steamware | 8 ++++---- IOB-PI/Jetco/168 - GD32/steamware/IOB.cfg.steamware | 8 ++++---- IOB-PI/Jetco/std_v_2/IOB.cfg.steamware | 8 ++++---- IOB-PI/vers1.8 8bit/IOB.cfg | 8 ++++---- IOB-PI/vers1.8 8bit/IOB.cfg.steamware | 8 ++++---- IOB-PI/vers2.4 12bit/IOB.cfg | 8 ++++---- IOB-PI/vers2.4 12bit/IOB.cfg.steamware | 8 ++++---- IOB-PI/vers2.4 8bit/IOB.cfg | 8 ++++---- IOB-PI/vers2.4 8bit/IOB.cfg.steamware | 8 ++++---- IOB-PI/vers2.5 8bit/IOB.cfg | 8 ++++---- IOB-PI/vers2.5 8bit/IOB.cfg.steamware | 8 ++++---- MP-MON-PI/IOB-MON-2021.12/startBrowser.sh | 2 +- MP-MON-PI/RPI-MON-00001/startBrowser.sh | 4 ++-- MP-MON-PI/RPI-MON-00002/startBrowser.sh | 4 ++-- MP-MON-PI/RPI-MON-00003/startBrowser.sh | 4 ++-- MP-MON-PI/RPI-MON-00004/startBrowser.sh | 4 ++-- MP-MON-PI/RPI-MON-TEMPL/restartBrowser.sh | 4 ++-- MP-MON-PI/RPI-MON-TEMPL/startBrowser.sh | 4 ++-- MP-MON-PI/RPI-MON-V4/startBrowser.sh | 2 +- 42 files changed, 134 insertions(+), 134 deletions(-) diff --git a/IOB-PI/Donati/1023_185/IOB.cfg.steamware b/IOB-PI/Donati/1023_185/IOB.cfg.steamware index 6246b6a..51e9778 100644 --- a/IOB-PI/Donati/1023_185/IOB.cfg.steamware +++ b/IOB-PI/Donati/1023_185/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MPIO/inputIOB.aspx?idxMacchina= -URLALIVE = http://10.74.82.219/MPIO/Alive.aspx -URLENABLED = http://10.74.82.219/MPIO/Enabled.aspx?idxMacchina= +URLBASE = http://10.74.82.218/MPIO/inputIOB.aspx?idxMacchina= +URLALIVE = http://10.74.82.218/MPIO/Alive.aspx +URLENABLED = http://10.74.82.218/MPIO/Enabled.aspx?idxMacchina= URLADV1 = &valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.20 diff --git a/IOB-PI/Donati/1024_177/IOB.cfg.steamware b/IOB-PI/Donati/1024_177/IOB.cfg.steamware index 6246b6a..51e9778 100644 --- a/IOB-PI/Donati/1024_177/IOB.cfg.steamware +++ b/IOB-PI/Donati/1024_177/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MPIO/inputIOB.aspx?idxMacchina= -URLALIVE = http://10.74.82.219/MPIO/Alive.aspx -URLENABLED = http://10.74.82.219/MPIO/Enabled.aspx?idxMacchina= +URLBASE = http://10.74.82.218/MPIO/inputIOB.aspx?idxMacchina= +URLALIVE = http://10.74.82.218/MPIO/Alive.aspx +URLENABLED = http://10.74.82.218/MPIO/Enabled.aspx?idxMacchina= URLADV1 = &valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.20 diff --git a/IOB-PI/Donati/1025_178/IOB.cfg.steamware b/IOB-PI/Donati/1025_178/IOB.cfg.steamware index 6246b6a..51e9778 100644 --- a/IOB-PI/Donati/1025_178/IOB.cfg.steamware +++ b/IOB-PI/Donati/1025_178/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MPIO/inputIOB.aspx?idxMacchina= -URLALIVE = http://10.74.82.219/MPIO/Alive.aspx -URLENABLED = http://10.74.82.219/MPIO/Enabled.aspx?idxMacchina= +URLBASE = http://10.74.82.218/MPIO/inputIOB.aspx?idxMacchina= +URLALIVE = http://10.74.82.218/MPIO/Alive.aspx +URLENABLED = http://10.74.82.218/MPIO/Enabled.aspx?idxMacchina= URLADV1 = &valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.20 diff --git a/IOB-PI/Donati/1026_180/IOB.cfg.steamware b/IOB-PI/Donati/1026_180/IOB.cfg.steamware index 6246b6a..51e9778 100644 --- a/IOB-PI/Donati/1026_180/IOB.cfg.steamware +++ b/IOB-PI/Donati/1026_180/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MPIO/inputIOB.aspx?idxMacchina= -URLALIVE = http://10.74.82.219/MPIO/Alive.aspx -URLENABLED = http://10.74.82.219/MPIO/Enabled.aspx?idxMacchina= +URLBASE = http://10.74.82.218/MPIO/inputIOB.aspx?idxMacchina= +URLALIVE = http://10.74.82.218/MPIO/Alive.aspx +URLENABLED = http://10.74.82.218/MPIO/Enabled.aspx?idxMacchina= URLADV1 = &valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.20 diff --git a/IOB-PI/Donati/1501_172/restartBrowser.sh b/IOB-PI/Donati/1501_172/restartBrowser.sh index 4cf4bd5..5d21387 100644 --- a/IOB-PI/Donati/1501_172/restartBrowser.sh +++ b/IOB-PI/Donati/1501_172/restartBrowser.sh @@ -47,7 +47,7 @@ url='file:///home/pi/steamware/MP-MON-DEMO.html' if [[ $iaddr == "10.74.82"* ]] then - url='http://10.74.82.219/MP-MON' + url='http://10.74.82.218/MP-MON' echo "$(date) | Siamo in Steamware, imposto pagina a $url!" >> $logFile elif [[ $iaddr == "192.168.51"* ]] then @@ -62,6 +62,6 @@ echo "$(date) | chiusura processi precedenti!" >> $logFile killall -9 chromium-browser # avvio chromium in KIOSK senza segnalazione errori... -#chromium-browser --noerrdialogs --kiosk http://10.74.82.219/MP-MON --incognito --disable-translate +#chromium-browser --noerrdialogs --kiosk http://10.74.82.218/MP-MON --incognito --disable-translate echo "$(date) | apertura nuovo URL!" >> $logFile DISPLAY=:0.0 chromium-browser --noerrdialogs --kiosk $url --incognito --disable-translate diff --git a/IOB-PI/Donati/1501_172/startBrowser.sh b/IOB-PI/Donati/1501_172/startBrowser.sh index 58a9f7a..4ef12c5 100644 --- a/IOB-PI/Donati/1501_172/startBrowser.sh +++ b/IOB-PI/Donati/1501_172/startBrowser.sh @@ -47,7 +47,7 @@ url='file:///home/pi/steamware/MP-MON-DEMO.html' if [[ $iaddr == "10.74.82"* ]] then - url='http://10.74.82.219/MP-MON' + url='http://10.74.82.218/MP-MON' echo "$(date) | Siamo in Steamware, imposto pagina a $url!" >> $logFile elif [[ $iaddr == "192.168.51"* ]] then @@ -61,6 +61,6 @@ fi killall -9 chromium-browser # avvio chromium in KIOSK senza segnalazione errori... -#chromium-browser --noerrdialogs --kiosk http://10.74.82.219/MP-MON --incognito --disable-translate +#chromium-browser --noerrdialogs --kiosk http://10.74.82.218/MP-MON --incognito --disable-translate chromium-browser --noerrdialogs --kiosk $url --incognito --disable-translate diff --git a/IOB-PI/Donati/1502_173/logBrowser.txt b/IOB-PI/Donati/1502_173/logBrowser.txt index 97a35ee..d3afe3d 100644 --- a/IOB-PI/Donati/1502_173/logBrowser.txt +++ b/IOB-PI/Donati/1502_173/logBrowser.txt @@ -1,9 +1,9 @@ ven 14 ott 2016, 16.24.45, CEST | Cavo connesso, eth: up ven 14 ott 2016, 16.24.45, CEST | IP: 10.74.82.23 -ven 14 ott 2016, 16.24.45, CEST | Siamo in Steamware, imposto pagina a http://10.74.82.219/MP-MON! +ven 14 ott 2016, 16.24.45, CEST | Siamo in Steamware, imposto pagina a http://10.74.82.218/MP-MON! ven 14 ott 2016, 16.29.23, CEST | Cavo connesso, eth: up ven 14 ott 2016, 16.29.23, CEST | IP: 10.74.82.23 -ven 14 ott 2016, 16.29.23, CEST | Siamo in Steamware, imposto pagina a http://10.74.82.219/MP-MON! +ven 14 ott 2016, 16.29.23, CEST | Siamo in Steamware, imposto pagina a http://10.74.82.218/MP-MON! sab 19 nov 2016, 07.17.19, CET | Cavo connesso, eth: up sab 19 nov 2016, 07.17.19, CET | IP: 192.168.51.173 sab 19 nov 2016, 07.17.19, CET | Siamo a Passirano, imposto pagina a http://192.168.51.71/MP-MON! diff --git a/IOB-PI/Donati/1502_173/startBrowser.sh b/IOB-PI/Donati/1502_173/startBrowser.sh index 8af1a7d..8204772 100644 --- a/IOB-PI/Donati/1502_173/startBrowser.sh +++ b/IOB-PI/Donati/1502_173/startBrowser.sh @@ -47,7 +47,7 @@ url='file:///home/pi/steamware/MP-MON-DEMO.html' if [[ $iaddr == "10.74.82"* ]] then - url='http://10.74.82.219/MP-MON' + url='http://10.74.82.218/MP-MON' echo "$(date) | Siamo in Steamware, imposto pagina a $url!" >> $logFile elif [[ $iaddr == "192.168.51"* ]] then @@ -61,6 +61,6 @@ fi killall -9 chromium-browser # avvio chromium in KIOSK senza segnalazione errori... -#chromium-browser --noerrdialogs --kiosk http://10.74.82.219/MP-MON --incognito --disable-translate +#chromium-browser --noerrdialogs --kiosk http://10.74.82.218/MP-MON --incognito --disable-translate chromium-browser --noerrdialogs --kiosk $url --incognito --disable-translate diff --git a/IOB-PI/Donati/1503_174/logBrowser.txt b/IOB-PI/Donati/1503_174/logBrowser.txt index 363652c..ca1ce32 100644 --- a/IOB-PI/Donati/1503_174/logBrowser.txt +++ b/IOB-PI/Donati/1503_174/logBrowser.txt @@ -1,9 +1,9 @@ ven 14 ott 2016, 16.46.26, CEST | Cavo connesso, eth: up ven 14 ott 2016, 16.46.26, CEST | IP: 10.74.82.23 -ven 14 ott 2016, 16.46.26, CEST | Siamo in Steamware, imposto pagina a http://10.74.82.219/MP-MON! +ven 14 ott 2016, 16.46.26, CEST | Siamo in Steamware, imposto pagina a http://10.74.82.218/MP-MON! ven 14 ott 2016, 16.47.44, CEST | Cavo connesso, eth: up ven 14 ott 2016, 16.47.44, CEST | IP: 10.74.82.23 -ven 14 ott 2016, 16.47.44, CEST | Siamo in Steamware, imposto pagina a http://10.74.82.219/MP-MON! +ven 14 ott 2016, 16.47.44, CEST | Siamo in Steamware, imposto pagina a http://10.74.82.218/MP-MON! sab 17 dic 2016, 11.17.20, CET | Cavo connesso, eth: up lun 19 dic 2016, 06.44.42, CET | IP: 192.168.51.174 lun 19 dic 2016, 06.44.42, CET | Siamo a Passirano, imposto pagina a http://192.168.51.71/MP-MON! diff --git a/IOB-PI/Donati/1503_174/startBrowser.sh b/IOB-PI/Donati/1503_174/startBrowser.sh index 8af1a7d..8204772 100644 --- a/IOB-PI/Donati/1503_174/startBrowser.sh +++ b/IOB-PI/Donati/1503_174/startBrowser.sh @@ -47,7 +47,7 @@ url='file:///home/pi/steamware/MP-MON-DEMO.html' if [[ $iaddr == "10.74.82"* ]] then - url='http://10.74.82.219/MP-MON' + url='http://10.74.82.218/MP-MON' echo "$(date) | Siamo in Steamware, imposto pagina a $url!" >> $logFile elif [[ $iaddr == "192.168.51"* ]] then @@ -61,6 +61,6 @@ fi killall -9 chromium-browser # avvio chromium in KIOSK senza segnalazione errori... -#chromium-browser --noerrdialogs --kiosk http://10.74.82.219/MP-MON --incognito --disable-translate +#chromium-browser --noerrdialogs --kiosk http://10.74.82.218/MP-MON --incognito --disable-translate chromium-browser --noerrdialogs --kiosk $url --incognito --disable-translate diff --git a/IOB-PI/Donati/1504_175/logBrowser.txt b/IOB-PI/Donati/1504_175/logBrowser.txt index 7054b67..69967be 100644 --- a/IOB-PI/Donati/1504_175/logBrowser.txt +++ b/IOB-PI/Donati/1504_175/logBrowser.txt @@ -1,9 +1,9 @@ ven 14 ott 2016, 16.41.10, CEST | Cavo connesso, eth: up ven 14 ott 2016, 16.41.10, CEST | IP: 10.74.82.23 -ven 14 ott 2016, 16.41.10, CEST | Siamo in Steamware, imposto pagina a http://10.74.82.219/MP-MON! +ven 14 ott 2016, 16.41.10, CEST | Siamo in Steamware, imposto pagina a http://10.74.82.218/MP-MON! ven 14 ott 2016, 16.43.19, CEST | Cavo connesso, eth: up ven 14 ott 2016, 16.43.19, CEST | IP: 10.74.82.23 -ven 14 ott 2016, 16.43.19, CEST | Siamo in Steamware, imposto pagina a http://10.74.82.219/MP-MON! +ven 14 ott 2016, 16.43.19, CEST | Siamo in Steamware, imposto pagina a http://10.74.82.218/MP-MON! ven 16 dic 2016, 19.17.19, CET | Cavo connesso, eth: up ven 16 dic 2016, 19.17.19, CET | IP: 192.168.51.175 ven 16 dic 2016, 19.17.19, CET | Siamo a Passirano, imposto pagina a http://192.168.51.71/MP-MON! diff --git a/IOB-PI/Donati/1504_175/startBrowser.sh b/IOB-PI/Donati/1504_175/startBrowser.sh index 8af1a7d..8204772 100644 --- a/IOB-PI/Donati/1504_175/startBrowser.sh +++ b/IOB-PI/Donati/1504_175/startBrowser.sh @@ -47,7 +47,7 @@ url='file:///home/pi/steamware/MP-MON-DEMO.html' if [[ $iaddr == "10.74.82"* ]] then - url='http://10.74.82.219/MP-MON' + url='http://10.74.82.218/MP-MON' echo "$(date) | Siamo in Steamware, imposto pagina a $url!" >> $logFile elif [[ $iaddr == "192.168.51"* ]] then @@ -61,6 +61,6 @@ fi killall -9 chromium-browser # avvio chromium in KIOSK senza segnalazione errori... -#chromium-browser --noerrdialogs --kiosk http://10.74.82.219/MP-MON --incognito --disable-translate +#chromium-browser --noerrdialogs --kiosk http://10.74.82.218/MP-MON --incognito --disable-translate chromium-browser --noerrdialogs --kiosk $url --incognito --disable-translate diff --git a/IOB-PI/Donati/2001_184/IOB.cfg.steamware b/IOB-PI/Donati/2001_184/IOB.cfg.steamware index ac044d0..920043f 100644 --- a/IOB-PI/Donati/2001_184/IOB.cfg.steamware +++ b/IOB-PI/Donati/2001_184/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/Donati/2002_183/IOB.cfg.steamware b/IOB-PI/Donati/2002_183/IOB.cfg.steamware index ac044d0..920043f 100644 --- a/IOB-PI/Donati/2002_183/IOB.cfg.steamware +++ b/IOB-PI/Donati/2002_183/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/Donati/2003_187/IOB.cfg.steamware b/IOB-PI/Donati/2003_187/IOB.cfg.steamware index ac044d0..920043f 100644 --- a/IOB-PI/Donati/2003_187/IOB.cfg.steamware +++ b/IOB-PI/Donati/2003_187/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/Donati/2004_186/IOB.cfg.steamware b/IOB-PI/Donati/2004_186/IOB.cfg.steamware index ac044d0..920043f 100644 --- a/IOB-PI/Donati/2004_186/IOB.cfg.steamware +++ b/IOB-PI/Donati/2004_186/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/Donati/2005_179/IOB.cfg.steamware b/IOB-PI/Donati/2005_179/IOB.cfg.steamware index 22072d4..724f532 100644 --- a/IOB-PI/Donati/2005_179/IOB.cfg.steamware +++ b/IOB-PI/Donati/2005_179/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MP/IO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/Donati/2006_188/IOB.cfg.steamware b/IOB-PI/Donati/2006_188/IOB.cfg.steamware index 22072d4..724f532 100644 --- a/IOB-PI/Donati/2006_188/IOB.cfg.steamware +++ b/IOB-PI/Donati/2006_188/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MP/IO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/Donati/2007_181/IOB.cfg.steamware b/IOB-PI/Donati/2007_181/IOB.cfg.steamware index ac044d0..920043f 100644 --- a/IOB-PI/Donati/2007_181/IOB.cfg.steamware +++ b/IOB-PI/Donati/2007_181/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/Donati/2008_189/IOB.cfg.steamware b/IOB-PI/Donati/2008_189/IOB.cfg.steamware index 22072d4..724f532 100644 --- a/IOB-PI/Donati/2008_189/IOB.cfg.steamware +++ b/IOB-PI/Donati/2008_189/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MP/IO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/Donati/2009_190/IOB.cfg.steamware b/IOB-PI/Donati/2009_190/IOB.cfg.steamware index 22072d4..724f532 100644 --- a/IOB-PI/Donati/2009_190/IOB.cfg.steamware +++ b/IOB-PI/Donati/2009_190/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MP/IO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/Donati/2010_186/IOB.cfg.steamware b/IOB-PI/Donati/2010_186/IOB.cfg.steamware index ac044d0..920043f 100644 --- a/IOB-PI/Donati/2010_186/IOB.cfg.steamware +++ b/IOB-PI/Donati/2010_186/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/IOB-SER/Testing_Iniziale/IOB.cfg b/IOB-PI/IOB-SER/Testing_Iniziale/IOB.cfg index db379b6..367ae94 100644 --- a/IOB-PI/IOB-SER/Testing_Iniziale/IOB.cfg +++ b/IOB-PI/IOB-SER/Testing_Iniziale/IOB.cfg @@ -6,11 +6,11 @@ port = COM1 idxMacchina = 0001 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MP/IO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/Jetco/167 - GLD25/steamware/IOB.cfg.steamware b/IOB-PI/Jetco/167 - GLD25/steamware/IOB.cfg.steamware index 9d9c1de..c51b34b 100644 --- a/IOB-PI/Jetco/167 - GLD25/steamware/IOB.cfg.steamware +++ b/IOB-PI/Jetco/167 - GLD25/steamware/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 0001 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MP/IO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/Jetco/168 - GD32/steamware/IOB.cfg.steamware b/IOB-PI/Jetco/168 - GD32/steamware/IOB.cfg.steamware index 9d9c1de..c51b34b 100644 --- a/IOB-PI/Jetco/168 - GD32/steamware/IOB.cfg.steamware +++ b/IOB-PI/Jetco/168 - GD32/steamware/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 0001 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MP/IO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/Jetco/std_v_2/IOB.cfg.steamware b/IOB-PI/Jetco/std_v_2/IOB.cfg.steamware index 9d9c1de..c51b34b 100644 --- a/IOB-PI/Jetco/std_v_2/IOB.cfg.steamware +++ b/IOB-PI/Jetco/std_v_2/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 0001 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MP/IO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/vers1.8 8bit/IOB.cfg b/IOB-PI/vers1.8 8bit/IOB.cfg index 6246b6a..51e9778 100644 --- a/IOB-PI/vers1.8 8bit/IOB.cfg +++ b/IOB-PI/vers1.8 8bit/IOB.cfg @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MPIO/inputIOB.aspx?idxMacchina= -URLALIVE = http://10.74.82.219/MPIO/Alive.aspx -URLENABLED = http://10.74.82.219/MPIO/Enabled.aspx?idxMacchina= +URLBASE = http://10.74.82.218/MPIO/inputIOB.aspx?idxMacchina= +URLALIVE = http://10.74.82.218/MPIO/Alive.aspx +URLENABLED = http://10.74.82.218/MPIO/Enabled.aspx?idxMacchina= URLADV1 = &valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.20 diff --git a/IOB-PI/vers1.8 8bit/IOB.cfg.steamware b/IOB-PI/vers1.8 8bit/IOB.cfg.steamware index 6246b6a..51e9778 100644 --- a/IOB-PI/vers1.8 8bit/IOB.cfg.steamware +++ b/IOB-PI/vers1.8 8bit/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MPIO/inputIOB.aspx?idxMacchina= -URLALIVE = http://10.74.82.219/MPIO/Alive.aspx -URLENABLED = http://10.74.82.219/MPIO/Enabled.aspx?idxMacchina= +URLBASE = http://10.74.82.218/MPIO/inputIOB.aspx?idxMacchina= +URLALIVE = http://10.74.82.218/MPIO/Alive.aspx +URLENABLED = http://10.74.82.218/MPIO/Enabled.aspx?idxMacchina= URLADV1 = &valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.20 diff --git a/IOB-PI/vers2.4 12bit/IOB.cfg b/IOB-PI/vers2.4 12bit/IOB.cfg index 26771f4..44f53bd 100644 --- a/IOB-PI/vers2.4 12bit/IOB.cfg +++ b/IOB-PI/vers2.4 12bit/IOB.cfg @@ -2,11 +2,11 @@ idxMacchina = 0001 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MP/IO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/vers2.4 12bit/IOB.cfg.steamware b/IOB-PI/vers2.4 12bit/IOB.cfg.steamware index ac044d0..920043f 100644 --- a/IOB-PI/vers2.4 12bit/IOB.cfg.steamware +++ b/IOB-PI/vers2.4 12bit/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/vers2.4 8bit/IOB.cfg b/IOB-PI/vers2.4 8bit/IOB.cfg index ad9ef57..248eb83 100644 --- a/IOB-PI/vers2.4 8bit/IOB.cfg +++ b/IOB-PI/vers2.4 8bit/IOB.cfg @@ -2,11 +2,11 @@ idxMacchina = 0001 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MP/IO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/vers2.4 8bit/IOB.cfg.steamware b/IOB-PI/vers2.4 8bit/IOB.cfg.steamware index ac044d0..920043f 100644 --- a/IOB-PI/vers2.4 8bit/IOB.cfg.steamware +++ b/IOB-PI/vers2.4 8bit/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/vers2.5 8bit/IOB.cfg b/IOB-PI/vers2.5 8bit/IOB.cfg index ad9ef57..248eb83 100644 --- a/IOB-PI/vers2.5 8bit/IOB.cfg +++ b/IOB-PI/vers2.5 8bit/IOB.cfg @@ -2,11 +2,11 @@ idxMacchina = 0001 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MP/IO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/vers2.5 8bit/IOB.cfg.steamware b/IOB-PI/vers2.5 8bit/IOB.cfg.steamware index ac044d0..920043f 100644 --- a/IOB-PI/vers2.5 8bit/IOB.cfg.steamware +++ b/IOB-PI/vers2.5 8bit/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/MP-MON-PI/IOB-MON-2021.12/startBrowser.sh b/MP-MON-PI/IOB-MON-2021.12/startBrowser.sh index c142076..71fd154 100644 --- a/MP-MON-PI/IOB-MON-2021.12/startBrowser.sh +++ b/MP-MON-PI/IOB-MON-2021.12/startBrowser.sh @@ -86,6 +86,6 @@ sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /home/pi/.config/chromi sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' /home/pi/.config/chromium/Default/Preferences # avvio chromium in KIOSK senza segnalazione errori... -#chromium-browser --noerrdialogs --kiosk http://10.74.82.219/MP-MON --incognito --disable-translate +#chromium-browser --noerrdialogs --kiosk http://10.74.82.218/MP-MON --incognito --disable-translate chromium-browser --noerrdialogs --kiosk $url --incognito --disable-translate --disable-infobars --disable-component-update diff --git a/MP-MON-PI/RPI-MON-00001/startBrowser.sh b/MP-MON-PI/RPI-MON-00001/startBrowser.sh index 8af1a7d..8204772 100644 --- a/MP-MON-PI/RPI-MON-00001/startBrowser.sh +++ b/MP-MON-PI/RPI-MON-00001/startBrowser.sh @@ -47,7 +47,7 @@ url='file:///home/pi/steamware/MP-MON-DEMO.html' if [[ $iaddr == "10.74.82"* ]] then - url='http://10.74.82.219/MP-MON' + url='http://10.74.82.218/MP-MON' echo "$(date) | Siamo in Steamware, imposto pagina a $url!" >> $logFile elif [[ $iaddr == "192.168.51"* ]] then @@ -61,6 +61,6 @@ fi killall -9 chromium-browser # avvio chromium in KIOSK senza segnalazione errori... -#chromium-browser --noerrdialogs --kiosk http://10.74.82.219/MP-MON --incognito --disable-translate +#chromium-browser --noerrdialogs --kiosk http://10.74.82.218/MP-MON --incognito --disable-translate chromium-browser --noerrdialogs --kiosk $url --incognito --disable-translate diff --git a/MP-MON-PI/RPI-MON-00002/startBrowser.sh b/MP-MON-PI/RPI-MON-00002/startBrowser.sh index 8af1a7d..8204772 100644 --- a/MP-MON-PI/RPI-MON-00002/startBrowser.sh +++ b/MP-MON-PI/RPI-MON-00002/startBrowser.sh @@ -47,7 +47,7 @@ url='file:///home/pi/steamware/MP-MON-DEMO.html' if [[ $iaddr == "10.74.82"* ]] then - url='http://10.74.82.219/MP-MON' + url='http://10.74.82.218/MP-MON' echo "$(date) | Siamo in Steamware, imposto pagina a $url!" >> $logFile elif [[ $iaddr == "192.168.51"* ]] then @@ -61,6 +61,6 @@ fi killall -9 chromium-browser # avvio chromium in KIOSK senza segnalazione errori... -#chromium-browser --noerrdialogs --kiosk http://10.74.82.219/MP-MON --incognito --disable-translate +#chromium-browser --noerrdialogs --kiosk http://10.74.82.218/MP-MON --incognito --disable-translate chromium-browser --noerrdialogs --kiosk $url --incognito --disable-translate diff --git a/MP-MON-PI/RPI-MON-00003/startBrowser.sh b/MP-MON-PI/RPI-MON-00003/startBrowser.sh index 8af1a7d..8204772 100644 --- a/MP-MON-PI/RPI-MON-00003/startBrowser.sh +++ b/MP-MON-PI/RPI-MON-00003/startBrowser.sh @@ -47,7 +47,7 @@ url='file:///home/pi/steamware/MP-MON-DEMO.html' if [[ $iaddr == "10.74.82"* ]] then - url='http://10.74.82.219/MP-MON' + url='http://10.74.82.218/MP-MON' echo "$(date) | Siamo in Steamware, imposto pagina a $url!" >> $logFile elif [[ $iaddr == "192.168.51"* ]] then @@ -61,6 +61,6 @@ fi killall -9 chromium-browser # avvio chromium in KIOSK senza segnalazione errori... -#chromium-browser --noerrdialogs --kiosk http://10.74.82.219/MP-MON --incognito --disable-translate +#chromium-browser --noerrdialogs --kiosk http://10.74.82.218/MP-MON --incognito --disable-translate chromium-browser --noerrdialogs --kiosk $url --incognito --disable-translate diff --git a/MP-MON-PI/RPI-MON-00004/startBrowser.sh b/MP-MON-PI/RPI-MON-00004/startBrowser.sh index 8af1a7d..8204772 100644 --- a/MP-MON-PI/RPI-MON-00004/startBrowser.sh +++ b/MP-MON-PI/RPI-MON-00004/startBrowser.sh @@ -47,7 +47,7 @@ url='file:///home/pi/steamware/MP-MON-DEMO.html' if [[ $iaddr == "10.74.82"* ]] then - url='http://10.74.82.219/MP-MON' + url='http://10.74.82.218/MP-MON' echo "$(date) | Siamo in Steamware, imposto pagina a $url!" >> $logFile elif [[ $iaddr == "192.168.51"* ]] then @@ -61,6 +61,6 @@ fi killall -9 chromium-browser # avvio chromium in KIOSK senza segnalazione errori... -#chromium-browser --noerrdialogs --kiosk http://10.74.82.219/MP-MON --incognito --disable-translate +#chromium-browser --noerrdialogs --kiosk http://10.74.82.218/MP-MON --incognito --disable-translate chromium-browser --noerrdialogs --kiosk $url --incognito --disable-translate diff --git a/MP-MON-PI/RPI-MON-TEMPL/restartBrowser.sh b/MP-MON-PI/RPI-MON-TEMPL/restartBrowser.sh index 4cf4bd5..5d21387 100644 --- a/MP-MON-PI/RPI-MON-TEMPL/restartBrowser.sh +++ b/MP-MON-PI/RPI-MON-TEMPL/restartBrowser.sh @@ -47,7 +47,7 @@ url='file:///home/pi/steamware/MP-MON-DEMO.html' if [[ $iaddr == "10.74.82"* ]] then - url='http://10.74.82.219/MP-MON' + url='http://10.74.82.218/MP-MON' echo "$(date) | Siamo in Steamware, imposto pagina a $url!" >> $logFile elif [[ $iaddr == "192.168.51"* ]] then @@ -62,6 +62,6 @@ echo "$(date) | chiusura processi precedenti!" >> $logFile killall -9 chromium-browser # avvio chromium in KIOSK senza segnalazione errori... -#chromium-browser --noerrdialogs --kiosk http://10.74.82.219/MP-MON --incognito --disable-translate +#chromium-browser --noerrdialogs --kiosk http://10.74.82.218/MP-MON --incognito --disable-translate echo "$(date) | apertura nuovo URL!" >> $logFile DISPLAY=:0.0 chromium-browser --noerrdialogs --kiosk $url --incognito --disable-translate diff --git a/MP-MON-PI/RPI-MON-TEMPL/startBrowser.sh b/MP-MON-PI/RPI-MON-TEMPL/startBrowser.sh index e71b957..0ca408f 100644 --- a/MP-MON-PI/RPI-MON-TEMPL/startBrowser.sh +++ b/MP-MON-PI/RPI-MON-TEMPL/startBrowser.sh @@ -51,7 +51,7 @@ url='file:///home/pi/steamware/MP-MON-DEMO.html' if [[ $iaddr == "10.74.82"* ]] then - url='http://10.74.82.219/MP/MON' + url='http://10.74.82.218/MP/MON' echo "$(date) | Siamo in Steamware, imposto pagina a $url!" >> $logFile elif [[ $iaddr == $localNet* ]] then @@ -65,6 +65,6 @@ fi killall -9 chromium-browser # avvio chromium in KIOSK senza segnalazione errori... -#chromium-browser --noerrdialogs --kiosk http://10.74.82.219/MP/MON --incognito --disable-translate +#chromium-browser --noerrdialogs --kiosk http://10.74.82.218/MP/MON --incognito --disable-translate chromium-browser --noerrdialogs --kiosk $url --incognito --disable-translate diff --git a/MP-MON-PI/RPI-MON-V4/startBrowser.sh b/MP-MON-PI/RPI-MON-V4/startBrowser.sh index f4a7286..093b53e 100644 --- a/MP-MON-PI/RPI-MON-V4/startBrowser.sh +++ b/MP-MON-PI/RPI-MON-V4/startBrowser.sh @@ -82,6 +82,6 @@ sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /home/pi/.config/chromi sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' /home/pi/.config/chromium/Default/Preferences # avvio chromium in KIOSK senza segnalazione errori... -#chromium-browser --noerrdialogs --kiosk http://10.74.82.219/MP-MON --incognito --disable-translate +#chromium-browser --noerrdialogs --kiosk http://10.74.82.218/MP-MON --incognito --disable-translate chromium-browser --noerrdialogs --kiosk $url --incognito --disable-translate --disable-infobars --disable-component-update From 60b652f2610ae0a65423d2ce9f6138815d920651 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 18 Jul 2023 16:48:52 +0200 Subject: [PATCH 4/4] Fix vers 2.5 a 12 bit --- CONF-IOB/Donati/1000_Pi1/IOB.cfg | 8 +- CONF-IOB/Donati/1000_Pi1/IOB.cfg.steamware | 8 +- CONF-IOB/Donati/1000_Pi3/IOB.cfg | 8 +- CONF-IOB/Donati/1000_Pi3/IOB.cfg.steamware | 8 +- CONF-IOB/Donati/1024_177/IOB.cfg.steamware | 8 +- CONF-IOB/Donati/1025_178/IOB.cfg.steamware | 8 +- CONF-IOB/Donati/1026_180/IOB.cfg.steamware | 8 +- CONF-IOB/Donati/1027 - 185/IOB.cfg.steamware | 8 +- CONF-IOB/Donati/1501_172/restartBrowser.sh | 4 +- CONF-IOB/Donati/1501_172/startBrowser.sh | 4 +- CONF-IOB/Donati/1502_173/startBrowser.sh | 4 +- CONF-IOB/Donati/1503_174/startBrowser.sh | 4 +- CONF-IOB/Donati/1504_175/startBrowser.sh | 4 +- CONF-IOB/Donati/2001_184/IOB.cfg.steamware | 8 +- CONF-IOB/Donati/2002_183/IOB.cfg.steamware | 8 +- CONF-IOB/Donati/2003_187/IOB.cfg.steamware | 8 +- CONF-IOB/Donati/2004_186/IOB.cfg.steamware | 8 +- IOB-PI/std_vers/IOB.cfg | 8 +- IOB-PI/std_vers/IOB.cfg.steamware | 8 +- IOB-PI/std_vers/readParallela.py | 23 +++-- IOB-PI/vers2.5 12bit/IOB.cfg | 8 +- IOB-PI/vers2.5 12bit/IOB.cfg.steamware | 8 +- IOB-PI/vers2.5 12bit/readParallela.py | 95 +++++++++++++++---- Schema Cablaggi/Donati/IOB_doc.xls | Bin 244736 -> 244736 bytes 24 files changed, 169 insertions(+), 97 deletions(-) diff --git a/CONF-IOB/Donati/1000_Pi1/IOB.cfg b/CONF-IOB/Donati/1000_Pi1/IOB.cfg index 6246b6a..51e9778 100644 --- a/CONF-IOB/Donati/1000_Pi1/IOB.cfg +++ b/CONF-IOB/Donati/1000_Pi1/IOB.cfg @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MPIO/inputIOB.aspx?idxMacchina= -URLALIVE = http://10.74.82.219/MPIO/Alive.aspx -URLENABLED = http://10.74.82.219/MPIO/Enabled.aspx?idxMacchina= +URLBASE = http://10.74.82.218/MPIO/inputIOB.aspx?idxMacchina= +URLALIVE = http://10.74.82.218/MPIO/Alive.aspx +URLENABLED = http://10.74.82.218/MPIO/Enabled.aspx?idxMacchina= URLADV1 = &valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.20 diff --git a/CONF-IOB/Donati/1000_Pi1/IOB.cfg.steamware b/CONF-IOB/Donati/1000_Pi1/IOB.cfg.steamware index 6246b6a..51e9778 100644 --- a/CONF-IOB/Donati/1000_Pi1/IOB.cfg.steamware +++ b/CONF-IOB/Donati/1000_Pi1/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MPIO/inputIOB.aspx?idxMacchina= -URLALIVE = http://10.74.82.219/MPIO/Alive.aspx -URLENABLED = http://10.74.82.219/MPIO/Enabled.aspx?idxMacchina= +URLBASE = http://10.74.82.218/MPIO/inputIOB.aspx?idxMacchina= +URLALIVE = http://10.74.82.218/MPIO/Alive.aspx +URLENABLED = http://10.74.82.218/MPIO/Enabled.aspx?idxMacchina= URLADV1 = &valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.20 diff --git a/CONF-IOB/Donati/1000_Pi3/IOB.cfg b/CONF-IOB/Donati/1000_Pi3/IOB.cfg index ac044d0..920043f 100644 --- a/CONF-IOB/Donati/1000_Pi3/IOB.cfg +++ b/CONF-IOB/Donati/1000_Pi3/IOB.cfg @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/CONF-IOB/Donati/1000_Pi3/IOB.cfg.steamware b/CONF-IOB/Donati/1000_Pi3/IOB.cfg.steamware index ac044d0..920043f 100644 --- a/CONF-IOB/Donati/1000_Pi3/IOB.cfg.steamware +++ b/CONF-IOB/Donati/1000_Pi3/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/CONF-IOB/Donati/1024_177/IOB.cfg.steamware b/CONF-IOB/Donati/1024_177/IOB.cfg.steamware index 6246b6a..51e9778 100644 --- a/CONF-IOB/Donati/1024_177/IOB.cfg.steamware +++ b/CONF-IOB/Donati/1024_177/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MPIO/inputIOB.aspx?idxMacchina= -URLALIVE = http://10.74.82.219/MPIO/Alive.aspx -URLENABLED = http://10.74.82.219/MPIO/Enabled.aspx?idxMacchina= +URLBASE = http://10.74.82.218/MPIO/inputIOB.aspx?idxMacchina= +URLALIVE = http://10.74.82.218/MPIO/Alive.aspx +URLENABLED = http://10.74.82.218/MPIO/Enabled.aspx?idxMacchina= URLADV1 = &valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.20 diff --git a/CONF-IOB/Donati/1025_178/IOB.cfg.steamware b/CONF-IOB/Donati/1025_178/IOB.cfg.steamware index 6246b6a..51e9778 100644 --- a/CONF-IOB/Donati/1025_178/IOB.cfg.steamware +++ b/CONF-IOB/Donati/1025_178/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MPIO/inputIOB.aspx?idxMacchina= -URLALIVE = http://10.74.82.219/MPIO/Alive.aspx -URLENABLED = http://10.74.82.219/MPIO/Enabled.aspx?idxMacchina= +URLBASE = http://10.74.82.218/MPIO/inputIOB.aspx?idxMacchina= +URLALIVE = http://10.74.82.218/MPIO/Alive.aspx +URLENABLED = http://10.74.82.218/MPIO/Enabled.aspx?idxMacchina= URLADV1 = &valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.20 diff --git a/CONF-IOB/Donati/1026_180/IOB.cfg.steamware b/CONF-IOB/Donati/1026_180/IOB.cfg.steamware index 6246b6a..51e9778 100644 --- a/CONF-IOB/Donati/1026_180/IOB.cfg.steamware +++ b/CONF-IOB/Donati/1026_180/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MPIO/inputIOB.aspx?idxMacchina= -URLALIVE = http://10.74.82.219/MPIO/Alive.aspx -URLENABLED = http://10.74.82.219/MPIO/Enabled.aspx?idxMacchina= +URLBASE = http://10.74.82.218/MPIO/inputIOB.aspx?idxMacchina= +URLALIVE = http://10.74.82.218/MPIO/Alive.aspx +URLENABLED = http://10.74.82.218/MPIO/Enabled.aspx?idxMacchina= URLADV1 = &valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.20 diff --git a/CONF-IOB/Donati/1027 - 185/IOB.cfg.steamware b/CONF-IOB/Donati/1027 - 185/IOB.cfg.steamware index 6246b6a..51e9778 100644 --- a/CONF-IOB/Donati/1027 - 185/IOB.cfg.steamware +++ b/CONF-IOB/Donati/1027 - 185/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MPIO/inputIOB.aspx?idxMacchina= -URLALIVE = http://10.74.82.219/MPIO/Alive.aspx -URLENABLED = http://10.74.82.219/MPIO/Enabled.aspx?idxMacchina= +URLBASE = http://10.74.82.218/MPIO/inputIOB.aspx?idxMacchina= +URLALIVE = http://10.74.82.218/MPIO/Alive.aspx +URLENABLED = http://10.74.82.218/MPIO/Enabled.aspx?idxMacchina= URLADV1 = &valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.20 diff --git a/CONF-IOB/Donati/1501_172/restartBrowser.sh b/CONF-IOB/Donati/1501_172/restartBrowser.sh index 4cf4bd5..5d21387 100644 --- a/CONF-IOB/Donati/1501_172/restartBrowser.sh +++ b/CONF-IOB/Donati/1501_172/restartBrowser.sh @@ -47,7 +47,7 @@ url='file:///home/pi/steamware/MP-MON-DEMO.html' if [[ $iaddr == "10.74.82"* ]] then - url='http://10.74.82.219/MP-MON' + url='http://10.74.82.218/MP-MON' echo "$(date) | Siamo in Steamware, imposto pagina a $url!" >> $logFile elif [[ $iaddr == "192.168.51"* ]] then @@ -62,6 +62,6 @@ echo "$(date) | chiusura processi precedenti!" >> $logFile killall -9 chromium-browser # avvio chromium in KIOSK senza segnalazione errori... -#chromium-browser --noerrdialogs --kiosk http://10.74.82.219/MP-MON --incognito --disable-translate +#chromium-browser --noerrdialogs --kiosk http://10.74.82.218/MP-MON --incognito --disable-translate echo "$(date) | apertura nuovo URL!" >> $logFile DISPLAY=:0.0 chromium-browser --noerrdialogs --kiosk $url --incognito --disable-translate diff --git a/CONF-IOB/Donati/1501_172/startBrowser.sh b/CONF-IOB/Donati/1501_172/startBrowser.sh index 58a9f7a..4ef12c5 100644 --- a/CONF-IOB/Donati/1501_172/startBrowser.sh +++ b/CONF-IOB/Donati/1501_172/startBrowser.sh @@ -47,7 +47,7 @@ url='file:///home/pi/steamware/MP-MON-DEMO.html' if [[ $iaddr == "10.74.82"* ]] then - url='http://10.74.82.219/MP-MON' + url='http://10.74.82.218/MP-MON' echo "$(date) | Siamo in Steamware, imposto pagina a $url!" >> $logFile elif [[ $iaddr == "192.168.51"* ]] then @@ -61,6 +61,6 @@ fi killall -9 chromium-browser # avvio chromium in KIOSK senza segnalazione errori... -#chromium-browser --noerrdialogs --kiosk http://10.74.82.219/MP-MON --incognito --disable-translate +#chromium-browser --noerrdialogs --kiosk http://10.74.82.218/MP-MON --incognito --disable-translate chromium-browser --noerrdialogs --kiosk $url --incognito --disable-translate diff --git a/CONF-IOB/Donati/1502_173/startBrowser.sh b/CONF-IOB/Donati/1502_173/startBrowser.sh index 8af1a7d..8204772 100644 --- a/CONF-IOB/Donati/1502_173/startBrowser.sh +++ b/CONF-IOB/Donati/1502_173/startBrowser.sh @@ -47,7 +47,7 @@ url='file:///home/pi/steamware/MP-MON-DEMO.html' if [[ $iaddr == "10.74.82"* ]] then - url='http://10.74.82.219/MP-MON' + url='http://10.74.82.218/MP-MON' echo "$(date) | Siamo in Steamware, imposto pagina a $url!" >> $logFile elif [[ $iaddr == "192.168.51"* ]] then @@ -61,6 +61,6 @@ fi killall -9 chromium-browser # avvio chromium in KIOSK senza segnalazione errori... -#chromium-browser --noerrdialogs --kiosk http://10.74.82.219/MP-MON --incognito --disable-translate +#chromium-browser --noerrdialogs --kiosk http://10.74.82.218/MP-MON --incognito --disable-translate chromium-browser --noerrdialogs --kiosk $url --incognito --disable-translate diff --git a/CONF-IOB/Donati/1503_174/startBrowser.sh b/CONF-IOB/Donati/1503_174/startBrowser.sh index 8af1a7d..8204772 100644 --- a/CONF-IOB/Donati/1503_174/startBrowser.sh +++ b/CONF-IOB/Donati/1503_174/startBrowser.sh @@ -47,7 +47,7 @@ url='file:///home/pi/steamware/MP-MON-DEMO.html' if [[ $iaddr == "10.74.82"* ]] then - url='http://10.74.82.219/MP-MON' + url='http://10.74.82.218/MP-MON' echo "$(date) | Siamo in Steamware, imposto pagina a $url!" >> $logFile elif [[ $iaddr == "192.168.51"* ]] then @@ -61,6 +61,6 @@ fi killall -9 chromium-browser # avvio chromium in KIOSK senza segnalazione errori... -#chromium-browser --noerrdialogs --kiosk http://10.74.82.219/MP-MON --incognito --disable-translate +#chromium-browser --noerrdialogs --kiosk http://10.74.82.218/MP-MON --incognito --disable-translate chromium-browser --noerrdialogs --kiosk $url --incognito --disable-translate diff --git a/CONF-IOB/Donati/1504_175/startBrowser.sh b/CONF-IOB/Donati/1504_175/startBrowser.sh index 8af1a7d..8204772 100644 --- a/CONF-IOB/Donati/1504_175/startBrowser.sh +++ b/CONF-IOB/Donati/1504_175/startBrowser.sh @@ -47,7 +47,7 @@ url='file:///home/pi/steamware/MP-MON-DEMO.html' if [[ $iaddr == "10.74.82"* ]] then - url='http://10.74.82.219/MP-MON' + url='http://10.74.82.218/MP-MON' echo "$(date) | Siamo in Steamware, imposto pagina a $url!" >> $logFile elif [[ $iaddr == "192.168.51"* ]] then @@ -61,6 +61,6 @@ fi killall -9 chromium-browser # avvio chromium in KIOSK senza segnalazione errori... -#chromium-browser --noerrdialogs --kiosk http://10.74.82.219/MP-MON --incognito --disable-translate +#chromium-browser --noerrdialogs --kiosk http://10.74.82.218/MP-MON --incognito --disable-translate chromium-browser --noerrdialogs --kiosk $url --incognito --disable-translate diff --git a/CONF-IOB/Donati/2001_184/IOB.cfg.steamware b/CONF-IOB/Donati/2001_184/IOB.cfg.steamware index ac044d0..920043f 100644 --- a/CONF-IOB/Donati/2001_184/IOB.cfg.steamware +++ b/CONF-IOB/Donati/2001_184/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/CONF-IOB/Donati/2002_183/IOB.cfg.steamware b/CONF-IOB/Donati/2002_183/IOB.cfg.steamware index ac044d0..920043f 100644 --- a/CONF-IOB/Donati/2002_183/IOB.cfg.steamware +++ b/CONF-IOB/Donati/2002_183/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/CONF-IOB/Donati/2003_187/IOB.cfg.steamware b/CONF-IOB/Donati/2003_187/IOB.cfg.steamware index ac044d0..920043f 100644 --- a/CONF-IOB/Donati/2003_187/IOB.cfg.steamware +++ b/CONF-IOB/Donati/2003_187/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/CONF-IOB/Donati/2004_186/IOB.cfg.steamware b/CONF-IOB/Donati/2004_186/IOB.cfg.steamware index ac044d0..920043f 100644 --- a/CONF-IOB/Donati/2004_186/IOB.cfg.steamware +++ b/CONF-IOB/Donati/2004_186/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/std_vers/IOB.cfg b/IOB-PI/std_vers/IOB.cfg index 26771f4..44f53bd 100644 --- a/IOB-PI/std_vers/IOB.cfg +++ b/IOB-PI/std_vers/IOB.cfg @@ -2,11 +2,11 @@ idxMacchina = 0001 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MP/IO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/std_vers/IOB.cfg.steamware b/IOB-PI/std_vers/IOB.cfg.steamware index ac044d0..920043f 100644 --- a/IOB-PI/std_vers/IOB.cfg.steamware +++ b/IOB-PI/std_vers/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/std_vers/readParallela.py b/IOB-PI/std_vers/readParallela.py index 14dd49f..799265a 100644 --- a/IOB-PI/std_vers/readParallela.py +++ b/IOB-PI/std_vers/readParallela.py @@ -1,7 +1,7 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -# readParallela v. 2.4 +# readParallela v. 2.5.1 # - single instance timer # - invio multiplo x send eventi accodati # - gestione segnali BLINKING @@ -9,6 +9,9 @@ # - gestione FILTRAGGIO segnali brevi cv 23-VII-2018 # - (2.3) gestione 12 bit cv 14-I-2020 # - (2.4) fix ingressi e conf apertura parallela + gestione vari bit filtraggio x nuovi ingressi + update conf con 12 parametri bit SEL 15-I-2020 +# - (2.4.8) versione adatta a raspberry PI vecchia generazione (GPIO corto, 8bit) +# - (2.5) Fix (hope) ciclo "wait send to complete", gestione timeout (rety infinito se IO riparte in modo anomalo) +# - (2.5.1) Fix numero versione 18.05.2023 #--------------------------------------------------------------- # levare locking @@ -38,12 +41,12 @@ from array import * # COSTANTI MSGLEN = 9 TIMEOUTSERIALE = 10 -MAXRETRY = 3 +MAXRETRY = 10 # numero campioni filtraggio segnale ballerino MAX_COUNTER_BLINK = 10 -PROGRAM_NAME ="ReadPar IOB-pi v.2.4" +PROGRAM_NAME ="ReadPar IOB-pi v.2.5.1" # DA FILE CONF idxMacchina = "1001" @@ -304,7 +307,7 @@ def readParallelaFiltrata(): B_output[i] = 0 logPro.info("END Blink on bit " + `i` ) - #Rimettiamo insieme i bit + #Rimettiamo insieme i bit new_value = 0 if ( B_output[0] == 1 ) : @@ -354,7 +357,7 @@ def accoda(): logPro.error( "Queue full" + `dtEve` + '#' + `value` + '#' + `cont` ) except: logPro.error( "NETWORK:Errore http-no com rete-timeout" + url ) -# print "Url aforte" , url + #print "Url aforte" , url #-------------------------------------------------------------- @@ -440,7 +443,13 @@ def svuota_coda(): # completato invio, riporto sending a zero! sending = '0' else: - logPro.info("WAIT active send to complete") + if to_retry > 0: + to_retry -= 1 + logPro.info("WAIT active send to complete") + else: + sending = '0' + to_retry = MAXRETRY + logPro.info("END WAIT, reset to_retry var") else: pass @@ -455,7 +464,7 @@ def svuota_coda(): onLine = '0' -# in ogni caso + # in ogni caso timer_busy = False #print "end timer ok" diff --git a/IOB-PI/vers2.5 12bit/IOB.cfg b/IOB-PI/vers2.5 12bit/IOB.cfg index 26771f4..44f53bd 100644 --- a/IOB-PI/vers2.5 12bit/IOB.cfg +++ b/IOB-PI/vers2.5 12bit/IOB.cfg @@ -2,11 +2,11 @@ idxMacchina = 0001 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MP/IO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MP/IO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/vers2.5 12bit/IOB.cfg.steamware b/IOB-PI/vers2.5 12bit/IOB.cfg.steamware index ac044d0..920043f 100644 --- a/IOB-PI/vers2.5 12bit/IOB.cfg.steamware +++ b/IOB-PI/vers2.5 12bit/IOB.cfg.steamware @@ -2,11 +2,11 @@ idxMacchina = 1005 [web] -URLBASE = http://10.74.82.219/MP/IO/IOB/input/ -URLALIVE = http://10.74.82.219/MP/IO/IOB -URLENABLED = http://10.74.82.219/MP/IO/IOB/enabled/ +URLBASE = http://10.74.82.218/MP/IO/IOB/input/ +URLALIVE = http://10.74.82.218/MP/IO/IOB +URLENABLED = http://10.74.82.218/MP/IO/IOB/enabled/ URLADV1 = ?valore= -URLREBO = http://10.74.82.219/MPIO/sendReboot.aspx?idxMacchina= +URLREBO = http://10.74.82.218/MPIO/sendReboot.aspx?idxMacchina= [time] SAMPLETIME = 0.05 diff --git a/IOB-PI/vers2.5 12bit/readParallela.py b/IOB-PI/vers2.5 12bit/readParallela.py index 4a97022..799265a 100644 --- a/IOB-PI/vers2.5 12bit/readParallela.py +++ b/IOB-PI/vers2.5 12bit/readParallela.py @@ -77,6 +77,10 @@ in_4 = 16 in_5 = 18 in_6 = 22 in_7 = 7 +in_8 = 29 +in_9 = 31 +in_10 = 32 +in_11 = 36 # contatore: serve x match tra accoda ed invia x possibile controllo a posteriori... ogni volta che accodo incremento di 1, va da 0 a 9999 cont = '0' @@ -93,18 +97,18 @@ timer_busy = False # # array per ingressi filtrati -i_counters = array ( 'i',[0,0,0,0,0,0,0,0]) -B_blinking = array ( 'B',[0,0,0,0,0,0,0,0]) -B_previous = array ( 'B',[0,0,0,0,0,0,0,0]) -B_input = array ( 'B',[0,0,0,0,0,0,0,0]) -B_output = array ( 'B',[0,0,0,0,0,0,0,0]) +i_counters = array ( 'i',[0,0,0,0,0,0,0,0,0,0,0,0]) +B_blinking = array ( 'B',[0,0,0,0,0,0,0,0,0,0,0,0]) +B_previous = array ( 'B',[0,0,0,0,0,0,0,0,0,0,0,0]) +B_input = array ( 'B',[0,0,0,0,0,0,0,0,0,0,0,0]) +B_output = array ( 'B',[0,0,0,0,0,0,0,0,0,0,0,0]) -B_inverting = array ( 'B',[0,0,0,0,0,0,0,0]) +B_inverting = array ( 'B',[0,0,0,0,0,0,0,0,0,0,0,0]) -B_filter = array ( 'B',[0,0,0,0,0,0,0,0]) -B_filter_prev = array ( 'B',[0,0,0,0,0,0,0,0]) -B_temp = array ( 'B',[0,0,0,0,0,0,0,0]) -i_filter_counters = array ( 'i',[0,0,0,0,0,0,0,0]) +B_filter = array ( 'B',[0,0,0,0,0,0,0,0,0,0,0,0]) +B_filter_prev = array ( 'B',[0,0,0,0,0,0,0,0,0,0,0,0]) +B_temp = array ( 'B',[0,0,0,0,0,0,0,0,0,0,0,0]) +i_filter_counters = array ( 'i',[0,0,0,0,0,0,0,0,0,0,0,0]) #-------------------------------------------------------------- # Gestione coda (condivisa) x registrazione eventi ed invio URL @@ -129,6 +133,12 @@ def readParallelaFiltrata(): global in_6 global in_7 + global in_8 + global in_9 + global in_10 + global in_11 + + global GPIO current = '' @@ -177,9 +187,33 @@ def readParallelaFiltrata(): B_input[7] = 1 + if GPIO.input(in_8): + B_input[8] = 0 + else: + B_input[8] = 1 + + if GPIO.input(in_9): + B_input[9] = 0 + else: + B_input[9] = 1 + + if GPIO.input(in_10): + B_input[10] = 0 + else: + B_input[10] = 1 + + if GPIO.input(in_11): + B_input[11] = 0 + else: + B_input[11] = 1 + + + + + #ciclo per ogni segnale - for i in xrange(8) : + for i in xrange(12) : # print (i) # v2.1 gestione inversione bit ingresso @@ -273,7 +307,7 @@ def readParallelaFiltrata(): B_output[i] = 0 logPro.info("END Blink on bit " + `i` ) - #Rimettiamo insieme i bit + #Rimettiamo insieme i bit new_value = 0 if ( B_output[0] == 1 ) : @@ -293,6 +327,15 @@ def readParallelaFiltrata(): if ( B_output[7] == 1 ) : new_value = new_value + 128 + if ( B_output[8] == 1 ) : + new_value = new_value + 256 + if ( B_output[9] == 1 ) : + new_value = new_value + 512 + if ( B_output[10] == 1 ) : + new_value = new_value + 1024 + if ( B_output[11] == 1 ) : + new_value = new_value + 2048 + current = hex( new_value ).replace ( "0x" , "" ).upper() @@ -314,7 +357,7 @@ def accoda(): logPro.error( "Queue full" + `dtEve` + '#' + `value` + '#' + `cont` ) except: logPro.error( "NETWORK:Errore http-no com rete-timeout" + url ) -# print "Url aforte" , url + #print "Url aforte" , url #-------------------------------------------------------------- @@ -421,7 +464,7 @@ def svuota_coda(): onLine = '0' -# in ogni caso + # in ogni caso timer_busy = False #print "end timer ok" @@ -469,6 +512,10 @@ def avviaParallela(): global in_5 global in_6 global in_7 + global in_8 + global in_9 + global in_10 + global in_11 global GPIO @@ -489,6 +536,10 @@ def avviaParallela(): GPIO.setup(in_5, GPIO.IN) # input 5 GPIO.setup(in_6, GPIO.IN) # input 6 GPIO.setup(in_7, GPIO.IN) # input 7 + GPIO.setup(in_8, GPIO.IN) # input 8 + GPIO.setup(in_9, GPIO.IN) # input 9 + GPIO.setup(in_10, GPIO.IN) # input 10 + GPIO.setup(in_11, GPIO.IN) # input 11 except: print( "\n\n" + PROGRAM_NAME + " - Error 3 on RPi.GPIO ! \n\n") @@ -531,6 +582,10 @@ try: B_blinking[5] = config.getint ( 'blink' , 'bit5' ) B_blinking[6] = config.getint ( 'blink' , 'bit6' ) B_blinking[7] = config.getint ( 'blink' , 'bit7' ) + B_blinking[8] = config.getint ( 'blink' , 'bit8' ) + B_blinking[9] = config.getint ( 'blink' , 'bit9' ) + B_blinking[10] = config.getint ( 'blink' , 'bit10' ) + B_blinking[11] = config.getint ( 'blink' , 'bit11' ) MAX_COUNTER_BLINK = config.getint ( 'blink' , 'MAX_COUNTER_BLINK' ) @@ -543,7 +598,11 @@ try: B_inverting[4] = config.getint ( 'invert' , 'bit4' ) B_inverting[5] = config.getint ( 'invert' , 'bit5' ) B_inverting[6] = config.getint ( 'invert' , 'bit6' ) - B_inverting[7] = config.getint ( 'invert' , 'bit7' ) + B_inverting[7] = config.getint ( 'invert' , 'bit7' ) + B_inverting[8] = config.getint ( 'invert' , 'bit8' ) + B_inverting[9] = config.getint ( 'invert' , 'bit9' ) + B_inverting[10] = config.getint ( 'invert' , 'bit10' ) + B_inverting[11] = config.getint ( 'invert' , 'bit11' ) # cv 2.2 se bit = 1 allora filtro segnali brevi ... @@ -554,7 +613,11 @@ try: B_filter[4] = config.getint ( 'filter' , 'bit4' ) B_filter[5] = config.getint ( 'filter' , 'bit5' ) B_filter[6] = config.getint ( 'filter' , 'bit6' ) - B_filter[7] = config.getint ( 'filter' , 'bit7' ) + B_filter[7] = config.getint ( 'filter' , 'bit7' ) + B_filter[8] = config.getint ( 'filter' , 'bit8' ) + B_filter[9] = config.getint ( 'filter' , 'bit9' ) + B_filter[10] = config.getint ( 'filter' , 'bit10' ) + B_filter[11] = config.getint ( 'filter' , 'bit11' ) MAX_COUNTER_FILTER = config.getint ( 'filter' , 'MAX_COUNTER_FILTER' ) diff --git a/Schema Cablaggi/Donati/IOB_doc.xls b/Schema Cablaggi/Donati/IOB_doc.xls index eee6fedf077806ddf2c3bd6636d0da105b2ea6b4..cd0309f2327f4776526a51517793ffad51e1d47b 100644 GIT binary patch delta 29 jcmZqp!PfvpEsQNpTbOfpuwQukUB7wf&F#fIn0uK4&W8=( delta 29 jcmZqp!PfvpEsQNpTbOfpuz!&MZ4)1Od3*5==3Zt1!ru(I