Module: dds.core

dds.core.LENGTH_UNLIMITED = -1

int(x=0) -> int or long int(x, base=10) -> int or long

Convert a number or string to an integer, or return 0 if no arguments are given. If x is floating point, the conversion truncates towards zero. If x is outside the integer range, the function returns a long instead.

If x is not a number or if base is given, then x must be a string or Unicode object representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-‘ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4

class dds.core.Duration

Bases: dds.core.Time

Parameters:
  • sec – an integer seconds value (default: 0)
  • nanosec – an integer nanoseconds value (default: 0)
infinite

Return an infinite Duration

exception dds.core.Error

Bases: exceptions.Exception

Base class for DDS Exceptions

class dds.core.GUID

Bases: object

The GUID object holds a single member ‘value’ of type bytearray(16)

class dds.core.InconsistentTopicStatus

Represents the Inconsistent Topic status of an entity. This is provided in the associated callback, or can be obtained by calling get_inconsistent_topic_status() on Topic, or DomainParticipant.

The following values are included in the status:

total_count

int – Cummulative count of the discovered Topics having a matching name and inconsistent characteristics.

total_count_change

int – Change in total_count since the last time the listener was called or status was read.

class dds.core.InstanceHandle

Identifies an instance within the scope of a particular DataReader. The following values are defined:

  • HANDLE_NIL
  • NIL (an alias for HANDLE_NIL)
class dds.core.InstanceState

InstanceState indicates the state of a data instance.

The following values are defined:

  • ALIVE_INSTANCE_STATE
  • NOT_ALIVE_DISPOSED_INSTANCE_STATE
  • NOT_ALIVE_NO_WRITERS_INSTANCE_STATE
  • NOT_ALIVE_INSTANCE_STATE
  • ANY_INSTANCE_STATE
class dds.core.LivelinessChangedStatus

Status related to the on_liveliness_changed listener methods of the DataReader, Subscriber, and DomainParticipant structures.

The following values are included in the status:

alive_count

int – The number of ‘active’ DataWriters matched to this DataReader.

not_alive_count

int – The number of ‘not-alive’ DataWriters matched to this DataReader.

alive_count_change

int – Change in  alive_count since the last time the listener was called or status was read.

not_alive_count_change

int – Change in  not_alive_count since the last time the listener was called or status was read.

last_publication_handle

dds.core.InstanceHandle – Handle identifying the most recent DataWriter whose liveliness changed.

class dds.core.LivelinessLostStatus

Status related to the on_liveliness_lost listener methods of the DataWriter, Publisher, and DomainParticipant structures.

The following values are included in the status:

total_count

int – Cummulative number of times that an ‘alive’ DataWriter became not alive.

total_count_change

int – Change in  total_count since the last time the listener was called or status was read.

class dds.core.OfferedDeadlineMissedStatus

Status related to the on_offered_deadline_missed listener methods of the DataWriter, Publisher, and DomainParticipant structures.

The following values are included in the status:

total_count

int – Cummulative count of the number of deadlines missed by this DataWriter.

total_count_change

int – Change in  total_count since the last time the listener was called or status was read.

last_instance_handle

dds.core.InstanceHandle – Handle identifying the most recent instance whose deadline was missed.

class dds.core.OfferedIncompatibleQosStatus

Status related to the on_offered_incompatible_qos listener methods of the DataWriter, Publisher, and DomainParticipant structures.

The following values are included in the status:

total_count

int – Cummulative count of the number of DataWriters discovered having matching Topic and incompatible QoS.

total_count_change

int – Change in  total_count since the last time the listener was called or status was read.

last_policy_id

dds.core.QosPolicyId – Id of the most recent requested incompatible QoS policy.

class dds.core.PublicationMatchedStatus

Status related to the on_publication_matched listener methods of the DataWriter, Publisher, and DomainParticipant structures.

The following values are included in the status:

total_count

int – Cummulative count of the number of times this DataWriter has discovered a matching DataReader.

total_count_change

int – Change in  total_count since the last time the listener was called or status was read.

current_count

int – The current number of DataReaders matched to the DataWriter.

current_count_change

int – Change in  current_count since the last time the listener was called or status was read.

last_subscription_handle

dds.core.QosPolicyId – The handle of the most recent matched DataReader

class dds.core.QosPolicyCount

Holds a QosPolicyId value and a counter to indicate the number of events associated with that PolicyId.

class dds.core.QosPolicyId

Each standard QoS Policy has an associated ID that is used in the OfferedIncompatibleQosStatus and RequestedIncompatibleQosStatus objects.

The following values are defined:

  • USERDATA_QOS_POLICY_ID
  • DURABILITY_QOS_POLICY_ID
  • PRESENTATION_QOS_POLICY_ID
  • DEADLINE_QOS_POLICY_ID
  • LATENCYBUDGET_QOS_POLICY_ID
  • OWNERSHIP_QOS_POLICY_ID
  • OWNERSHIPSTRENGTH_QOS_POLICY_ID
  • LIVELINESS_QOS_POLICY_ID
  • TIMEBASEDFILTER_QOS_POLICY_ID
  • PARTITION_QOS_POLICY_ID
  • RELIABILITY_QOS_POLICY_ID
  • DESTINATIONORDER_QOS_POLICY_ID
  • HISTORY_QOS_POLICY_ID
  • RESOURCELIMITS_QOS_POLICY_ID
  • ENTITYFACTORY_QOS_POLICY_ID
  • WRITERDATALIFECYCLE_QOS_POLICY_ID
  • READERDATALIFECYCLE_QOS_POLICY_ID
  • TOPICDATA_QOS_POLICY_ID
  • GROUPDATA_QOS_POLICY_ID
  • TRANSPORTPRIORITY_QOS_POLICY_ID
  • LIFESPAN_QOS_POLICY_ID
  • DURABILITYSERVICE_QOS_POLICY_ID
  • DATA_REPRESENTATION_QOS_POLICY_ID
  • TYPE_CONSISTENCY_ENFORCEMENT_QOS_POLICY_ID
class dds.core.RequestedDeadlineMissedStatus

Status related to the on_requested_deadline_missed listener methods of the DataReader, Subscriber, and DomainParticipant structures.

The following values are included in the status:

  • total_count: Cummulative count of the number of detected deadline misses for any instance read by the DataReader.
  • total_count_change: Change in  total_count since the last time the listener was called or status was read.
  • last_instance_handle: Handle identifying the most recent instance whose deadline was missed.
class dds.core.RequestedIncompatibleQosStatus

Status related to the on_requested_incompatible_qos listener methods of the DataReader, Subscriber, and DomainParticipant structures.

The following values are included in the status:

total_count

int – Cummulative count of the number of discovered DataReaders having matching Topic and incompatible QoS.

total_count_change

int – Change in  total_count since the last time the listener was called or status was read.

last_policy_id

dds.core.QosPolicyId

class dds.core.ReturnCode

ReturnCode is used to indicate the success or failure of various methods throughout the dds api.

The following values are defined:

  • RETCODE_OK
  • RETCODE_ERROR
  • RETCODE_UNSUPPORTED
  • RETCODE_BAD_PARAMETER
  • RETCODE_PRECONDITION_NOT_MET
  • RETCODE_OUT_OF_RESOURCES
  • RETCODE_NOT_ENABLED
  • RETCODE_IMMUTABLE_POLICY
  • RETCODE_INCONSISTENT_POLICY
  • RETCODE_ALREADY_DELETED
  • RETCODE_TIMEOUT
  • RETCODE_NO_DATA
class dds.core.Sample

Bases: object

A Sample object holds the user sample data and the associated SampleInfo

data

Access the sample data

info

Access the SampleInfo

class dds.core.SampleInfo

Bases: object

The SampleInfo structure contains meta-data information associated with each sample.

absolute_generation_rank

he generation difference between this sample and the most recent sample. The  absolute_generation_rank indicates the generation difference (ie, the number of times the instance was disposed and became alive again) between this sample, and the most recent sample (possibly not in the returned collection) of this instance.

disposed_generation_count

The number of times the instance has become ‘ALIVE’ after being explicitly disposed. (Computed at the time the sample arrives at the DataReader.)

generation_rank

The generation difference of this sample and the most recent sample in the collection.  generation_rank indicates the generation difference (ie, the number of times the instance was disposed and became alive again) between this sample, and the most recent sample in the collection related to this instance.

instance_handle

The handle that locally identifies the associated instance.

instance_state

Indicates whether the associated instance currently exists. instance_state can be one of:

  • InstanceState.ALIVE_INSTANCE_STATE
  • InstanceState.NOT_ALIVE_DISPOSED_INSTANCE_STATE
  • InstanceState.NOT_ALIVE_NO_WRITERS_INSTANCE_STATE

Can use DDS_NOT_ALIVE_INSTANCE_STATE as a test (bitwise AND) for either ‘NOT_ALIVE’ state.

no_writers_generation_count

The number of times the instance has become ‘ALIVE’ after being automatically disposed due to no active writers.

publication_handle

The local handle of the source DataWriter.

reception_timestamp

The time provided by the DataWriter when the sample was written.

sample_rank

Number of samples related to this instances that follow in the collection returned by the DataReader  read or  take operations.

sample_state

The associated data sample has/has not been read previously. sample_state indicates whether or not the DataReader has previously read the associated sample.

One of:

Use ANY_SAMPLE_STATE to test for either state.

source_timestamp

The time provided by the DataWriter when the sample was written.

valid_data

Set to true (non-zero) if the associated DataSample contains data. The associated DataSample may not contain data if it this sample indicates a change in sample state (for example ALIVE -> DISPOSED).

view_state

Associated instance has/has not been seen before. view_state indicates whether the DataReader has already seen samples for the most current generation of the related instance.

view_state can be one of:

  • ViewState.NEW_VIEW_STATE
  • ViewState.NOT_NEW_VIEW_STATE
class dds.core.SampleLostStatus

Status related to the on_sample_lost listener methods of the DataReader, Subscriber, and DomainParticipant structures.

The following values are included in the status:

total_count

int – Cummulative count of all samples lost under the Topic.

total_count_change

int – Change in  total_count since the last time the listener was called or status was read.

class dds.core.SampleRejectedStatus

Status related to the on_sample_rejected listener methods of the DataReader, Subscriber, and DomainParticipant structures.

The following values are included in the status:

total_count

int – Cummulative count of samples rejected by the DataReader.

total_count_change

int – Change in  total_count since the last time the listener was called or status was read.

last_reason

dds.core.ReturnCode – The reason for rejecting the most recently rejected sample.

last_instance_handle

dds.core.InstanceHandle – The handle of the instance associated with the most recently rejected sample.

class dds.core.SampleRejectedStatusKind

SampleRejectedStatusKind indicates the reason for sample rejection The following values are defined:

  • NOT_REJECTED
  • REJECTED_BY_INSTANCE_LIMIT
  • REJECTED_BY_SAMPLES_LIMIT
  • REJECTED_BY_SAMPLES_PER_INSTANCE_LIMIT
class dds.core.SampleState

SampleState indicates the ‘read’ state of a data sample.

The following values are defined:

  • READ_SAMPLE_STATE
  • NOT_READ_SAMPLE_STATE
  • ANY_SAMPLE_STATE
class dds.core.StatusMask

StatusMask values represent bit flags that can be ‘bitwise’ combined. These values are used to indicate changes in status. These are useful when examining the status changes of a DDS entity (for example DomainParticipant.get_status_changes()), or installing a listener on a DDS entity (for example DomainParticipant.set_listener()).

The following values are defined:

  • NO_STATUS
  • STATUS_MASK_NONE (an alias for NO_STATUS)
  • INCONSISTENT_TOPIC_STATUS
  • OFFERED_DEADLINE_MISSED_STATUS
  • REQUESTED_DEADLINE_MISSED_STATUS
  • OFFERED_INCOMPATIBLE_QOS_STATUS
  • REQUESTED_INCOMPATIBLE_QOS_STATUS
  • SAMPLE_LOST_STATUS
  • SAMPLE_REJECTED_STATUS
  • DATA_ON_READERS_STATUS
  • DATA_AVAILABLE_STATUS
  • LIVELINESS_LOST_STATUS
  • LIVELINESS_CHANGED_STATUS
  • PUBLICATION_MATCHED_STATUS
  • SUBSCRIPTION_MATCHED_STATUS
  • ALL_STATUS
class dds.core.SubscriptionMatchedStatus

Status related to the on_subscription_matched listener methods of the DataReader, Subscriber, and DomainParticipant structures.

The following values are included in the status:

total_count

int – Cummulative count of the number of times this DataReader has discovered a matching DataWriter.

total_count_change

int – Change in  total_count since the last time the listener was called or status was read.

current_count

int – The current number of DataWriters matched to the DataReader.

current_count_change

int – Change in  current_count since the last time the listener was called or status was read.

last_publication_handle

dds.core.QosPolicyId – The handle of the most recent matched DataWriter

class dds.core.Time

Bases: object

Represents a point in time

Parameters:
  • sec – an integer seconds value (default: 0)
  • nanosec – an integer nanoseconds value (default: 0)
exception dds.core.Unsupported

Bases: dds.core.Error

Unsupported operation invoked

class dds.core.ViewState

ViewState indicates the ‘viewed’ state of a data sample.

The following values are defined:

  • NEW_VIEW_STATE
  • NOT_NEW_VIEW_STATE
  • ANY_VIEW_STATE