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. limited with DDS.DataReader; 
  13. with DDS.Condition_Impl; 
  14. with DDS.ReadCondition; 
  15. with RTIDDS.Low_Level.ndds_reda_reda_worker_impl_h; 
  16. with RTIDDS.Low_Level.ndds_dds_c_dds_c_subscription_h; 
  17. with DDS.DataReader_Impl; 
  18.  
  19. package DDS.ReadCondition_Impl is 
  20.    use RTIDDS.Low_Level.ndds_dds_c_dds_c_subscription_h; 
  21.    type Ref is new DDS.Condition_Impl.Ref and DDS.ReadCondition.Ref with null record; 
  22.    type Ref_Access is access all Ref'Class; 
  23.  
  24.    function Get_Trigger_Value 
  25.      (Self : access Ref) 
  26.      return DDS.Boolean; 
  27.  
  28.    function Get_Sample_State_Mask 
  29.      (Self : not null access Ref) 
  30.      return DDS.SampleStateMask; 
  31.  
  32.    function Get_View_State_Mask 
  33.      (Self : not null access Ref) 
  34.      return DDS.ViewStateMask; 
  35.  
  36.    function Get_Instance_State_Mask 
  37.      (Self : not null access Ref) 
  38.      return DDS.InstanceStateMask; 
  39.  
  40.    function Get_DataReader 
  41.      (Self : not null access Ref) 
  42.       return access DDS.DataReader.Ref'Class; 
  43.  
  44.    function CreateI 
  45.      (C_DataReader  : DDS.DataReader_Impl.DDS_DataReader_Access; 
  46.       Sample_Mask   : DDS.SampleStateMask; 
  47.       View_Mask     : DDS.ViewStateMask; 
  48.       Instance_Mask : DDS.InstanceStateMask) 
  49.       return DDS.ReadCondition.Ref_Access; 
  50.  
  51.    procedure Free (Self : access Ref'Class); 
  52.  
  53.    function Get_Impl_I 
  54.      (Self : access Ref) 
  55.      return DDS.Condition_Impl.Ref_Access; 
  56.  
  57.    procedure Finalize_Callback 
  58.      (arg1 : System.Address; 
  59.       arg2 : System.Address; 
  60.       arg3 : access RTIDDS.Low_Level.ndds_reda_reda_worker_impl_h.REDAWorker); 
  61.    pragma Convention (C, Finalize_Callback); 
  62.    type DDS_ReadCondition_Access is access all DDS_ReadCondition with Storage_Size => 0; 
  63.    function GetInterface (Self : not null access Ref) return DDS_ReadCondition_Access; 
  64.    procedure SetInterface (Self : not null access Ref; To : DDS_ReadCondition_Access); 
  65. private 
  66.  
  67.    procedure Free_Impl is new Ada.Unchecked_Deallocation (Ref'Class, Ref_Access); 
  68.    procedure Free_Mem (Self : in out Ref_Access) renames Free_Impl; 
  69.  
  70. end DDS.ReadCondition_Impl;