1. pragma Ada_2012; 
  2. --  (c) Copyright, Real-Time Innovations 2018 
  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. --  <internal> 
  12. --  The default implementation for these methods does almost nothing and 
  13. --  returns the Ref error code by default, signaling the type does not 
  14. --  support zero copy operations. 
  15. -- 
  16. --  For actual zero copy types, the generated type support code will define 
  17. --  and implement a subclass of DDS.MetpTypeSupport.Ref overriding 
  18. --  these methods and using the real METP routines from the C library. This 
  19. --  subclass will be used as part of the type traits. 
  20. --  </internal> 
  21. with System; 
  22. with DDS.MetpTypeSupport; 
  23. with DDS.DataWriter; 
  24. with DDS.DataReader; 
  25. generic 
  26. package DDS.MetpTypeSupport_Generic is 
  27.  
  28.    type Ref is new DDS.MetpTypeSupport.Ref with null record; 
  29.    type Ref_Access is access all Ref'Class; 
  30.  
  31.    function Metp_Supported (This : Ref) return Standard.Boolean is (True); 
  32.  
  33.    procedure DataWriter_Create_Metp_Data 
  34.      (This            : Ref; 
  35.       Writer          : access DDS.DataWriter.Ref'class; 
  36.       Sample          : out System.Address; 
  37.       Initialize_Data : out Standard.Boolean); 
  38.  
  39.    procedure DataWriter_Delete_Metp_Data 
  40.      (This   : Ref; 
  41.       Writer : access DDS.DataWriter.Ref'class; 
  42.       Sample : System.Address); 
  43.  
  44.    function DataWriter_Is_Metp_Writer 
  45.      (This   : Ref; 
  46.       Writer : access DDS.DataWriter.Ref'class) return Standard.Boolean; 
  47.  
  48.    procedure DataWriter_Write_Metp_Data 
  49.      (This     : Ref; 
  50.       Writer   : access DDS.DataWriter.Ref'class; 
  51.       Sample   : System.Address; 
  52.       Handle   : DDS.InstanceHandle_T_Access; 
  53.       W_Params : DDS.WriteParams_T_Access); 
  54.  
  55.    function DataReader_Is_Metp_Data_Consistent 
  56.      (This        : Ref; 
  57.       Reader      : access DDS.DataReader.Ref'Class; 
  58.       Sample      : System.Address; 
  59.       Sample_Info : DDS.SampleInfo_Access) return  Standard.Boolean; 
  60.  
  61. end DDS.MetpTypeSupport_Generic;