text: #include "CdlCoordinationServiceBlockedEventEventHandlerCore.hh"
  #include "runTimeInterface.hh"
  #include <cstdio>
  #include <iostream>
  
  CdlCoordinationServiceBlockedEventEventHandlerCore::CdlCoordinationServiceBlockedEventEventHandlerCore(Smart::IEventClientPattern<CommNavigationObjects::CommCdlRobotBlockedEventParameter, CommNavigationObjects::CommCdlRobotBlockedEventResult> *client, std::string ciInstanceName)
  : Smart::IEventHandler<CommNavigationObjects::CommCdlRobotBlockedEventResult>(client)
  {
  	this->ciInstanceName = ciInstanceName;
  }
  		
  void CdlCoordinationServiceBlockedEventEventHandlerCore::handleEvent(const Smart::EventIdPtr &id, const CommNavigationObjects::CommCdlRobotBlockedEventResult &r) {
  	std::string resultString;
  	resultString = userHandler.handleEvent(r);
  	
  	///////////////////////////////////////////
  	/////////// ESCAPE " in user data
  	std::string toSearch = "\"";
  	std::string replaceStr = "\\\"";
  	// Get the first occurrence
      size_t pos = resultString.find(toSearch);
      // Repeat till end is reached
      while( pos != std::string::npos)
      {
          // Replace this occurrence of Sub String
      	resultString.replace(pos, toSearch.size(), replaceStr);
          // Get the next occurrence from the current position
          pos =resultString.find(toSearch, pos + replaceStr.size());
      }
      ///////////////////////////////////////////
  	
  	std::ostringstream eventResult;
  	eventResult<< "(";
  	eventResult<< "( coordination-interfaces-type . \"CdlCoordinationService\")";
  	eventResult<< "( coordination-interface-instance . \""<<this->ciInstanceName<<"\")";
  	eventResult<< "( service-name . \"blockedEvent\")";
  	eventResult<< "( id . "<<id<<")";
  	eventResult<< "( data . \""<<resultString<<"\")";
  	eventResult<< ")";
  //	eventResult<<"((\"CdlCoordinationService\" "<<this->ciInstanceName<<" \"blockedEvent\" "<<id<<") "<<resultString<<")";
  	int result = appedEvent(eventResult.str());
  }
  
  CommNavigationObjects::CommCdlRobotBlockedEventParameter CdlCoordinationServiceBlockedEventEventHandlerCore::activateEventParam(const std::string& parameterString){
  	std::cout<<"Activate Event Parameter string: "<<parameterString<<std::endl;
  	return userHandler.activateEventParam(parameterString);
  }
  