Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add device_model_id and software_version_id properties #20

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ssilverman
Copy link
Owner

Also capitalize "Manufacturer" in the manufacturer_id description
for consistency.

Fixes #13

Also capitalize "Manufacturer" in the manufacturer_id description
for consistency.
@ssilverman
Copy link
Owner Author

@mayanigrosh @sammysmallman Have a look at this and check for correctness and consistency?

@ssilverman ssilverman mentioned this pull request May 19, 2022
"type": "integer",
"minimum": 0,
"maximum": 65535
},
"device_model_id": {
"$comment": "The Device Model ID is a 16-bit value determined by the manufacturer. Users may expect to see these values in the UI as hexadecimal.",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the second sentence should be removed, because nothing specifies that.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec says this, and that’s why I used “may”:

The recommended method for representing the UID in text is in hexadecimal format with a colon separating the Manufacturer ID and the Device ID.
An example of such would be: mmmm:dddddddd, where mmmm is the Manufacturer ID in hexadecimal and dddddddd is the Device ID in hexadecimal.

Would you rather see “it’s possible” instead of “may”?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or… is “Device ID” different from “Device Model ID”?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Device Model ID" and "Software Version ID" both appear as fields under DEVICE_INFO.
The Data Description for Device Model ID says

This field identifies the Device Model ID of the Root Device or the Sub-Device. The Manufacturer shall not use the same ID to represent more than one unique model type.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we want device_model_id. We're identifying a type of device and the software it is running, rather than a particular instance of a device. The use case is that we have a parameter definition from Device 1. If Device 2 is the same model made by the same manufacturer and running the same software, the get response would be the same thus we don't need to do a get request again, we can just used the previously retrieved parameter definition.

I'd just omit the part about displaying it as hex.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets use GitHub's features and be explicit:

Suggested change
"$comment": "The Device Model ID is a 16-bit value determined by the manufacturer. Users may expect to see these values in the UI as hexadecimal.",
"$comment": "The Device Model ID is a 16-bit value determined by the manufacturer.",

@mayanigrosh
Copy link

@mayanigrosh @sammysmallman Have a look at this and check for correctness and consistency?

I'd like to argue that the two new keys be required.

@ssilverman
Copy link
Owner Author

ssilverman commented May 19, 2022

@mayanigrosh @sammysmallman Have a look at this and check for correctness and consistency?

I'd like to argue that the two new keys be required.

Are you also saying that you’d like for manufacturer_id to be required? The three values form a tuple.

@ssilverman
Copy link
Owner Author

ssilverman commented May 19, 2022

I'm still not sure I agree with this change. See my comment here: #13 (comment)
Also see this comment: #13 (comment)

In short, the data isn't necessary because each message doesn't need to be self-contained.

@ssilverman ssilverman marked this pull request as draft May 19, 2022 20:07
@mayanigrosh
Copy link

@mayanigrosh @sammysmallman Have a look at this and check for correctness and consistency?

I'd like to argue that the two new keys be required.

Are you also saying that you’d like for manufacturer_id to be required? The three values form a tuple.

manufacturer_id is already required
I'm suggesting that device_model_id and software_version_id also be required. I'd prefer if they were separate keys and not grouped into an object like in Sammy's original suggestion.

@ssilverman ssilverman force-pushed the master branch 2 times, most recently from 3e6d0c1 to ac42033 Compare August 23, 2022 15:18
Copy link
Contributor

@peternewman peternewman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More generally, the description fields this adds are just the title with the word the prepended. Whereas the comment has potentially useful info.

From a UI perspective unless the description is mandatory, wouldn't we be better leaving it blank and then people don't need to show needlessly repetitive info. Or moving the $comment into description and then people can show that. I can't remember, is one for the developer and one for the user?

"type": "integer",
"minimum": 0,
"maximum": 65535
},
"device_model_id": {
"$comment": "The Device Model ID is a 16-bit value determined by the manufacturer. Users may expect to see these values in the UI as hexadecimal.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets use GitHub's features and be explicit:

Suggested change
"$comment": "The Device Model ID is a 16-bit value determined by the manufacturer. Users may expect to see these values in the UI as hexadecimal.",
"$comment": "The Device Model ID is a 16-bit value determined by the manufacturer.",

"maximum": 65535
},
"software_version_id": {
"$comment": "The Software Version ID is a 32-bit value determined by the manufacturer.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not just a random 32-bit value they picked:

Suggested change
"$comment": "The Software Version ID is a 32-bit value determined by the manufacturer.",
"$comment": "The Software Version ID is a 32-bit value for a particular software release determined by the manufacturer.",

@patrick-dmxc
Copy link

This something i also need for my usecase.
Why its not part of the finisched V1.0.0 Schema?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uniqueness
5 participants