Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
FemtoCurrentAmplifier
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
MeasureInstruments
FemtoCurrentAmplifier
Commits
72263996
Commit
72263996
authored
Sep 13, 2013
by
Florent LANGLOIS
Browse files
Options
Downloads
Patches
Plain Diff
- fixed a state bug :mantis 25877
parent
0734ca2f
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/FemtoCurrentAmplifier.cpp
+887
-878
887 additions, 878 deletions
src/FemtoCurrentAmplifier.cpp
src/FemtoCurrentAmplifier.h
+1
-1
1 addition, 1 deletion
src/FemtoCurrentAmplifier.h
with
888 additions
and
879 deletions
src/FemtoCurrentAmplifier.cpp
+
887
−
878
View file @
72263996
...
...
@@ -164,7 +164,7 @@ namespace FemtoCurrentAmplifier_ns
attr_gain_write
=
0
;
dio_proxy_
not_yet_
created
=
tru
e
;
is_
dio_proxy_created
=
fals
e
;
creates_dio_proxy
();
if
(
femtoType
==
1
)
// femto 100
...
...
@@ -179,19 +179,24 @@ namespace FemtoCurrentAmplifier_ns
{
MAX_GAIN_INDEX
=
MAX_GAIN_INDEX_FEMTO_300
-
1
;
}
else
{
set_state
(
Tango
::
FAULT
);
set_status
(
"Error during init device, possible values for FemtoType property are: 1,2 or 3"
);
}
mutex
=
new
omni_mutex
();
//- Force gain mode to LN
if
(
femtoType
!=
3
)
{
Tango
::
WAttribute
&
attr1
=
dev_attr
->
get_w_attr_by_name
(
"gainMode"
);
attr1
.
set_write_value
(
true
);
write_gainMode
(
attr1
);
Tango
::
WAttribute
&
gainMode
=
dev_attr
->
get_w_attr_by_name
(
"gainMode"
);
gainMode
.
set_write_value
(
true
);
write_gainMode
(
gainMode
);
}
Tango
::
WAttribute
&
attr2
=
dev_attr
->
get_w_attr_by_name
(
"gain"
);
string
mem_value
=
attr2
.
get_mem_value
();
Tango
::
WAttribute
&
gain
=
dev_attr
->
get_w_attr_by_name
(
"gain"
);
string
mem_value
=
gain
.
get_mem_value
();
attr_gain_write
=
XString
<
Tango
::
DevShort
>::
convertFromString
(
mem_value
);
}
...
...
@@ -366,6 +371,10 @@ namespace FemtoCurrentAmplifier_ns
//-----------------------------------------------------------------------------
void
FemtoCurrentAmplifier
::
always_executed_hook
()
{
if
(
!
is_dio_proxy_created
)
{
creates_dio_proxy
();
}
}
//+----------------------------------------------------------------------------
...
...
@@ -379,11 +388,6 @@ void FemtoCurrentAmplifier::read_attr_hardware(vector<long> &attr_list)
{
DEBUG_STREAM
<<
"FemtoCurrentAmplifier::read_attr_hardware(vector<long> &attr_list) entering... "
<<
endl
;
if
(
dio_proxy_not_yet_created
)
{
creates_dio_proxy
();
}
}
//+----------------------------------------------------------------------------
//
...
...
@@ -502,10 +506,15 @@ void FemtoCurrentAmplifier::write_gain(Tango::WAttribute &attr)
if
(
attr_gain_write
<
0
)
attr_gain_write
=
0
;
Tango
::
WAttribute
&
watt
=
dev_attr
->
get_w_attr_by_name
(
"gain"
);
watt
.
set_write_value
(
attr_gain_write
);
//- FL: ??? set the value on the write part ??
Tango
::
WAttribute
&
gain
=
dev_attr
->
get_w_attr_by_name
(
"gain"
);
gain
.
set_write_value
(
attr_gain_write
);
this
->
set_gain_on_dio_board
(
attr_gain_write
);
//- force a read to overload to refresh the state
Tango
::
Attribute
&
overload
=
dev_attr
->
get_attr_by_name
(
"overload"
);
read_overload
(
overload
);
}
//+----------------------------------------------------------------------------
...
...
@@ -929,7 +938,7 @@ void FemtoCurrentAmplifier::creates_dio_proxy()
"FemtoCurrentAmplifier::init_device"
);
dio_proxy_
not_yet_
created
=
fals
e
;
is_
dio_proxy_created
=
tru
e
;
}
...
...
This diff is collapsed.
Click to expand it.
src/FemtoCurrentAmplifier.h
+
1
−
1
View file @
72263996
...
...
@@ -342,7 +342,7 @@ protected :
short
MAX_GAIN_INDEX
;
bool
dio_proxy_
not_yet_
created
;
bool
is_
dio_proxy_created
;
//- thread
omni_mutex
*
mutex
;
...
...
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