Ejemplo n.º 1
0
 /**
  * Metodo para examinar la accion del comando recivido por la pelicula flash para
  * seleccionar la funcion del alumno adecuada
  *
  * @param ComandoFlash $cmd
  */
 public function getComandoFlash($cmd)
 {
     if (strcmp($cmd->getAccion(), "PIDE_PALABRA") == 0) {
         $lag = $cmd->getAtributo();
         $alumno = substr($lag, 2);
         $this->alumnoPidePalabra($alumno);
     } else {
         if (strcmp($cmd->getAccion(), "TIENE_PALABRA") == 0) {
             $lag1 = $cmd->getAtributo();
             $alumno1 = substr($lag1, 2);
             $this->alumnoTienePalabra($alumno1);
         } else {
             if (strcmp($cmd->getAccion(), "NOTIENE_PALABRA") == 0) {
                 $lag2 = $cmd->getAtributo();
                 $alumno2 = substr($lag2, 2);
                 $this->alumnoNoTienePalabra($alumno2);
             }
         }
     }
 }
Ejemplo n.º 2
0
 /**
  * Metodo para examinar la accion del comando recivido por la pelicula flash
  * para seleccionar la accion del sonido adecuada
  *
  * @param ComandoFlash $cmd
  */
 public function getComandoSonidoFlash($cmd)
 {
     if (strcmp($cmd->getAccion(), "SUBIR_VOLUMEN") == 0) {
         $this->subirSonidoGeneral();
     } else {
         if (strcmp($cmd->getAccion(), "BAJAR_VOLUMEN") == 0) {
             $this->bajarSonidoGeneral();
         } else {
             if (strcmp($cmd->getAccion(), "ACTIVAR") == 0) {
                 if (strcmp($cmd->getAtributo(), "ENTRANTE") == 0) {
                     $this->activarSonidoEntrante();
                 } else {
                     if (strcmp($cmd->getAtributo(), "SALIENTE") == 0) {
                         $this->activarSonidoSaliente();
                     } else {
                         if (strcmp($cmd->getAtributo(), "GENERAL") == 0) {
                             $this->activarSonidoGeneral();
                         }
                     }
                 }
             } else {
                 if (strcmp($cmd->getAccion(), "SILENCIAR") == 0) {
                     if (strcmp($cmd->getAtributo(), "ENTRANTE") == 0) {
                         $this->desactivarSonidoEntrante();
                     } else {
                         if (strcmp($cmd->getAtributo(), "SALIENTE") == 0) {
                             $this->desactivarSonidoSaliente();
                         } else {
                             if (strcmp($cmd->getAtributo(), "GENERAL") == 0) {
                                 $this->desactivarSonidoGeneral();
                             }
                         }
                     }
                 }
             }
         }
     }
 }
Ejemplo n.º 3
0
 /**
  * Metodo para examinar el entorno y la accion del comando recivido por la pelicula flash para
  * seleccionar la camara y la funcion adecuada
  *
  * @param ComandoFlash $cmd
  */
 public function getComandoFlash($cmd)
 {
     if (strcmp($cmd->getAccion(), "ACERCAR") == 0) {
         if (strcmp($cmd->getEntorno(), "CAMARA_1") == 0) {
             $this->acercarCamaraAlumnos1();
         } else {
             if (strcmp($cmd->getEntorno(), "CAMARA_2") == 0) {
                 $this->acercarCamaraAlumnos2();
             }
         }
         if (strcmp($cmd->getEntorno(), "CAMARA_3") == 0) {
             $this->acercarCamaraPresidencia();
         }
     } else {
         if (strcmp($cmd->getAccion(), "ALEJAR") == 0) {
             if (strcmp($cmd->getEntorno(), "CAMARA_1") == 0) {
                 $this->alejarCamaraAlumnos1();
             } else {
                 if (strcmp($cmd->getEntorno(), "CAMARA_2") == 0) {
                     $this->alejarCamaraAlumnos2();
                 }
             }
             if (strcmp($cmd->getEntorno(), "CAMARA_3") == 0) {
                 $this->alejarCamaraPresidencia();
             }
         } else {
             if (strcmp($cmd->getAccion(), "PANR") == 0) {
                 if (strcmp($cmd->getEntorno(), "CAMARA_1") == 0) {
                     $this->panRightCamaraAlumnos1();
                 } else {
                     if (strcmp($cmd->getEntorno(), "CAMARA_2") == 0) {
                         $this->panRightCamaraAlumnos2();
                     }
                 }
                 if (strcmp($cmd->getEntorno(), "CAMARA_3") == 0) {
                     $this->panRightCamaraPresidencia();
                 }
             } else {
                 if (strcmp($cmd->getAccion(), "PANL") == 0) {
                     if (strcmp($cmd->getEntorno(), "CAMARA_1") == 0) {
                         $this->panLeftCamaraAlumnos1();
                     } else {
                         if (strcmp($cmd->getEntorno(), "CAMARA_2") == 0) {
                             $this->panLeftCamaraAlumnos2();
                         }
                     }
                     if (strcmp($cmd->getEntorno(), "CAMARA_3") == 0) {
                         $this->panLeftCamaraPresidencia();
                     }
                 } else {
                     if (strcmp($cmd->getAccion(), "TILTUP") == 0) {
                         if (strcmp($cmd->getEntorno(), "CAMARA_1") == 0) {
                             $this->tiltUpCamaraAlumnos1();
                         } else {
                             if (strcmp($cmd->getEntorno(), "CAMARA_2") == 0) {
                                 $this->tiltUpCamaraAlumnos2();
                             }
                         }
                         if (strcmp($cmd->getEntorno(), "CAMARA_3") == 0) {
                             $this->tiltUpCamaraPresidencia();
                         }
                     } else {
                         if (strcmp($cmd->getAccion(), "TILTDOWN") == 0) {
                             if (strcmp($cmd->getEntorno(), "CAMARA_1") == 0) {
                                 $this->tiltDownCamaraAlumnos1();
                             } else {
                                 if (strcmp($cmd->getEntorno(), "CAMARA_2") == 0) {
                                     $this->tiltDownCamaraAlumnos2();
                                 }
                             }
                             if (strcmp($cmd->getEntorno(), "CAMARA_3") == 0) {
                                 $this->tiltDownCamaraPresidencia();
                             }
                         } else {
                             if (strcmp($cmd->getAccion(), "POSICION") == 0) {
                                 if (strcmp($cmd->getEntorno(), "CAMARA_1") == 0) {
                                     $this->presetCamaraAlumnos1($cmd->getAtributo());
                                 } else {
                                     if (strcmp($cmd->getEntorno(), "CAMARA_2") == 0) {
                                         $this->presetCamaraAlumnos2($cmd->getAtributo());
                                     }
                                 }
                                 if (strcmp($cmd->getEntorno(), "CAMARA_3") == 0) {
                                     $this->presetCamaraPresidencia($cmd->getAtributo());
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     // if(strcmp($tipoComando, "COMANDO")==0)
     //        $comandoFlash=$this->crearComandoFlash($cmd->getEntorno());
     //        //else if(strcmp($tipoComando, "POSICION")==0)
     //        $comandoFlash=$this->crearComandoPosicionFlash($cmd->getEntorno());
     //        return $comandoFlash;
 }
Ejemplo n.º 4
0
 /**
  * Metodo para examinar la accion del comando recivido por la pelicula flash
  * para elegir la accion de las luces que se quiere
  *
  * @param ComandoFlash $cmd
  */
 public function getComandoFlash($cmd)
 {
     if (strcmp($cmd->getAccion(), "ENCENDER_SALA") == 0) {
         $this->lucesEncenderSala();
     } else {
         if (strcmp($cmd->getAccion(), "APAGAR_SALA") == 0) {
             $this->lucesApagarSala();
         } else {
             if (strcmp($cmd->getAccion(), "SUBIR") == 0) {
                 //denak batera igotzeko, ez da erabiltzen
                 $this->luzSalaNivel($cmd->getAtributo());
             } else {
                 if (strcmp($cmd->getAccion(), "BAJAR") == 0) {
                     //denak batera jeisteko, ez da erabiltzen
                     $this->luzSalaNivel($cmd->getAtributo());
                 } else {
                     if (strcmp($cmd->getAccion(), "ENCENDER") == 0) {
                         $this->luzSalaEncenderTodo($cmd->getAtributo());
                     } else {
                         if (strcmp($cmd->getAccion(), "APAGAR") == 0) {
                             $this->luzSalaApagarTodo($cmd->getAtributo());
                         } else {
                             if (strcmp($cmd->getAccion(), "SUELO") == 0) {
                                 $this->getComandoLucesSueloFlash($cmd);
                             } else {
                                 if (strcmp($cmd->getAccion(), "TECHO") == 0) {
                                     $this->getComandoLucesTechoFlash($cmd);
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }