|
|
|
|
|
|
|
|
|
|
|
|
|
|
//// Version Info |
|
|
//// Version Info |
|
|
|
|
|
|
|
|
const char* SNF_ENGINE_VERSION = "SNFMulti Engine Version 3.1.3 Build: " __DATE__ " " __TIME__; |
|
|
|
|
|
|
|
|
const char* SNF_ENGINE_VERSION = "SNFMulti Engine Version 3.1.4 Build: " __DATE__ " " __TIME__; |
|
|
|
|
|
|
|
|
//// Script Caller Methods |
|
|
//// Script Caller Methods |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while(NULL!=ResultCursor) { // While we have records to process...
|
|
|
while(NULL!=ResultCursor) { // While we have records to process...
|
|
|
captureMatchRecord(TmpSNFMatch, ResultCursor); // grab the next record and evaluate it.
|
|
|
captureMatchRecord(TmpSNFMatch, ResultCursor); // grab the next record and evaluate it.
|
|
|
|
|
|
|
|
|
bool isPanickedRule = MyCFGPacket.isRulePanic(TmpSNFMatch.ruleid);
|
|
|
|
|
|
bool isVotingCandidate = (false == isPanickedRule);
|
|
|
|
|
|
|
|
|
// Mitigate short-match rulebase events to prevent false positives.
|
|
|
|
|
|
|
|
|
|
|
|
const size_t minimumPatternLength = 5; // Establish a minimum match length.
|
|
|
|
|
|
size_t matchSpan = (TmpSNFMatch.endex - TmpSNFMatch.index); // Determine the length of this match.
|
|
|
|
|
|
bool isShortMatchEvent = (minimumPatternLength > matchSpan); // Identify short-match events.
|
|
|
|
|
|
|
|
|
|
|
|
bool isPanickedRule = ( // In addition to rule IDs that are
|
|
|
|
|
|
MyCFGPacket.isRulePanic(TmpSNFMatch.ruleid) || // in the rule-panic list also treat
|
|
|
|
|
|
isShortMatchEvent // short match events as panic rules.
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
bool isVotingCandidate = (false == isPanickedRule); // Panic rules can't vote.
|
|
|
|
|
|
|
|
|
bool isWhiteRule = (
|
|
|
bool isWhiteRule = (
|
|
|
MyCFGPacket.Config()->TrainingWhiteRuleHandler.isListed(TmpSNFMatch.ruleid) ||
|
|
|
MyCFGPacket.Config()->TrainingWhiteRuleHandler.isListed(TmpSNFMatch.ruleid) ||
|
|
|
0 == TmpSNFMatch.symbol
|
|
|
0 == TmpSNFMatch.symbol
|