//================================================================================================// // process script //================================================================================================// private static void ProcessScript(SignalHead head, SignalScripts.SCRScripts signalScript) { int[] localFloats = new int[signalScript.TotalLocalFloats]; // process script if (!ProcessStatementBlock(head, signalScript.Statements, localFloats)) { return; } }
//================================================================================================// // // processing routines // //================================================================================================// // main update routine //================================================================================================// internal static void SignalHeadUpdate(SignalHead head, SignalScripts.SCRScripts signalScript) { if (head.SignalType == null) { return; } if (signalScript != null) { ProcessScript(head, signalScript); } else { UpdateBasic(head); } }
//================================================================================================// // // process script // //================================================================================================// public void SH_process_script(SignalHead thisHead, SignalScripts.SCRScripts signalScript, SIGSCRfile sigscr) { int[] localFloats = new int[signalScript.totalLocalFloats]; // process script #if DEBUG_PRINT_ENABLED if (thisHead.mainSignal.enabledTrain != null) { File.AppendAllText(dpe_fileLoc + @"printproc.txt", "\n\nSIGNAL : " + thisHead.TDBIndex.ToString() + "\n"); File.AppendAllText(dpe_fileLoc + @"printproc.txt", "OBJECT : " + thisHead.mainSignal.thisRef.ToString() + "\n"); File.AppendAllText(dpe_fileLoc + @"printproc.txt", "type : " + signalScript.scriptname + "\n"); } #endif #if DEBUG_PRINT_PROCESS if (TDB_debug_ref.Contains(thisHead.TDBIndex)) { File.AppendAllText(dpr_fileLoc + @"printproc.txt", "\n\nSIGNAL : " + thisHead.TDBIndex.ToString() + "\n"); File.AppendAllText(dpr_fileLoc + @"printproc.txt", "OBJECT : " + thisHead.mainSignal.thisRef.ToString() + "\n"); File.AppendAllText(dpr_fileLoc + @"printproc.txt", "type : " + signalScript.scriptname + "\n"); } #endif if (!SH_process_StatementBlock(thisHead, signalScript.Statements, localFloats, sigscr)) { return; } #if DEBUG_PRINT_ENABLED if (thisHead.mainSignal.enabledTrain != null) { File.AppendAllText(dpe_fileLoc + @"printproc.txt", "\n ------- \n"); } #endif #if DEBUG_PRINT_PROCESS if (TDB_debug_ref.Contains(thisHead.TDBIndex)) { File.AppendAllText(dpr_fileLoc + @"printproc.txt", "\n ------- \n"); } #endif }