1. pragma Ada_2012; 
  2. --  (c) Copyright, Real-Time Innovations, $Date:: 2012-02-16 #$ 
  3. --  All rights reserved. 
  4. -- 
  5. --  No duplications, whole or partial, manual or electronic, may be made 
  6. --  without express written permission.  Any such copies, or 
  7. --  revisions thereof, must display this notice unaltered. 
  8. --  This code contains trade secrets of Real-Time Innovations, Inc. 
  9.  
  10.  
  11.  
  12. with DDS.Condition; 
  13. with DDS.GuardCondition_Impl; 
  14.  
  15. --  <dref>GuardCondition</dref> 
  16. package DDS.GuardCondition is 
  17.  
  18.    --  Detailed Description 
  19.    --  A specific DDSCondition whose trigger_value is completely under the control of the application. 
  20.    --  The DDS.GuardCondition provides a way for an application to manually wake up a DDS.WaitSet. 
  21.    --  This is accomplished by attaching the DDS.GuardCondition to the DDS.SWaitSet and then 
  22.    --  setting the trigger_value by means of the DDS.GuardCondition.set_trigger_value operation. 
  23.    -- 
  24.    --  See also: 
  25.    --      DDS.WaitSet 
  26.  
  27.    type Ref is limited new Ada.Finalization.Limited_Controlled and DDS.Condition.Ref with private; 
  28.    --  <dref>GuardCondition_new</dref> 
  29.  
  30.    type Ref_Access is access all Ref'Class; 
  31.  
  32.    procedure Initialize 
  33.      (Self : in out Ref); 
  34.  
  35.    procedure Adjust 
  36.      (Self : in out Ref); 
  37.  
  38.    procedure Finalize 
  39.      (Self : in out Ref); 
  40.  
  41.    procedure Set_Trigger_Value 
  42.      (Self  : access Ref; 
  43.       Value : DDS.Boolean); 
  44.    --  <dref>GuardCondition_set_trigger_value</dref> 
  45.    --  <internal> 
  46.    --  Set the guard condition trigger value. 
  47.    --  </internal> 
  48.  
  49.    function Get_Trigger_Value 
  50.      (Self : access Ref) return DDS.Boolean; 
  51.    --  <internal> 
  52.    --  Returns the trigger value. 
  53.    --  </internal> 
  54.  
  55.    function Get_Impl_ConditionI 
  56.      (Self : access Ref) return DDS.GuardCondition_Impl.Ref_Access; 
  57.  
  58.    procedure Free (This : in out Ref_Access); 
  59.    --  <dref>GuardCondition_delete</dref> 
  60.  
  61.    function "=" (L : GuardCondition.Ref_Access; 
  62.                  R : Condition.Ref_Access) return Boolean; 
  63.  
  64.    function "=" (L : Condition.Ref_Access; 
  65.                  R : GuardCondition.Ref_Access) return Boolean; 
  66.  
  67. private 
  68.    type Ref is limited new Ada.Finalization.Limited_Controlled and DDS.Condition.Ref with record 
  69.       m_impl : DDS.GuardCondition_Impl.Ref_Access; 
  70.    end record; 
  71.  
  72.    procedure Free_Impl is new Ada.Unchecked_Deallocation (Ref'Class, Ref_Access); 
  73.    procedure Free (This : in out Ref_Access) renames Free_Impl; 
  74.  
  75. end DDS.GuardCondition; 
  76.