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. limited with DDS.Publisher; 
  12. with DDS.Topic; 
  13. with DDS.DataWriterListener; 
  14. with DDS.Domain_Entity; 
  15. with DDS.MetpTypeSupport; 
  16.  
  17. with System; 
  18.  
  19. --  <dref>DataWriter</dref> 
  20. package DDS.DataWriter is 
  21.  
  22. --  Detailed Description 
  23. --  <<interface>> Allows an application to set the value of the 
  24. --   data to be published under a given DDS.Topic. 
  25. -- 
  26. --  A DDS.DataWriter is attached to exactly one DDS.Publisher, 
  27. --  that acts as a factory for it. 
  28. -- 
  29. --  A DDS.DataWriter is bound to exactly one DDS.Topic and therefore to exactly 
  30. --  one data type. 
  31. --  The DDS.Topic must exist prior to the DDS.DataWriter's creation. 
  32. -- 
  33. --  DDS.DataWriter is an abstract class. 
  34. --  It must be specialized for each particular application data-type 
  35. --  (see USER_DATA). The additional methods or functions that must be defined 
  36. --  in the auto-generated class for a hypothetical application type Foo are 
  37. --  specified in the example type DDS.DataWriter. 
  38. -- 
  39. --  The following operations may be called even if the DDS.DataWriter 
  40. --  is not enabled. Other operations will fail exeption RETCODE_NOT_ENABLED 
  41. --  if called on a disabled DDS.DataWriter: 
  42. -- 
  43. --      * The base-class operations DDS.DataWriter.set_qos, 
  44. --                                  DDS.DataWriter.get_qos, 
  45. --                                  DDS.DataWriter.set_listener, 
  46. --                                  DDS.DataWriter.get_listener, 
  47. --                                  DDS.DataWriter.enable, 
  48. --                                  DDS.DataWriter.get_statuscondition, 
  49. --                                  DDS.DataWriter.get_status_changes 
  50. --      * DDS.DataWriter.get_liveliness_lost_status 
  51. --        DDS.DataWriter.get_offered_deadline_missed_status 
  52. --        DDS.DataWriter.get_offered_incompatible_qos_status 
  53. --        DDS.DataWriter.get_publication_matched_status 
  54. --        DDS.DataWriter.get_reliable_writer_cache_changed_status 
  55. --        DDS.DataWriter.get_reliable_reader_activity_changed_status 
  56. -- 
  57. --  Several DDS.DataWriter may operate in different threads. 
  58. --  If they share the same DDS.Publisher, the middleware guarantees that 
  59. --  its operations are thread-safe. 
  60. -- 
  61. --  See also: 
  62. --      DDS.example.FooDataWriter 
  63. --      Operations Allowed in Listener Callbacks 
  64.  
  65.    type Ref is limited interface and DDS.Domain_Entity.Ref; 
  66.    type Ref_Access is access all Ref'Class; 
  67.  
  68.    procedure Set_Qos 
  69.      (Self : not null access Ref; 
  70.       Qos  : in DDS.DataWriterQos) is abstract; 
  71.    --  <dref>DataWriter_set_qos</dref> 
  72.  
  73.    procedure  Set_Qos_With_Profile (Self : not null access Ref; 
  74.                        Library_Name : String; 
  75.                        Profile_Name : String) is abstract; 
  76.    procedure  Set_Qos_With_Profile (Self : not null access Ref; 
  77.                        Library_Name : Standard.String; 
  78.                        Profile_Name : Standard.String) is abstract; 
  79.    --  <dref>DataWriter_set_qos_with_profile</dref> 
  80.    --  <internal> 
  81.    --  Sets the writer QoS. 
  82.    --  This operation modifies the QoS of the dds.DataWriter. 
  83.    --  The dds.DataWriterQos.user_data, 
  84.    --      dds.DataWriterQos.deadline, 
  85.    --      dds.DataWriterQos.latency_budget, 
  86.    --      dds.DataWriterQos.ownership_strength, 
  87.    --      dds.DataWriterQos.transport_priority, 
  88.    --      dds.DataWriterQos.lifespan and 
  89.    --      dds.publication.DataWriterQos.writer_data_lifecycle can be changed. 
  90.    --  The other policies are immutable. 
  91.    --  See also: 
  92.    --      dds.DataWriterQos for rules on consistency among QoS 
  93.    --      set_qos (abstract) 
  94.    --      Operations Allowed in Listener Callbacks 
  95.    --  </internal> 
  96.  
  97.  
  98.    procedure Get_Qos 
  99.      (Self : not null access Ref; 
  100.       Qos  : in out DDS.DataWriterQos) is abstract; 
  101.    --  <dref>DataWriter_get_qos</dref> 
  102.    --  <internal> 
  103.    --  Gets the writer QoS. 
  104.    --  This method may potentially allocate memory depending on the sequences 
  105.    --  contained in some QoS policies. 
  106.    --  </internal> 
  107.  
  108.    procedure Set_Listener 
  109.      (Self       : not null access Ref; 
  110.       A_Listener : in DDS.DataWriterListener.Ref_Access; 
  111.       Mask       : in DDS.StatusMask) is abstract; 
  112.    --  <dref>DataWriter_set_listener</dref> 
  113.    --  <internal> 
  114.    --  Sets the writer listener. 
  115.    --  </internal> 
  116.  
  117.    function Get_Listener 
  118.      (Self : not null access Ref) 
  119.      return DDS.DataWriterListener.Ref_Access is abstract; 
  120.    --  <dref>DataWriter_get_listener</dref> 
  121.    --  <internal> 
  122.    --  Get the writer listener. 
  123.    --  </internal> 
  124.  
  125.    function Get_Topic 
  126.      (Self : not null access Ref) 
  127.      return DDS.Topic.Ref_Access is abstract; 
  128.    --  <dref>DataWriter_get_topic</dref> 
  129.    --  <internal> 
  130.    --  Get the writer listener. 
  131.    --  </internal> 
  132.  
  133.    function Get_Publisher 
  134.      (Self : not null access Ref) 
  135.      return access DDS.Publisher.Ref'Class is abstract; 
  136.    --  <dref>DataWriter_get_publisher</dref> 
  137.  
  138.    procedure Wait_For_Acknowledgments 
  139.      (Self     : not null access Ref; 
  140.       Max_Wait : in DDS.Duration_T) is abstract; 
  141.    --  <dref>DataWriter_wait_for_acknowledgments</dref> 
  142.  
  143.    procedure Wait_For_Asynchronous_Publishing 
  144.      (Self     : not null access Ref; 
  145.       Max_Wait : in DDS.Duration_T) is abstract; 
  146.    --  <dref>DataWriter_wait_for_asynchronous_publishing</dref> 
  147.  
  148.    procedure Get_Liveliness_Lost_Status 
  149.      (Self   : not null access Ref; 
  150.       Status : in out DDS.LivelinessLostStatus) is abstract; 
  151.    --  <dref>DataWriter_get_liveliness_lost_status</dref> 
  152.    --  <internal> 
  153.    --  Returns the StatusKind.LIVELINESS_LOST_STATUS 
  154.    --  communication status. 
  155.    --  </internal> 
  156.  
  157.    procedure Get_Offered_Deadline_Missed_Status 
  158.      (Self : not null access Ref; 
  159.       Status : in out DDS.OfferedDeadlineMissedStatus) is abstract; 
  160.    --  <dref>DataWriter_get_offered_deadline_missed_status</dref> 
  161.    --  <internal> 
  162.    --  Returns the StatusKind.OFFERED_DEADLINE_MISSED_STATUS 
  163.    --  communication status. 
  164.    --  </internal> 
  165.  
  166.    procedure Get_Offered_Incompatible_Qos_Status 
  167.      (Self : not null access Ref; 
  168.       Status : in out DDS.OfferedIncompatibleQosStatus) is abstract; 
  169.    --  <dref>DataWriter_get_offered_incompatible_qos_status</dref> 
  170.    --  <internal> 
  171.    --  Returns the StatusKind.OFFERED_INCOMPATIBLE_QOS_STATUS 
  172.    --  communication status 
  173.    --  </internal> 
  174.  
  175.    procedure Get_Publication_Matched_Status 
  176.      (Self : not null access Ref; 
  177.       Status : in out DDS.PublicationMatchedStatus) is abstract; 
  178.    --  <dref>DataWriter_get_publication_matched_status</dref> 
  179.    --  <internal> 
  180.    --  Returns the StatusKind.PUBLICATION_MATCHED_STATUS 
  181.    --  communication status. 
  182.    --  </internal> 
  183.  
  184.    procedure Assert_Liveliness 
  185.      (Self : not null access Ref) is abstract; 
  186.    --  <dref>DataWriter_assert_liveliness</dref> 
  187.  
  188.    function Get_Matched_Subscriptions 
  189.      (Self    : not null access Ref) 
  190.      return DDS.InstanceHandle_Seq.Sequence is abstract; 
  191.    --  <dref>DataWriter_get_matched_subscriptions</dref> 
  192.  
  193.    function Get_Matched_Subscription_Data 
  194.      (Self                : not null access Ref; 
  195.       Subscription_Handle : in DDS.InstanceHandle_T) 
  196.      return DDS.SubscriptionBuiltinTopicData is abstract; 
  197.    --  <dref>DataWriter_get_matched_subscription_data</dref> 
  198.  
  199.    function Get_Matched_Subscription_Locators 
  200.      (Self    : not null access Ref) 
  201.      return DDS.Locator_Seq.Sequence is abstract; 
  202.    --  <dref>DataWriter_get_matched_subscription_locators</dref> 
  203.  
  204.    procedure Get_Reliable_Reader_Activity_Changed_Status 
  205.      (Self : not null access Ref; 
  206.       status : in out DDS.ReliableReaderActivityChangedStatus) is abstract; 
  207.  
  208.    procedure set_Reliable_Reader_Activity_Changed_Status 
  209.      (Self : not null access Ref; 
  210.       status : in DDS.ReliableReaderActivityChangedStatus) is abstract; 
  211.    --  <dref>DataWriter_get_reliable_reader_activity_changed_status</dref> 
  212.  
  213.    procedure Get_Reliable_Writer_Cache_Changed_Status 
  214.      (Self : not null access Ref; 
  215.       status : in out DDS.ReliableWriterCacheChangedStatus) is abstract; 
  216.    --  <dref>DataWriter_get_reliable_writer_cache_changed_status</dref> 
  217.  
  218.    procedure Get_DataWriter_Cache_Status 
  219.      (Self : not null access Ref; 
  220.       status : in out DDS.DataWriterCacheStatus) is abstract; 
  221.    --  <dref>DataWriter_get_datawriter_cache_status</dref> 
  222.  
  223.    procedure Get_DataWriter_Protocol_Status 
  224.      (Self : not null access Ref; 
  225.       status : in out DDS.DataWriterProtocolStatus) is abstract; 
  226.    --  <dref>DataWriter_get_datawriter_protocol_status</dref> 
  227.  
  228.    procedure Get_Matched_Subscription_Datawriter_Protocol_Status 
  229.      (Self                : not null access Ref; 
  230.       status              : in out DDS.DataWriterProtocolStatus; 
  231.       subscription_handle : DDS.InstanceHandle_T) is abstract; 
  232.    --  <dref>DataWriter_get_matched_subscription_datawriter_protocol_status</dref> 
  233.  
  234.    procedure Get_Matched_Subscription_Datawriter_Protocol_Status_By_Locator 
  235.      (Self    : not null access Ref; 
  236.       status  : in out DDS.DataWriterProtocolStatus; 
  237.       locator : DDS.Locator_T) is abstract; 
  238.    --  <dref>DataWriter_get_matched_subscription_datawriter_protocol_status_by_locator</dref> 
  239.  
  240.    procedure Flush 
  241.      (Self : not null access Ref) is abstract; 
  242.    --  <dref>DataWriter_flush</dref> 
  243.  
  244.    --  ------------------------------------------------------------------------- 
  245.    --   Implementation 
  246.    --  ------------------------------------------------------------------------- 
  247.  
  248.    procedure WriteI 
  249.      (Self          : not null access Ref; 
  250.       Instance_Data : in System.Address; 
  251.       Handle        : in DDS.InstanceHandle_T_Access; 
  252.       MetpImpl      : access DDS.MetpTypeSupport.Ref'Class) is abstract; 
  253.  
  254.    procedure Get_LoanI 
  255.      (Self            : not null access Ref; 
  256.       Loan_Ret        : out System.Address; 
  257.       Initialize_Data : out Standard.Boolean; 
  258.       MetpImpl        : access DDS.MetpTypeSupport.Ref'Class) is abstract; 
  259.  
  260.    procedure Discard_LoanI 
  261.      (Self     : not null access Ref; 
  262.       Sample   : System.Address; 
  263.       MetpImpl : access DDS.MetpTypeSupport.Ref'Class) is abstract; 
  264.  
  265.    procedure  call_listener (Self  : not null access Ref; 
  266.                              mask  : StatusMask) is abstract; 
  267.  
  268.    procedure  set_reliable_writer_cache_changed_status 
  269.      (Self  : not null access Ref; 
  270.       To    : ReliableWriterCacheChangedStatus) is abstract; 
  271.  
  272.    procedure  set_datawriter_cache_status 
  273.      (Self  : not null access Ref; 
  274.       To    : DataWriterCacheStatus) is abstract; 
  275.  
  276.    procedure  set_datawriter_protocol_status 
  277.      (Self  : not null access Ref; 
  278.       To    : DataWriterProtocolStatus) is abstract; 
  279.  
  280.    procedure set_matched_subscription_datawriter_protocol_status 
  281.      (Self   : not null access Ref; 
  282.       To     : DDS.DataWriterProtocolStatus; 
  283.       handle : DDS.InstanceHandle_T) is abstract; 
  284.  
  285.    procedure set_matched_subscription_datawriter_protocol_status_by_locator 
  286.      (Self   : not null access Ref; 
  287.       status  : DDS.DataWriterProtocolStatus; 
  288.       locator : DDS.Locator_T) is abstract; 
  289.  
  290. end DDS.DataWriter;