[SR-Users] Packet processing order
Alex Balashov
abalashov at evaristesys.com
Tue Dec 6 15:13:23 CET 2022
> On Dec 6, 2022, at 9:09 AM, Alex Balashov <abalashov at evaristesys.com> wrote:
>
> route[THE_REAL_PROC] {
> while(mq_fetch("proc$var(qnum)")) {
> $var(id) = $(mqk(term_proc){s.select,0,:}{s.int});
> $var(label) = $(mqk(term_proc){s.select,1,:}{s.int});
My bad. Replace `$(mqk(term_proc)` here with `$(mqk(proc$var(qnum))`
I don't know if PVs can be interpolated there in a mixed way. If they can't, easy fix:
route[PROC1] {
$var(qnum) = 'proc1';
route(THE_REAL_PROC);
}
route[PROC2] {
$var(qnum) = 'proc2';
route(THE_REAL_PROC);
}
route[PROC3] {
$var(qnum) = 'proc3';
route(THE_REAL_PROC);
}
route[PROC4] {
$var(qnum) = 'proc4';
route(THE_REAL_PROC);
}
route[THE_REAL_PROC] {
while(mq_fetch("$var(qnum)")) {
$var(id) = $(mqk($var(qnum)){s.select,0,:}{s.int});
$var(label) = $(mqk($var(qnum)){s.select,1,:}{s.int});
# Resume transaction in this worker process (rtimer process).
t_continue("$var(id)", "$var(label)", "ONWARD");
}
}
I know that works.
-- Alex
--
Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
More information about the sr-users
mailing list