Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sequencer-2-2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
epics-modules
sequencer-2-2
Commits
a7e41c9f
Commit
a7e41c9f
authored
11 years ago
by
benjamin.franksen
Browse files
Options
Downloads
Patches
Plain Diff
restore compatibility of C code (UserVar, ssId, pVar)
parent
a43e878c
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/seq/seqCom.h
+7
-3
7 additions, 3 deletions
src/seq/seqCom.h
src/snc/gen_code.h
+2
-1
2 additions, 1 deletion
src/snc/gen_code.h
src/snc/gen_ss_code.c
+4
-4
4 additions, 4 deletions
src/snc/gen_ss_code.c
with
13 additions
and
8 deletions
src/seq/seqCom.h
+
7
−
3
View file @
a7e41c9f
...
@@ -53,7 +53,7 @@ enum compType {
...
@@ -53,7 +53,7 @@ enum compType {
};
};
typedef
struct
state_set
*
const
SS_ID
;
/* state set id, opaque */
typedef
struct
state_set
*
const
SS_ID
;
/* state set id, opaque */
typedef
struct
_
se
q_v
ar
SEQ_VARS
;
/* defined by program, opaque */
typedef
struct
U
se
rV
ar
SEQ_VARS
;
/* defined by program, opaque */
typedef
char
string
[
MAX_STRING_SIZE
];
/* the string typedef */
typedef
char
string
[
MAX_STRING_SIZE
];
/* the string typedef */
typedef
SEQ_VARS
USER_VAR
;
/* for compatibility */
typedef
SEQ_VARS
USER_VAR
;
/* for compatibility */
...
@@ -108,8 +108,12 @@ epicsShareFunc seqBool seq_pvAssigned(SS_ID, VAR_ID);
...
@@ -108,8 +108,12 @@ epicsShareFunc seqBool seq_pvAssigned(SS_ID, VAR_ID);
epicsShareFunc
seqBool
seq_pvConnected
(
SS_ID
,
VAR_ID
);
epicsShareFunc
seqBool
seq_pvConnected
(
SS_ID
,
VAR_ID
);
#define seq_pvIndex(ssId, varId) varId
#define seq_pvIndex(ssId, varId) varId
#define seq_ssId(ssId) ssId
#define seq_ssId(ssId) _seq_ss
#define seq_pVar(ssId) _seq_var
#define seq_pVar(ssId) _seq_vars
/* for backwards compatibility */
#define ssId _seq_ss
#define pVar _seq_vars
/* global operations */
/* global operations */
epicsShareFunc
void
seq_pvFlush
(
SS_ID
);
epicsShareFunc
void
seq_pvFlush
(
SS_ID
);
...
...
This diff is collapsed.
Click to expand it.
src/snc/gen_code.h
+
2
−
1
View file @
a7e41c9f
...
@@ -20,7 +20,8 @@ void gen_defn_c_code(Expr *scope, int level);
...
@@ -20,7 +20,8 @@ void gen_defn_c_code(Expr *scope, int level);
void
gen_var_decl
(
Var
*
vp
);
void
gen_var_decl
(
Var
*
vp
);
void
indent
(
int
level
);
void
indent
(
int
level
);
#define NM_VARS "_seq_var"
#define NM_VARS "UserVar"
#define NM_VARS_ARG "_seq_vars"
#define NM_INITVAR "_seq_initvar_"
#define NM_INITVAR "_seq_initvar_"
#define NM_CHANS "_seq_chans"
#define NM_CHANS "_seq_chans"
#define NM_STATES "_seq_states"
#define NM_STATES "_seq_states"
...
...
This diff is collapsed.
Click to expand it.
src/snc/gen_ss_code.c
+
4
−
4
View file @
a7e41c9f
...
@@ -187,7 +187,7 @@ static void gen_state_func(
...
@@ -187,7 +187,7 @@ static void gen_state_func(
{
{
gen_code
(
"
\n
/* %s function for state
\"
%s
\"
in state set
\"
%s
\"
*/
\n
"
,
gen_code
(
"
\n
/* %s function for state
\"
%s
\"
in state set
\"
%s
\"
*/
\n
"
,
title
,
state_name
,
ss_name
);
title
,
state_name
,
ss_name
);
gen_code
(
"static %s %s_%s_%d_%s(SS_ID "
NM_SS
", SEQ_VARS *const "
NM_VARS
"%s)
\n
{
\n
"
,
gen_code
(
"static %s %s_%s_%d_%s(SS_ID "
NM_SS
", SEQ_VARS *const "
NM_VARS
_ARG
"%s)
\n
{
\n
"
,
rettype
,
prefix
,
ss_name
,
ss_num
,
state_name
,
extra_args
);
rettype
,
prefix
,
ss_name
,
ss_num
,
state_name
,
extra_args
);
gen_body
(
xp
,
context
);
gen_body
(
xp
,
context
);
gen_code
(
"}
\n
"
);
gen_code
(
"}
\n
"
);
...
@@ -298,7 +298,7 @@ static void gen_event_body(Expr *xp, int context)
...
@@ -298,7 +298,7 @@ static void gen_event_body(Expr *xp, int context)
static
void
gen_var_access
(
Var
*
vp
)
static
void
gen_var_access
(
Var
*
vp
)
{
{
const
char
*
pre
=
global_opt_reent
?
NM_VARS
"->"
:
""
;
const
char
*
pre
=
global_opt_reent
?
NM_VARS
_ARG
"->"
:
""
;
assert
(
vp
);
assert
(
vp
);
assert
(
vp
->
scope
);
assert
(
vp
->
scope
);
...
@@ -875,7 +875,7 @@ static void gen_prog_func(
...
@@ -875,7 +875,7 @@ static void gen_prog_func(
assert
(
prog
->
type
==
D_PROG
);
assert
(
prog
->
type
==
D_PROG
);
gen_code
(
"
\n
/* Program %s func */
\n
"
,
doc
);
gen_code
(
"
\n
/* Program %s func */
\n
"
,
doc
);
gen_code
(
"static void %s(PROG_ID "
NM_PROG
gen_code
(
"static void %s(PROG_ID "
NM_PROG
",
struct "
NM
_VARS
"
*const "
NM_VARS
")
\n
{
\n
"
,
",
SEQ
_VARS *const "
NM_VARS
_ARG
")
\n
{
\n
"
,
name
);
name
);
gen_body
(
prog
);
gen_body
(
prog
);
gen_code
(
"}
\n
"
);
gen_code
(
"}
\n
"
);
...
@@ -890,7 +890,7 @@ static void gen_prog_entex_func(
...
@@ -890,7 +890,7 @@ static void gen_prog_entex_func(
{
{
assert
(
prog
->
type
==
D_PROG
);
assert
(
prog
->
type
==
D_PROG
);
gen_code
(
"
\n
/* Program %s func */
\n
"
,
doc
);
gen_code
(
"
\n
/* Program %s func */
\n
"
,
doc
);
gen_code
(
"static void %s(SS_ID "
NM_SS
", SEQ_VARS *const "
NM_VARS
")
\n
{
\n
"
,
gen_code
(
"static void %s(SS_ID "
NM_SS
", SEQ_VARS *const "
NM_VARS
_ARG
")
\n
{
\n
"
,
name
);
name
);
if
(
prog
&&
gen_body
)
gen_body
(
prog
);
if
(
prog
&&
gen_body
)
gen_body
(
prog
);
gen_code
(
"}
\n
"
);
gen_code
(
"}
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment