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
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion rdm-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,27 @@
"manufacturer_id": {
"$comment": "Manufacturer IDs are assigned by ESTA and are commonly expressed in hexadecimal. Users may expect to see these values in the UI as hexadecimal.",
"title": "Manufacturer ID",
"description": "The manufacturer ID.",
"description": "The Manufacturer ID.",
"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.",

"title": "Device Model ID",
"description": "The Device Model ID.",
"type": "integer",
"minimum": 0,
"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.",

"title": "Software Version ID",
"description": "The Software Version ID.",
"type": "integer",
"minimum": 0,
"maximum": 4294967295
},
"pid": {
"title": "PID",
"description": "The parameter ID.",
Expand Down