Skip to content
Snippets Groups Projects
Commit 1739151a authored by Gwenaelle ABEILLE's avatar Gwenaelle ABEILLE
Browse files

added internal software support.

parent e2bdf95d
No related branches found
No related tags found
No related merge requests found
static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/InputOutput/ADLINK/RetrigAO/src/RetrigAO.cpp,v 1.6 2005-09-26 15:20:14 abeilleg Exp $";
static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/InputOutput/ADLINK/RetrigAO/src/RetrigAO.cpp,v 1.7 2006-09-18 10:32:52 abeilleg Exp $";
//+=============================================================================
//
// file : RetrigAO.cpp
......@@ -13,9 +13,12 @@ static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/InputOutput/AD
//
// $Author: abeilleg $
//
// $Revision: 1.6 $
// $Revision: 1.7 $
//
// $Log: not supported by cvs2svn $
// Revision 1.6 2005/09/26 15:20:14 abeilleg
// zero forcing after stopping generation.
//
// Revision 1.5 2005/06/15 09:18:01 abeilleg
// attributes channelXEnable added.
//
......@@ -747,6 +750,8 @@ void RetrigAO::get_device_property()
triggerSource = adl::external_digital;
else if(trig_src == "ATRIG")
triggerSource = adl::external_analog;
else if(trig_src == "INTRIG")
triggerSource = adl::internal_software;
else
WARN_STREAM<<"RetrigAO::get_device_property: the value of TriggerSource is not valid"
<<"using default value "<<default_trig_source<<endl;
......@@ -1057,7 +1062,7 @@ void RetrigAO::get_device_property()
//-----------------------------------------------------------------------------
void RetrigAO::always_executed_hook()
{
this->set_internal_state();
}
//+----------------------------------------------------------------------------
......@@ -1260,7 +1265,14 @@ void RetrigAO::stop()
{
DEBUG_STREAM << "RetrigAO::stop(): entering... !" << endl;
this->stop_with_zero_forcing();
_ASL_TRY_ACTION
(
ao->stop(),
"stop",
"RetrigAO::stop_with_zero_forcing",
this->set_internal_state()
);
//this->stop_with_zero_forcing();
}
//+------------------------------------------------------------------
......@@ -1398,6 +1410,7 @@ void RetrigAO::set_aoscaled_data(const Tango::DevVarDoubleStringArray *argin)
::memcpy(data.base(), (*argin).dvalue.get_buffer(), ((*argin).dvalue.length())*sizeof(double));
//NB: if a chan hasn't been enable with properties, 'ao' will do nothing
// cout << "RetrigAO::set_aoscaled_data - set periodic channel : " <<chan - '0'<< endl;
_config.set_channel_periodic_data(chan - '0', data);
// copy the new data in the attributes of the device.
......@@ -1452,6 +1465,16 @@ void RetrigAO::set_aoscaled_data(const Tango::DevVarDoubleStringArray *argin)
break;
}
this->config = _config;
/* DEBUG_STREAM<<"RetrigAO::init_device : init acq"<<std::endl;
_ASL_TRY_ACTION
(
ao->init(adl::DAQ2502, boardNum),
"init",
"RetrigAO::init_device",
this->set_internal_state()
);
// give the configuration the new channel
_ASL_TRY_ACTION
(
......@@ -1459,7 +1482,7 @@ void RetrigAO::set_aoscaled_data(const Tango::DevVarDoubleStringArray *argin)
"configure",
"RetrigAO::set_aoscaled_data",
this->set_internal_state()
);
);*/
}
//+------------------------------------------------------------------
......
......@@ -8,9 +8,12 @@
//
// $Author: abeilleg $
//
// $Revision: 1.4 $
// $Revision: 1.5 $
//
// $Log: not supported by cvs2svn $
// Revision 1.4 2005/09/26 15:20:14 abeilleg
// zero forcing after stopping generation.
//
// Revision 1.3 2005/06/15 09:18:01 abeilleg
// attributes channelXEnable added.
//
......@@ -44,7 +47,7 @@
/**
* @author $Author: abeilleg $
* @version $Revision: 1.4 $ $
* @version $Revision: 1.5 $ $
*/
// Add your own constants definitions here.
......@@ -120,7 +123,8 @@ public :
*/
Tango::DevUShort triggerMode;
/**
* The trigger source. Analog trigger DTRIG or ATRIG.
* The trigger source.The possible values are internal trigger INTRIG, digital trigger
* DTRIG or analog trigger ATRIG.
*/
Tango::DevUShort triggerSource;
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment