. . . .
Bernd also replied:
We have an additional requirement: The record code of some records need
to know if it is processed normally, the first time at all or the first
time after the ioc became active. Up to now we solved this problem by
introducing a new field in those records and a function, which sets
these fields, is registered to the redundancy task (RMT). These records
are in a linked list. When the ioc becomes active the RMT sets the
fields to a value, so that the record code can see that the record is
processed first after becoming active.
A record type can always find out if this is a record's first-ever process()
call by looking at the TIME field; if it's zero (the epoch) it has never
called recGblGetTimestamp() for this record. That distinguishes one case.
The other cases could be distinguished by making the IOC's initialization
state available, so a record type could do something like
if (iocInitState() == iocBuilding)
to detect the processing caused by PINI=YES, and
if (iocInitState() == iocRunning)
for the normal processing state. It can also change the PINI field itself at
runtime if it wants to cause re-processing at one of the other events.
Would this solve your requirement?