Skip to content
Snippets Groups Projects
Commit d3af3ab8 authored by Martin Killenberg's avatar Martin Killenberg
Browse files

made the adapter work with the upcoming release of DOOCS

parent f703b7e4
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,7 @@ class CSAdapterEqFct : public EqFct , boost::noncopyable { ...@@ -16,7 +16,7 @@ class CSAdapterEqFct : public EqFct , boost::noncopyable {
boost::shared_ptr<ControlSystemPVManager> controlSystemPVManager_; boost::shared_ptr<ControlSystemPVManager> controlSystemPVManager_;
int fctCode_; int fctCode_;
std::vector< boost::shared_ptr<D_fct> > doocsProperties_; std::vector< boost::shared_ptr<D_fct> > doocsProperties_;
void registerProcessVariablesInDoocs(std::string const & fctName); void registerProcessVariablesInDoocs();
std::vector < ChimeraTK::ProcessVariable::SharedPtr > getProcessVariablesInThisLocation(); std::vector < ChimeraTK::ProcessVariable::SharedPtr > getProcessVariablesInThisLocation();
static bool emptyLocationVariablesHandled; static bool emptyLocationVariablesHandled;
......
...@@ -19,8 +19,11 @@ namespace ChimeraTK{ ...@@ -19,8 +19,11 @@ namespace ChimeraTK{
controlSystemPVManager_(controlSystemPVManager), controlSystemPVManager_(controlSystemPVManager),
fctCode_(fctCode), updater_(updater){ fctCode_(fctCode), updater_(updater){
std::cout << "CSAdapterEqFct::CSAdapterEqFct name is " << name() << std::endl; // When testing the EqFct stand alone, the name is not set properly. Do this with the additional parameter of this constructor.
registerProcessVariablesInDoocs(fctName); if (name().empty()){
name_.assign(fctName);
}
registerProcessVariablesInDoocs();
} }
CSAdapterEqFct::~CSAdapterEqFct(){ CSAdapterEqFct::~CSAdapterEqFct(){
...@@ -36,11 +39,11 @@ namespace ChimeraTK{ ...@@ -36,11 +39,11 @@ namespace ChimeraTK{
return fctCode_; return fctCode_;
} }
void CSAdapterEqFct::registerProcessVariablesInDoocs(std::string const & fctName){ void CSAdapterEqFct::registerProcessVariablesInDoocs(){
// We only need the factory inside this function // We only need the factory inside this function
DoocsPVFactory factory(this, *updater_, controlSystemPVManager_); DoocsPVFactory factory(this, *updater_, controlSystemPVManager_);
auto mappingForThisLocation = VariableMapper::getInstance().getPropertiesInLocation(fctName); auto mappingForThisLocation = VariableMapper::getInstance().getPropertiesInLocation(name());
doocsProperties_.reserve( mappingForThisLocation.size() ); doocsProperties_.reserve( mappingForThisLocation.size() );
for (auto & propertyDescrition : mappingForThisLocation){ for (auto & propertyDescrition : mappingForThisLocation){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment