On Monday 13 July 2015 14:35:49 Kasemir, Kay wrote:
> In principle, you can read include/link.h to get the 'record' pointer
> of a link, cast that to the appropriate type, ...
>
> But that's a bad idea because you'd directly access the memory of that
> other record without it being locked.
It is possible to do this correctly, using the runtime database access
methods: in the init routine you call dbNameToAddr, store the address of
the dbAddr struct in the record's DPVT and in the subroutine place calls
to dbScanLock/Unlock around a call to dbPutField.
Cheers
Ben
> From: [email protected] <[email protected]> on
> behalf of Stefen Paul <[email protected]> Sent: Monday, July 13,
> 2015 10:14 AM
> To: EPICS Tech Talk
> Subject: record to record ...
>
> Hi
>
> Just wanna know that if we have a 'sub' record then from its
> subroutine can we directly write into RVAL field of some other
> records say 'ai' records in the same database. If the answer is yes
> then how does one get the address/pointer of other records (ai for
> example) in the subroutine of 'sub' record ?
>
> Thanks,
> Stefen.
--
"Make it so they have to reboot after every typo." ― Scott Adams
________________________________
Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.
Aufsichtsrat: Vorsitzender Prof. Dr. Dr. h.c. mult. Joachim Treusch, stv. Vorsitzende Dr. Beatrix Vierkorn-Rudolph
Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas Frederking
Sitz Berlin, AG Charlottenburg, 89 HRB 5583
Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin
http://www.helmholtz-berlin.de
- Replies:
- Re: record to record ... Ralph Lange
- References:
- record to record ... Stefen Paul
- Re: record to record ... Kasemir, Kay
- Navigate by Date:
- Prev:
Re: Stepper Motor Controllers Benjamin Franksen
- Next:
Re: record to record ... Ralph Lange
- 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
- Navigate by Thread:
- Prev:
Re: record to record ... Kasemir, Kay
- Next:
Re: record to record ... Ralph Lange
- 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
|