EPICS Controls Argonne National Laboratory

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

Subject: How to read array value with Channel Access compound data types
From: "Wang, Lin via Tech-talk" <tech-talk at aps.anl.gov>
To: tech-talk at aps.anl.gov
Date: Thu, 22 Feb 2024 16:49:58 +0800 (GMT+08:00)
Dear all, From Channel Access tutorial and EPICS base source code, I have learned that besides simple data types like DBR_INT and DBR_STRING, Channel Access client can also read data using compound data types like DBR_TIME_INT and DBR_TIME_STRING. My
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
 
ZjQcmQRYFpfptBannerEnd

Dear all,


From Channel Access tutorial and EPICS base source code, I have learned that besides simple data types like DBR_INT and DBR_STRING, Channel Access client can also read data using compound data types like DBR_TIME_INT and DBR_TIME_STRING.


My understanding is that the data will be returned in dbr field of event_handler_args structure,


typedef struct event_handler_args {
    void            *usr;   /* user argument supplied with request */
    chanId          chid;   /* channel id */
    long            type;   /* the type of the item returned */
    long            count;  /* the element count of the item returned */
    const void      *dbr;   /* a pointer to the item returned */
    int             status; /* ECA_XXX status of the requested op from the server */
} evargs;


And the data returned for DBR_TIME_STRING compound data type is dbr_time_string structure,


struct dbr_time_string{
    dbr_short_t status;         /* status of value */
    dbr_short_t severity;       /* severity of alarm */
    epicsTimeStamp  stamp;          /* time stamp */
    dbr_string_t    value;          /* current value */
};

However, the value field of dbr_time_string structure is a scalar value instead of array or pointer, which means that only the first item of the array can be read. Therefore, my question is, how do I read array value from records like waveform with the compound data type?



Thanks,

Lin


Navigate by Date:
Prev: EPICS Collaboration Meeting 2024 - Update status 조우성(빔운영팀) via Tech-talk
Next: Re: [EXTERNAL] Epics support for DIGITEL MPCQ Ion Pump Controller and Televac MX 200 Vacuum Controller Webb, Brad 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  <2024
Navigate by Thread:
Prev: EPICS Collaboration Meeting 2024 - Update status 조우성(빔운영팀) via Tech-talk
Next: Any chance people can get rid of this extra "feature" Maren Purves 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  <2024
ANJ, 22 Feb 2024 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·