CoreDX DDS Java Reference Manual
Public Member Functions | List of all members
FooDataWriter Class Reference

The FooDataWriter is an example specialized DataWriter (generated by the coredx_ddl compiler) for writing data samples of type 'Foo'. More...

Inheritance diagram for FooDataWriter:
DataWriter DomainEntity Entity

Public Member Functions

ReturnCode_t get_key_value (Foo key_holder, InstanceHandle_t handle)
 
InstanceHandle_t lookup_instance (Foo instance_data)
 
InstanceHandle_t register_instance (Foo instance_data)
 
InstanceHandle_t register_instance_w_timestamp (Foo instance_data, Time_t ts)
 
ReturnCode_t unregister_instance (Foo instance_data, InstanceHandle_t handle)
 
ReturnCode_t unregister_instance_w_timestamp (Foo instance_data, InstanceHandle_t handle, Time_t timestamp)
 
ReturnCode_t write (Foo instance_data, InstanceHandle_t handle)
 
ReturnCode_t write_w_timestamp (Foo instance_data, InstanceHandle_t handle, Time_t timestamp)
 
ReturnCode_t dispose (Foo instance_data, InstanceHandle_t handle)
 
ReturnCode_t dispose_w_timestamp (Foo instance_data, InstanceHandle_t handle, Time_t timestamp)
 
- Public Member Functions inherited from DataWriter
ReturnCode_t enable ()
 
ReturnCode_t set_qos (DataWriterQos qos)
 
ReturnCode_t get_qos (DataWriterQos qos)
 
ReturnCode_t set_listener (DataWriterListener new_listener, long mask)
 
DataWriterListener get_listener ()
 
Topic get_topic ()
 
Publisher get_publisher ()
 
ReturnCode_t wait_for_acknowledgments (Duration_t max_wait)
 Block until this writer has received acknowledgements for all written data. More...
 
ReturnCode_t assert_liveliness ()
 
ReturnCode_t get_liveliness_lost_status (LivelinessLostStatus status)
 
ReturnCode_t get_offered_deadline_missed_status (OfferedDeadlineMissedStatus status)
 
ReturnCode_t get_offered_incompatible_qos_status (OfferedIncompatibleQosStatus status)
 
ReturnCode_t get_publication_matched_status (PublicationMatchedStatus status)
 
ReturnCode_t get_matched_subscriptions (InstanceHandleSeq subscription_handles)
 
ReturnCode_t get_matched_subscription_data (SubscriptionBuiltinTopicData subscription_data, InstanceHandle_t subscription_handle)
 
ReturnCode_t get_guid (GUID_t g)
 Access the GUID which uniquely identifies this writer.
 
- Public Member Functions inherited from Entity
StatusCondition get_statuscondition ()
 
int get_status_changes ()
 
ReturnCode_t enable ()
 
InstanceHandle_t get_instance_handle ()
 

Detailed Description

The FooDataWriter is an example specialized DataWriter (generated by the coredx_ddl compiler) for writing data samples of type 'Foo'.

The FooDataWriter is an implementation of the base DataWriter class that has been extended to support the 'Foo' data type.

Note: the FooDataWriter is included here for documentation purposes only, and does not really exist in the com.toc.coredx.DDS package.

Member Function Documentation

ReturnCode_t dispose ( Foo  instance_data,
InstanceHandle_t  handle 
)

Indicates that the instance no longer exists. If handle is not HANDLE_NIL, then handle must identify a valid instance that has been previously registered or written by this DataWriter. The current time is used as the source timstamp.

ReturnCode_t dispose_w_timestamp ( Foo  instance_data,
InstanceHandle_t  handle,
Time_t  timestamp 
)

Indicates that the instance no longer exists. If handle is not HANDLE_NIL, then handle must identify a valid instance that has been previously registered or written by this DataWriter. The source_timestamp is used as the source timstamp for the published message.

ReturnCode_t get_key_value ( Foo  key_holder,
InstanceHandle_t  handle 
)

This routine will populate the data structure indicated by key_holder with the key infomation identified by handle.

This routine is data type specific. The generated type specific DataWriter includes an implementation of this routine which should be used to support type-safety.

InstanceHandle_t lookup_instance ( Foo  instance_data)

Returns the handle that identifies the data instance provided in instance_data. The 'key' field values of the data are associated with a unique handle.

InstanceHandle_t register_instance ( Foo  instance_data)

Declares the existance of an instance identified by the 'key fields' in instance_data. The handle that uniquely identifies the instance is returned. The current time is used as the source timestamp.

InstanceHandle_t register_instance_w_timestamp ( Foo  instance_data,
Time_t  ts 
)

Declares the existance of an instance identified by the 'key fields' in instance_data. The handle that uniquely identifies the instance is returned. The source_timestamp is used as the source timestamp.

ReturnCode_t unregister_instance ( Foo  instance_data,
InstanceHandle_t  handle 
)

Indicates that the writer will no longer be providing updates the specified instance. If handle is not HANDLE_NIL, then handle must identify a valid instance that has been previously registered or written by this DataWriter. The current time is used as the source timstamp.

ReturnCode_t unregister_instance_w_timestamp ( Foo  instance_data,
InstanceHandle_t  handle,
Time_t  timestamp 
)

Indicates that the writer will no longer be providing updates the specified instance. If handle is not HANDLE_NIL, then handle must identify a valid instance that has been previously registered or written by this DataWriter. The provided source_timestamp is used as the source timstamp.

ReturnCode_t write ( Foo  instance_data,
InstanceHandle_t  handle 
)

Publishes the provided instance_data. If handle is HANDLE_NIL, then the handle is determined from the 'key fields' of instance_data.

The current time is used as the source timestamp for the published data.

This routine may block if RELIABILITY kind == RELIABLE, RESOURCE_LIMITS are not UNLIMITED, and the local resources are exhausted. The routine will block at most 'max_blocking_time' as configured in the RELIABLITY QoS. If the routine is still unable to handle the data, after blocking, then RETCODE_TIMEOUT is returned.

The routine may return RETCODE_OUT_OF_RESOURCES if it is determined that no amount of blocking will allow the data to be processed.

On success, RETCODE_OK is returned.

ReturnCode_t write_w_timestamp ( Foo  instance_data,
InstanceHandle_t  handle,
Time_t  timestamp 
)

Publishes the provided instance_data. If handle is HANDLE_NIL, then the handle is determined from the 'key fields' of instance_data.

The source_timestamp is used as the source timestamp for the published data.

This routine may block if RELIABILITY kind == RELIABLE, RESOURCE_LIMITS are not UNLIMITED, and the local resources are exhausted. The routine will block at most 'max_blocking_time' as configured in the RELIABLITY QoS. If the routine is still unable to handle the data, after blocking, then RETCODE_TIMEOUT is returned.

The routine may return RETCODE_OUT_OF_RESOURCES if it is determined that no amount of blocking will allow the data to be processed.

On success, RETCODE_OK is returned.


© 2009-2017 Twin Oaks Computing, Inc
Castle Rock, CO 80108
All rights reserved.