int __api__playExecution( struct soap *soap, // request parameters: api__playExecution* api__playExecution_, // response parameters: api__playExecutionResponse* api__playExecutionResponse_ ){ if(config.VERBOSE) { std::cout << "__api__playExecution" << std::endl; } api__playExecutionResponse_->return_ = soap_new_api__Response(soap, 1); Execution execution = Execution(&config); bool is_success = execution.playExecution(soap, api__playExecution_->executionId); if(is_success) { api__playExecutionResponse_->return_->statusCode = 0; // if you set __union_Response, please set the real reponse value as well. Otherwise it will produce //api__killExecutionResponse_->return_->__union_Response = 2; //api__killExecutionResponse_->return_->union_Response.returnedValueExecution = execution.m_api__Execution; }else{ api__playExecutionResponse_->return_->statusCode = 1; api__playExecutionResponse_->return_->errorMessage = (soap_new_std__string(soap, 1)); (*api__playExecutionResponse_->return_->errorMessage) = execution.m_error_message; } return SOAP_OK; }
int __api__getStdErr( struct soap *soap, // request parameters: api__getStdErr* api__getStdErr_, // response parameters: api__getStdErrResponse* api__getStdErrResponse_ ){ api__getStdErrResponse_->return_ = soap_new_api__Response(soap, 1); Execution execution = Execution(&config); bool is_success = execution.getStdErr(soap, api__getStdErr_->executionId); if(is_success) { api__getStdErrResponse_->return_->statusCode = 0; // if you set __union_Response, please set the real reponse value as well. Otherwise it will produce api__getStdErrResponse_->return_->__union_Response = 4; api__getStdErrResponse_->return_->union_Response.returnedValueStr = execution.m_std_err; }else{ api__getStdErrResponse_->return_->statusCode = 1; api__getStdErrResponse_->return_->errorMessage = (soap_new_std__string(soap, 1)); (*api__getStdErrResponse_->return_->errorMessage) = execution.m_error_message; } return SOAP_OK; }
/* MAIN --------------------------------------------------------------------------------*/ int main(int argc, char ** argv) { struct argument * argList = NULL; int error; struct execNode * execList = NULL; printf("\nWelcome to Cthulhu sHEll.\nPh'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn.\n\n"); do { execList = NULL; argList = NULL; invite(); error = ParseString(&argList); if (!error) { int zombie; execList = List2arg(argList); Execution(execList); while ((zombie = waitpid(-1, NULL, WNOHANG)) > 0) printf("chell: [%i] terminated\n", zombie); } if (error == 1) break; if (error == 2) printf("Mismatched quotes\n"); FreeExec(execList); while (argList) { struct argument * tmpArg = argList; argList = argList->next; free(tmpArg); } } while (error != 1); printf("\n"); return 0; }
void ArrayProducer::ComputeState::produce( size_t index, size_t count, void *datas ) const { Execution( this, m_arrayProducer->getElementDesc()->getAllocSize(), datas, index, count ).run(); }
/*not supported web service.........*/ int __api__updateExecution( struct soap *soap, // request parameters: api__updateExecution* api__updateExecution_, // response parameters: api__updateExecutionResponse* api__updateExecutionResponse_ ){ api__updateExecutionResponse_->return_ = soap_new_api__Response(soap, 1); Execution execution = Execution(&config); bool is_success = false; bool type_error = false; std::string type_error_message = "For the moment, only string value can be accepted."; if(api__updateExecution_->keyValuePair[0]->__union_StringKeyValuePair != 1) { type_error = true; } is_success = execution.updateExecution(soap, api__updateExecution_->executionId, api__updateExecution_->keyValuePair[0]->name , *(api__updateExecution_->keyValuePair[0]->union_StringKeyValuePair.valueStr) ); if(is_success and (!type_error)) { api__updateExecutionResponse_->return_->statusCode = 0; // if you set __union_Response, please set the real reponse value as well. Otherwise it will produce //api__killExecutionResponse_->return_->__union_Response = 2; //api__killExecutionResponse_->return_->union_Response.returnedValueExecution = execution.m_api__Execution; }else{ api__updateExecutionResponse_->return_->statusCode = 1; api__updateExecutionResponse_->return_->errorMessage = (soap_new_std__string(soap, 1)); if(type_error) { (*api__updateExecutionResponse_->return_->errorMessage) = type_error_message; }else{ (*api__updateExecutionResponse_->return_->errorMessage) = execution.m_error_message; } } return SOAP_OK; std::cout << "__api__updateExecution" << std::endl; return SOAP_FATAL_ERROR; }
int main() { Environ env; bool go = true; newEnviron(&env); while (go == true) { char* rawLine = getRawInput(); if (rawLine == 0) { go = false; } else { FormatedInput* format = formatInput(rawLine); if (format == 0) continue ; Execution(format, &env); //free(format); } //free(rawLine); } }
void OpenBagMotionPlanner::Viewpoint() { double deg_to_rad = M_PI / 180; std::vector<double> angles; angles.resize(6); angles[0] = -65.56 * deg_to_rad; angles[1] = -101.73 * deg_to_rad; angles[2] = 78.13 * deg_to_rad; angles[3] = 48.27 * deg_to_rad; angles[4] = 103.46 * deg_to_rad; angles[5] = -87.73 * deg_to_rad; robot_state::RobotState start_state(*groupPtr->getCurrentState()); groupPtr->setStartState(start_state); groupPtr->setJointValueTarget(angles); bool success = groupPtr->plan(plan); ROS_INFO("Survey %s",success?"SUCCESS":"FAILED"); Execution(); }
int main(int _NbrParams, char* _tabstrParams[]) { // Initialisation... Init(1024, 768); dlgNom = new CMSFVTextBox(pSDLRenderer); dlgTexte = new CMSFVMemo(pSDLRenderer); mnuContextuel = new CMenu(); // Exécution... OnShow(); while (Execution()); OnClose(); // Conclusion... delete mnuContextuel; delete dlgTexte; delete dlgNom; delete pArbreIndSelect; // delete pRacine; // delete pCurrent; return 0; }