CoreDX DDS C Reference Manual
Related Functions | List of all members
DDS_Topic Struct Reference

DDS_Topic is the basic description of data to be published or subscribed. More...

Related Functions

(Note that these are not member functions.)

DDS_TopicDescription DDS_Topic_TopicDescription (DDS_Topic t)
 This operation 'casts' the provide DDS_Topic to a DDS_TopicDescrition.
 
const char * DDS_Topic_get_type_name (DDS_Topic t)
 This operation returns type_name of the provided DDS_Topic.
 
const char * DDS_Topic_get_name (DDS_Topic t)
 This operation returns topic name of the provided DDS_Topic.
 
DDS_DomainParticipant DDS_Topic_get_participant (DDS_Topic t)
 This operation returns DDS_DomainParticipant that owns the DDS_Topic.
 
DDS_ReturnCode_t DDS_Topic_enable (DDS_Topic t)
 Enables the DDS_Topic. More...
 
DDS_InstanceHandle_t DDS_Topic_get_instance_handle (DDS_Topic t)
 This operation returns the InstanceHandle_t that identifies the Topic.
 
DDS_StatusCondition DDS_Topic_get_statuscondition (DDS_Topic t)
 This operation allows access to the DDS_StatusCondition associated with the Topic. More...
 
DDS_StatusMask DDS_Topic_get_status_changes (DDS_Topic t)
 This returns the list of triggered communication statuses in the Topic. More...
 
DDS_ReturnCode_t DDS_Topic_set_qos (DDS_Topic t, const DDS_TopicQos *qos)
 Sets the DDS_TopicQos values. More...
 
DDS_ReturnCode_t DDS_Topic_get_qos (DDS_Topic t, DDS_TopicQos *qos)
 Returns the current DDS_TopicQos settings held in the Topic t. More...
 
DDS_ReturnCode_t DDS_Topic_set_listener (DDS_Topic t, DDS_TopicListener *a_listener, DDS_StatusMask mask)
 Installs a DDS_TopicListener on Topic t. More...
 
DDS_ReturnCode_t DDS_Topic_set_listener_cd (DDS_Topic t, DDS_TopicListener_cd *a_listener, DDS_StatusMask mask, void *callback_data)
 Installs a DDS_TopicListener_cd on Topic t. More...
 
DDS_TopicListenerDDS_Topic_get_listener (DDS_Topic t)
 This operation returns the currently installed DDS_TopicListener. More...
 
DDS_TopicListener_cdDDS_Topic_get_listener_cd (DDS_Topic t)
 This operation returns the currently installed DDS_TopicListener_cd. More...
 
DDS_ReturnCode_t DDS_Topic_get_inconsistent_topic_status (DDS_Topic t, DDS_InconsistentTopicStatus *a_status)
 Provides access to the DDS_InconsistentTopicStatus of the Topic. More...
 

Detailed Description

DDS_Topic is the basic description of data to be published or subscribed.

A topic is identified by a name and a type. A Topic is created by calling DDS_DomainParticipant_create_topic(). Prior to creating a Topic, the associated data type must be registered with the DomainParticipant via a call to the TypeSupport::register_type() function. [The register_type() function is auto-generated 'type-specific' code.]

Friends And Related Function Documentation

DDS_ReturnCode_t DDS_Topic_enable ( DDS_Topic  t)
related

Enables the DDS_Topic.

A Topic is created either enabled or not based on the DDS_DomainParticipantQos setting entity_factory. When a Topic is not enabled, only the following sub-set of all Topic operations are legal:

  • operations to get and set QoS policies,
  • get_name(), get_type_name(), get_participant()
  • get_statuscondition(),
  • get_status_changes(),

Any other operation may return the DDS_NOT_ENABLED error. DDS_Topic_enable() may be called on an already enabled Topic [it will have no effect].

DDS_ReturnCode_t DDS_Topic_get_inconsistent_topic_status ( DDS_Topic  t,
DDS_InconsistentTopicStatus a_status 
)
related

Provides access to the DDS_InconsistentTopicStatus of the Topic.

As a side-effect, this routine will reset the total_count_change status field to zero.

DDS_TopicListener * DDS_Topic_get_listener ( DDS_Topic  t)
related

This operation returns the currently installed DDS_TopicListener.

Note
Because the infrastructure makes a copy of the listener provided in DDS_Topic_set_listener(), the returned structure pointer will not match the pointer originally provided. However, the function pointers within the structure will match. Also, the application should not free the data referenced by the returned pointer.
DDS_TopicListener_cd * DDS_Topic_get_listener_cd ( DDS_Topic  t)
related

This operation returns the currently installed DDS_TopicListener_cd.

Note
Because the infrastructure holds a pointer to the listener provided in DDS_Topic_set_listener_cd(), the returned structure pointer will match the pointer originally provided. The application should not free the data referenced by the returned pointer.
DDS_ReturnCode_t DDS_Topic_get_qos ( DDS_Topic  t,
DDS_TopicQos qos 
)
related

Returns the current DDS_TopicQos settings held in the Topic t.

This routine copies the Topic QoS properites into qos.

Note
The qos structure may contain sequences or strings that are populated with dynamic memory. The caller is responsible for freeing the dynamic memory of these items.
For example, the sequence 'qos->topic_data' may have dynamically allocated memory assigned. This can be released by a call to seq_clear(&qos->topic_data).
DDS_StatusMask DDS_Topic_get_status_changes ( DDS_Topic  t)
related

This returns the list of triggered communication statuses in the Topic.

If the Topic is not enabled, all statuses will be untriggered.

DDS_StatusCondition DDS_Topic_get_statuscondition ( DDS_Topic  t)
related

This operation allows access to the DDS_StatusCondition associated with the Topic.

The returned condition can be added to a DDS_WaitSet.

DDS_ReturnCode_t DDS_Topic_set_listener ( DDS_Topic  t,
DDS_TopicListener a_listener,
DDS_StatusMask  mask 
)
related

Installs a DDS_TopicListener on Topic t.

Only one listener may be attached to a Topic at a time. A call to set_listener() will replace any current listener with a_listener.

a_listener can be NULL, which indicates a listener that does nothing.

The infrastructure will make an internal copy of the listener structure so that it need not be persisted by the application.

DDS_ReturnCode_t DDS_Topic_set_listener_cd ( DDS_Topic  t,
DDS_TopicListener_cd a_listener,
DDS_StatusMask  mask,
void *  callback_data 
)
related

Installs a DDS_TopicListener_cd on Topic t.

Only one listener may be attached to a Topic at a time. A call to set_listener_cd() will replace any current listener with a_listener.

a_listener can be NULL, which indicates a listener that does nothing.

The infrastructure will not make an internal copy of the listener_cd structure which means that it must be persisted by the application.

DDS_ReturnCode_t DDS_Topic_set_qos ( DDS_Topic  t,
const DDS_TopicQos qos 
)
related

Sets the DDS_TopicQos values.

These QoS values affect the behavior of the DDS_Topic.


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