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: Mark Rivers <[email protected]>
To: "'Zelazny, Michael Stanley'" <[email protected]>, Pierrick Hanlet <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Thu, 20 Dec 2012 20:14:38 +0000
You must escape declarations of variables with types like struct, they are not known types to SNL.

Mark


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Zelazny, Michael Stanley
Sent: Thursday, December 20, 2012 11:22 AM
To: Pierrick Hanlet
Cc: [email protected]
Subject: RE: structs and SNL

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 Pierrick Hanlet
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
RE: structs and SNL Zelazny, Michael Stanley

Navigate by Date:
Prev: Re: devlib2 bugfix (rare string corruption) Michael Davidsaver
Next: Re: structs and SNL Pierrick Hanlet
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: structs and SNL Zelazny, Michael Stanley
Next: Re: structs and SNL Pierrick Hanlet
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 ·