-
Notifications
You must be signed in to change notification settings - Fork 85
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
feat: [UCR] Attribute protocol info in device #1287
base: main
Are you sure you want to change the base?
Conversation
Any users that create Device Profiles and Devices that have protocol-specific attribute values. | ||
|
||
## Description | ||
The Device Profile **describes** the device and its attributes, it's type. Different manufacturers can build the same type of device using different protocols and the same device using the same protocol but different configuration (e.g. different Modbus HoldingRegister's). For example, two different manufacturers may build an HVAC using ModBus, and another may build an HVAC using SNMP. In the case of two Modbus devices, there will need to be two different Device Profiles, even though the devices are the same and have the same attributes, because the protocol configurations (e.g. HoldingRegister) will conflict. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Device Profile **describes** the device and its attributes, it's type. Different manufacturers can build the same type of device using different protocols and the same device using the same protocol but different configuration (e.g. different Modbus HoldingRegister's). For example, two different manufacturers may build an HVAC using ModBus, and another may build an HVAC using SNMP. In the case of two Modbus devices, there will need to be two different Device Profiles, even though the devices are the same and have the same attributes, because the protocol configurations (e.g. HoldingRegister) will conflict. | |
The Device Profile **describes** the device type and its attributes, it's type. Different manufacturers can build the same type of device using different protocols and the same device type using the same protocol but different configuration (e.g. different Modbus HoldingRegister's). For example, two different manufacturers may build an HVAC using ModBus, and another may build an HVAC using SNMP. In the case of two Modbus device types, there will need to be two different Device Profiles, even though the device types are the same and have the same attributes, because the protocol configurations (e.g. HoldingRegister) will conflict. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first change (addition of 'type') was fixed. The last three are correct as-is.
- '...and the same device using...' describes a manufacturer who built two of the same devices, but specified different configurations for the two.
- The last two uses of device flagged also describe a manufacturer who build two of the same devices, but specified different configurations for the two.
## Description | ||
The Device Profile **describes** the device and its attributes, it's type. Different manufacturers can build the same type of device using different protocols and the same device using the same protocol but different configuration (e.g. different Modbus HoldingRegister's). For example, two different manufacturers may build an HVAC using ModBus, and another may build an HVAC using SNMP. In the case of two Modbus devices, there will need to be two different Device Profiles, even though the devices are the same and have the same attributes, because the protocol configurations (e.g. HoldingRegister) will conflict. | ||
|
||
If the protocol information resides in the Device, which describes a specific (instance of a) device, only a single Device Profile is needed as all devices of the same type can use the same Device Profile. This becomes more important as you have more devices, potentially increasing the number and management of Device Profiles when a single one will do. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am confused by this statement since this is how it is today (i.e. protocol in the device definition), but it doesn't support your need of a single Device Profile for all types of a Device.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've clarified this.
--> | ||
|
||
## Requirements | ||
The requirement is to support the protocol-specific attribute values (e.g. HoldingRegister) in the Device as well as the Device Profile (for backward compatibility). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The requirement is to support the protocol-specific attribute values (e.g. HoldingRegister) in the Device as well as the Device Profile (for backward compatibility). | |
The requirement is to support the protocol-specific attribute values (e.g. HoldingRegister) in the Device definition as well as the Device Profile (for backward compatibility). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you requesting that the Device definition's protocol be expanded for to support the more detail specifics (e.g. HoldingRegister) or the Device Profile be expanded with protocol specifics, which are currently in the Device definition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latter.
## Requirements | ||
The requirement is to support the protocol-specific attribute values (e.g. HoldingRegister) in the Device as well as the Device Profile (for backward compatibility). | ||
|
||
- If only the Device contains a protocol-specific attribute, it is used for that device. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- If only the Device contains a protocol-specific attribute, it is used for that device. | |
- If only the Device definition contains a protocol-specific attribute, it is used for that device. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed using suggestion.
|
||
- If only the Device contains a protocol-specific attribute, it is used for that device. | ||
- If only the Device Profile contains a protocol-specific attribute, it is used for all Devices having that Device Profile. | ||
- If both the Device Profile and the Device contain a protocol-specific attribute, the entry in the Device overrides the one in the Device Profile. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- If both the Device Profile and the Device contain a protocol-specific attribute, the entry in the Device overrides the one in the Device Profile. | |
- If both the Device Profile and the Device definition contain a protocol-specific attribute, the entry in the Device definition overrides the one in the Device Profile. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed using suggestion.
@dmocek, you also need to add this UCR to the UCR TOC here: https://docs.edgexfoundry.org/3.1/design/TOC/ |
8d555b1
to
6da37a5
Compare
Signed-off-by: Darryl Mocek <[email protected]>
Signed-off-by: Darryl Mocek <[email protected]>
Signed-off-by: Darryl Mocek <[email protected]>
Signed-off-by: Darryl Mocek <[email protected]>
6da37a5
to
ec2f394
Compare
Signed-off-by: Darryl Mocek <[email protected]>
All issues have been addressed. |
The requirement is to support the protocol-specific attribute values (e.g. HOLDING_REGISTER's) in the Device definition as well as the Device Profile (for backward compatibility). | ||
|
||
- If only the Device definition contains a protocol-specific attribute, it is used for that device. | ||
- If only the Device Profile contains a protocol-specific attribute, it is used for all Devices having that Device Profile. | ||
- If both the Device Profile and the Device definition contain a protocol-specific attribute, the entry in the Device definition overrides the one in the Device Profile. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem I see with this approach is the common protocol details in the device definition are repeated for every instance of a specific device type. Each time a device object is instantiated the common protocol details have to be known so they can be specified in the device definition. Currently the common protocol details are specified once in the Device Profile and the Define Definitions only contain the device instance specific protocol details
What if the Device Profile Resource attribute could be partition by protocol allowing the Device Services to pick the attributes base on the protocol name already specified in the Device definition.
Something like:
name: "SwitchA"
isHidden: true
description: "On/Off , 0-OFF 1-ON"
attributes:
modbus-tcp:
{ primaryTable: "COILS", startingAddress: 0 }
modbus-rtu:
{ primaryTable: "COILS", startingAddress: 1 }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, the fomat of the profile resource attribute is free, so users can define multiple protocol information in the device resources. It's simpler than adding the protocol resource attribute to Device.
Attribute protocol information in the Device UCR.