- Timestamp:
- Jul 2, 2012, 7:54:12 AM (13 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- 9d14c3
- Parents:
- 6b3a37
- git-author:
- Frederik Heber <heber@…> (03/04/12 20:11:38)
- git-committer:
- Frederik Heber <heber@…> (07/02/12 07:54:12)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
src/Fragmentation/Automation/Controller/Commands/SendJobsOperation.cpp
r6b3a37 r425fc6 7 7 8 8 /* 9 * ReceiveJobsOperation.cpp9 * SendJobsOperation.cpp 10 10 * 11 11 * Created on: Dec 11, 2011 … … 34 34 #include "Jobs/FragmentJob.hpp" 35 35 36 #include "Controller/Commands/ ReceiveJobsOperation.hpp"36 #include "Controller/Commands/SendJobsOperation.hpp" 37 37 38 38 /** Handle connect operation to receive jobs from controller … … 41 41 * \param endpoint_iterator endpoint of the connection 42 42 */ 43 void ReceiveJobsOperation::handle_connect(const boost::system::error_code& e,43 void SendJobsOperation::handle_connect(const boost::system::error_code& e, 44 44 boost::asio::ip::tcp::resolver::iterator endpoint_iterator) 45 45 { … … 48 48 { 49 49 // Successfully established connection. Give choice. 50 enum ControllerChoices choice = ReceiveJobs;50 enum ControllerChoices choice = SendJobs; 51 51 connection_.async_write(choice, 52 boost::bind(& ReceiveJobsOperation::handle_SendJobs, this,52 boost::bind(&SendJobsOperation::handle_SendJobs, this, 53 53 boost::asio::placeholders::error)); 54 54 } else if (endpoint_iterator != boost::asio::ip::tcp::resolver::iterator()) { … … 57 57 boost::asio::ip::tcp::endpoint endpoint = *endpoint_iterator; 58 58 connection_.socket().async_connect(endpoint, 59 boost::bind(& ReceiveJobsOperation::handle_connect, this,59 boost::bind(&SendJobsOperation::handle_connect, this, 60 60 boost::asio::placeholders::error, ++endpoint_iterator)); 61 61 } else { … … 72 72 * \param e error code if something went wrong 73 73 */ 74 void ReceiveJobsOperation::handle_SendJobs(const boost::system::error_code& e)74 void SendJobsOperation::handle_SendJobs(const boost::system::error_code& e) 75 75 { 76 76 Info info(__FUNCTION__); … … 82 82 LOG(1, "INFO: Sending "+toString(jobs.size())+" jobs ..."); 83 83 connection_.async_write(jobs, 84 boost::bind(& ReceiveJobsOperation::handle_FinishOperation, this,84 boost::bind(&SendJobsOperation::handle_FinishOperation, this, 85 85 boost::asio::placeholders::error)); 86 86 } … … 100 100 * \param e error code if something went wrong 101 101 */ 102 void ReceiveJobsOperation::handle_FinishOperation(const boost::system::error_code& e)102 void SendJobsOperation::handle_FinishOperation(const boost::system::error_code& e) 103 103 { 104 104 Info info(__FUNCTION__); … … 114 114 * \param _jobs jobs to add 115 115 */ 116 void ReceiveJobsOperation::addJobs(const std::vector<FragmentJob::ptr> &_jobs)116 void SendJobsOperation::addJobs(const std::vector<FragmentJob::ptr> &_jobs) 117 117 { 118 118 jobs.reserve(jobs.size()+_jobs.size()); … … 120 120 jobs.push_back(job); 121 121 } 122 LOG(1, "INFO: ReceiveJobsOperation now contains " << jobs.size() << " job(s).");122 LOG(1, "INFO: SendJobsOperation now contains " << jobs.size() << " job(s)."); 123 123 } 124 124
Note:
See TracChangeset
for help on using the changeset viewer.