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 Ada.Unchecked_Conversion; 
  13. with DDS.DomainParticipantListener; 
  14. with DDS.TopicListener; 
  15. with DDS.SubscriberListener; 
  16. with DDS.PublisherListener; 
  17. with DDS.Publisher; 
  18. with DDS.PublisherSeq; 
  19. with DDS.Topic; 
  20. with DDS.TopicDescription; 
  21. with DDS.Subscriber; 
  22. with DDS.SubscriberSeq; 
  23. with DDS.ContentFilteredTopic; 
  24. with DDS.MultiTopic; 
  25. with DDS.DomainParticipant; 
  26. limited with dds.DomainParticipantFactory; 
  27. --  limited with DDS.FlowController; 
  28. with DDS.Entity_Impl; 
  29. with DDS.Entity; 
  30. with DDS.DataWriter; 
  31. with DDS.DataWriterListener; 
  32. with DDS.DataReader; 
  33. with DDS.DataReaderListener; 
  34. with RTIDDS.Low_Level.ndds_dds_c_dds_c_infrastructure_h; use RTIDDS.Low_Level.ndds_dds_c_dds_c_infrastructure_h; 
  35. package DDS.DomainParticipant_Impl is 
  36.  
  37.    type Ref is new DDS.Entity_Impl.Ref and DDS.DomainParticipant.Ref with record 
  38.       Domain_Id : DDS.DomainId_T := 0; 
  39.    end record; 
  40.  
  41.    type Ref_Access is access all Ref'Class; 
  42.  
  43.    function Create_Publisher 
  44.      (Self       : not null access Ref; 
  45.       Qos        : in DDS.PublisherQos; 
  46.       A_Listener : in DDS.PublisherListener.Ref_Access; 
  47.       Mask       : in DDS.StatusMask) 
  48.       return DDS.Publisher.Ref_Access; 
  49.  
  50.    function Create_Publisher_With_Profile 
  51.      (Self         : not null access Ref; 
  52.       Library_Name : in DDS.String; 
  53.       profile_name : in DDS.String; 
  54.       A_Listener   : in DDS.PublisherListener.Ref_Access := null; 
  55.       Mask         : in DDS.StatusMask := STATUS_MASK_NONE) 
  56.       return DDS.Publisher.Ref_Access; 
  57.    function Create_Publisher_With_Profile 
  58.      (Self         : not null access Ref; 
  59.       Library_Name : in Standard.String; 
  60.       profile_name : in Standard.String; 
  61.       A_Listener   : in DDS.PublisherListener.Ref_Access := null; 
  62.       Mask         : in DDS.StatusMask := STATUS_MASK_NONE) 
  63.       return DDS.Publisher.Ref_Access; 
  64.  
  65.    procedure Delete_Publisher 
  66.      (Self      : not null access Ref; 
  67.       Publisher : in out DDS.Publisher.Ref_Access); 
  68.  
  69.  
  70.    function Create_Subscriber 
  71.      (Self       : not null access Ref; 
  72.       Qos        : in DDS.SubscriberQos; 
  73.       A_Listener : in DDS.SubscriberListener.Ref_Access; 
  74.       Mask       : in DDS.StatusMask) 
  75.       return DDS.Subscriber.Ref_Access; 
  76.  
  77.    function Create_Subscriber_With_Profile 
  78.      (Self         : not null access Ref; 
  79.       Library_Name : in DDS.String; 
  80.       profile_name : in DDS.String; 
  81.       A_Listener   : in DDS.SubscriberListener.Ref_Access  := null; 
  82.       Mask         : in DDS.StatusMask := STATUS_MASK_NONE) 
  83.       return DDS.Subscriber.Ref_Access; 
  84.  
  85.    function Create_Subscriber_With_Profile 
  86.      (Self         : not null access Ref; 
  87.       Library_Name : in Standard.String; 
  88.       profile_name : in Standard.String; 
  89.       A_Listener   : in DDS.SubscriberListener.Ref_Access  := null; 
  90.       Mask         : in DDS.StatusMask := STATUS_MASK_NONE) 
  91.       return DDS.Subscriber.Ref_Access; 
  92.  
  93.  
  94.    procedure Delete_Subscriber 
  95.      (Self       :  not null access Ref; 
  96.       Subscriber :  in out DDS.Subscriber.Ref_Access); 
  97.  
  98.  
  99.    function Create_DataWriter 
  100.      (Self       : not null access Ref; 
  101.       A_Topic    : in DDS.Topic.Ref_Access; 
  102.       Qos        : in DDS.DataWriterQos := DDS.Publisher.DATAWRITER_QOS_DEFAULT; 
  103.       A_Listener : in DDS.DataWriterListener.Ref_Access := null; 
  104.       Mask       : in DDS.StatusMask := STATUS_MASK_NONE) 
  105.       return DDS.DataWriter.Ref_Access; 
  106.  
  107.    function Create_DataWriter_With_Profile 
  108.      (Self         : not null access Ref; 
  109.       A_Topic      : in DDS.Topic.Ref_Access; 
  110.       Library_Name : in DDS.String; 
  111.       profile_name : in DDS.String; 
  112.       A_Listener   : in DDS.DataWriterListener.Ref_Access := null; 
  113.       Mask         : in DDS.StatusMask := STATUS_MASK_NONE) 
  114.       return DDS.DataWriter.Ref_Access; 
  115.    function Create_DataWriter_With_Profile 
  116.      (Self         : not null access Ref; 
  117.       A_Topic      : in DDS.Topic.Ref_Access; 
  118.       Library_Name : in Standard.String; 
  119.       profile_name : in Standard.String; 
  120.       A_Listener   : in DDS.DataWriterListener.Ref_Access := null; 
  121.       Mask         : in DDS.StatusMask := STATUS_MASK_NONE) 
  122.       return DDS.DataWriter.Ref_Access; 
  123.  
  124.    procedure Delete_DataWriter 
  125.      (Self         : not null access Ref; 
  126.       A_DataWriter : in out DDS.DataWriter.Ref_Access); 
  127.  
  128.  
  129.    function Create_DataReader 
  130.      (Self       : not null access Ref; 
  131.       Topic      : not null access DDS.TopicDescription.Ref'Class; 
  132.       Qos        : in DDS.DataReaderQoS := DDS.Subscriber.DATAREADER_QOS_DEFAULT; 
  133.       A_Listener : in DDS.DataReaderListener.Ref_Access := null; 
  134.       Mask       : in DDS.StatusMask := STATUS_MASK_NONE) 
  135.       return DDS.DataReader.Ref_Access; 
  136.  
  137.    function Create_DataReader_With_Profile 
  138.      (Self         : not null access Ref; 
  139.       Topic        : not null access DDS.TopicDescription.Ref'Class; 
  140.       Library_Name : in DDS.String; 
  141.       profile_name : in DDS.String; 
  142.       A_Listener   : in DDS.DataReaderListener.Ref_Access := null; 
  143.       Mask         : in DDS.StatusMask := STATUS_MASK_NONE) 
  144.       return DDS.DataReader.Ref_Access; 
  145.    function Create_DataReader_With_Profile 
  146.      (Self         : not null access Ref; 
  147.       Topic        : not null access DDS.TopicDescription.Ref'Class; 
  148.       Library_Name : in Standard.String; 
  149.       profile_name : in Standard.String; 
  150.       A_Listener   : in DDS.DataReaderListener.Ref_Access := null; 
  151.       Mask         : in DDS.StatusMask := STATUS_MASK_NONE) 
  152.       return DDS.DataReader.Ref_Access; 
  153.  
  154.    procedure Delete_DataReader 
  155.      (Self         : not null access Ref; 
  156.       A_DataReader : in out DDS.DataReader.Ref_Access); 
  157.  
  158.  
  159.    function Get_Builtin_Subscriber 
  160.      (Self :  not null access Ref) 
  161.       return DDS.Subscriber.Ref_Access; 
  162.  
  163.    function Get_Implicit_Publisher 
  164.      (Self :  not null access Ref) 
  165.       return DDS.Publisher.Ref_Access; 
  166.  
  167.    function Get_Implicit_Subscriber 
  168.      (Self :  not null access Ref) 
  169.       return DDS.Subscriber.Ref_Access; 
  170.  
  171.    function Create_Topic 
  172.      (Self       : not null access Ref; 
  173.       Topic_Name : in DDS.String; 
  174.       Type_Name  : in DDS.String; 
  175.       Qos        : in DDS.TopicQos; 
  176.       A_Listener : in DDS.TopicListener.Ref_Access; 
  177.       Mask       : in DDS.StatusMask) 
  178.       return DDS.Topic.Ref_Access; 
  179.  
  180.    function Create_Topic_With_Profile 
  181.      (Self         : not null access Ref; 
  182.       Topic_Name   : in DDS.String; 
  183.       Type_Name    : in DDS.String; 
  184.       Library_Name : in DDS.String; 
  185.       profile_name : in DDS.String; 
  186.       A_Listener   : in DDS.TopicListener.Ref_Access := null; 
  187.       Mask         : in DDS.StatusMask := STATUS_MASK_NONE) 
  188.       return DDS.Topic.Ref_Access; 
  189.  
  190.    function Create_Topic_With_Profile 
  191.      (Self         : not null access Ref; 
  192.       Topic_Name   : in DDS.String; 
  193.       Type_Name    : in DDS.String; 
  194.       Library_Name : in Standard.String; 
  195.       profile_name : in Standard.String; 
  196.       A_Listener   : in DDS.TopicListener.Ref_Access := null; 
  197.       Mask         : in DDS.StatusMask := STATUS_MASK_NONE) 
  198.       return DDS.Topic.Ref_Access; 
  199.  
  200.    function  Get_Or_Create_Topic 
  201.      (Self       : not null access Ref; 
  202.       Topic_Name : in DDS.String; 
  203.       Type_Name  : in DDS.String; 
  204.       Qos        : in DDS.TopicQos := DDS.DomainParticipant.TOPIC_QOS_DEFAULT; 
  205.       A_Listener : in DDS.TopicListener.Ref_Access := null; 
  206.       Mask       : in DDS.StatusMask := STATUS_MASK_NONE) return  DDS.Topic.Ref_Access; 
  207.  
  208.    function  Get_Or_Create_Topic_With_Profile 
  209.      (Self         : not null access Ref; 
  210.       Topic_Name   : in DDS.String; 
  211.       Type_Name    : in DDS.String; 
  212.       Library_Name : in DDS.String; 
  213.       Profile_Name : in DDS.String; 
  214.       A_Listener   : in DDS.TopicListener.Ref_Access := null; 
  215.       Mask         : in DDS.StatusMask := STATUS_MASK_NONE) return  DDS.Topic.Ref_Access; 
  216.    procedure Delete_Topic 
  217.      (Self    : not null access Ref; 
  218.       A_Topic : in out DDS.Topic.Ref_Access); 
  219.  
  220.  
  221.    function Find_Topic 
  222.      (Self       : not null access Ref; 
  223.       Topic_Name : in DDS.String; 
  224.       Timeout    : in DDS.Duration_T) 
  225.       return DDS.Topic.Ref_Access; 
  226.  
  227.    function Lookup_Entity 
  228.      (Self : not null access Ref; 
  229.       Key  : in Dds.BuiltinTopicKey_T) 
  230.       return DDS.Entity.Ref_Access; 
  231.  
  232.    function Lookup_Topicdescription 
  233.      (Self : not null access Ref; 
  234.       Name : in DDS.String) 
  235.       return DDS.TopicDescription.Ref_Access; 
  236.  
  237.    function Create_Contentfilteredtopic 
  238.      (Self                  : not null access Ref; 
  239.       Name                  : in DDS.String; 
  240.       Related_Topic         : in DDS.Topic.Ref_Access; 
  241.       Filter_Expression     : in DDS.String; 
  242.       Filter_Parameters     : access DDS.String_Seq.Sequence) 
  243.       return DDS.ContentFilteredTopic.Ref_Access; 
  244.  
  245.    function Create_Correlation_Contentfilteredtopic 
  246.      (Participant      : not null access Ref; 
  247.       Topic            : not null DDS.Topic.Ref_Access; 
  248.       Correlation_Guid : DDS.Guid_T) 
  249.       return DDS.ContentFilteredTopic.Ref_Access; 
  250.  
  251.  
  252.    procedure Delete_Contentfilteredtopic 
  253.      (Self    : not null access Ref; 
  254.       CFTopic : in out DDS.ContentFilteredTopic.Ref_Access); 
  255.  
  256.    function Create_MultiTopic 
  257.      (Self                    : not null access Ref; 
  258.       Name                    : in DDS.String; 
  259.       Type_Name               : in DDS.String; 
  260.       Subscription_Expression : in DDS.String; 
  261.       Expression_Parameters   : access DDS.String_Seq.Sequence) 
  262.       return DDS.MultiTopic.Ref_Access; 
  263.  
  264.    procedure Delete_MultiTopic 
  265.      (Self     : not null access Ref; 
  266.       MTopic  : in out DDS.MultiTopic.Ref_Access); 
  267.  
  268. --     function Create_FlowController 
  269. --       (Self         : not null access Ref; 
  270. --        name         : DDS.String; 
  271. --        prop         : access DDS.FlowControllerProperty_T) 
  272. --        return access DDS.FlowController.Ref'Class; 
  273.  
  274.    procedure Delete_Contained_Entities 
  275.      (Self :  not null access Ref); 
  276.  
  277.  
  278.    procedure Set_Qos 
  279.      (Self : not null access Ref; 
  280.       Qos  : in DDS.DomainParticipantQos); 
  281.  
  282.    procedure Set_Qos_With_Profile 
  283.      (Self          : not null access Ref; 
  284.       library_name  : in String; 
  285.       profile_name  : in String); 
  286.    procedure Set_Qos_With_Profile 
  287.      (Self          : not null access Ref; 
  288.       library_name  : in Standard.String; 
  289.       profile_name  : in Standard.String); 
  290.  
  291.    procedure Get_Qos 
  292.      (Self : not null access Ref; 
  293.       Qos  : in out DDS.DomainParticipantQos); 
  294.  
  295.    procedure Set_Listener 
  296.      (Self       : not null access Ref; 
  297.       A_Listener : DDS.DomainParticipantListener.Ref_Access; 
  298.       Mask       : in DDS.StatusMask); 
  299.  
  300.    function Get_Listener 
  301.      (Self :  not null access Ref) 
  302.       return DDS.DomainParticipantListener.Ref_Access; 
  303.  
  304.  
  305.    procedure Ignore_Participant 
  306.      (Self   : not null access Ref; 
  307.       Handle : in DDS.InstanceHandle_T); 
  308.  
  309.  
  310.    procedure Ignore_Topic 
  311.      (Self   : not null access Ref; 
  312.       Handle : in DDS.InstanceHandle_T); 
  313.  
  314.    procedure Ignore_Publication 
  315.      (Self   : not null access Ref; 
  316.       Handle : in DDS.InstanceHandle_T); 
  317.  
  318.    procedure Ignore_Subscription 
  319.      (Self   : not null access Ref; 
  320.       Handle : in DDS.InstanceHandle_T); 
  321.  
  322.    function Get_Domain_Id 
  323.      (Self :  not null access Ref) 
  324.       return DDS.DomainId_T; 
  325.  
  326.    procedure Assert_Liveliness 
  327.      (Self :  not null access Ref); 
  328.  
  329.    procedure Set_Default_DataReader_Qos 
  330.      (Self : not null access Ref; 
  331.       Qos  : in DDS.DataReaderQoS); 
  332.  
  333.    procedure Set_Default_DataReader_Qos_With_Profile 
  334.      (Self     : not null access Ref; 
  335.       libName  : DDS.String; 
  336.       profName : DDS.String); 
  337.    procedure Set_Default_DataReader_Qos_With_Profile 
  338.      (Self     : not null access Ref; 
  339.       libName  : Standard.String; 
  340.       profName : Standard.String); 
  341.  
  342.    procedure Set_Default_DataWriter_Qos 
  343.      (Self : not null access Ref; 
  344.       Qos  : in DDS.DataWriterQoS); 
  345.  
  346.    procedure Set_Default_DataWriter_Qos_With_Profile 
  347.      (Self     : not null access Ref; 
  348.       libName  : DDS.String; 
  349.       profName : DDS.String); 
  350.    procedure Set_Default_DataWriter_Qos_With_Profile 
  351.      (Self     : not null access Ref; 
  352.       libName  : Standard.String; 
  353.       profName : Standard.String); 
  354.  
  355.    procedure Set_Default_Publisher_Qos 
  356.      (Self : not null access Ref; 
  357.       Qos  : in DDS.PublisherQos); 
  358.  
  359.    procedure Set_Default_Publisher_Qos_With_Profile 
  360.      (Self     : not null access Ref; 
  361.       libName  : DDS.String; 
  362.       profName : DDS.String); 
  363.    procedure Set_Default_Publisher_Qos_With_Profile 
  364.      (Self     : not null access Ref; 
  365.       libName  : Standard.String; 
  366.       profName : Standard.String); 
  367.  
  368.    procedure Get_Default_Publisher_Qos 
  369.      (Self    : not null access Ref; 
  370.       Qos     : in out DDS.PublisherQos); 
  371.  
  372.    procedure Set_Default_Subscriber_Qos 
  373.      (Self : not null access Ref; 
  374.       Qos  : in DDS.SubscriberQos); 
  375.  
  376.    procedure Set_Default_Subscriber_Qos_With_Profile 
  377.      (Self : not null access Ref; 
  378.       libraryName : DDS.String; 
  379.       profileName : DDS.String); 
  380.    procedure Set_Default_Subscriber_Qos_With_Profile 
  381.      (Self : not null access Ref; 
  382.       libraryName : Standard.String; 
  383.       profileName : Standard.String); 
  384.  
  385.    procedure Get_Default_Subscriber_Qos 
  386.      (Self    : not null access Ref; 
  387.       Qos     : in out DDS.SubscriberQos); 
  388.  
  389.    procedure Get_Default_DataReader_Qos 
  390.      (Self : not null access Ref; 
  391.       Qos  : in out DDS.DataReaderQoS); 
  392.  
  393.    procedure Get_Default_DataWriter_Qos 
  394.      (Self : not null access Ref; 
  395.       Qos  : in out DDS.DataWriterQos); 
  396.  
  397.    procedure Set_Default_Topic_Qos 
  398.      (Self : not null access Ref; 
  399.       Qos  : in DDS.TopicQos); 
  400.  
  401.    procedure Set_Default_Topic_Qos_With_Profile 
  402.      (Self        : not null access Ref; 
  403.       libraryName : DDS.String; 
  404.       profileName : DDS.String); 
  405.    procedure Set_Default_Topic_Qos_With_Profile 
  406.      (Self        : not null access Ref; 
  407.       libraryName : Standard.String; 
  408.       profileName : Standard.String); 
  409.  
  410.    procedure Get_Default_Topic_Qos 
  411.      (Self    : not null access Ref; 
  412.       Qos     : in out DDS.TopicQos); 
  413.  
  414.    procedure Set_Default_Profile 
  415.      (Self          : not null access Ref; 
  416.       library_name  : DDS.String; 
  417.       profile_name  : DDS.String); 
  418.  
  419.    procedure Set_Default_Library 
  420.      (Self          : not null access Ref; 
  421.       library_name   : DDS.String); 
  422.  
  423.    function Get_Default_Library 
  424.      (Self : not null access Ref) 
  425.       return DDS.String; 
  426.  
  427.    function Get_Default_Profile 
  428.      (Self : not null access Ref) 
  429.       return DDS.String; 
  430.  
  431.    function Get_Default_Profile_Library 
  432.      (Self : not null access Ref) 
  433.       return DDS.String; 
  434.  
  435.    procedure Get_Default_Flowcontroller_Property 
  436.      (Self : not null access Ref; 
  437.       Property : in out DDS.FlowControllerProperty_T); 
  438.  
  439.    procedure Set_Default_Flowcontroller_Property 
  440.      (Self : not null access Ref; 
  441.       Property : in DDS.FlowControllerProperty_T); 
  442.  
  443.    function Get_Discovered_Participants 
  444.      (Self                :  access Ref) 
  445.       return DDS.InstanceHandle_Seq.Sequence; 
  446.  
  447.    function Get_Discovered_Participant_Data 
  448.      (Self               : not null access Ref; 
  449.       Participant_Handle : in DDS.InstanceHandle_T) 
  450.       return DDS.ParticipantBuiltinTopicData; 
  451.  
  452.    function Get_Discovered_Topics 
  453.      (Self :  access Ref) 
  454.       return DDS.InstanceHandle_Seq.Sequence; 
  455.  
  456.    function Get_Discovered_Topic_Data 
  457.      (Self         : not null access Ref; 
  458.       Topic_Handle : in DDS.InstanceHandle_T) 
  459.       return DDS.TopicBuiltinTopicData; 
  460.  
  461.    procedure Get_Discovered_Topic_Data 
  462.      (Self         : not null access Ref; 
  463.       Topic_Handle : in DDS.InstanceHandle_T; 
  464.       data         : access DDS.TopicBuiltinTopicData); 
  465.  
  466.    function Contains_Entity 
  467.      (Self     : not null access Ref; 
  468.       A_Handle : in DDS.InstanceHandle_T) 
  469.       return Boolean; 
  470.  
  471.    function Get_Current_Time 
  472.      (Self : not null access Ref) 
  473.       return DDS.Time_T; 
  474.  
  475.    procedure Free (This : in out Ref_Access); 
  476.  
  477.    function CreateI 
  478.      (Participant_Factory   : not null access dds.DomainParticipantFactory.ref; 
  479.       Domain_Id             : in DDS.DomainId_T; 
  480.       Qos                   : in DDS.DomainParticipantQos; 
  481.       A_Listener            : in DDS.DomainParticipantListener.Ref_Access; 
  482.       Mask                  : in DDS.StatusMask) 
  483.       return DDS.DomainParticipant.Ref_Access; 
  484.  
  485.    function CreateI 
  486.      (Participant_Factory : not null access dds.DomainParticipantFactory.ref; 
  487.       Domain_Id             : in DDS.DomainId_T; 
  488.       library_name          : in DDS.String; 
  489.       profile_name          : in DDS.String; 
  490.       A_Listener            : in DDS.DomainParticipantListener.Ref_Access; 
  491.       Mask                  : in DDS.StatusMask) 
  492.       return DDS.DomainParticipant.Ref_Access; 
  493.  
  494.  
  495.    type DDS_DomainParticipant_Access is access all DDS_DomainParticipant with Storage_Size => 0; 
  496.    function Get_FacadeI (C_DomainParticpant : DDS_DomainParticipant_Access) 
  497.                          return Ref_Access; 
  498.    function as_dds_entety_access is new ada.Unchecked_Conversion (DDS_DomainParticipant_Access, DDS.Entity_Impl.DDS_Entity_Access); 
  499.  
  500.    function GetInterface (Self : not null access Ref) return DDS_DomainParticipant_Access; 
  501.    procedure SetInterface (Self : not null access Ref; To : DDS_DomainParticipant_Access); 
  502.  
  503.    procedure Add_Peer 
  504.      (Self             : not null access Ref; 
  505.       peer_desc_string : DDS.String); 
  506.  
  507.    procedure Register_Builtin_TypesI (Self : not null access Ref); 
  508.  
  509.    procedure Register_User_TypesI (Self : not null access Ref); 
  510.  
  511.    procedure Delete_Implicit_EntitiesI (Self : not null access Ref); 
  512.  
  513.    procedure Get_Publishers 
  514.      (Self : not null access Ref; 
  515.       publishers : access DDS.PublisherSeq.Sequence); 
  516.  
  517.    procedure Get_Subscribers 
  518.      (Self        : not null access Ref; 
  519.       subscribers : access DDS.SubscriberSeq.Sequence); 
  520.  
  521.    type Register_Type_Procedure is not null access procedure 
  522.      (Participant :  not null access DDS.DomainParticipant.Ref'Class); 
  523.  
  524.    procedure Register_Type_Registration (P : Register_Type_Procedure); 
  525. private 
  526.  
  527.    procedure Free_Impl is new Ada.Unchecked_Deallocation (Ref'Class, Ref_Access); 
  528.    procedure Free_Mem (This : in out Ref_Access) renames Free_Impl; 
  529.  
  530. end DDS.DomainParticipant_Impl;