Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/web-klick.de/dsh/50_dev2017/1300__perllib/PPLTest/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/web-klick.de/dsh/50_dev2017/1300__perllib/PPLTest/MMIStatusFkt.pm

use strict;

sub initGeraet {
   my $self = shift;
   my $mmi= shift;

   # Sprache / Land / Datum / Uhrzeit
   $mmi->{'sprache'} = 'deutsch';
   $mmi->{'land'} = 'Deutschland';
   $mmi->{'datum'} = "01.Januar.2012";
   $mmi->{'uhrzeit'} = "00:00";
   $mmi->{'tageszeitdarstellung'} = "analog";
   $mmi->{'tageszeitformat'} = "24Std";
   $mmi->{'tageszeitsynchronisieren'} = "zulassen";
   
   # Timer
   $mmi->{'timer1'} = "deaktiviert";
   $mmi->{'timer2'} = "deaktiviert";
   $mmi->{'timer1einschaltenum'} = "12:00";
   $mmi->{'timer1abschaltennach'} = "00:15";
   $mmi->{'timer1abschaltenum'} = "12:00";
   $mmi->{'timer1wochentagzuordnung'} = "0000000";
   $mmi->{'timer1aktivieren'} = "00";
   $mmi->{'timer2einschaltenum'} = "12:00";
   $mmi->{'timer2abschaltenum'} = "12:00";
   $mmi->{'timer2wochentagzuordnung'} = "0000000";
   $mmi->{'timer2aktivieren'} = "00";

   # Bezuege
   $mmi->{'gesamtbezuege'} = 0;
   $mmi->{'espressobezuege'} = 0;
   $mmi->{'kaffeebezuege'} = 0;
   $mmi->{'kaffeeLangbezuege'} = 0;
   $mmi->{'cappucinobezuege'} = 0;
   $mmi->{'latteMacchiatobezuege'} = 0;
   $mmi->{'caffeeLattebezuege'} = 0;
   $mmi->{'heisseMilchbezuege'} = 0;
   $mmi->{'milchschaumbezuege'} = 0;
   $mmi->{'kaffeekannebezuege'} = 0;
   $mmi->{'heisswasserbezuege'} = 0;
   
   # Beleuchtung / Display / Lautstaerke / Wasserhaerte
   $mmi->{'beleuchtunghelligkeitein'} = "Stufe 4";
   $mmi->{'beleuchtunghelligkeitaus'} = "Stufe 4";
   $mmi->{'beleuchtungabschaltennach'} = "1:00";
   $mmi->{'displaykontrast'} = 4;
   $mmi->{'lautstaerkesignalton'} = 4;
   $mmi->{'lautstaerketastenton'} = 4;
   $mmi->{'wasserhaerte'} = "sehrhart4";

   # Zustaende (alles was ein und ausschaltbar ist)
   $mmi->{'geschirrwaermer'} = 'aus';
   $mmi->{'festwasser'} = 'aus';
   $mmi->{'mielehome'} = 'aus';
   $mmi->{'fernsteuerung'} = 'aus';
   $mmi->{'tageszeitanzeige'} = 'aus';
   $mmi->{'ecomodus'} = "ein";
   $mmi->{'inbetriebnahmesperre'} = "aus";
   $mmi->{'geschirrwaermer'} = "aus";
   $mmi->{'festwasser'} = "ein";
   $mmi->{'messeschaltung'} = "aus";	  

   # zusaetzliche Module
   # 0 -> Modul nicht vorhanden
   # 1 -> Modul vorhanden
   $mmi->{'geraetvernetzt'} = 0;
   $mmi->{'uhrzeitgeber'} = 0;
   $mmi->{'geschirrwaermermodul'} = 0;
   $mmi->{'mielehomemodul'} = 0;
   $mmi->{'remotevisionmodul'} = 0;
   $mmi->{'festwasseranschluss'} = 0;
 
   # Hilfsvariablen
   $mmi->{'aktivervorgang'} = 0;                       # 1 wenn gerade Getraenk bezogen wird, danach wieder 0
   $mmi->{'stromausfall'} = 0;                         # wenn Stromausfall vermutet wird 1, danach wieder 0

   # slt
   $mmi->{'Geraetentkalken'} = 0;	  
   $mmi->{'Geraetentkalkenabgebrochen'} = 0;	  
   $mmi->{'TuerAuf'} = 0;	  
   $mmi->{'Milchgefaess'} = 1;	  
   $mmi->{'Bohnenbehaelter'} = 1;	  

   # Profil
   $mmi->{'profil'} = 0;
   
}   

sub meldungen {
   my $t = shift;
   my $mmi= shift;
   if ($t eq "BohnenLeer") {
      $mmi->{'Bohnenbehaelter'} = 0;
   }
   if ($t eq "BohnenVoll") {
      $mmi->{'Bohnenbehaelter'} = 1;
   }
}

#********************************************************************

sub display {

   my $self      = shift;
   my $title     = shift;
   my $partition = shift;
   my $e         = shift;
   my $v         = shift;
   my $ist       = "___UNDEFINED___";
   
print "ERG: $e   <----------------\n";

#   if ($e =~ /^(.*\-.*)\-(.*)$/) {
#      $ist = $1;
#      print "Istwert: $ist\n";
#      if (lc($ist) ne lc $soll) {
#         $v->{'result'}  =  1009;
#      }
#   }
   
   if ($e =~ /^(.*)$/) {
      $ist = $1;
      print "\nPRUEFUNG $ist\n\n";
      $v->{'log'} = $v->{'log'} .
                    "PRUEFUNG: Ist: $ist, Soll: $partition\_$title\n";
      if (lc($ist) ne lc($partition . "_" . $title)) {
            $v->{'log'} = $v->{'log'} .
            "---> SOLLWERT-WARNUNG: $ist falsch\n";
      }
   } else {
            $v->{'log'} = $v->{'log'} .
            "---> SOLLWERT-WARNUNG: Kein Ergebnis gefunden\n";
   }

   print "SOLLWERT BERECHNET IN DISPLAY-FUNKTION: " .
           lc($partition) . "_soll - $partition\_$title\n";
   
   $v->{'mmi'}->{lc($partition)."_soll"} = $partition . "_" . $title;
   
} 
 
#********************************************************************
#  Funktion fuer Menu und Einfachauswahlen
#  Parameter: Liste der Items auf dem Display, 
#             Processdescriptor siehe MMIMonitor.xml, 
#             Zuruecktaste, 
#             Primaere Navigationstaste, 
#             Sekundaere Navigationstaste, 
#             Screeninformationen, 
#             Timestamp, 
#             Ergebnis, 
#             Historie, 
#             Taste
#********************************************************************
sub dialog {
   my $self = shift;
   my $dialog = shift;
   my $partition = shift;
   my $primaereNavigation = shift;
   my $sekundaereNavigation = shift;
   my $ref_itemliste = shift;
   my $timeout = shift;
   my $timeoutDialog = shift;
   my $zurueckDialog = shift;
   my $mmi= shift;
   my $z = shift;
   my $e = shift;
   my $v = shift;
   my $t = shift;
   
   my $timedif = $z - $mmi->{'zeit'};  # debug
   print "Zeit: $z - $mmi->{'zeit'} = $timedif\n";  # debug

   # Timeout
   if ($timeout > 0) {
      if ($z - $mmi->{'zeit'} > $timeout) {
         $mmi->{'redirect'} = $timeoutDialog; 
		 $mmi->{'zeit'} => ($mmi->{'zeit'} + $timeout);
		 return;
      }
   }
   
   # Zurueck Key
   if ($t eq "KeyPressShort.ZURUECK") {
     if ($zurueckDialog ne '') {
       $mmi->{'screenname'} = {'name' => $zurueckDialog};
	 }  
	 else {
	   print "Die Taste Zurueck ist zur Zeit nicht aktiv!\n";
	 }
   }
   
   # EinAus Taster
   elsif ($t eq "KeyPressShort.EINAUS") {
     if ($mmi->{'tageszeitanzeige'} eq "Ein") {
        $mmi->{'screen'} = 'vde0MitDisplay';
	 }
     elsif ($mmi->{'tageszeitanzeige'} eq "Aus") {
       $mmi->{'screen'} = 'vde0OhneDisplay';
	 }
     elsif (($mmi->{'tageszeitanzeige'} eq "Nachtabschaltung") && (($mmi->{'uhrzeit'} < "5:00") || ($mmi->{'uhrzeit'} > "22:59"))) {
       $mmi->{'screen'} = 'vde0OhneDisplay';
	 }
     elsif (($mmi->{'tageszeitanzeige'} eq "Nachtabschaltung") && (($mmi->{'uhrzeit'} > "4:59") || ($mmi->{'uhrzeit'} < "23:00"))) {
       $mmi->{'screen'} = 'vde0MitDisplay';
	 }
   }
   
   # Item aktiviert   
   elsif ($t =~/^SoftKey.ITEM(\d)$/) {
     my @itemliste = @{$ref_itemliste};
     my $anzahlitem = @itemliste;
     if ($anzahlitem != 0) {
       print "Item: $1: $itemliste[$1]\n";
       $mmi->{'screen'} = $itemliste[$1];
	 }
	 else { 
	   print "Items koennen zur Zeit nicht ausgewaehlt werden!\n";
	 }
   }
   
   # primaere Navigationstaste
   elsif ($t =~/^SoftKey.Navi1$/) {
       $mmi->{'screen'} = $primaereNavigation;
   }

   # sekundaere Navigationstaste
   elsif ($t =~/^SoftKey.Navi2$/) {
       $mmi->{'screen'} = $sekundaereNavigation;
   }
   
   # Sollwert mit aktuellem Istwert ueberpruefen
   elsif ($t =~ /^DISPLAY/i) {
      $self->display($dialog, $partition, $e, $v);
   }  
}


#********************************************************************
#  Funktion fuer Meldungen, die mit JA oder NEIN bestaetigt 
#  werden muessen
#
#********************************************************************
sub meldungJaNein {
   my $self = shift;
   my $dialog = shift;
   my $partition = shift;
   my $nextDialogJa = shift;
   my $nextDialogNein = shift;
   my $timeout = shift;
   my $timeoutDialog = shift;
   my $zurueckDialog = shift;
   my $mmi = shift;
   my $z = shift;
   my $e = shift;
   my $v = shift;
   my $t = shift;

   my $timedif = $z - $mmi->{'zeit'};  # debug
   print "Zeit: $z - $mmi->{'zeit'} = $timedif\n";  # debug

   # Timeout
   if ($timeout > 0) {
      if ($z - $mmi->{'zeit'} > $timeout) {
         $mmi->{'redirect'} = $timeoutDialog;
		 $mmi->{'zeit'} => ($mmi->{'zeit'} + $timeout);
		 return;
      }
   }
   
   # Zurueck Key
   if ($t eq "KeyPressShort.ZURUECK") {
     if ($zurueckDialog ne '') {
       $mmi->{'screen'} = $zurueckDialog;
	 }  
	 else {
	   print "Die Taste Zurueck ist zur Zeit nicht aktiv!\n";
	 }
   }
   
   # EinAus Taster
   elsif ($t eq "KeyPressShort.EINAUS") {
     if ($mmi->{'tageszeitanzeige'} eq "Ein") {
        $mmi->{'screen'} = 'vde0MitDisplay';
	 }
     elsif ($mmi->{'tageszeitanzeige'} eq "Aus") {
       $mmi->{'screen'} = 'vde0OhneDisplay';
	 }
     elsif (($mmi->{'tageszeitanzeige'} eq "Nachtabschaltung") && (($mmi->{'uhrzeit'} < "5:00") || ($mmi->{'uhrzeit'} > "22:59"))) {
       $mmi->{'screen'} = 'vde0OhneDisplay';
	 }
     elsif (($mmi->{'tageszeitanzeige'} eq "Nachtabschaltung") && (($mmi->{'uhrzeit'} > "4:59") || ($mmi->{'uhrzeit'} < "23:00"))) {
       $mmi->{'screen'} = 'vde0MitDisplay';
	 }
   }
   
   # Entscheidungstaste Ja
   elsif ($t =~/^SoftKey.JA$/) {
       $mmi->{'screen'} = $nextDialogJa;
   }

   # Entscheidungstaste Nein
   elsif ($t =~/^SoftKey.NEIN$/) {
       $mmi->{'screen'} = $nextDialogNein;
   }
   
   # Sollwert mit aktuellem Istwert ueberpruefen
   elsif ($t eq "DISPLAY") {
      $self->display($dialog, $partition, $e, $v);
   }  
}

1;

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net