Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
SingleShotAO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Control System
Tango devices
InputOutput
ADLINK
SingleShotAO
Commits
acaf27f5
Commit
acaf27f5
authored
5 months ago
by
Alexandre MALFREYT
Committed by
Florent LANGLOIS
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
feat: add logging for parsed device properties in get_device_property method
parent
9547d4ba
No related branches found
Tags
snapArchivingServers-1.6.5
2 merge requests
!4
develop -> main
,
!3
EnableRamps and OutputMemorizedChannelsAtInit properties
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/SingleShotAO.cpp
+11
-9
11 additions, 9 deletions
src/SingleShotAO.cpp
with
11 additions
and
9 deletions
src/SingleShotAO.cpp
+
11
−
9
View file @
acaf27f5
...
...
@@ -601,6 +601,7 @@ void SingleShotAO::get_device_property()
if
(
Tango
::
Util
::
instance
()
->
_UseDb
==
true
)
{
get_db_device
()
->
get_property
(
dev_prop
);
}
Tango
::
DbDatum
def_prop
,
cl_prop
;
SingleShotAOClass
*
ds_class
=
(
static_cast
<
SingleShotAOClass
*>
(
get_device_class
()));
int
i
=
-
1
;
...
...
@@ -616,6 +617,7 @@ void SingleShotAO::get_device_property()
}
// And try to extract BoardNum value from database
if
(
dev_prop
[
i
].
is_empty
()
==
false
)
dev_prop
[
i
]
>>
boardNum
;
INFO_STREAM
<<
"Raw BoardNum parsed: "
<<
boardNum
<<
endl
;
//- <BoardType> -----------------------
// Try to initialize BoardType from class property
...
...
@@ -628,39 +630,37 @@ void SingleShotAO::get_device_property()
}
// And try to extract BoardType value from database
if
(
dev_prop
[
i
].
is_empty
()
==
false
)
dev_prop
[
i
]
>>
boardType
;
INFO_STREAM
<<
"Raw BoardType parsed: "
<<
boardType
<<
endl
;
//- <EnableRamps> -----------------------
// Try to initialize EnableRamps from class property
cl_prop
=
ds_class
->
get_class_property
(
dev_prop
[
++
i
].
name
);
if
(
cl_prop
.
is_empty
()
==
false
)
cl_prop
>>
enableRamps
;
else
{
else
{
// Try to initialize EnableRamps from default device value
def_prop
=
ds_class
->
get_default_device_property
(
dev_prop
[
i
].
name
);
if
(
def_prop
.
is_empty
()
==
false
)
def_prop
>>
enableRamps
;
}
// And try to extract EnableRamps value from database
if
(
dev_prop
[
i
].
is_empty
()
==
false
)
dev_prop
[
i
]
>>
enableRamps
;
INFO_STREAM
<<
"EnableRamps parsed: "
<<
(
enableRamps
?
"true"
:
"false"
)
<<
endl
;
//- <WriteMemorizedValuesAtInit> -----------------------
// Try to initialize WriteMemorizedValuesAtInit from class property
cl_prop
=
ds_class
->
get_class_property
(
dev_prop
[
++
i
].
name
);
if
(
cl_prop
.
is_empty
()
==
false
)
cl_prop
>>
writeMemorizedValuesAtInit
;
else
{
else
{
// Try to initialize WriteMemorizedValuesAtInit from default device value
def_prop
=
ds_class
->
get_default_device_property
(
dev_prop
[
i
].
name
);
if
(
def_prop
.
is_empty
()
==
false
)
def_prop
>>
writeMemorizedValuesAtInit
;
}
// And try to extract WriteMemorizedValuesAtInit value from database
if
(
dev_prop
[
i
].
is_empty
()
==
false
)
dev_prop
[
i
]
>>
writeMemorizedValuesAtInit
;
INFO_STREAM
<<
"WriteMemorizedValuesAtInit parsed: "
<<
(
writeMemorizedValuesAtInit
?
"true"
:
"false"
)
<<
endl
;
// Check critical properties being present
//--------------------------------------------
critical_properties_missing
=
false
;
if
(
dev_prop
[
0
].
is_empty
())
{
ERROR_STREAM
<<
"Required device property <BoardNum> is missing"
<<
endl
;
...
...
@@ -671,20 +671,20 @@ void SingleShotAO::get_device_property()
ERROR_STREAM
<<
"Required device property <BoardType> is missing"
<<
endl
;
critical_properties_missing
=
true
;
}
if
(
critical_properties_missing
)
{
return
;
}
// Check critical properties being valid
//--------------------------------------------
//- <BoardNum> -----------------------
if
(
boardNum
<
0
||
boardNum
>
7
)
{
boardNum
=
0
;
ERROR_STREAM
<<
"device property <BoardNum> is invalid. Valid range is [0..7]"
<<
endl
;
critical_properties_missing
=
true
;
}
else
{
INFO_STREAM
<<
"BoardNum resolved to "
<<
boardNum
<<
endl
;
}
//- <BoardType> -----------------------
...
...
@@ -692,11 +692,13 @@ void SingleShotAO::get_device_property()
{
boardType
=
k6208_BOARD_TYPE
;
boardTypeId
=
adl
::
PCI6208
;
INFO_STREAM
<<
"BoardType resolved to PCI6208"
<<
endl
;
}
else
if
(
boardType
==
"MAO_6216"
)
{
boardType
=
k6216_BOARD_TYPE
;
boardTypeId
=
adl
::
PCI6216
;
INFO_STREAM
<<
"BoardType resolved to PCI6216"
<<
endl
;
}
else
{
...
...
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