EPICS Home

Experimental Physics and Industrial Control System


 
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  <20242025  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  <20242025 
<== Date ==> <== Thread ==>

Subject: Re: dbGetField AI.DPVT
From: Érico Nogueira Rolim via Tech-talk <tech-talk at aps.anl.gov>
To: Dave Bracey <dbracey at fnal.gov>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Tue, 23 Jul 2024 18:17:32 +0000
Hi Dave,

Have you looked at IOC Access Security [1]? You could simply define an ASG which blocks all writes to your ai record. Something like:

ASG(READONLY) {
    RULE(1, READ)
}

Would that be enough for your purpose? The hardware, since it can use a different method to access the record (e.g. device support code, dbPutField in StreamDevice protocols, pvPut in sequencer running on the same IOC), should still be able to write to the record without issue.

Cheers,
Érico

[1] https://docs.epics-controls.org/en/latest/appdevguide/AccessSecurity.html

On 22/07/2024 18:06, Dave Bracey via Tech-talk wrote:

I find that I can PVPUT (cmd line) to an AI, and I feel that this is probably not a good thing.  It seems to me that the hardware should be the only thing that changes the value of an AI PV.

Without going into detail, I was going to use DPVT as a side-channel to ensure that only the hardware can put to the AI.

 

From: Johnson, Andrew N. <anj at anl.gov>
Date: Monday, July 22, 2024 at 3:48
PM
To: Dave Bracey <dbracey at fnal.gov>, tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Re: dbGetField AI.DPVT

[EXTERNAL] – This message is from an external sender

Hi Dave,

 

There's a reason the DPVT field is called "Device Private" — it's not intended to be accessible from outside the device support code which owns it. Think of it like a C++ private: class-member access specifier. That doesn't mean it's impossible for other software running inside the IOC to get to it, but dbGetField() can't do it by design.

 

What's the higher-level problem that you're trying to solve which seems to require this? Please describe that to the list and we can try to offer other approaches that wouldn't require you to break the encapsulation.

 

- Andrew

 

On 7/22/24, 2:47PM, "Tech-talk" <tech-talk-bounces at aps.anl.gov> wrote:

 

I want to use dbGetField to get the value of the DPVT field of an AI record.  Does this work?  What field type would I specify?

 

I tried with DBR_LONG and it didn’t like that.  I used the field_type returned from dbNameToAddr (17) and it didn’t like that.

 

Dave Bracey

Fermilab AD Instrumentation



Aviso Legal: Esta mensagem e seus anexos podem conter informações confidenciais e/ou de uso restrito. Observe atentamente seu conteúdo e considere eventual consulta ao remetente antes de copiá-la, divulgá-la ou distribuí-la. Se você recebeu esta mensagem por engano, por favor avise o remetente e apague-a imediatamente.

Disclaimer: This email and its attachments may contain confidential and/or privileged information. Observe its content carefully and consider possible querying to the sender before copying, disclosing or distributing it. If you have received this email by mistake, please notify the sender and delete it immediately.


Replies:
Re: dbGetField AI.DPVT Ralph Lange via Tech-talk
References:
dbGetField AI.DPVT Dave Bracey via Tech-talk
Re: dbGetField AI.DPVT Johnson, Andrew N. via Tech-talk
Re: dbGetField AI.DPVT Dave Bracey via Tech-talk

Navigate by Date:
Prev: Re: dbGetField AI.DPVT Johnson, Andrew N. via Tech-talk
Next: Re: Guaranteeing access to consistent state in asyn-backed waveforms Érico Nogueira Rolim via Tech-talk
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  <20242025 
Navigate by Thread:
Prev: Re: dbGetField AI.DPVT Johnson, Andrew N. via Tech-talk
Next: Re: dbGetField AI.DPVT Ralph Lange via Tech-talk
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  <20242025