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