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
a2ad9a5a
Commit
a2ad9a5a
authored
Nov 25, 2022
by
DESGRANGES
Browse files
Options
Downloads
Patches
Plain Diff
Throw execptions for read/write operations on acceleration and deceleration attributes if E-754
parent
5b9b6f38
Branches
Branches containing commit
Tags
Tags containing commit
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
+33
-3
33 additions, 3 deletions
src/piaxis/PIAxis.cpp
with
33 additions
and
3 deletions
src/piaxis/PIAxis.cpp
+
33
−
3
View file @
a2ad9a5a
...
@@ -482,6 +482,14 @@ void PIAxis::read_acceleration(Tango::Attribute &attr)
...
@@ -482,6 +482,14 @@ void PIAxis::read_acceleration(Tango::Attribute &attr)
*
attr_acceleration_read
=
m_axis_controller
->
read_acceleration
();
*
attr_acceleration_read
=
m_axis_controller
->
read_acceleration
();
attr
.
set_value
(
attr_acceleration_read
);
attr
.
set_value
(
attr_acceleration_read
);
}
}
else
{
std
::
stringstream
ss
;
ss
<<
"aCceleration is not handled by this PI Controller"
<<
std
::
endl
;
Tango
::
Except
::
throw_exception
(
"TANGO_DEVICE_ERROR"
,
(
ss
.
str
()).
c_str
(),
"PIAxis::read_acceleration()"
);
}
/*----- PROTECTED REGION END -----*/
// PIAxis::read_acceleration
/*----- PROTECTED REGION END -----*/
// PIAxis::read_acceleration
}
}
...
@@ -505,6 +513,14 @@ void PIAxis::write_acceleration(Tango::WAttribute &attr)
...
@@ -505,6 +513,14 @@ void PIAxis::write_acceleration(Tango::WAttribute &attr)
{
{
m_axis_controller
->
write_acceleration
(
w_val
);
m_axis_controller
->
write_acceleration
(
w_val
);
}
}
else
{
std
::
stringstream
ss
;
ss
<<
"acceleration is not handled by this PI Controller"
<<
std
::
endl
;
Tango
::
Except
::
throw_exception
(
"TANGO_DEVICE_ERROR"
,
(
ss
.
str
()).
c_str
(),
"PIAxis::write_acceleration()"
);
}
/*----- PROTECTED REGION END -----*/
// PIAxis::write_acceleration
/*----- PROTECTED REGION END -----*/
// PIAxis::write_acceleration
}
}
...
@@ -528,7 +544,14 @@ void PIAxis::read_deceleration(Tango::Attribute &attr)
...
@@ -528,7 +544,14 @@ void PIAxis::read_deceleration(Tango::Attribute &attr)
*
attr_deceleration_read
=
m_axis_controller
->
read_deceleration
();
*
attr_deceleration_read
=
m_axis_controller
->
read_deceleration
();
attr
.
set_value
(
attr_deceleration_read
);
attr
.
set_value
(
attr_deceleration_read
);
}
}
else
{
std
::
stringstream
ss
;
ss
<<
"deceleration is not handled by this PI Controller"
<<
std
::
endl
;
Tango
::
Except
::
throw_exception
(
"TANGO_DEVICE_ERROR"
,
(
ss
.
str
()).
c_str
(),
"PIAxis::read_deceleration()"
);
}
/*----- PROTECTED REGION END -----*/
// PIAxis::read_deceleration
/*----- PROTECTED REGION END -----*/
// PIAxis::read_deceleration
}
}
//--------------------------------------------------------
//--------------------------------------------------------
...
@@ -551,7 +574,14 @@ void PIAxis::write_deceleration(Tango::WAttribute &attr)
...
@@ -551,7 +574,14 @@ void PIAxis::write_deceleration(Tango::WAttribute &attr)
{
{
m_axis_controller
->
write_deceleration
(
w_val
);
m_axis_controller
->
write_deceleration
(
w_val
);
}
}
else
{
std
::
stringstream
ss
;
ss
<<
"deceleration is not handled by this PI Controller"
<<
std
::
endl
;
Tango
::
Except
::
throw_exception
(
"TANGO_DEVICE_ERROR"
,
(
ss
.
str
()).
c_str
(),
"PIAxis::write_deceleration()"
);
}
/*----- PROTECTED REGION END -----*/
// PIAxis::write_deceleration
/*----- PROTECTED REGION END -----*/
// PIAxis::write_deceleration
}
}
//--------------------------------------------------------
//--------------------------------------------------------
...
...
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