Experimental Physics and Industrial Control System
Geoff Savage wrote:
> Jeff,
>
> Where is the address assigned to the monitor subscription data structures?
> I saw what you are disscussing in db_post_events() but I couldn't determine
> where the address is stored when the monitor is registered.
>
> Geoff
>
J. Frederick Bartlett ([email protected]) wrote:
>...
To my considerable surprise, I found that the CA client received
monitor events for the STATUS field but not for the VAL field.
...
So, how should I handle the monitoring of a VAL (or any other) field
that has the SPC_DBADDR property?
Fritz
This info is in the Application Developers Guide.
In the 3.14.0beta1 version it is section 11.5.7 and 11.5.8.
A brief summary is.
When a CA client connects to a field of a record.
1) A DBADDR structure is allocated.
2) dbNameToAddr is called. It assigns values to the members of DBADDR.
3) If the fields has been declared SPC_DBADDR then the record support routine
cvt_dbaddr is called. It is allowed to change any of the following members of
DBADDR: no_elements, field_type, field_size, special, pfield, and dbr_type.
For example the waveformRecord cvt_dbaddr is
static long cvt_dbaddr(paddr)
struct dbAddr *paddr;
{
struct waveformRecord *pwf=(struct waveformRecord *)paddr->precord;
paddr->pfield = (void *)(pwf->bptr);
paddr->no_elements = pwf->nelm;
paddr->field_type = pwf->ftvl;
if(pwf->ftvl==0) paddr->field_size = MAX_STRING_SIZE;
else paddr->field_size = sizeofTypes[pwf->ftvl];
paddr->dbr_field_type = pwf->ftvl;
return(0);
}
Since it set pfield = bptr it calls
db_post_events(pwf,pwf->bptr,monitor_mask);
rather than
db_post_events(pwf,pwf->val,monitor_mask);
Note that section 11.5.8 says that the record support routine "get_array_info"
is also allowed to change pfield. This allows record support to implement double
buffering.
I hope this helps.
Marty Kraimer
- References:
- How to handle EPICS monitors? J. Frederick Bartlett ([email protected])
- Navigate by Date:
- Prev:
Re: How to handle EPICS monitors? Geoff Savage
- Next:
Re: NAN and INF Marty Kraimer
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
<2002>
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
- Navigate by Thread:
- Prev:
Re: How to handle EPICS monitors? Geoff Savage
- Next:
EPICS Licensing Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
<2002>
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025