06-22-2011 05:00 PM - edited 06-22-2011 05:00 PM
I was wondering the best way to do the following:
Initially when the RT starts up it takes the current configuration and creates RT FIFOs and bundles all the references into a cluster. Then those references are passed to every loop. However, if my monitor configuration loop notices a change in the configuration file (such as a new one being FTP'd down) it has to reconfigure the FIFOs. This is important because RT FIFOs which pass arrays need to know how many elements there are in the array.
So, after the FIFOs are configured for their new array sizes, I need to get the new cluster of FIFO references to every loop. I have thought about using a queue or notifier to do this, but I hate to make 3 more queues just to pass queue references to 3 parallel loops. Another option is a functional global, but then there is the risk the queue references will be cleaned up and lost. In that case I have to check all the references before returning them, and change all my FIFOs (8 of them) to named. Does anyone have either:
1. other methods
2. a prefered method listed above
3. a modification of a method listed above
Thanks!
06-23-2011 07:32 PM
You only need to use an RT FIFO if you need to guarantee determinism. If you have one writer, and three readers that each need to read every value, the simplest way to do this would be to use a tripple queue. If you want this to be neater, you could build the three queue references into an array, and then feed each reference to a different consumer loop (see below)
Hope this helps!
~kgarrett