Skip to content

Commit e74729b

Browse files
authored
Separate type and instance of ue_id in Zenoh key (#259)
* Separate type and instance of ue_id in Zenoh key Signed-off-by: ChenYing Kuo <evshary@gmail.com> * Fix the ignore part in Zenoh key for publish type. Signed-off-by: ChenYing Kuo <evshary@gmail.com> * Incorporate the review's comment. Signed-off-by: ChenYing Kuo <evshary@gmail.com> --------- Signed-off-by: ChenYing Kuo <evshary@gmail.com>
1 parent b482035 commit e74729b

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

up-l1/zenoh.adoc

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ For more information, please visit https://projects.eclipse.org/projects/iot.zen
3030

3131
=== Zenoh Version
3232

33-
We **MUST** use Zenoh version `1.0.0` to ensure the interoperability in different language bindings.
33+
We **MUST** use Zenoh version `1.0.0` or above to ensure the interoperability in different language bindings.
3434

3535
=== UPTransportZenoh initialization
3636

@@ -90,27 +90,29 @@ The data is sent with Zenoh directly without further processing.
9090

9191
UUri are transformed into Zenoh key expressions following the format defined below.
9292
The format of Zenoh key **MUST** be
93-
`up/[source.authority_name]/[source.ue_id]/[source.ue_version_major]/[source.resource_id]/[sink.authority_name]/[sink.ue_id]/[sink.ue_version_major]/[sink.resource_id]`
93+
`up/[source.authority_name]/[source.ue_type]/[source.ue_instance]/[source.ue_version_major]/[source.resource_id]/[sink.authority_name]/[sink.ue_type]/[sink.ue_instance]/[sink.ue_version_major]/[sink.resource_id]`
9494

9595
* `up/`: Zenoh key **MUST** always start with `up/`, which can be used to identify the uProtocol traffic.
9696
* `authority_name`: The authority_name defined in link:../basics/uri.adoc#3-mapping-to-uri[URI spec] is mapped into Zenoh key directly.
9797
If the authority_name is omitted in UUri, it **MUST** be filled with UAuthority which is initialized while creating UPClienZenoh.
98-
* `ue_id`, `ue_version_major` and `resource_id`: They **MUST** be mapped to the upper-case base16 encoding.
98+
* `ue_type`, `ue_instance`, `ue_version_major` and `resource_id`: They **MUST** be mapped to the upper-case base16 encoding without any leading 0.
9999

100-
Note that in Publish use case, there is no sink UURI.
101-
We **MUST** use `{}` to replace the empty `authority_name`, `ue_id`, `ue_version_major`, and `resource_id`.
100+
Note:
101+
102+
* In Publish use case, there is no sink UURI. We **MUST** use `{}` to replace the empty `authority_name`, `ue_type`, `ue_instance`, `ue_version_major`, and `resource_id`.
103+
* The wildcard values in each part of UUri is mapped to the asterisk (+++*+++).
102104

103105
Take some examples:
104106

105107
[%autowidth]
106108
|===
107109
| Use Case | Source | Sink | Zenoh Key
108110

109-
| Send Publish | /10AB/3/80CD (If publisher's authority is 192.168.1.100) | - | up/192.168.1.100/10AB/3/80CD/{}/{}/{}/{}
110-
| Subscribe messages | //192.168.1.100/10AB/3/80CD | - | up/192.168.1.100/10AB/3/80CD/{}/{}/{}/{}
111-
| Send Notification | //192.168.1.100/10AB/3/80CD | //192.168.1.101/20EF/4/0 | up/192.168.1.100/10AB/3/80CD/192.168.1.101/20EF/4/0
112-
| Receive all Notifications | //+++*+++/FFFF/FF/FFFF | //192.168.1.101/20EF/4/0 | up/+++*+++/+++*+++/+++*+++/+++*+++/192.168.1.101/20EF/4/0
113-
| Send Request | //my-host1/10AB/3/0 | //my-host2/20EF/4/B | up/my-host1/10AB/3/0/my-host2/20EF/4/B
114-
| Receive all Requests | //+++*+++/FFFF/FF/FFFF | //my-host2/20EF/4/B | up/+++*+++/+++*+++/+++*+++/+++*+++/my-host2/20EF/4/B
115-
| Receive all messages to a device | //+++*+++/FFFF/FF/FFFF | //[::1]/FFFF/FF/FFFF | up/+++*+++/+++*+++/+++*+++/+++*+++/[::1]/+++*+++/+++*+++/+++*+++
111+
| Send Publish | /10AB/3/80CD (If publisher's authority is 192.168.1.100) | - | up/192.168.1.100/10AB/0/3/80CD/{}/{}/{}/{}/{}
112+
| Subscribe messages | //192.168.1.100/10AB/3/80CD | - | up/192.168.1.100/10AB/0/3/80CD/{}/{}/{}/{}/{}
113+
| Send Notification | //192.168.1.100/10AB/3/80CD | //192.168.1.101/300EF/4/0 | up/192.168.1.100/10AB/0/3/80CD/192.168.1.101/EF/3/4/0
114+
| Receive all Notifications | //+++*+++/FFFFFFFF/FF/FFFF | //192.168.1.101/300EF/4/0 | up/+++*+++/+++*+++/+++*+++/+++*+++/+++*+++/192.168.1.101/EF/3/4/0
115+
| Send Request | //my-host1/403AB/3/0 | //my-host2/CD/4/B | up/my-host1/3AB/4/3/0/my-host2/CD/0/4/B
116+
| Receive all Requests | //+++*+++/FFFFFFFF/FF/FFFF | //my-host2/CD/4/B | up/+++*+++/+++*+++/+++*+++/+++*+++/+++*+++/my-host2/CD/0/4/B
117+
| Receive all messages to a device | //+++*+++/FFFFFFFF/FF/FFFF | //[::1]/FFFFFFFF/FF/FFFF | up/+++*+++/+++*+++/+++*+++/+++*+++/+++*+++/[::1]/+++*+++/+++*+++/+++*+++/+++*+++
116118
|===

0 commit comments

Comments
 (0)