eclipse-uprotocol / up-spec

uProtocol Specifications
Apache License 2.0
32 stars 25 forks source link

uE Instance ID of UUri when set to 0 is ambiguous #217

Closed stevenhartley closed 1 month ago

stevenhartley commented 1 month ago

Some languages like up-cpp has interpreted the spec that it must always set the instance id to be 1 however the intention was that a value of 0 (don't care) is also used to indicate when there is only a single instance. the purpose of not forcing the "1" for a single instance was to avoid sending additional bytes for the URI.

The specifications need to be clarified to indicate that setting instance_id (upper 16 bits of ue_id) to 0 (don't care) is used to also indicate a single instance. It is covered slightly in the someip specs but needs some more TLC.

gregmedd commented 1 month ago

@stevenhartley - I think this is a spec bug that needs to be fixed before we make code changes. We discussed elsewhere, but I've copied my recommendation into the bug filed against up-cpp: https://github.com/eclipse-uprotocol/up-cpp/issues/259#issuecomment-2276430356

In short, I recommend that we update the spec to define 0xFFFF as the wildcard filter value for instance ID. It solves several problems, allows for the wildcard value to be reserved, improves the SOME/IP instance ID mapping, and removes ambiguity around the usage of instance ID 0 in several situations.

PLeVasseur commented 1 month ago

FWIW, this would very seamlessly slot into how vsomeip defines ANY_INSTANCE and ANY_SERVICE. :+1: