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
94945669
Commit
94945669
authored
5 months ago
by
Alexandre MALFREYT
Browse files
Options
Downloads
Patches
Plain Diff
cleanup: remove this->
parent
fabc724f
No related branches found
No related tags found
1 merge request
!1
Cleanup: clean code (DODD)
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/SingleShotAO.cpp
+5
-5
5 additions, 5 deletions
src/SingleShotAO.cpp
src/SingleShotAO.h
+2
-2
2 additions, 2 deletions
src/SingleShotAO.h
src/SingleShotAOManager.cpp
+12
-12
12 additions, 12 deletions
src/SingleShotAOManager.cpp
with
19 additions
and
19 deletions
src/SingleShotAO.cpp
+
5
−
5
View file @
94945669
...
...
@@ -466,7 +466,7 @@ void SingleShotAO::init_device()
l_dynAttrList
.
push_back
(
dai_initial
);
}
this
->
m_dyn_attr_manager
->
add_attributes
(
l_dynAttrList
);
m_dyn_attr_manager
->
add_attributes
(
l_dynAttrList
);
// Get memorized values from database
for
(
unsigned
int
l_cpt
=
0
;
l_cpt
<
m_nb_chan
;
l_cpt
++
)
...
...
@@ -684,7 +684,7 @@ void SingleShotAO::read_frequency(Tango::Attribute &attr)
void
SingleShotAO
::
write_frequency
(
Tango
::
WAttribute
&
attr
)
{
DEBUG_STREAM
<<
"SingleShotAO::write_frequency(Tango::WAttribute &attr) entering... "
<<
endl
;
if
(
this
->
dev_state
()
!=
Tango
::
ON
)
if
(
dev_state
()
!=
Tango
::
ON
)
{
THROW_DEVFAILED
(
_CPTC
(
"DEVICE_ERROR"
),
_CPTC
(
"could not write frequency. The state must be ON."
),
...
...
@@ -758,7 +758,7 @@ Tango::ConstDevString SingleShotAO::dev_status()
//+------------------------------------------------------------------
void
SingleShotAO
::
read_channel
(
yat4tango
::
DynamicAttributeReadCallbackData
&
cbd
)
{
yat
::
AutoMutex
<>
guard
(
this
->
m_lock
);
yat
::
AutoMutex
<>
guard
(
m_lock
);
std
::
string
l_attr_name
=
cbd
.
dya
->
get_name
();
...
...
@@ -825,7 +825,7 @@ void SingleShotAO::write_channel(yat4tango::DynamicAttributeWriteCallbackData &
//+------------------------------------------------------------------
void
SingleShotAO
::
read_speed
(
yat4tango
::
DynamicAttributeReadCallbackData
&
cbd
)
{
yat
::
AutoMutex
<>
guard
(
this
->
m_lock
);
yat
::
AutoMutex
<>
guard
(
m_lock
);
std
::
string
l_attr_name
=
cbd
.
dya
->
get_name
();
...
...
@@ -902,7 +902,7 @@ void SingleShotAO::write_speed(yat4tango::DynamicAttributeWriteCallbackData & cb
//+------------------------------------------------------------------
void
SingleShotAO
::
read_initial
(
yat4tango
::
DynamicAttributeReadCallbackData
&
cbd
)
{
yat
::
AutoMutex
<>
guard
(
this
->
m_lock
);
yat
::
AutoMutex
<>
guard
(
m_lock
);
std
::
string
l_attr_name
=
cbd
.
dya
->
get_name
();
...
...
This diff is collapsed.
Click to expand it.
src/SingleShotAO.h
+
2
−
2
View file @
94945669
...
...
@@ -291,7 +291,7 @@ protected :
try
{
this
->
get_db_device
()
->
put_property
(
db_data
);
get_db_device
()
->
put_property
(
db_data
);
}
catch
(
Tango
::
DevFailed
&
df
)
{
...
...
@@ -324,7 +324,7 @@ protected :
try
{
this
->
get_db_device
()
->
get_property
(
dev_prop
);
get_db_device
()
->
get_property
(
dev_prop
);
}
catch
(
Tango
::
DevFailed
&
df
)
{
...
...
This diff is collapsed.
Click to expand it.
src/SingleShotAOManager.cpp
+
12
−
12
View file @
94945669
...
...
@@ -35,8 +35,8 @@ SingleShotAOManager::SingleShotAOManager (Tango::DeviceImpl * hostDevice)
//- trace/profile this method
yat4tango
::
TraceHelper
t
(
"SingleShotAOManager::SingleShotAOManager"
,
this
);
this
->
enable_timeout_msg
(
false
);
this
->
enable_periodic_msg
(
false
);
enable_timeout_msg
(
false
);
enable_periodic_msg
(
false
);
m_state
=
Tango
::
INIT
;
m_status
=
"Initialization in progress"
;
...
...
@@ -47,7 +47,7 @@ SingleShotAOManager::SingleShotAOManager (Tango::DeviceImpl * hostDevice)
// ============================================================================
SingleShotAOManager
::~
SingleShotAOManager
()
{
this
->
enable_periodic_msg
(
false
);
enable_periodic_msg
(
false
);
}
// ============================================================================
...
...
@@ -113,15 +113,15 @@ std::string SingleShotAOManager::get_status()
void
SingleShotAOManager
::
write_frequency
(
double
p_frequency
)
{
m_frequency
=
p_frequency
;
this
->
enable_periodic_msg
(
false
);
enable_periodic_msg
(
false
);
if
(
m_frequency
==
0
)
{
this
->
set_periodic_msg_period
(
0
);
set_periodic_msg_period
(
0
);
}
else
{
this
->
set_periodic_msg_period
((
size_t
)(
1
/
m_frequency
*
1000
));
this
->
enable_periodic_msg
(
true
);
set_periodic_msg_period
((
size_t
)(
1
/
m_frequency
*
1000
));
enable_periodic_msg
(
true
);
}
}
...
...
@@ -137,13 +137,13 @@ void SingleShotAOManager::init(asl::SingleShotAO * p_ssao, unsigned short p_nb_c
m_frequency
=
p_frequency
;
if
(
m_frequency
==
0
)
{
this
->
set_periodic_msg_period
(
0
);
this
->
enable_periodic_msg
(
false
);
set_periodic_msg_period
(
0
);
enable_periodic_msg
(
false
);
}
else
{
this
->
set_periodic_msg_period
((
size_t
)(
1
/
m_frequency
*
1000
));
this
->
enable_periodic_msg
(
true
);
set_periodic_msg_period
((
size_t
)(
1
/
m_frequency
*
1000
));
enable_periodic_msg
(
true
);
}
// initialize channel indexes (-1 means no ramp in progress)
...
...
@@ -183,7 +183,7 @@ void SingleShotAOManager::process_message (yat::Message& msg)
case
yat
::
TASK_PERIODIC
:
{
//DEBUG_STREAM << "SingleShotAOManager::handle_message::THREAD_PERIODIC" << std::endl;
this
->
periodic_job_i
();
periodic_job_i
();
}
break
;
...
...
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