Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ApplicationCore
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ChimeraTK Mirror
ApplicationCore
Commits
9e1c58c4
Commit
9e1c58c4
authored
5 years ago
by
Martin Christoph Hierholzer
Browse files
Options
Downloads
Patches
Plain Diff
fix wrong read-type for initial values when reading from devices through FanOut
parent
65041603
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/VariableNetworkNode.cc
+29
-14
29 additions, 14 deletions
src/VariableNetworkNode.cc
with
29 additions
and
14 deletions
src/VariableNetworkNode.cc
+
29
−
14
View file @
9e1c58c4
...
...
@@ -394,21 +394,21 @@ namespace ChimeraTK {
/*********************************************************************************************************************/
VariableNetworkNode
::
InitialValueMode
VariableNetworkNode
::
hasInitialValue
()
const
{
if
(
getType
()
==
NodeType
::
ControlSystem
)
{
return
InitialValueMode
::
Push
;
}
if
(
getType
()
==
NodeType
::
Device
||
getType
()
==
NodeType
::
Constant
)
{
if
(
getOwner
().
getTriggerType
()
==
VariableNetwork
::
TriggerType
::
feeder
)
{
return
InitialValueMode
::
Poll
;
}
else
{
assert
(
getOwner
().
getTriggerType
()
==
VariableNetwork
::
TriggerType
::
external
||
getOwner
().
getTriggerType
()
==
VariableNetwork
::
TriggerType
::
pollingConsumer
);
if
(
getDirection
().
dir
==
VariableDirection
::
feeding
)
{
if
(
getType
()
==
NodeType
::
ControlSystem
)
{
return
InitialValueMode
::
Push
;
}
}
assert
(
getType
()
==
NodeType
::
Application
);
if
(
getDirection
().
dir
==
VariableDirection
::
feeding
)
{
if
(
getType
()
==
NodeType
::
Device
||
getType
()
==
NodeType
::
Constant
)
{
if
(
getOwner
().
getTriggerType
()
==
VariableNetwork
::
TriggerType
::
feeder
)
{
return
InitialValueMode
::
Poll
;
}
else
{
assert
(
getOwner
().
getTriggerType
()
==
VariableNetwork
::
TriggerType
::
external
||
getOwner
().
getTriggerType
()
==
VariableNetwork
::
TriggerType
::
pollingConsumer
);
return
InitialValueMode
::
Push
;
}
}
assert
(
getType
()
==
NodeType
::
Application
);
if
(
pdata
->
hasInitialValue
)
{
return
InitialValueMode
::
Push
;
}
...
...
@@ -416,7 +416,22 @@ namespace ChimeraTK {
return
InitialValueMode
::
None
;
}
}
return
getOwner
().
getFeedingNode
().
hasInitialValue
();
else
{
auto
feederInitialValue
=
getOwner
().
getFeedingNode
().
hasInitialValue
();
if
(
getOwner
().
countConsumingNodes
()
==
1
)
{
return
feederInitialValue
;
}
else
{
if
(
feederInitialValue
!=
InitialValueMode
::
None
)
{
// More then one consuming node: FanOut in between. Need to wait for FanOut to process the initial value!
// If the FanOut is a ConsumingFanOut, InitialValueMode::Push doesn't hurt as that fan out is always poll-type
return
InitialValueMode
::
Push
;
}
else
{
return
InitialValueMode
::
None
;
}
}
}
}
}
// namespace ChimeraTK
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