File : a-rttiev-bb.ads


   1 ------------------------------------------------------------------------------
   2 --                                                                          --
   3 --                         GNAT RUN-TIME COMPONENTS                         --
   4 --                                                                          --
   5 --          A D A . R E A L _ T I M E . T I M I N G _ E V E N T S           --
   6 --                                                                          --
   7 --                                 S p e c                                  --
   8 --                                                                          --
   9 --           Copyright (C) 2005-2013, Free Software Foundation, Inc.        --
  10 --                                                                          --
  11 -- This specification is derived from the Ada Reference Manual for use with --
  12 -- GNAT. The copyright notice above, and the license provisions that follow --
  13 -- apply solely to the  contents of the part following the private keyword. --
  14 --                                                                          --
  15 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
  16 -- terms of the  GNU General Public License as published  by the Free Soft- --
  17 -- ware  Foundation;  either version 3,  or (at your option) any later ver- --
  18 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
  19 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
  20 -- or FITNESS FOR A PARTICULAR PURPOSE.                                     --
  21 --                                                                          --
  22 --                                                                          --
  23 --                                                                          --
  24 --                                                                          --
  25 --                                                                          --
  26 -- You should have received a copy of the GNU General Public License and    --
  27 -- a copy of the GCC Runtime Library Exception along with this program;     --
  28 -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
  29 -- <http://www.gnu.org/licenses/>.                                          --
  30 --                                                                          --
  31 -- GNAT was originally developed  by the GNAT team at  New York University. --
  32 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
  33 --                                                                          --
  34 ------------------------------------------------------------------------------
  35 
  36 with System.BB.Timing_Events;
  37 
  38 package Ada.Real_Time.Timing_Events is
  39 
  40    type Timing_Event is tagged limited private;
  41 
  42    type Timing_Event_Handler
  43      is access protected procedure (Event : in out Timing_Event);
  44 
  45    procedure Set_Handler
  46      (Event   : in out Timing_Event;
  47       At_Time : Time;
  48       Handler : Timing_Event_Handler);
  49 
  50    function Current_Handler
  51      (Event : Timing_Event) return Timing_Event_Handler;
  52 
  53    procedure Cancel_Handler
  54      (Event     : in out Timing_Event;
  55       Cancelled : out Boolean);
  56 
  57    function Time_Of_Event (Event : Timing_Event) return Time;
  58 
  59 private
  60 
  61    pragma Inline (Set_Handler);
  62    pragma Inline (Current_Handler);
  63    pragma Inline (Cancel_Handler);
  64    pragma Inline (Time_Of_Event);
  65 
  66    type Timing_Event is new System.BB.Timing_Events.Timing_Event with
  67       record
  68          Real_Handler : Timing_Event_Handler;
  69          --  This is the real handler to be called at timeout, opposed to
  70          --  "Handler" (inherited from System.BB.Timing_Events.Timing_Event)
  71          --  which is a wrapper.
  72       end record;
  73 
  74 end Ada.Real_Time.Timing_Events;