Skip to content
Snippets Groups Projects
ControlSystemModule.cc 1.26 KiB
Newer Older
/*
 * ControlSystemModule.cc
 *
 *  Created on: Jun 28, 2016
 *      Author: Martin Hierholzer
 */

#include "Application.h"
#include "ControlSystemModule.h"

namespace ChimeraTK {

  ControlSystemModule::ControlSystemModule(const std::string& _variableNamePrefix)
  : Module(&(Application::getInstance()), "ControlSystem:"+_variableNamePrefix, ""),

  /*********************************************************************************************************************/

  VariableNetworkNode ControlSystemModule::operator()(const std::string& variableName, const std::type_info &valueType,
    if(variables.count(variableName) == 0) {
      variables[variableName] = {variableNamePrefix/variableName, VariableDirection::invalid, valueType, nElements};
    }
    return variables[variableName];
  /*********************************************************************************************************************/

  Module& ControlSystemModule::operator[](const std::string& moduleName) const {
    if(subModules.count(moduleName) == 0) {
      subModules[moduleName] = {variableNamePrefix/moduleName};
    }
    return subModules[moduleName];
  }