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