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  <20122013  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  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: structs and SNL
From: "Zelazny, Michael Stanley" <[email protected]>
To: Pierrick Hanlet <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Thu, 20 Dec 2012 09:21:58 -0800
If you "escape to C" the .h with "%%" then you'll have to do the same with your struct declaration.

cc-ing tech-talk for further comments from others.
________________________________________
From: Pierrick Hanlet [[email protected]]
Sent: Thursday, December 20, 2012 6:07 AM
To: Zelazny, Michael Stanley
Subject: structs and SNL

Hi Michael,
I think that I understand reentrant to mean (in part) that variables in SNL and C-code
can be related.  Assuming that is true, then I'm attempting to implement the section
"Variable Modification for Reentrant Option".  My C code reads our database and I
would like to use some of the variables from there in an entry block of a particular
state.

So, in the top-level declarations I define a number a variables which have the same
declaration as those in a struct in a header which I include in the top-level with %%
escape:

option +r;

%%#include "MICEStates.h"

char name[50];
...

If I understand the documentation, I should be able to do:
struct PV *cPV;
where PV is the name of my struct in the header file (I also tried UserVar, as
in the example).  However, at compile time, I get the error "type specifier".
This error follows the "struct" statement wherever I put it in the code.

Can you tell me what I'm doing incorrectly?
Thank you.
Pierrick--
"Whether you think you can or think you can't, either way, you are correct" -- Henry Ford
_______________________________________________________________
Pierrick Hanlet
IIT/Fermilab
+1-630-840-5555 (FNAL)
+1-312-567-5745 (IIT)
+1-630-697-8758/+44-79-48-860-197 (US/UK mobile)


Replies:
RE: structs and SNL Mark Rivers
References:
SNL with C Pierrick M Hanlet
RE: SNL with C Zelazny, Michael Stanley
Re: SNL with C Pierrick Hanlet
RE: SNL with C Zelazny, Michael Stanley

Navigate by Date:
Prev: Re: [makefile] adding a library to an EPICS application Ralph Lange
Next: Record processing: periodic vs. push vs. pull jon
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: SNL with C Zelazny, Michael Stanley
Next: RE: structs and SNL Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·