Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with Ada.Text_IO; use Ada.Text_IO;
- with data_types; use data_types;
- package body recursoCompartido is
- protected body BBDD_Read is
- entry accesoBBDD_Read(I : out Integer) when Number > 0 is
- begin
- I := 0;
- Put_Line("Accediendo a la base de datos para realizar una lectura");
- end accesoBBDD_Read;
- entry ReadTemp(T : out Temperatura) when Number > 0 is
- begin
- T := 0.0;
- Put_Line("Lectura de valores de la temperatura");
- end ReadTemp;
- end BBDD_Read;
- protected body BBDD_Write is
- entry accesoBBDD_Write(I : out Integer) when Number > 0 is
- begin
- I := 0;
- Put_Line("Accediendo a la base de datos para realizar una escritura");
- end accesoBBDD_Write;
- entry WriteCau(C : in Integer) when Number > 0 is
- begin
- --C := 0.0;
- Put_Line("Realizando escritura del caudal numero " & C'Img & " en la base de datos");
- end WriteCau;
- end BBDD_Write;
- task body pantalla is
- begin
- loop
- select
- accept Acceso (I : out integer) do
- I := 0;
- Put_Line("Accediendo a la base de datos");
- end Acceso;
- or
- accept ControlS (I : out integer) do
- I := 0;
- Put_Line("Accediendo al control de seguridad del sistema");
- end ControlS;
- or
- accept SeguridadCorrecta (I : out integer) do
- I := 0;
- Put_Line("Condiciones de seguridad correctas");
- end SeguridadCorrecta;
- or
- accept FalloSeguridad (I : out integer) do
- I := 0;
- Put_Line("Se ha producido un error de seguridad");
- end FalloSeguridad;
- or
- terminate;
- end select;
- end loop;
- end pantalla;
- end recursoCompartido;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement