Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
PIController
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
Motion
PI
PIController
Commits
7a0c0347
Commit
7a0c0347
authored
Nov 21, 2022
by
BAHJI
Browse files
Options
Downloads
Patches
Plain Diff
[ICATHALES-416] check the AxisDefinition value
parent
48dfeee7
Branches
Branches containing commit
No related tags found
1 merge request
!3
[PIController] Add PIAxis commands and attributes
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/piaxis/PIAxis.cpp
+28
-3
28 additions, 3 deletions
src/piaxis/PIAxis.cpp
with
28 additions
and
3 deletions
src/piaxis/PIAxis.cpp
+
28
−
3
View file @
7a0c0347
...
...
@@ -162,7 +162,8 @@ void PIAxis::init_device()
m_is_device_initialized
=
false
;
m_status_message
.
str
(
"Initialization in progress..."
);
try
{
/*----- PROTECTED REGION END -----*/
// PIAxis::init_device_before
...
...
@@ -170,6 +171,20 @@ void PIAxis::init_device()
get_device_property
();
/*----- PROTECTED REGION ID(PIAxis::init_device) ENABLED START -----*/
}
catch
(
Tango
::
DevFailed
&
df
)
{
m_status_message
<<
"initialization Failed [<get_device_property> error]: "
<<
string
(
df
.
errors
[
0
].
desc
)
<<
std
::
endl
;;
ERROR_STREAM
<<
m_status_message
<<
std
::
endl
;
return
;
}
catch
(...)
{
m_status_message
<<
"initialization Failed [unknown <get_device_property> error]"
<<
std
::
endl
;
ERROR_STREAM
<<
"initialization Failed - unknown <get_device_property> error"
<<
std
::
endl
;
return
;
}
try
{
m_axis_controller
.
reset
(
new
AxisController
(
this
,
axisDefinition
),
yat4tango
::
DeviceTaskExiter
());
...
...
@@ -249,6 +264,16 @@ void PIAxis::get_device_property()
// Check device property data members init
yat4tango
::
PropertyHelper
::
create_property_if_empty
(
this
,
dev_prop
,
"0"
,
"AxisDefinition"
);
//check the AxisDefinition value
std
::
stringstream
axis_id_str
(
""
);
axis_id_str
<<
axisDefinition
;
if
(
!
(
yat
::
StringUtil
::
to_num
<
int
>
(
axis_id_str
.
str
())
>
0
))
{
ERROR_STREAM
<<
"The AxisDefinition property must be filled with at value greater than 0"
<<
std
::
endl
;
THROW_DEVFAILED
(
"CONFIGURATION_ERROR"
,
"The AxisDefinition property must be filled with at value greater than 0"
,
"PIAxis::get_device_property "
);
}
/*----- PROTECTED REGION END -----*/
// PIAxis::get_device_property_after
}
...
...
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