|
|
|
|
|
|
|
|
|
|
|
|
|
|
//#include "../nvwa-0.6/nvwa/debug_new.h" |
|
|
//#include "../nvwa-0.6/nvwa/debug_new.h" |
|
|
|
|
|
|
|
|
using namespace std; |
|
|
|
|
|
|
|
|
namespace cd = codedweller; |
|
|
|
|
|
|
|
|
//// Version Info |
|
|
//// Version Info |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// FileUTC(FileName) - utility function for tagging the active rulebase |
|
|
// FileUTC(FileName) - utility function for tagging the active rulebase |
|
|
|
|
|
|
|
|
RuntimeCheck FileUTCGoodTimestampLength("SNFMulti.cpp:FileUTC snprintf(...) == CorrectTimestampLength"); |
|
|
|
|
|
|
|
|
cd::RuntimeCheck FileUTCGoodTimestampLength("SNFMulti.cpp:FileUTC snprintf(...) == CorrectTimestampLength"); |
|
|
|
|
|
|
|
|
string FileUTC(string FileName) { // Gets a files UTC. |
|
|
string FileUTC(string FileName) { // Gets a files UTC. |
|
|
struct stat FileNameStat; // First we need a stat buffer. |
|
|
struct stat FileNameStat; // First we need a stat buffer. |
|
|
|
|
|
|
|
|
// are appropriate. The other functions can count on this one to polish off the various forms of rulebase |
|
|
// are appropriate. The other functions can count on this one to polish off the various forms of rulebase |
|
|
// load activity. |
|
|
// load activity. |
|
|
|
|
|
|
|
|
const LogicCheck SaneRefreshProcessCheck("snf_RulebaseHandler::_snf_LoadNewRulebase():SaneRefreshProcessCheck(RefreshInProgress)"); |
|
|
|
|
|
|
|
|
const cd::LogicCheck SaneRefreshProcessCheck("snf_RulebaseHandler::_snf_LoadNewRulebase():SaneRefreshProcessCheck(RefreshInProgress)"); |
|
|
|
|
|
|
|
|
void snf_RulebaseHandler::_snf_LoadNewRulebase(){ // Common internal load/check routine. |
|
|
void snf_RulebaseHandler::_snf_LoadNewRulebase(){ // Common internal load/check routine. |
|
|
SaneRefreshProcessCheck(RefreshInProgress); // We only get called when this flag is set. |
|
|
SaneRefreshProcessCheck(RefreshInProgress); // We only get called when this flag is set. |
|
|
|
|
|
|
|
|
return ExtractedID; // Return the extracted id or substitute. |
|
|
return ExtractedID; // Return the extracted id or substitute. |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const LogicFault FaultBadMessageBuffer1("snf_EngineHandler::scanMessage():FaultBadMessageBuffer1(NULL == inputMessageBuffer)"); |
|
|
|
|
|
const LogicFault FaultBadMessageBuffer2("snf_EngineHandler::scanMessage():FaultBadMessageBuffer2(0 >= inputMessageLength)"); |
|
|
|
|
|
|
|
|
const cd::LogicFault FaultBadMessageBuffer1("snf_EngineHandler::scanMessage():FaultBadMessageBuffer1(NULL == inputMessageBuffer)"); |
|
|
|
|
|
const cd::LogicFault FaultBadMessageBuffer2("snf_EngineHandler::scanMessage():FaultBadMessageBuffer2(0 >= inputMessageLength)"); |
|
|
|
|
|
|
|
|
const char Unknown_SNFMatchFlag = '-'; |
|
|
const char Unknown_SNFMatchFlag = '-'; |
|
|
const char Panic_SNFMatchFlag = 'p'; |
|
|
const char Panic_SNFMatchFlag = 'p'; |