Advertisement
Javic9

Untitled

May 2nd, 2020
3,678
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ada 1.42 KB | None | 0 0
  1. with data_types, IO, control_procedures, Ada.Text_IO;
  2. use data_types, IO, control_procedures, Ada.Text_IO;
  3. with recursoCompartido; use recursoCompartido;
  4. procedure sistema_control is
  5.    
  6.    ST2: Temperatura;
  7.    SD1 : Temperatura;
  8.    SC1, SC2: Caudal;
  9.    BDW : BBDD_Write;
  10.    BDR : BBDD_Read;
  11.    numero : Integer;
  12.    
  13.    task control_CS;
  14.    task control_MD;
  15.    task control_seguridad;
  16.    
  17.    task body control_CS is
  18.      
  19.    begin
  20.      
  21.       Put_Line("COMIENZO DE LA FASE DE CONTROL DEL CAMPO SOLAR");
  22.      
  23.       ST2 := 100.0;
  24.       SC1 := 200.0;
  25.      
  26.       for i in 1..5 loop
  27.      BDR.accesoBBDD_Read(numero);
  28.      BDR.ReadTemp(ST2);
  29.      BDW.WriteCau(1);
  30.       end loop;
  31.      
  32.    end control_CS;
  33.    
  34.    task body control_MD is
  35.      
  36.       begin
  37.      
  38.       Put_Line("COMIENZO DE LA FASE DE CONTROL DEL MODULO DE DESTILACIÓN");
  39.  
  40.      
  41.      SD1 := 100.0;
  42.      SC2 := 200.0;
  43.       for i in 1..5 loop
  44.      BDR.accesoBBDD_Read(numero);
  45.      BDR.ReadTemp(SD1);
  46.      BDW.WriteCau(2);
  47.       end loop;
  48.      
  49.    end control_MD;
  50.    
  51.    task body control_seguridad is
  52.      
  53.    begin
  54.      
  55.       Put_Line("COMIENZO DE LA FASE DE CONTROL DE SEGURIDAD");
  56.  
  57.      
  58.       ST2 := 100.0;
  59.       SC1 := 100.0;
  60.       SC2 := 200.0;
  61.      
  62.       for i in 1..5 loop
  63.       control_procedures.Control_Seguridad(ST2, SC1, SC2);    
  64.       end loop;
  65.    end control_seguridad;
  66.    
  67.      
  68. begin
  69.    null;
  70.    
  71. end sistema_control;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement