Hi Lana,
On 2011-10-18 Abadie Lana wrote:
> I had a look at the code you mentioned to see if it is a constant or not.
> Sorry for my stupid question here... but a link of type constant in EPICS
> is always a double/long? it cannot be a string?
With the current IOC code constants cannot be non-numeric, because there's no
way for the IOC to distinguish between such constant strings and a Channel
Access PV, as you discovered in your test:
> record(stringout, "$(PSH)-COS:TraceMessage") {
> field(DTYP, "Soft Channel")
> field(DOL, "Test string for dol")
> }
>
> epics> dbpr RF-ICH1-COS:TraceMessage 4
> DOL:CA_LINK Test NPP NMS
Your DOL constant string became a CA link.
There are several ways to provide constant string values for use in a
database; setting the VAL field of a stringin or stringout record in a .db
file is the simplest, but people have used other methods — autosave/restore,
putting dbpf statements in their st.cmd files, using a sequence program etc.
> and in the case of a timestamp
>
> record(stringin, "$(PSH)-COS:CurrentTime") {
> field(DESC, "Current Date and Time of the IOC")
> field(DTYP, "Soft Timestamp")
> field(SCAN, "1 second")
> field(PINI, "YES")
> field(INP, "@%d/%m/%Y %H:%M:%S")
> }
>
> I have this, INST_IO (which corresponds to the entry in the dbd file for
> DTYP). But is it a constant for you?
A Soft Timestamp stringin device support expects an INST_IO address, which is
a different kind of link than the Soft Channel device supports use. The
leading @ sign in the field's value indicates that the characters following it
are to be placed in the string field of the struct instio value for the device
support to parse as it likes.
HTH,
- Andrew
--
Optimization is the process of taking something that works and
replacing it with something that almost works, but costs less.
-- Roger Needham
- Replies:
- RE: How the EPICS IOC determines the link type {CA_LINK/DB_LINK/CONSTANT} Abadie Lana
- References:
- EPICS Workshop Fall 2011 Dirk Zimoch
- Re: How the EPICS IOC determines the link type {CA_LINK/DB_LINK/CONSTANT} Andrew Johnson
- RE: How the EPICS IOC determines the link type {CA_LINK/DB_LINK/CONSTANT} Abadie Lana
- Navigate by Date:
- Prev:
Re: aSub and zero length arrays Michael Davidsaver
- Next:
RE: How the EPICS IOC determines the link type {CA_LINK/DB_LINK/CONSTANT} Abadie Lana
- 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: How the EPICS IOC determines the link type {CA_LINK/DB_LINK/CONSTANT} Abadie Lana
- Next:
RE: How the EPICS IOC determines the link type {CA_LINK/DB_LINK/CONSTANT} Abadie Lana
- 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
|