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