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. with DDS.DataWriter; 
  10. with DDS.DataWriter_Impl; 
  11. with DDS.Treats_Generic; 
  12. generic 
  13.    with package Treats is new DDS.Treats_Generic (<>); 
  14.    use Treats; 
  15. package DDS.Typed_DataWriter_Generic is 
  16.    pragma Suppress (Elaboration_Check); 
  17.  
  18.    type Ref is new Standard.DDS.DataWriter_Impl.Ref with null record; 
  19.    type Ref_Access is access all Ref; 
  20.  
  21.    function Register_Instance 
  22.      (Self          : not null access Ref; 
  23.       Instance_Data : Data_Type) 
  24.       return Standard.DDS.InstanceHandle_T; 
  25.    function Register_Instance 
  26.      (Self          : not null access Ref; 
  27.       Instance_Data : Data_Type_Access) 
  28.       return Standard.DDS.InstanceHandle_T; 
  29.    --  <dref>FooDataWriter_register_instance</dref> 
  30.    --  <internal> 
  31.    --  Informs Data Distribution Service that the application will be modifying a 
  32.    --  particular instance. 
  33.    --  This operation is only useful for keyed data types. Using it for non-keyed 
  34.    --  types causes no effect and returns HANDLE_NIL. The operation takes as a parameter 
  35.    --  an instance (of which only the key value is examined) and returns a handle that 
  36.    --  can be used in successive write() or dispose() operations. 
  37.    --  The operation gives Data Distribution Service an opportunity to pre-configure 
  38.    --  itself to improve performance. 
  39.    --  The use of this operation by an application is optional even for keyed types. 
  40.    --  If an instance has not been pre-registered, the application can use the special 
  41.    --  value HANDLE_NIL as the InstanceHandle_t paramater to the write or dispose 
  42.    --  operation and Data Distribution Service will auto-register the instance. 
  43.    --  For best performance, the operation should be invoked prior to calling any 
  44.    --  operation that modifies the instance, such as write, write_w_timestamp, 
  45.    --  dispose and dispose_w_timestamp and the handle used in conjunction with 
  46.    --  the data for those calls. 
  47.    --  When this operation is used, Data Distribution Service will automatically supply 
  48.    --  the value of the source_timestamp that is used. 
  49.    --  This operation may fail and return HANDLE_NIL if ResourceLimitsQosPolicy::max_instances 
  50.    --  limit has been exceeded. 
  51.    --  The operation is idempotent. If it is called for an already registered instance, 
  52.    --  it just returns the already allocated handle. This may be used to lookup and retrieve 
  53.    --  the handle allocated to a given instance. 
  54.    --  This operation can only be called after DataWriter has been enabled. 
  55.    --  Otherwise, HANDLE_NIL will be returned. 
  56.    --  </internal> 
  57.  
  58.  
  59.    function Register_Instance_W_Timestamp 
  60.      (Self             : not null access Ref; 
  61.       Instance_Data    : Data_Type; 
  62.       Source_Timestamp : in Standard.DDS.Time_T) 
  63.       return Standard.DDS.InstanceHandle_T; 
  64.    function Register_Instance_W_Timestamp 
  65.      (Self             : not null access Ref; 
  66.       Instance_Data    : Data_Type_Access; 
  67.       Source_Timestamp : in Standard.DDS.Time_T) 
  68.       return Standard.DDS.InstanceHandle_T; 
  69.    --  <dref>FooDataWriter_register_instance_w_timestamp</dref> 
  70.    --  <internal> 
  71.    --  Performs the same functions as register_instance except that the application 
  72.    --  provides the value for the source_timestamp. 
  73.    --  The provided source_timestamp potentially affects the relative order in which 
  74.    --  readers observe events from multiple writers. Refer to DESTINATION_ORDER QoS policy for details. 
  75.    --  This operation may fail and return DDS_HANDLE_NIL if ResourceLimitsQosPolicy::max_instances 
  76.    --  limit has been exceeded. 
  77.    --  This operation can only be called after DataWriter has been enabled. 
  78.    --  Otherwise, HANDLE_NIL will be returned. 
  79.    --  </internal> 
  80.  
  81.    function Register_Instance_W_Params 
  82.      (Self             : not null access Ref; 
  83.       Instance_Data    : not null Data_Type_Access; 
  84.       Params           : not null access DDS.WriteParams_T) 
  85.       return Standard.DDS.InstanceHandle_T; 
  86.    function Register_Instance_W_Params 
  87.      (Self             : not null access Ref; 
  88.       Instance_Data    : Data_Type; 
  89.       params           : not null access DDS.WriteParams_T) 
  90.       return Standard.DDS.InstanceHandle_T; 
  91.    --  <dref>FooDataWriter_register_instance_w_params</dref> 
  92.    --  <internal> 
  93.    --  Performs the same functions as register_instance except that ... 
  94.    --  readers observe events from multiple writers. Refer to DESTINATION_ORDER QoS policy for details. 
  95.    --  This operation may fail and return DDS_HANDLE_NIL if ResourceLimitsQosPolicy::max_instances 
  96.    --  limit has been exceeded. 
  97.    --  This operation can only be called after DataWriter has been enabled. 
  98.    --  Otherwise, HANDLE_NIL will be returned. 
  99.    --  </internal> 
  100.  
  101.  
  102.    procedure Unregister_Instance 
  103.      (Self          : not null access Ref; 
  104.       Instance_Data : Data_Type; 
  105.       Handle        : in Standard.DDS.InstanceHandle_T); 
  106.    procedure Unregister_Instance 
  107.      (Self          : not null access Ref; 
  108.       Instance_Data : Data_Type_Access; 
  109.       Handle        : in Standard.DDS.InstanceHandle_T); 
  110.    --  <dref>FooDataWriter_unregister_instance</dref> 
  111.    --  <internal> 
  112.    --  Reverses the action of register_instance. 
  113.    --  This operation is useful only for keyed data types. Using it for non-keyed types 
  114.    --  causes no effect and reports no error. The operation takes as a parameter an 
  115.    --  instance (of which only the key value is examined) and a handle. 
  116.    --  This operation should only be called on an instance that is currently registered. 
  117.    --  This includes instances that have been auto-registered by calling operations such 
  118.    --  as write or dispose as described in register_instance. Otherwise, this operation may 
  119.    --  fail with exception BAD_PARAMETER. 
  120.    --  This only need be called just once per instance, regardless of how many times 
  121.    --  register_instance was called for that instance. 
  122.    --  When this operation is used, DDS will automatically supply 
  123.    --  the value of the source_timestamp that is used. 
  124.    --  This operation informs DDS that the DataWriter is no longer 
  125.    --  going to provide any information about the instance. This operation also indicates 
  126.    --  that DDS can locally remove all information regarding that instance. 
  127.    --  The application should not attempt to use the handle previously allocated to 
  128.    --  that instance after calling unregister_instance(). 
  129.    --  The special value HANDLE_NIL can be used for the parameter handle. 
  130.    --  This indicates that the identity of the instance should be automatically deduced 
  131.    --  from the instance_data (by means of the key). 
  132.    --  If handle is any value other than HANDLE_NIL, then it must correspond to an instance 
  133.    --  that has been registered. If there is no correspondence, the operation will fail with 
  134.    --  exception BAD_PARAMETER. 
  135.    --  DDS will not detect the error when the handle is any value other than HANDLE_NIL, 
  136.    --  corresponds to an instance that has been registered, but does not correspond to the 
  137.    --  instance deduced from the instance_data (by means of the key). DDS will treat as if 
  138.    --  the unregister_instance() operation is for the instance as indicated by the handle. 
  139.    --  If after a unregister_instance, the application wants to modify (write or dispose) 
  140.    --  an instance, it has to register it again, or else use the special handle value HANDLE_NIL. 
  141.    --  This operation does not indicate that the instance is deleted 
  142.    --  (that is the purpose of dispose). The operation unregister_instance just indicates 
  143.    --  that the DataWriter no longer has anything to say about the instance. DataReader 
  144.    --  entities that are reading the instance may receive a sample with 
  145.    --  NOT_ALIVE_NO_WRITERS_INSTANCE_STATE for the instance, unless there are other 
  146.    --  DataWriter objects writing that same instance. 
  147.    --  This operation can affect the ownership of the data instance (see OWNERSHIP). 
  148.    --  If the DataWriter was the exclusive owner of the instance, then calling 
  149.    --  unregister_instance() will relinquish that ownership. 
  150.    --  If ReliabilityQosPolicy::kind is set to RELIABLE_RELIABILITY_QOS and the unregistration 
  151.    --  would overflow the resource limits of this writer or of a reader, this operation 
  152.    --  may block for up to ReliabilityQosPolicy::max_blocking_time; if this writer is 
  153.    --  still unable to unregister after that period, this function will fail with exception TIMEOUT. 
  154.    --  </internal> 
  155.  
  156.  
  157.    procedure Unregister_Instance_W_Timestamp 
  158.      (Self              : not null access Ref; 
  159.       Instance_Data     : Data_Type; 
  160.       Handle            : in Standard.DDS.InstanceHandle_T; 
  161.       Source_Timestamp  : in Standard.DDS.Time_T); 
  162.    procedure Unregister_Instance_W_Timestamp 
  163.      (Self              : not null access Ref; 
  164.       Instance_Data     : Data_Type_Access; 
  165.       Handle            : in Standard.DDS.InstanceHandle_T; 
  166.       Source_Timestamp  : in Standard.DDS.Time_T); 
  167.    --  <dref>FooDataWriter_unregister_instance_w_timestamp</dref> 
  168.    --  <internal> 
  169.    --  Performs the same function as unregister_instance except that it also provides 
  170.    --  the value for the source_timestamp. 
  171.    --  The provided source_timestamp potentially affects the relative order in which 
  172.    --  readers observe events from multiple writers. Refer to DESTINATION_ORDER QoS policy for details. 
  173.    --  The constraints on the values of the handle parameter and the corresponding error 
  174.    --  behavior are the same specified for the unregister_instance operation. 
  175.    --  This operation may block and may time out (exception RETCODE_TIMEOUT) under 
  176.    --  the same circumtances described for the unregister_instance operation. 
  177.    --  </internal> 
  178.  
  179.    procedure Unregister_Instance_W_Params 
  180.      (Self              : not null access Ref; 
  181.       Instance_Data     : Data_Type; 
  182.       Params            : access DDS.WriteParams_T); 
  183.    procedure Unregister_Instance_W_Params 
  184.      (Self              : not null access Ref; 
  185.       Instance_Data     : Data_Type_Access; 
  186.       Params            : access DDS.WriteParams_T); 
  187.  
  188.  
  189.    procedure Write 
  190.      (Self           : not null access Ref; 
  191.       Instance_Data  : Data_Type; 
  192.       Handle         : in Standard.DDS.InstanceHandle_T_Access); 
  193.    procedure Write 
  194.      (Self           : not null access Ref; 
  195.       Instance_Data  : Data_Type_Access; 
  196.       Handle         : in Standard.DDS.InstanceHandle_T_Access); 
  197.    procedure Write 
  198.      (Self           : not null access Ref; 
  199.       Instance_Data  : Data_Array; 
  200.       Handle         : in Standard.DDS.InstanceHandle_T_Access); 
  201.    --  <dref>FooDataWriter_write</dref> 
  202.    --  <internal> 
  203.    --  Modifies the value of a data instance. 
  204.    --  When this operation is used, DDS will automatically supply the value of the 
  205.    --  source_timestamp that is made available to DataReader objects by means of the 
  206.    --  source_timestamp attribute inside the SampleInfo. 
  207.    --  (Refer to SampleInfo and DESTINATION_ORDER QoS policy for details). 
  208.    --  As a side effect, this operation asserts liveliness on the DataWriter itself, 
  209.    --  the Publisher and the DomainParticipant. 
  210.    --  Note that the special value HANDLE_NIL can be used for the parameter handle. 
  211.    --  This indicates the identity of the instance should be automatically deduced 
  212.    --  from the instance_data (by means of the key). 
  213.    --  If handle is any value other than HANDLE_NIL, then it must correspond to an instance 
  214.    --  that has been registered. If there is no correspondence, the operation will fail 
  215.    --  with exception BAD_PARAMETER. 
  216.    --  DDS will not detect the error when the handle is any value other than HANDLE_NIL, 
  217.    --  corresponds to an instance that has been registered, but does not correspond 
  218.    --  to the instance deduced from the instance_data (by means of the key). 
  219.    --  DDS will treat as if the write() operation is for the instance as indicated by the handle. 
  220.    --  This operation may block if the RELIABILITY kind is set to RELIABLE_RELIABILITY_QOS 
  221.    --  and the modification would cause data to be lost or else cause one of the limits 
  222.    --  specified in the RESOURCE_LIMITS to be exceeded. 
  223.    --  Specifically, this operation may block in the following situations 
  224.    --  (note that the list may not be exhaustive), 
  225.    --   even if its HistoryQosPolicyKind is KEEP_LAST_HISTORY_QOS: 
  226.    --   * If (ResourceLimitsQosPolicy::max_samples < 
  227.    --            ResourceLimitsQosPolicy::max_instances * HistoryQosPolicy::depth), 
  228.    --     then in the situation where the max_samples resource limit is exhausted, 
  229.    --     DDS is allowed to discard samples of some other instance, as long as at 
  230.    --     least one sample remains for such an instance. If it is still not possible 
  231.    --     to make space available to store the modification, the writer is allowed to block. 
  232.    --   * If (ResourceLimitsQosPolicy::max_samples < ResourceLimitsQosPolicy::max_instances), 
  233.    --     then the DataWriter may block regardless of the HistoryQosPolicy::depth. 
  234.    --  This operation may also block when using BEST_EFFORT_RELIABILITY_QOS and 
  235.    --  ASYNCHRONOUS_PUBLISH_MODE_QOS. In this case, the DataWriter will queue samples 
  236.    --  until they are sent by the asynchronous publishing thread. 
  237.    --  The number of samples that can be stored is determined by the HistoryQosPolicy. 
  238.    --  If the asynchronous thread does not send samples fast enough 
  239.    --  (e.g., when using a slow FlowController), the queue may fill up. In that case, 
  240.    --  subsequent write calls will block. 
  241.    --  If this operation does block for any of the above reasons, the RELIABILITY 
  242.    --  max_blocking_time configures the maximum time the write operation may block 
  243.    --  (waiting for space to become available). If max_blocking_time elapses before 
  244.    --  the DataWriter is able to store the modification without exceeding the limits, 
  245.    --  the operation will time out (exception TIMEOUT). 
  246.    --  If there are no instance resources left, this operation may fail with exception 
  247.    --  OUT_OF_RESOURCES. Calling DataWriter.unregister_instance may help 
  248.    --  freeing up some resources. 
  249.    --  </internal> 
  250.  
  251.  
  252.    procedure Write_W_Timestamp 
  253.      (Self             : not null access Ref; 
  254.       Instance_Data    : Data_Type; 
  255.       Handle           : in Standard.DDS.InstanceHandle_T_Access; 
  256.       Source_Timestamp : in Standard.DDS.Time_T); 
  257.    procedure Write_W_Timestamp 
  258.      (Self             : not null access Ref; 
  259.       Instance_Data    : Data_Type_Access; 
  260.       Handle           : in Standard.DDS.InstanceHandle_T_Access; 
  261.       Source_Timestamp : in Standard.DDS.Time_T); 
  262.    --  <dref>FooDataWriter_write_w_timestamp</dref> 
  263.    --  <internal> 
  264.    --  Performs the same function as write except that it also provides the value 
  265.    --  for the source_timestamp. 
  266.    --  Explicitly provides the timestamp that will be available to the DataReader objects 
  267.    --  by means of the source_timestamp attribute inside the SampleInfo. 
  268.    --  (Refer to SampleInfo and DESTINATION_ORDER QoS policy for details) 
  269.    --  The constraints on the values of the handle parameter and the corresponding 
  270.    --  error behavior are the same specified for the write operation. 
  271.    --  This operation may block and time out (exception TIMEOUT) 
  272.    --  under the same circumtances described for write. 
  273.    --  If there are no instance resources left, this operation may fail with 
  274.    --  exception OUT_OF_RESOURCES. Calling unregister_instance may help free up some resources. 
  275.    --  This operation may fail with exception BAD_PARAMETER under the same circumstances 
  276.    --  described for the write operation. 
  277.    --  </internal> 
  278.  
  279.  
  280.    procedure Write_W_Params (Self          : not null access Ref; 
  281.                              Instance_Data : Data_Type; 
  282.                              Params        : in DDS.WriteParams_T); 
  283.    procedure Write_W_Params (Self          : not null access Ref; 
  284.                              Instance_Data : Data_Type_Access; 
  285.                              Params        : in DDS.WriteParams_T); 
  286.    --  <dref>FooDataWriter_write_w_params</dref> 
  287.    --  <internal> 
  288.    --  Performs the same function as write and write_w_timestamp except 
  289.    --  that it also provides the values contained in params. 
  290.    -- 
  291.    --  Allows provision of the instance handle, source timestamp, publication priority, 
  292.    --  and cookie, in params. Allows provision of the sample identity, instance handle, source timestamp, 
  293.    --  The constraints on the values of the handle parameter and the corresponding error 
  294.    --  behavior are the same specified for the write operation. 
  295.    -- 
  296.    --  The cookie is a sequence of bytes tagging the data being written, 
  297.    --  and is used to retrieve the data when it is not available to the writer when needed. 
  298.    -- 
  299.    --  This operation may block and time out (DDS_RETCODE_TIMEOUT) under 
  300.    --  the same circumtances described for write. 
  301.    -- 
  302.    --  If there are no instance resources left, this operation may fail with DDS_RETCODE_OUT_OF_RESOURCES. 
  303.    --  Calling unregister_instance_w_params may help free up some resources. 
  304.    -- 
  305.    --  The handle is either returned by a previous call to DataWriter_register_instance, 
  306.    --  or else the special value DDS_HANDLE_NIL. If Foo has a key and handle is not DDS_HANDLE_NIL, 
  307.    --  handle must represent a registered instance of type Foo. Otherwise, 
  308.    --  this function may fail with DDS_RETCODE_BAD_PARAMETER. 
  309.    --  The source_timestamp value must be greater than or equal to the timestamp 
  310.    --  value used in the last writer operation 
  311.    --  (used in a register, unregister, dispose, or write, with either the 
  312.    --  automatically supplied timestamp or the application provided timestamp). 
  313.    --  This timestamp may potentially affect the order in which readers observe 
  314.    --  events from multiple writers. This timestamp will be available to the 
  315.    --  DDS.DataReader objects by means of the source_timestamp attribute 
  316.    --  inside the DDS.SampleInfo. 
  317.    --  </internal> 
  318.  
  319.  
  320.    procedure Dispose 
  321.      (Self            : not null access Ref; 
  322.       Instance_Data   : Data_Type; 
  323.       Instance_Handle : in Standard.DDS.InstanceHandle_T); 
  324.    procedure Dispose 
  325.      (Self            : not null access Ref; 
  326.       Instance_Data   : Data_Type_Access; 
  327.       Instance_Handle : in Standard.DDS.InstanceHandle_T); 
  328.    --  <dref>FooDataWriter_dispose</dref> 
  329.    --  <internal> 
  330.    --  Requests the middleware to delete the data. 
  331.    --  This operation is useful only for keyed data types. Using it for non-keyed types 
  332.    --  has no effect and reports no error. 
  333.    --  The actual deletion is postponed until there is no more use for that data in the whole system. 
  334.    --  Applications are made aware of the deletion by means of operations on the DataReader 
  335.    --  objects that already knew that instance. DataReader objects that didn't know 
  336.    --  the instance will never see it. 
  337.    --  This operation does not modify the value of the instance. 
  338.    --  The instance_data parameter is passed just for the purposes of identifying the instance. 
  339.    --  When this operation is used, DDS will automatically 
  340.    --  supply the value of the source_timestamp that is made available to DataReader 
  341.    --  objects by means of the source_timestamp attribute inside the SampleInfo. 
  342.    --  The constraints on the values of the handle parameter and the corresponding 
  343.    --  error behavior are the same specified for the DataWriter.unregister_instance operation. 
  344.    --  The special value HANDLE_NIL can be used for the parameter instance_handle. 
  345.    --  This indicates the identity of the instance should be automatically deduced 
  346.    --  from the instance_data (by means of the key). 
  347.    --  If handle is any value other than HANDLE_NIL, then it must correspond to an 
  348.    --  instance that has been registered. If there is no correspondence, the operation 
  349.    --  will fail with exception BAD_PARAMETER. 
  350.    --  DDS will not detect the error when the handle is any 
  351.    --  value other than HANDLE_NIL, corresponds to an instance that has been registered, 
  352.    --  but does not correspond to the instance deduced from the instance_data (by means of the key). 
  353.    --  DDS will treat as if the dispose() operation is for the instance as indicated by the handle. 
  354.    --  This operation may block and time out (exception TIMEOUT) under the same 
  355.    --  circumtances described for write(). 
  356.    --  If there are no instance resources left, this operation may fail with exception OUT_OF_RESOURCES. 
  357.    --  Calling unregister_instance may help freeing up some resources. 
  358.    --  </internal> 
  359.  
  360.  
  361.    procedure Dispose_W_Timestamp 
  362.      (Self             : not null access Ref; 
  363.       Instance_Data    : Data_Type; 
  364.       Instance_Handle  : in Standard.DDS.InstanceHandle_T; 
  365.       Source_Timestamp : in Standard.DDS.Time_T); 
  366.    procedure Dispose_W_Timestamp 
  367.      (Self             : not null access Ref; 
  368.       Instance_Data    : Data_Type_Access; 
  369.       Instance_Handle  : in Standard.DDS.InstanceHandle_T; 
  370.       Source_Timestamp : in Standard.DDS.Time_T); 
  371.    --  <dref>FooDataWriter_dispose_w_timestamp</dref> 
  372.    --  <internal> 
  373.    --  Performs the same functions as dispose except that the application provides 
  374.    --  the value for the source_timestamp that is made available to DataReader objects 
  375.    --  by means of the source_timestamp attribute inside the SampleInfo. 
  376.    --  The constraints on the values of the handle parameter and the corresponding 
  377.    --  error behavior are the same specified for the dispose operation. 
  378.    --  This operation may block and time out (exception TIMEOUT) under the same 
  379.    --  circumtances described for write. 
  380.    --  If there are no instance resources left, this operation may fail 
  381.    --  with exception OUT_OF_RESOURCES. 
  382.    --  Calling unregister_instance may help freeing up some resources. 
  383.    --  </internal> 
  384.  
  385.  
  386.    procedure Dispose_W_Params 
  387.      (Self             : not null access Ref; 
  388.       Instance_Data    : Data_Type; 
  389.       Params           : in DDS.WriteParams_T); 
  390.    procedure Dispose_W_Params 
  391.      (Self             : not null access Ref; 
  392.       Instance_Data    : Data_Type_Access; 
  393.       Params           : in DDS.WriteParams_t); 
  394.  
  395.  
  396.    procedure Get_Key_Value 
  397.      (Self       : not null access Ref; 
  398.       Key_Holder : out Data_Type; 
  399.       Handle     : in Standard.DDS.InstanceHandle_T); 
  400.    --  <dref>FooDataWriter_get_key_value</dref> 
  401.    --  <internal> 
  402.    --  Retrieve the instance key that corresponds to an instance handle. 
  403.    --  Useful for keyed data types. 
  404.    --  The operation will only fill the fields that form the key inside the key_holder instance. 
  405.    --  If the data has no key, this function has no effect and exit with no error. 
  406.    --  For keyed data types, this operation may fail with exception BAD_PARAMETER 
  407.    --  if the handle does not correspond to an existing data-object known to the DataWriter. 
  408.    --  </internal> 
  409.  
  410.    procedure Get_Key_Value 
  411.      (Self       : not null access Ref; 
  412.       Key_Holder : not null Data_Type_Access; 
  413.       Handle     : in Standard.DDS.InstanceHandle_T); 
  414.    --  <dref>FooDataWriter_get_key_value</dref> 
  415.    --  <internal> 
  416.    --  Retrieve the instance key that corresponds to an instance handle. 
  417.    --  Useful for keyed data types. 
  418.    --  The operation will only fill the fields that form the key inside the key_holder instance. 
  419.    --  If the data has no key, this function has no effect and exit with no error. 
  420.    --  For keyed data types, this operation may fail with exception BAD_PARAMETER 
  421.    --  if the handle does not correspond to an existing data-object known to the DataWriter. 
  422.    --  </internal> 
  423.  
  424.    function Lookup_Instance 
  425.      (Self        : not null access Ref; 
  426.       Key_Holder  : Data_Type) return Standard.DDS.InstanceHandle_T; 
  427.    --  <dref>FooDataWriter_lookup_instance</dref> 
  428.    --  <internal> 
  429.    --  Retrieve the instance handle that corresponds to an instance key_holder. 
  430.    --  Useful for keyed data types. 
  431.    --  This operation takes as a parameter an instance and returns a handle that can be 
  432.    --  used in subsequent operations that accept an instance handle as an argument. 
  433.    --  The instance parameter is only used for the purpose of examining the fields 
  434.    --  that define the key. 
  435.    --  This operation does not register the instance in question. 
  436.    --  If the instance has not been previously registered, or if for any other reason 
  437.    --  DDS is unable to provide an instance handle, DDS will return the special value HANDLE_NIL. 
  438.    --  </internal> 
  439.  
  440.    function Lookup_Instance 
  441.      (Self       : not null access Ref; 
  442.       Key_Holder : not null Data_Type_Access) return Standard.DDS.InstanceHandle_T; 
  443.    --  <dref>FooDataWriter_lookup_instance</dref> 
  444.    --  <internal> 
  445.    --  Retrieve the instance handle that corresponds to an instance key_holder. 
  446.    --  Useful for keyed data types. 
  447.    --  This operation takes as a parameter an instance and returns a handle that can be 
  448.    --  used in subsequent operations that accept an instance handle as an argument. 
  449.    --  The instance parameter is only used for the purpose of examining the fields 
  450.    --  that define the key. 
  451.    --  This operation does not register the instance in question. 
  452.    --  If the instance has not been previously registered, or if for any other reason 
  453.    --  DDS is unable to provide an instance handle, DDS will return the special value HANDLE_NIL. 
  454.    --  </internal> 
  455.  
  456.    function As_DataWriter (Self : Ref_Access) return Standard.DDS.DataWriter.Ref_Access is 
  457.      (Standard.DDS.DataWriter.Ref_Access (Self)); 
  458.  
  459.    function Narrow 
  460.      (Self        : access DDS.DataWriter.Ref'Class) return not null access Ref is 
  461.      (if Self = null then null else Ref (Self.all)'Access); 
  462.  
  463.    function CreateTypedI return Standard.DDS.DataWriter.Ref_Access; 
  464.  
  465.    procedure DestroyTypedI 
  466.      (Writer : in out Standard.DDS.DataWriter.Ref_Access); 
  467.  
  468. end DDS.Typed_DataWriter_Generic;