Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ControlSystemAdapter-DoocsAdapter
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
ControlSystemAdapter-DoocsAdapter
Commits
b9d4f6e2
Commit
b9d4f6e2
authored
4 years ago
by
vargheseg
Browse files
Options
Downloads
Patches
Plain Diff
Implement DoocsIfff constructor without history
parent
dcc310fb
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
include/DoocsIfff.h
+1
-0
1 addition, 0 deletions
include/DoocsIfff.h
src/DoocsIfff.cc
+21
-17
21 additions, 17 deletions
src/DoocsIfff.cc
with
22 additions
and
17 deletions
include/DoocsIfff.h
+
1
−
0
View file @
b9d4f6e2
...
...
@@ -37,6 +37,7 @@ namespace ChimeraTK {
void
updateAppToDoocs
(
TransferElementID
&
elementId
);
void
sendToApplication
();
void
registerVariable
(
const
ChimeraTK
::
TransferElementAbstractor
&
var
);
void
registerIfffSources
();
boost
::
shared_ptr
<
NDRegisterAccessor
<
int
>>
_i1Value
;
boost
::
shared_ptr
<
NDRegisterAccessor
<
float
>>
_f1Value
;
...
...
This diff is collapsed.
Click to expand it.
src/DoocsIfff.cc
+
21
−
17
View file @
b9d4f6e2
...
...
@@ -12,26 +12,30 @@ namespace ChimeraTK {
boost
::
shared_ptr
<
NDRegisterAccessor
<
float
>>
const
&
f2Value
,
boost
::
shared_ptr
<
NDRegisterAccessor
<
float
>>
const
&
f3Value
,
DoocsUpdater
&
updater
)
:
D_ifff
(
eqFct
,
doocsPropertyName
),
_i1Value
(
i1Value
),
_f1Value
(
f1Value
),
_f2Value
(
f2Value
),
_f3Value
(
f3Value
),
_updater
(
updater
),
_eqFct
(
eqFct
)
{
auto
registerSource
=
[
&
](
const
ChimeraTK
::
TransferElementAbstractor
&
var
)
{
if
(
var
.
isReadable
())
{
updater
.
addVariable
(
var
,
eqFct
,
std
::
bind
(
&
DoocsIfff
::
updateAppToDoocs
,
this
,
var
.
getId
()));
_consistencyGroup
.
add
(
var
);
}
};
_updater
(
updater
),
_eqFct
(
eqFct
),
isWriteable
(
_i1Value
->
isWriteable
()
&&
_f1Value
->
isWriteable
()
&&
_f2Value
->
isWriteable
()
&&
_f3Value
->
isWriteable
())
{
registerIfffSources
();
}
// Constructor without history
DoocsIfff
::
DoocsIfff
(
std
::
string
const
&
doocsPropertyName
,
EqFct
*
eqFct
,
boost
::
shared_ptr
<
NDRegisterAccessor
<
int
>>
const
&
i1Value
,
boost
::
shared_ptr
<
NDRegisterAccessor
<
float
>>
const
&
f1Value
,
boost
::
shared_ptr
<
NDRegisterAccessor
<
float
>>
const
&
f2Value
,
boost
::
shared_ptr
<
NDRegisterAccessor
<
float
>>
const
&
f3Value
,
DoocsUpdater
&
updater
)
:
D_ifff
(
doocsPropertyName
,
eqFct
),
_i1Value
(
i1Value
),
_f1Value
(
f1Value
),
_f2Value
(
f2Value
),
_f3Value
(
f3Value
),
_updater
(
updater
),
_eqFct
(
eqFct
),
isWriteable
(
_i1Value
->
isWriteable
()
&&
_f1Value
->
isWriteable
()
&&
_f2Value
->
isWriteable
()
&&
_f3Value
->
isWriteable
())
{
registerIfffSources
();
}
void
DoocsIfff
::
registerIfffSources
()
{
// FIXME: What if not all 4 are readable? is it still valid to add
// all to a consistency group then?
registerSource
(
OneDRegisterAccessor
<
int
>
(
_i1Value
));
registerSource
(
OneDRegisterAccessor
<
float
>
(
_f1Value
));
registerSource
(
OneDRegisterAccessor
<
float
>
(
_f2Value
));
registerSource
(
OneDRegisterAccessor
<
float
>
(
_f3Value
));
// FIXME: get this from a constructor parameter isReadOnly so this can be turned off
isWriteable
=
true
;
if
(
!
_i1Value
->
isWriteable
()
||
!
_f1Value
->
isWriteable
()
||
!
_f2Value
->
isWriteable
()
||
!
_f3Value
->
isWriteable
())
{
isWriteable
=
false
;
}
registerVariable
(
OneDRegisterAccessor
<
int
>
(
_i1Value
));
registerVariable
(
OneDRegisterAccessor
<
float
>
(
_f1Value
));
registerVariable
(
OneDRegisterAccessor
<
float
>
(
_f2Value
));
registerVariable
(
OneDRegisterAccessor
<
float
>
(
_f3Value
));
}
void
DoocsIfff
::
updateAppToDoocs
(
TransferElementID
&
elementId
)
{
...
...
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