Skip to main content

A full Python binding for RTI Connext

Reason this release was yanked:

Pre-release for limited platforms. 7.2.0 version coming soon.

Project description

RTI® Connext® is a connectivity framework for building distributed applications with requirements for high performance and scalability.

The RTI Connext Python API provides access to most Connext features from Python.

Documentation

Hello World Example

The following is the basic code to publish and subscribe to a topic defined by a simple data type. Similar code can be generated by rtiddsgen from an IDL or XML file defining your data types.

Define your types:

# hello.py

import rti.types as idl

@idl.struct
class HelloWorld:
    message: str = ""

Create a DataWriter to publish the HelloWorld Topic:

# hello_publisher.py

import time
import rti.connextdds as dds
from hello import HelloWorld

participant = dds.DomainParticipant(domain_id=0)
topic = dds.Topic(participant, 'HelloWorld Topic', HelloWorld)
writer = dds.DataWriter(participant.implicit_publisher, topic)

for i in range(10):
    writer.write(HelloWorld(message=f'Hello World! #{i}'))
    time.sleep(1)

Create a DataReader to subscribe to the HelloWorld Topic:

# hello_subscriber.py

import rti.connextdds as dds
import rti.asyncio
from hello import HelloWorld

participant = dds.DomainParticipant(domain_id=0)
topic = dds.Topic(participant, 'HelloWorld Topic', HelloWorld)
reader = dds.DataReader(participant.implicit_subscriber, topic)

async def print_data():
    async for data in reader.take_data_async():
        print(f"Received: {data}")

rti.asyncio.run(print_data())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rti.connext-7.2.0.dev0-cp38-cp38-macosx_13_0_arm64.whl (22.6 MB view details)

Uploaded CPython 3.8macOS 13.0+ ARM64

File details

Details for the file rti.connext-7.2.0.dev0-cp38-cp38-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for rti.connext-7.2.0.dev0-cp38-cp38-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 28259c9281eb7bbc71a78d48b5e9768850650cb64f13454840c35869b0caf401
MD5 c9bf052c2e85f0c5fa20268c793b3d5c
BLAKE2b-256 27d5f48399329eb3f5fe8904b7bd8556c415ee7be6f6d98c0c4dc464ca39e694

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page