Python API Surface
The astutedds package re-exports the contents of the native _core pybind11
extension module. This page enumerates the public symbols; full per-class
documentation will be generated from the C++ DCPS headers in the
API Reference.
Module attributes
| Symbol | Description |
|---|---|
astutedds.__version__ |
Package version string (matches the C++ library). |
astutedds.factory() |
Module-level convenience function returning the DomainParticipantFactory singleton (equivalent to DomainParticipantFactory.get_instance()). |
Core entities
| Class | Purpose |
|---|---|
DomainParticipantFactory |
Singleton — get_instance(), create_participant(domain_id, qos=None), delete_participant(...). |
DomainParticipant |
Per-domain entity factory: topics, publishers, subscribers. Supports the context-manager protocol (with factory.create_participant(0) as dp: …). |
Publisher |
Container for DataWriters. |
Subscriber |
Container for DataReaders. |
Topic / TopicDescription |
Topic name + type-name binding. |
ContentFilteredTopic |
SQL-style filtered topic view. |
DataWriter |
write(bytes[, handle]), register_instance(bytes), unregister_instance(handle), dispose(handle), wait_for_acknowledgments(timeout). |
DataReader |
read(), take(), read_next_sample(), take_next_sample(), get_key_value(...), get_topicdescription(), get_qos(), set_data_callback(fn), return_loan(...). |
Sample / status objects
| Class | Contents |
|---|---|
ReceivedSample |
.data: bytes, .info: SampleInfo. |
SampleInfo |
sample/view/instance state, valid_data, source/reception timestamps. |
Duration |
seconds (int32) and fraction (NTP-style uint32, 2³² fractions per second). Construct via Duration(seconds, fraction=0), Duration.from_seconds(float), Duration.zero(), or Duration.infinite(). Round-trip with .to_seconds(). |
QoS aggregates
One per entity kind. All are plain Python objects with read/write attributes
mirroring the C++ dds::core::policy::* types:
DomainParticipantQosTopicQosPublisherQosSubscriberQosDataWriterQosDataReaderQos
QoS policies
| Policy | Enum (if applicable) |
|---|---|
DurabilityQos |
DurabilityKind.{VOLATILE, TRANSIENT_LOCAL, TRANSIENT, PERSISTENT} |
ReliabilityQos |
ReliabilityKind.{BEST_EFFORT, RELIABLE} |
HistoryQos |
HistoryKind.{KEEP_LAST, KEEP_ALL} |
LivelinessQos |
LivelinessKind.{AUTOMATIC, MANUAL_BY_PARTICIPANT, MANUAL_BY_TOPIC} |
DeadlineQos |
— |
OwnershipQos |
OwnershipKind.{SHARED, EXCLUSIVE} |
OwnershipStrengthQos |
— |
PartitionQos |
— |
PresentationQos |
PresentationAccessScope.{INSTANCE, TOPIC, GROUP} |
ResourceLimitsQos |
— |
LifespanQos |
— |
TimeBasedFilterQos |
— |
DestinationOrderQos |
DestinationOrderKind.{BY_RECEPTION_TIMESTAMP, BY_SOURCE_TIMESTAMP} |
LatencyBudgetQos |
— |
UserDataQos / TopicDataQos / GroupDataQos |
— |
EntityFactoryQos |
— |
WriterDataLifecycleQos / ReaderDataLifecycleQos |
— |
DurabilityServiceQos |
— |
DataRepresentationQos |
— |
TransportPriorityQos |
— |
Sample / instance state constants
READ_SAMPLE_STATE NEW_VIEW_STATE ALIVE_INSTANCE_STATE
NOT_READ_SAMPLE_STATE NOT_NEW_VIEW_STATE NOT_ALIVE_DISPOSED_INSTANCE_STATE
ANY_SAMPLE_STATE ANY_VIEW_STATE NOT_ALIVE_NO_WRITERS_INSTANCE_STATE
NOT_ALIVE_INSTANCE_STATE
ANY_INSTANCE_STATE
Status masks
STATUS_MASK_NONE PUBLICATION_MATCHED_STATUS OFFERED_DEADLINE_MISSED_STATUS
STATUS_MASK_ALL SUBSCRIPTION_MATCHED_STATUS REQUESTED_DEADLINE_MISSED_STATUS
DATA_AVAILABLE_STATUS LIVELINESS_LOST_STATUS OFFERED_INCOMPATIBLE_QOS_STATUS
DATA_ON_READERS_STATUS LIVELINESS_CHANGED_STATUS REQUESTED_INCOMPATIBLE_QOS_STATUS
SAMPLE_REJECTED_STATUS
SAMPLE_LOST_STATUS
INCONSISTENT_TOPIC_STATUS
Status structures
InconsistentTopicStatus, SampleLostStatus, SampleRejectedStatus,
LivelinessLostStatus, LivelinessChangedStatus, OfferedDeadlineMissedStatus,
RequestedDeadlineMissedStatus, OfferedIncompatibleQosStatus,
RequestedIncompatibleQosStatus, PublicationMatchedStatus,
SubscriptionMatchedStatus, QosPolicyCount.
Listeners
Subclass to override the callbacks you care about:
DomainParticipantListenerPublisherListener/SubscriberListenerTopicListenerDataWriterListener/DataReaderListener
WaitSet + Conditions
| Class | Purpose |
|---|---|
WaitSet |
attach(condition), detach(condition), wait(timeout_secs). |
Condition |
Base class. |
ReadCondition |
Trigger when a DataReader has matching samples. |
StatusCondition |
Trigger on a chosen status mask. |
GuardCondition |
User-triggered (set_trigger_value(True)) — ideal shutdown signal. |
Return codes
ReturnCode.{OK, ERROR, UNSUPPORTED, BAD_PARAMETER, PRECONDITION_NOT_MET,
OUT_OF_RESOURCES, NOT_ENABLED, IMMUTABLE_POLICY, INCONSISTENT_POLICY,
ALREADY_DELETED, TIMEOUT, NO_DATA, ILLEGAL_OPERATION, NOT_ALLOWED_BY_SECURITY}.
Introspection
The full export list is reachable from Python:
import astutedds
print(sorted(astutedds.__all__))
help(astutedds.DataReader)
help(astutedds.DataWriterQos)