Skip to content

Commit 72a49fc

Browse files
PR feedback (tech writer edits)
1 parent aa9023c commit 72a49fc

File tree

6 files changed

+40
-33
lines changed

6 files changed

+40
-33
lines changed

docs/guide/configuration.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ RTI Connector for Rust uses an XML configuration file to define participants,
44
readers, writers, topics, types, and QoS. The XML schema is the same one used
55
by RTI Connext DDS XML-Based Application Creation.
66

7-
For background on the XML format, see:
8-
9-
* <https://community.rti.com/static/documentation/connext-dds/7.3.0/doc/manuals/connext_dds_professional/xml_application_creation/index.htm>
7+
For background on the XML format, see the
8+
[RTI XML-Based Application Creation guide](https://community.rti.com/static/documentation/connext-dds/current/doc/manuals/connext_dds_professional/xml_application_creation/index.htm).
109

1110
## Loading a configuration
1211

@@ -23,7 +22,7 @@ fn load_config() -> rtiddsconnector::ConnectorFallible {
2322

2423
The `config_name` must match a `<domain_participant>` element in the XML.
2524

26-
## XML tags and Connector API
25+
## XML tags and Connector API mapping
2726

2827
The table below summarizes the most common XML tags and how they map to the
2928
Connector API:
@@ -73,7 +72,8 @@ Domains register types and define topics:
7372

7473
## Participants, readers, and writers
7574

76-
Participants contain publishers and subscribers, which contain writers/readers:
75+
Participants contain publishers and subscribers, which in turn manage individual
76+
writers and readers:
7777

7878
```xml
7979
<domain_participant_library name="MyParticipantLibrary">
@@ -114,7 +114,7 @@ QoS can be configured at the profile level or per-entity. Example profile:
114114

115115
## Examples in this repo
116116

117-
The repository includes XML examples you can adapt:
117+
This repository includes XML examples you can adapt:
118118

119119
* `examples/MyApplication.xml`
120120
* `examples/shapes/Shapes.xml`

docs/guide/connector.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
# Connector lifecycle
22

3+
This chapter covers creating a connector, acquiring inputs and outputs, and
4+
cleaning up native resources.
5+
36
[`crate::Connector`] represents a DDS `DomainParticipant` configured from XML.
47
It owns native resources and creates `Input` and `Output` handles.
58

69
## Importing the crate
710

11+
To import the crate:
12+
813
```rust
914
use rtiddsconnector::{self, Connector};
1015
```
@@ -24,7 +29,7 @@ fn create_connector() -> rtiddsconnector::ConnectorFallible {
2429
```
2530

2631
The XML file defines your types, QoS profiles, and DDS entities. The call above
27-
loads a `<domain_participant>` from a `<domain_participant_library>`, for example:
32+
loads a `<domain_participant>` from a `<domain_participant_library>`. For example:
2833

2934
```xml
3035
<domain_participant_library name="MyParticipantLibrary">
@@ -42,8 +47,8 @@ There is no explicit `close()` method in Rust. Instead, `Connector`, `Input`, an
4247
`Output` are released when they go out of scope. The crate uses RAII to free
4348
native resources.
4449

45-
If you want to force cleanup of Connext global resources at the end of a scope
46-
(for example in tests), use [`crate::GlobalsDropGuard`].
50+
To force cleanup of Connext global resources at the end of a scope
51+
(for example, in tests), use [`crate::GlobalsDropGuard`].
4752

4853
## Getting inputs and outputs
4954

@@ -56,16 +61,14 @@ until the entity becomes available, use [`crate::Connector::take_input`] or
5661
See [Publishing data](crate::guide::output) and [Reading data](crate::guide::input)
5762
for the workflow that follows.
5863

59-
## Threading note
60-
61-
Operations on the same `Connector` or its contained entities are not protected
62-
for multi-threaded access. See [Threading and ownership](crate::guide::threading)
63-
for guidance.
64+
> **Note:** Multiple operations on the same `Connector`, or its contained
65+
> entities, are not protected for multi-threaded access. See
66+
> [Threading and ownership](crate::guide::threading) for guidance.
6467
65-
## Auto-enable considerations
68+
## DataReader auto-enable considerations
6669

6770
Connext DDS controls entity enablement through XML QoS settings (for example,
6871
`<entity_factory>/<autoenable_created_entities>`). If readers are enabled before
6972
you acquire an `Input`, data may already be available when you call
70-
`get_input`. This behavior comes from Connext configuration rather than the
73+
`get_input`. This behavior stems from your Connext configuration rather than the
7174
Rust API itself.

docs/guide/data.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ accessors for common primitive fields.
77

88
The types you read and write can include nested structs, sequences, arrays, and
99
unions. These types are defined in XML following RTI's XML-Based Application
10-
Creation format. See
10+
Creation format. For details, see
1111
[RTI XML-Based Application Creation](https://community.rti.com/static/documentation/connext-dds/current/doc/manuals/connext_dds_professional/xml_application_creation/xml_based_app_creation_guide/UnderstandingXMLBased/XMLTagsConfigEntities.htm).
1212

1313
## JSON vs member access
@@ -46,9 +46,8 @@ fn get_basic(sample: &Sample) -> rtiddsconnector::ConnectorFallible {
4646
## Accessing complex members
4747

4848
Examples of field-name syntax for nested members, arrays, sequences, and unions
49-
are available in the Connector JavaScript API documentation:
50-
51-
[Accessing the data (field-name syntax examples)](https://community.rti.com/static/documentation/connector/current/api/javascript/data.html#.)
49+
are available in the [Accessing the data (field-name syntax examples)](https://community.rti.com/static/documentation/connector/current/api/javascript/data.html#)
50+
chapter of the Connector for JavaScript API documentation.
5251

5352
## Type-independent access with SelectedValue
5453

@@ -93,5 +92,5 @@ If you want to work with Rust structs, use Serde:
9392
instance.
9493
* [`crate::Sample::deserialize`]: deserialize a sample into a struct.
9594

96-
These methods allow you to keep strongly typed models in your application while
95+
These methods allow you to keep strongly-typed models in your application while
9796
still using the dynamic RTI Connector API.

docs/guide/errors.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ To inspect the last native error message, call
2727

2828
## Timeout example
2929

30+
This example waits for data and treats a timeout as a non-fatal outcome.
31+
3032
```rust
3133
use rtiddsconnector::Input;
3234

@@ -45,6 +47,6 @@ fn wait_with_timeout(input: &Input) -> rtiddsconnector::ConnectorFallible {
4547
## Native error details
4648

4749
If an operation fails because of a native RTI Connector error, the
48-
`ConnectorError` will include the last error message from the native library.
50+
[`crate::ConnectorError`] will include the last error message from the native library.
4951
This can provide additional context when debugging configuration or data access
5052
issues.

docs/guide/getting_started.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
# Getting started
22

33
This crate is intended to be consumed from Cargo as a Git dependency. The
4-
examples in `snippets/` and `examples/` are also included in the repository.
4+
examples in `snippets/` and `examples/` are also included in the
5+
[rticonnextdds-connector-rust repository](https://github.com/rticommunity/rticonnextdds-connector-rust).
56

67
## Add the dependency
78

89
```console
910
cargo add --git https://github.com/rticommunity/rticonnextdds-connector-rs
1011
```
1112

12-
If you need a specific branch, add `--branch <branch-name>`.
13+
This command adds the Connector for Rust repository to your project. If you
14+
need a specific branch, add `--branch <branch-name>`.
1315

1416
## Running the examples
1517

@@ -22,8 +24,9 @@ See `examples/shapes/README.md` for usage details.
2224

2325
## Minimal example
2426

25-
This is the typical flow: create a connector, obtain an output and input, write
26-
one sample, then read samples back.
27+
This is the typical flow for using Connector: create a connector,
28+
obtain an output and input, write one sample, then read samples back. For
29+
example:
2730

2831
```rust
2932
use rtiddsconnector::{Connector, GlobalsDropGuard, Input, Output};
@@ -56,14 +59,14 @@ fn main() -> rtiddsconnector::ConnectorFallible {
5659

5760
At build time, `build.rs` locates the RTI Connector C libraries in this order:
5861

59-
1. `RTI_CONNECTOR_VERSION`: downloads the target-specific libraries from the
62+
1. `RTI_CONNECTOR_VERSION` downloads the target-specific libraries from the
6063
RTI Connector GitHub releases.
61-
2. `RTI_CONNECTOR_DIR`: uses a local directory containing the libraries.
62-
3. `CARGO_MANIFEST_DIR/rticonnextdds-connector`: uses a local directory next to
64+
2. `RTI_CONNECTOR_DIR` uses a local directory containing the libraries.
65+
3. `CARGO_MANIFEST_DIR/rticonnextdds-connector` uses a local directory next to
6366
the crate.
64-
4. `CONNECTOR_VERSION` file: falls back to a version file in the crate root.
67+
4. `CONNECTOR_VERSION` file falls back to a version file in the crate root.
6568

66-
If neither of these methods is successful, the build will fail with an error
69+
If none of the methods above is successful, the build will fail with an error
6770
message indicating that the C libraries could not be found.
6871

6972
Once your application has been built, `cargo` commands will automatically pick
@@ -73,4 +76,4 @@ configuration is needed to link the RTI Connext C libraries when using
7376

7477
At runtime, ensure the native libraries are discoverable in your system's
7578
library path (for example `DYLD_LIBRARY_PATH` on macOS, `LD_LIBRARY_PATH` on
76-
Linux, or `PATH` on Windows).
79+
Linux, or `PATH` on Windows).

docs/lib.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ the _RTI Connector_ API:
3737
[omg-dds-xml]: https://www.omg.org/spec/DDS-XML/ "OMG DDS XML Specification"
3838
[gh-connector]: https://github.com/rticommunity/rticonnextdds-connector "RTI Connector on Github"
3939

40-
## User Guide
40+
# User Guide
4141

4242
Start here for a tour of the crate:
4343

0 commit comments

Comments
 (0)