[Xenomai] Analogy: Basic question regarding a4l_snd_insnlist()
andi.glatz at gmail.com
Sat Apr 12 16:30:40 CEST 2014
I think a4l_snd_insnlist() would be the best option for my use-case,
where I basically want to turn GPIOs on and off, occasionally change
DAC values and at the end acquire a certain amount of ADC samples. So
basically it's a linear sequence of synchronous (well, partly
asynchronous - depending how the last instruction is realized in
hardware) commands which should get executed at certain points in
time. However, when I look at a4l_snd_insnlist() I can pass a list of
instructions but there is no possibility to tell that function when to
exactly execute each instruction of the list. I think this would be a
very nice feature to have since you can get pretty good timing
accuracy with Xenomai as demonstrated previously .
IMHO this shouldn't require many changes (at least for synchronous
instructions): Firstly the a4l_instruction_list struct could be
generalised so that each instruction gets a relative (?) time when it
should be executed. This time is then used in a4l_ioctl_insnlist() to
translate the relative into an absolute time (?) and execute all
instructions at the given time with the method used in e.g. . If
the relative time of each instruction is 0, then the modified
a4l_ioctl_insnlist() falls back to the current mode of operation...
and it remains compatible with everything before that change.
PS: I think that's a very general use-case since it is required in
every sequence based hardware control applications (MRI scanners come
to my mind).
More information about the Xenomai