feat: Ef 569 add resource cmd device tags to events #586
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix: #569
If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/device-sdk-c/blob/main/.github/Contributing.md
PR Checklist
Please check if your PR fulfills the following requirements:
BREAKING CHANGE:describing the break)In addition to the functional changes, I have also updated the template.c applications device file and device profile to include tags on the SensorOne device resource, the Device1 device, and a new device command in the profile which includes device command tags.
The device tags take precedence over command tags if tags have overlapping keys as is in the GO SDK implementation of this feature.
The tags for a received EdgeX event are also now exposed in the GET and PUT handlers for the device services.
Testing Instructions
{ "apiVersion": "v3", "contentType": "application/json", "correlationID": "976a443a-bd2e-4f8e-8fd2-402dabab00ce", "errorCode": 0, "payload": { "apiVersion": "v3", "event": { "apiVersion": "v3", "deviceName": "Device1", "id": "ea2773b0-3287-4b99-a554-3afb3ceca26e", "origin": 1761135717329020200, "profileName": "TemplateSensor", "readings": [ { "apiVersion": "v3", "deviceName": "Device1", "id": "ffe6e561-e510-4ea8-95e2-ea97053278ce", "origin": 1761135717329020200, "profileName": "TemplateSensor", "resourceName": "SensorOne", "tags": { "resourceTag1": "someResourceTag1" }, "value": "Template result", "valueType": "String" }, { "apiVersion": "v3", "deviceName": "Device1", "id": "40ca0f07-7540-4e19-8662-4e6c3e167ef9", "origin": 1761135717329020200, "profileName": "TemplateSensor", "resourceName": "SensorTwo", "value": "Template result", "valueType": "String" } ], "sourceName": "SensorOneTwo", "tags": { "cmdTag1": "someCmdTag1", "deviceTag1": "someDeviceTag1" } }, "statusCode": 200 } }