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
fc9f21ea
Commit
fc9f21ea
authored
7 years ago
by
Martin Killenberg
Browse files
Options
Downloads
Patches
Plain Diff
some small refactoring to prepare setting read-only
parent
ce471fb6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/DoocsPVFactory.cc
+7
-4
7 additions, 4 deletions
src/DoocsPVFactory.cc
with
7 additions
and
4 deletions
src/DoocsPVFactory.cc
+
7
−
4
View file @
fc9f21ea
...
...
@@ -29,26 +29,29 @@ namespace ChimeraTK {
auto
propertyDescription
=
VariableMapper
::
getInstance
().
getAllProperties
().
at
(
processVariable
->
getName
());
assert
(
processArray
->
getNumberOfChannels
()
==
1
);
boost
::
shared_ptr
<
D_fct
>
doocsPV
;
if
(
processArray
->
getNumberOfSamples
()
>
1
)
{
return
boost
::
shared_ptr
<
D_fct
>
(
new
DoocsProcessArray
<
T
>
(
_eqFct
,
processArray
,
*
_syncUtility
)
);
doocsPV
.
reset
(
new
DoocsProcessArray
<
T
>
(
_eqFct
,
processArray
,
*
_syncUtility
)
);
}
else
{
// scalar
// Histories seem to be supported by DOOCS only for property names shorter than 64 characters, so disable history for longer names.
// The DOOCS property name is the variable name without the location name and the separating slash between location and property name.
if
(
propertyDescription
.
name
.
length
()
>
64
)
{
std
::
cerr
<<
"WARNING: Disabling history for "
<<
processArray
->
getName
()
<<
". Name is too long."
<<
std
::
endl
;
return
boost
::
shared_ptr
<
D_fct
>
(
new
DoocsProcessScalar
<
T
,
DOOCS_T
,
DOOCS_VALUE_T
>
(
propertyDescription
.
name
.
c_str
(),
_eqFct
,
processArray
,
*
_syncUtility
)
);
doocsPV
.
reset
(
new
DoocsProcessScalar
<
T
,
DOOCS_T
,
DOOCS_VALUE_T
>
(
propertyDescription
.
name
.
c_str
(),
_eqFct
,
processArray
,
*
_syncUtility
)
);
}
else
{
if
(
propertyDescription
.
hasHistory
){
// version with history: EqFtc first
return
boost
::
shared_ptr
<
D_fct
>
(
new
DoocsProcessScalar
<
T
,
DOOCS_T
,
DOOCS_VALUE_T
>
(
_eqFct
,
propertyDescription
.
name
.
c_str
(),
processArray
,
*
_syncUtility
)
);
doocsPV
.
reset
(
new
DoocsProcessScalar
<
T
,
DOOCS_T
,
DOOCS_VALUE_T
>
(
_eqFct
,
propertyDescription
.
name
.
c_str
(),
processArray
,
*
_syncUtility
)
);
}
else
{
// version without history: name first
return
boost
::
shared_ptr
<
D_fct
>
(
new
DoocsProcessScalar
<
T
,
DOOCS_T
,
DOOCS_VALUE_T
>
(
propertyDescription
.
name
.
c_str
(),
_eqFct
,
processArray
,
*
_syncUtility
)
);
doocsPV
.
reset
(
new
DoocsProcessScalar
<
T
,
DOOCS_T
,
DOOCS_VALUE_T
>
(
propertyDescription
.
name
.
c_str
(),
_eqFct
,
processArray
,
*
_syncUtility
)
);
}
}
// if name too long
}
// if scalar
return
doocsPV
;
}
template
<
>
...
...
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