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
feac8e75
Commit
feac8e75
authored
11 years ago
by
benjamin.franksen
Browse files
Options
Downloads
Patches
Plain Diff
seq: renamed struct members related to connection and monitor count
parent
8e81244b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/seq/seqPvt.h
+3
-3
3 additions, 3 deletions
src/seq/seqPvt.h
src/seq/seq_ca.c
+13
-11
13 additions, 11 deletions
src/seq/seq_ca.c
with
16 additions
and
14 deletions
src/seq/seqPvt.h
+
3
−
3
View file @
feac8e75
...
...
@@ -127,7 +127,7 @@ struct db_channel
pvVar
pvid
;
/* PV (process variable) id */
unsigned
dbCount
;
/* actual count for db access */
boolean
connected
;
/* whether channel is connected */
boolean
got
One
Monitor
;
/* whether got a
t least one monitor
*/
boolean
gotMonitor
;
/* whether
we
got a
monitor after connect
*/
PVMETA
metaData
;
/* meta data (shared buffer) */
PVMETA
*
ssMetaData
;
/* array of meta data,
one for each state set (safe mode) */
...
...
@@ -196,8 +196,8 @@ struct program_instance
unsigned
assignCount
;
/* number of channels assigned to ext. pv */
unsigned
connectCount
;
/* number of channels connected */
unsigned
monitorCount
;
/* number of channels monitored */
unsigned
firs
tMonitorCount
;
/* number of channels that
received
a
t least one
monitor event */
unsigned
go
tMonitorCount
;
/* number of
monitored
channels that
got
a monitor event */
void
*
pvReqPool
;
/* freeList for pv requests (has own lock) */
boolean
die
;
/* flag set when seqStop is called */
...
...
This diff is collapsed.
Click to expand it.
src/seq/seq_ca.c
+
13
−
11
View file @
feac8e75
...
...
@@ -102,7 +102,7 @@ pvStat seq_connect(SPROG *sp, boolean wait)
ac
=
sp
->
assignCount
;
mc
=
sp
->
monitorCount
;
cc
=
sp
->
connectCount
;
gmc
=
sp
->
firs
tMonitorCount
;
gmc
=
sp
->
go
tMonitorCount
;
epicsMutexUnlock
(
sp
->
programLock
);
ready
=
ac
==
cc
&&
mc
==
gmc
;
...
...
@@ -189,12 +189,12 @@ static void seq_mon_handler(
assert
(
dbch
!=
NULL
);
proc_db_events
(
value
,
type
,
ch
,
0
,
pvEventMonitor
,
status
);
if
(
!
dbch
->
got
One
Monitor
)
if
(
!
dbch
->
gotMonitor
)
{
dbch
->
got
One
Monitor
=
TRUE
;
dbch
->
gotMonitor
=
TRUE
;
epicsMutexMustLock
(
sp
->
programLock
);
sp
->
firs
tMonitorCount
++
;
if
(
sp
->
firs
tMonitorCount
==
sp
->
monitorCount
sp
->
go
tMonitorCount
++
;
if
(
sp
->
go
tMonitorCount
==
sp
->
monitorCount
&&
sp
->
connectCount
==
sp
->
assignCount
)
{
epicsEventSignal
(
sp
->
ready
);
...
...
@@ -368,28 +368,30 @@ void seq_disconnect(SPROG *sp)
pvSysFlush
(
sp
->
pvSys
);
}
pvStat
seq_camonitor
(
CHAN
*
ch
,
boolean
on
)
pvStat
seq_camonitor
(
CHAN
*
ch
,
boolean
turn_
on
)
{
DBCHAN
*
dbch
=
ch
->
dbch
;
pvStat
status
;
assert
(
ch
);
assert
(
dbch
);
if
(
on
==
pvMonIsDefined
(
dbch
->
pvid
))
/*
already don
e */
if
(
turn_
on
==
pvMonIsDefined
(
dbch
->
pvid
))
/*
no chang
e */
return
pvStatOK
;
DEBUG
(
"calling pvVarMonitor%s(%p)
\n
"
,
on
?
"On"
:
"Off"
,
dbch
->
pvid
);
DEBUG
(
"calling pvVarMonitor%s(%p)
\n
"
,
turn_on
?
"On"
:
"Off"
,
ch
);
dbch
->
gotOneMonitor
=
FALSE
;
if
(
on
)
if
(
turn_on
)
{
status
=
pvVarMonitorOn
(
&
dbch
->
pvid
,
/* pvid */
ch
->
type
->
getType
,
/* requested type */
ch
->
count
,
/* element count */
ch
);
/* user arg (channel struct) */
}
else
status
=
pvVarMonitorOff
(
&
dbch
->
pvid
);
if
(
status
!=
pvStatOK
)
errlogSevPrintf
(
errlogFatal
,
"seq_camonitor: pvVarMonitor%s(var '%s', pv '%s') failure: %s
\n
"
,
on
?
"On"
:
"Off"
,
ch
->
varName
,
dbch
->
dbName
,
pvVarGetMess
(
dbch
->
pvid
));
turn_
on
?
"On"
:
"Off"
,
ch
->
varName
,
dbch
->
dbName
,
pvVarGetMess
(
dbch
->
pvid
));
return
status
;
}
...
...
@@ -444,7 +446,7 @@ void seq_conn_handler(int connected, void *arg)
unsigned
dbCount
;
dbch
->
connected
=
TRUE
;
sp
->
connectCount
++
;
if
(
sp
->
firs
tMonitorCount
==
sp
->
monitorCount
if
(
sp
->
go
tMonitorCount
==
sp
->
monitorCount
&&
sp
->
connectCount
==
sp
->
assignCount
)
{
epicsEventSignal
(
sp
->
ready
);
...
...
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