I haven't checked the code, but are you saying that the existing AIU code doesn't poll the AIU itself but looks at an AIU memory block (or are you confusing this with the turnout position memory block)?
<>
<>
--
Dave
toggle quoted message
Show quoted text
On 8 Mar 2018, at 1:55 AM, 'Ken Cameron' kcameron@... [jmriusers] <jmriusers@...> wrote:
I just setup the test and the replies show it sees the AIU!! So it would
seem that by editing NceSensorManager to use that command instead of reading
the memory block would work for these systems. The question is what speed is
reasonable for this action? The upside is there is a low number of AIU
boards possible (2-PowerCab, 3-5, 8-9, 10-USB) is 5 boards (or is it 6 if
address 7 is valid for a AIU). So polling as a low priority thread on
address every 100ms, you still get under 1s worst case delay. So that's
likely close to what we get from the method of scanning the memory in the
CS02. I'm not reading deeply in the manager right now, but it looks like
part of its polling logic is based on how often things are changing and
other traffic.
I don't know what the effective scan rate we get on the CS02 is, so maybe
somebody else out here knows?
It looks doable but I also see a lot of things in the code that would need
to change so it knows all of the possible changes that might be out there.
Like MINAIU and MAXAIU and the range. The gap in the range. Things like
that. My current task loading isn't able to deal with it, so if somebody
else wants to, I can still do the testing.