void manualTest() { sout << "### Manual Test ###" << std::endl << std::endl; DummyDynamicInputModule modIn("input"); DummyDynamicOutputModule modOut("output"); modIn.in1.connect(modOut.out1); modIn.run(); sout << std::endl; ParameterFile file; file.set("input.type", "DummyDynamicInputModule"); file.set("input.length", 2); file.set("output.length", 2); file.set("input.parameters", 4); file.set("input.param4", 987); modIn.getMetadata().save("DummyDynamicInputModule.before.wrp"); modOut.getMetadata().save("DummyDynamicOutputModule.before.wrp"); modIn.prepareDynamicInterface(file); modIn.loadParameters(file); modOut.prepareDynamicInterface(file); modIn.getMetadata().save("DummyDynamicInputModule.after.wrp"); modOut.getMetadata().save("DummyDynamicOutputModule.after.wrp"); modOut.resetExecuted(); sout << std::endl; if (modIn.connected()) { throw "everything is connected!"; } modIn.in2.connect(modOut.out2); if (modIn.connected()) { sout << "everything is connected" << std::endl; } modIn.run(); sout << std::endl << "### End of Test ###" << std::endl << std::endl; }
void EventShow() { void ExamineEvent(), ShowTW(); int i; mPrintf("\nCurAbs=%ld\n ", CurAbsolute()); mPrintf("ANYTIME NET is %d\n ", ClassActive[CL_ANYTIME_NET]); mPrintf("non-preempt nextabs is %ld, %ld seconds away\n ", Types[2].NextAbs, Types[2].NextAbs - CurAbsolute()); mPrintf("Preemptive list (%ld):\n ", Types[0].NextAbs); RunList(&Types[0].List, ExamineEvent); modIn(); mPrintf("Non-Preemptive list (%ld):\n ", Types[1].NextAbs); RunList(&Types[1].List, ExamineEvent); modIn(); mPrintf("Quiet list (%ld):\n ", Types[2].NextAbs); RunList(&Types[2].List, ExamineEvent); modIn(); mPrintf("Event ending list:\n "); RunList(&EventEnds, ShowTW); mPrintf("Anytime net is %s\n ", (ClassActive[CL_ANYTIME_NET]) ? "On" : "Off"); if (ClassActive[CL_ANYTIME_NET]) { msgBuf.mbtext[0] = 0; for (i = 0; i < 32; i++) if ((1l << i) & AnyTimeNets) sprintf(lbyte(msgBuf.mbtext), "%d, ", i + 1); if (strlen(msgBuf.mbtext)) msgBuf.mbtext[strLen(msgBuf.mbtext) - 2] = 0; mPrintf("Anytime nets: %s\n ", msgBuf.mbtext); } }
char iChar() { char modIn(); char c; scrn = 0; if (ra.justLostCarrier) return 0; /* ugly patch */ blank_flag = FALSE; c = ra.filter[modIn()]; if (c==SPECIAL) c=' '; /* if(ra.textDownload) return(c);*/ switch (ra.echo) { case BOTH: if (ra.haveCarrier) { if (c == '\n') doCR(); else outMod(c); } if (c == '\n') cprintf ("\n\r"); else putch(c); break; case CALLER: if (ra.whichIO == MODEM) { if (c == '\n') doCR(); else outMod(c); } else { if (c == '\n') cprintf("\n\r"); else putch(c); } break; case ASTERISK: if (ra.haveCarrier) { if (c == '\n') doCR(); else outMod((c=='\b' ? '\b' : '*')); } if (c == '\n') cprintf ("\n\r"); else putch((c == '\b' ? '\b' : '*')); break; } return(c); }