git-svn-id: https://svn.microneil.com/svn/SNF4CGP/trunk@44 59e8e3e7-56fa-483b-b4b4-fa6ab0af3dfcmaster
@@ -66,13 +66,13 @@ void ExecutiveProcess::dispatchWakeupCommand() { | |||
void ExecutiveProcess::notifyQUIT() { | |||
ostringstream O; | |||
O << "* SNF4CGP[" << QuitJobNumber << "] Received QUIT, shutting down..." << endl; | |||
O << "* CGPSNF[" << QuitJobNumber << "] Received QUIT, shutting down..." << endl; | |||
Output.sendString(O.str()); | |||
} | |||
void ExecutiveProcess::notifyNOTGOOD() { | |||
ostringstream O; | |||
O << "* SNF4CGP Input stream has gone bad, shutting down..." << endl; | |||
O << "* CGPSNF Input stream has gone bad, shutting down..." << endl; | |||
Output.sendString(O.str()); | |||
} | |||
@@ -105,7 +105,7 @@ void ExecutiveProcess::doShutdown() { | |||
shutdownWorkerPool(); | |||
shutdownOutput(); | |||
shutdownJobPool(); | |||
cout << "* SNF4CGP Shutdown completed." << endl; | |||
cout << "* CGPSNF Shutdown completed." << endl; | |||
if(0 < QuitJobNumber) { // If processing ended with QUIT | |||
cout << QuitJobNumber << " OK" << endl; // then respond appropriately. | |||
} |
@@ -32,7 +32,7 @@ void Job::emitComment(const string& Comment) { | |||
} | |||
void Job::generateCommandCommentPrefix(ostringstream& O) { | |||
O << "* SNF4CGP[" << CurrentCommand.Number << "] "; | |||
O << "* CGPSNF[" << CurrentCommand.Number << "] "; | |||
} | |||
void Job::emitOK() { | |||
@@ -104,7 +104,7 @@ void Job::finalize() { | |||
} | |||
void Job::doWakeUp() { | |||
emitComment("SNF4CGP Waking Up"); | |||
emitComment("CGPSNF Waking Up"); | |||
emitComment(CurrentCommand.Data); | |||
} | |||
@@ -114,7 +114,7 @@ void Job::doINTF() { | |||
void Job::doUNKNOWN() { | |||
ostringstream O; | |||
O << "* SNF4CGP[" << CurrentCommand.Number << "] Does not understand: " | |||
O << "* CGPSNF[" << CurrentCommand.Number << "] Does not understand: " | |||
<< formatAsCGPString(CurrentCommand.Data) << endl; | |||
OutputBuffer.append(O.str()); | |||
emitFAILURE(); |
@@ -13,13 +13,13 @@ | |||
using namespace std; // Introduce standard namespace. | |||
const string SNF4CGP_VERSION_INFO = "SNF4CGP Version 0.1.0 Build: " __DATE__ " " __TIME__; | |||
const string SNF4CGP_VERSION_INFO = "CGPSNF Version 0.1.0 Build: " __DATE__ " " __TIME__; | |||
const int ConfigPathArgNumber = 1; | |||
const int CorrectArgcNumber = 2; | |||
bool CommandLineIsValid(int argc, char*argv[]) { // Validate the command line. | |||
if(CorrectArgcNumber != argc) { | |||
cout << "* SNF4CGP - Bad command line, use SNF4CGP <path_to_config_file>" << endl; | |||
cout << "* CGPSNF - Bad command line, use CGPSNF <path_to_config_file>" << endl; | |||
return false; | |||
} | |||
return true; | |||
@@ -33,10 +33,10 @@ void go(string ConfigurationPath) { | |||
SNF4CGP.doShutdown(); | |||
} | |||
catch(exception& e) { // Display standard exceptions. | |||
cout << "* SFN4CGP Exception: " << e.what() << endl; | |||
cout << "* CGPSNF Exception: " << e.what() << endl; | |||
} | |||
catch(...) { // Display unusual exceptions. | |||
cout << "* SNF4CGP Unusual Excetption!" << endl; | |||
cout << "* CGPSNF Unusual Excetption!" << endl; | |||
} | |||
} | |||