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