-
Notifications
You must be signed in to change notification settings - Fork 126
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
Option to create multiple events with readings #574
Comments
This could be done by sending all except the most recent Event via the async channel? |
@iain-anderson since this issue is tagged ireland but in icebox, should we implement this ? |
Per Device Service WG meeting today, here are more details about my requirement: My device has a REST endpoint that when I call, it gives me a collection of RFID alerts. Each alert (which would equate to an event in EdgeX language) is for a product it is seeing via RFID. On each read, it provides a lot of details (what we would call device resources) to include: The device profile for this device is here: https://github.com/jpwhitemn/device-rest-rfrain/blob/master/cmd/res/device.rfrain.yaml (under older Hanoi schema) After making the REST call to get the multiple RFID alerts with multiple data points, I'd like the device resource (through SDK) to be able to create multiple events (one for each RFID alert tag) with all the above device resources. |
We still need to define which event include which reading clearly in the Device Profile, because Event contains In addition to
It could trigger other Device Commands to send out additional events |
this? edgexfoundry/device-sdk-c#3 |
There are three ways a device service produces EdgeX
In the first two cases, the client or It's not possible to use an In our device services meeting today, I thought what you were asking for was just a way to tell a device service to send all of it's queued |
After re-reading @jpwhitemn's comment from after last week's meeting, I don't think my previous comment captures what's really being asked for... I think the issue here is that the EdgeX data model doesn't map simply to the RFID data model. To simplify it, let's say an RFID has three attributes:
Each RFID event is composed of the three attributes but it doesn't make sense to read them individually as they're constantly changing. You could create a So what do you do? You could:
|
@jpwhitemn May we use async channel to produce multiple events to fulfill this requirement? |
Using the current SDK, on AutoEvent schedule, the HandleReadCommands method gets called to create and add reading objects to an event. This, however presupposes that at the appointed schedule, only one event is to be created.
Some devices/sensors, when polled, return the data for multiple events/readings. For example, in some RFID devices, when the RFID reader is pulled, multiple RFID tag events are returned. Each tag event contains what tag was read, the signal strength, reader id, etc.
The SDK should allow for creation of multiple events as well as multiple readings on a single event.
The text was updated successfully, but these errors were encountered: