Async Channel in Device Service #31
Replies: 2 comments 1 reply
-
Hey guys, |
Beta Was this translation helpful? Give feedback.
-
When you implement the Device Services based on Device Service SDK, you can retrieve the resource information from In the async value handler, you can still use the internal DS API to retrieve the Device or Profile from cache. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I needed some help in Device Service SDK. I wanted to get a Resource defined in the profile but I want to use another resource as parameter for retrieving the main resource. For example I have an IO device which has multiple temperature sensors attached to it so I have defined 2 resources namely
I want to read the Temperature but pass the PortId as a parameter to specify which port I want to read. So far from what I understand from the device service example I have 2 options
I don't want to design an API router from scratch so I went the second way based on the example from device-llrp-go.
But the problem I am facing is even if I save the result in the async Channel in the driver struct I am just getting a 200OK in the response instead of the result that I want to return.
Any idea how I can access the result from the async channel? Thanks
Beta Was this translation helpful? Give feedback.
All reactions