Skip to content

Commit 729c2d9

Browse files
committed
Update legacy interface article
Reference the IDL section on identifying interfaces and be explicit about the namespaces for messages, services, and actions. Signed-off-by: Jacob Perron <[email protected]>
1 parent 4d50aeb commit 729c2d9

File tree

1 file changed

+29
-6
lines changed

1 file changed

+29
-6
lines changed

articles/143_legacy_interface_definition.md

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,15 @@ Each field is described by a *type* and a *name*.
3838

3939
A single data structure is called *message*.
4040
Each message has a *name*.
41+
Together with the name of the *package* a message can be uniquely identified.
42+
A message has the URN: package/msg/name`.
4143

4244
### Services
4345

4446
For request / reply style communication the two exchanged data structures are related.
4547
These pairs of data structures are called *services*.
4648
Each service describes two messages, one for the request data structure, one for the reply data structure.
49+
Together with the name of the *package* a
4750

4851
### Actions
4952

@@ -53,14 +56,34 @@ Each action describes three messages, one for the goal data structure, one for t
5356

5457
### Identifying data structures
5558

56-
Every data structure can be uniquely identified with three pieces of information:
59+
Every data structure can be uniquely referenced with a *uniform resource name* (URN) and a *uniform resource locator* (URL)
60+
as described by [IDL - Interface Identification](idl_interface_definition.html#interface-identification)
5761

58-
1. **Package** - the name of the package containing the data structure definition.
59-
2. **Subnamespaces** - the list of namespaces within the package where the data structure is defined.
60-
3. **Name** - the name of the data structure.
62+
#### Messages
6163

62-
For example, a message with the name `Foo` in the namespace `msg` of the package `bar` has the unique identifier `bar/msg/Foo`.
63-
Here, `/` is used as a separator, but in practice any delimeter could be used.
64+
- URN: `<package_name>/msg/<name>`
65+
- URL: `<package_name>/msg/<name>`
66+
67+
#### Services
68+
69+
- URN: `<package_name>/srv/<name>`
70+
- URL: `<package_name>/srv/<name>`
71+
72+
The underlying message definitions that make up a service are located in the same file (ie. have the same URL) and are in the `srv` namespace:
73+
74+
- URN: `<package_name>/srv/<name>\_Request`
75+
- URN: `<package_name>/srv/<name>\_Response`
76+
77+
#### Actions
78+
79+
- URN: `<package_name>/action/<name>`
80+
- URL: `<package_name>/action/<name>`
81+
82+
The underlying message definitions that make up an action are located in the same file (ie. have the same URL) and are in the `action` namespace:
83+
84+
- URN: `<package_name>/action/<name>\_Goal`
85+
- URN: `<package_name>/action/<name>\_Result`
86+
- URN: `<package_name>/action/<name>\_Feedback`
6487

6588
### Field types
6689

0 commit comments

Comments
 (0)