From 1fe9c9c9669ad2510bee4af9b9904d25014f0b83 Mon Sep 17 00:00:00 2001 From: Alex Campos Date: Tue, 12 Nov 2024 09:28:49 -0800 Subject: [PATCH 1/2] Custom transport example: note about doc out of date --- examples/connext_dds/custom_transport/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/connext_dds/custom_transport/README.md b/examples/connext_dds/custom_transport/README.md index 16dcfbe10..23a483af6 100644 --- a/examples/connext_dds/custom_transport/README.md +++ b/examples/connext_dds/custom_transport/README.md @@ -1,5 +1,9 @@ # Example Code: Creating a Custom Transport +**IMPORTANT:** This documentation is out of date, and details may be missing. +If you are interested in developing a custom transport plugin for RTI Connext, +please contact your local RTI representative or email sales@rti.com. + ## Concept RTI Connext DDS interacts with the underlying network/communications transport From 28f31b458290bd29d2f0d3abf3cc8066af1fa27c Mon Sep 17 00:00:00 2001 From: Alex Campos Date: Fri, 9 May 2025 09:29:18 -0700 Subject: [PATCH 2/2] Update RPC python example and tutorial to use wait_for_service_async The new API is available since 7.5 and can be now used the latest code examples --- .../remote_procedure_call/py/inventory_client.py | 10 +--------- tutorials/rpc/py/robot_client.py | 5 +---- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/examples/connext_dds/remote_procedure_call/py/inventory_client.py b/examples/connext_dds/remote_procedure_call/py/inventory_client.py index 78ec9611c..26c416d99 100644 --- a/examples/connext_dds/remote_procedure_call/py/inventory_client.py +++ b/examples/connext_dds/remote_procedure_call/py/inventory_client.py @@ -21,21 +21,13 @@ class InventoryClient(InventoryService, rpc.ClientBase): ... -async def wait_for_service(client: InventoryClient): - while client.matched_service_count == 0: - await sleep(0.1) - - async def run_client(args): participant = dds.DomainParticipant(args.domain) client = InventoryClient( participant, "Inventory", max_wait_per_call=dds.Duration(20) ) - # For versions 7.4.0 and below: - await wait_for_service(client) - # For newer versions you can use the following: - # await client.wait_for_service_async(dds.Duration(20)) + await client.wait_for_service_async(dds.Duration(20)) print("Initial inventory: ", await client.get_inventory()) diff --git a/tutorials/rpc/py/robot_client.py b/tutorials/rpc/py/robot_client.py index b3452faa9..b80451772 100644 --- a/tutorials/rpc/py/robot_client.py +++ b/tutorials/rpc/py/robot_client.py @@ -24,10 +24,7 @@ async def main(): participant = dds.DomainParticipant(domain_id=0) client = RobotControlClient(participant, "MyRobotControl") - # For versions 7.4.0 and below: - sleep(2) - # For newer versions you can use the following: - # await client.wait_for_service_async(dds.Duration(20)) + await client.wait_for_service_async(dds.Duration(20)) # Available in Connext 7.5.0+ print("Calling walk_to...") result = await client.walk_to(