- 1. Read multiple values (default behaviour?)
- 2. Raise a missing sample alert
What is the failure condition when a sample is missed look like? My
assumption was that this would be, for example, a FIFO overrun on a
connected sensor that you are polling for data.
The main failure I had in mind was missing a polling interval because of
resource allocation issues. Part of that is of course just planning, but
there are DSP algorithms where missing an interval might have a
significant influence on the output. But to be honest, I'm being overly
paranoid here and if you have extremely strict timing requirements, the
burden is on you to make sure you meet them by setting appropriate
timing and priority values. And we do know when the last sample was read
(off the top of my head), so we can probably detect an error already.
I guess another failure condition is that you are late in processing
an interrupt (locally on the processor), or your task gets locked out
for too long and you miss a poll. However, I’m not sure if you want
to be putting strict requirements on this task — I think we’d just
want to log a delay / statistic every time we get locked out for more
than ’n’ ms.
This was my main concern, yes. But I think as you implied if you have
strict requirements, that should be part of the design and decisions
from the start, and I don't know if we should bend over backwards in the
sensor API to fit strict timing in.
K.