09-14-2021 07:32 AM
Coming back on this, I've realized that I'm going to face an issue soon:
As I'm using queues and calling async multiple times, I cannot assign a specific queue to a specific clone in advance, can I?
Because then it means that all my clones will use the same queue... How do I make sure that one clone won't read the data destined to another clone?
Typically, If I have the Clones 970002; 970003 and 970004 with Node IDs 1 2 and 3 respectively. These three clones will use the same queue(s) (by principal of being a clone)
If Node ID 1 requests telemetry; how do I make sure that data read in my communication module and sent over the common queue will not be read (and discarded then) by Node ID 2 instead?
As I see it, I can either create an array of queue(s) and whenever a clone is created with a specific node ID, this node ID indexes the array and then gets a specific (set of) queue(s) and everytime I request the communication Module I send over this index as well-
Or I can also use the Preview Queue Element function and depending on my clone name/Node ID I retrieve only one specific element (or not)
What do you think?
09-14-2021 10:54 AM
If you had a small company with three workers, would you:
A) keep a copy of their individual email addresses (in an array, perhaps).
Or B) come up with complex rules where the three employees share one email address.
09-15-2021 02:24 AM
haha I like this analogy.
My problem however is that I won't know in advance which clone will control which device in advance (operations include often plug/unplug of devices and it usually not necessarilly in the "Node ID Order") That's what I meant with my previous message (in a very poorly way sorry)
But I guess that is very specific to my case, I'll find an initialization solution, I think, were I'm questionning the system's identification somehow and assign it to a specific set of queues
09-15-2021 04:35 AM
You get that information on a query of the Queues - When you setup clone, each queue can pass info back to the master controller (presumably via another queue and say which device it is) - or you index the info out of the FOR loop which setup the clones.
If using plug and play - you want to keep a record of which device type is attached to which queue anyway - FGV (or similar structure in main controller) is good for this.
It's like the small company analogy - you'd keep a record of job roles with HR as well as the email addresses.
James
09-15-2021 05:12 AM
In your small business would you be spending time worrying about your "Employee ID Order"? Or care, in advance, about which employee will handle which equipment? And, if you want to send an employee an email, why not just ask them what their address is, rather than worry about "assigning" something.
I'm trying to prompt you into seeing past whatever is making you find a simple situation so complicated. You are some way down a wrong path and I'm hoping to lead you back from wherever you are.
09-15-2021 05:22 AM
@James_W a écrit :
You get that information on a query of the Queues - When you setup clone, each queue can pass info back to the master controller (presumably via another queue and say which device it is) - or you index the info out of the FOR loop which setup the clones.
If using plug and play - you want to keep a record of which device type is attached to which queue anyway - FGV (or similar structure in main controller) is good for this.
Yes it will be P&P, and sometimes only one device will be connected, sometimes up to 4.
It is still quite blurred in my mind, but I think I need to stop talking about it and start making it 😄
09-15-2021 05:45 AM
I think I'm struggling as well to porperly set my problematic as I'm lacking experience for this. But also I don't really have any devices to test right now, so that makes it difficult to try anything for now and I just have to anticipate different possibilites..
09-16-2021 07:46 AM
Experience is gained through experimentation, not through anticipation.