Experimental Physics and Industrial Control System
|
Andrew Johnson schrieb:
. . . .
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?
Well, partly yes. In one case not, I think: If an IOC have been "master"
(active) and then "slave" and then it becomes "master" again after long
time.... In this case the timestamp is not zero and iocInitState() would
return "iocRunning". The record has no information, that it runs the
first time after becoming "master" again.
-Bernd
- References:
- Re: Local CA out links broken during PINI Andrew Johnson
- Re: Local CA out links broken during PINI Ralph Lange
- Re: Local CA out links broken during PINI Andrew Johnson
- Navigate by Date:
- Prev:
Re: Local CA out links broken during PINI Tim Mooney
- Next:
SIGALRM => SIGUSR1? Andrew Johnson
- Index:
2002
2003
2004
2005
2006
2007
2008
<2009>
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Local CA out links broken during PINI Andrew Johnson
- Next:
Re: Local CA out links broken during PINI Tim Mooney
- Index:
2002
2003
2004
2005
2006
2007
2008
<2009>
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|
ANJ, 02 Feb 2012 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|