// Public Constructor public AIS_Parser(AisHostType hostType, AisSecureType secType, LogFxnDelegate hostLogFxn, ReadFxnDelegate hostReadFxn, WriteFxnDelegate hostWriteFxn) { // apply specified params this.hostDevice = hostType; this.readFxn = hostReadFxn; this.writeFxn = hostWriteFxn; this.logFxn = hostLogFxn; this.secureType = secType; // use defaults for others posN = 2; ioBits = 8; ioDelay = 0; opcodeDelay = 5; ioTimeout = 5000; // 5s waitBOOTME = true; if (secureType == AisSecureType.GENERIC) { sigSize = 32; } else if (secureType == AisSecureType.CUSTOM) { sigSize = 128; // default to RSA1024 to start } else { sigSize = 0; } }
public AIS_Parser(int hostType, LogFxnDelegate hostLogFxn, ReadFxnDelegate hostReadFxn, WriteFxnDelegate hostWriteFxn) { // apply specified params hostDevice = hostType; readFxn = hostReadFxn; writeFxn = hostWriteFxn; logFxn = hostLogFxn; // use defaults for others posN = 2; ioBits = 8; ioDelay = 0; opcodeDelay = 5; // 5ms ioTimeout = 5000; // 5s waitBOOTME = true; }
public AIS_Parser(int hostType, LogFxnDelegate hostLogFxn, ReadFxnDelegate hostReadFxn, WriteFxnDelegate hostWriteFxn) { // apply specified params hostDevice = hostType; readFxn = hostReadFxn; writeFxn = hostWriteFxn; logFxn = hostLogFxn; // use defaults for others posN = 2; ioBits = 8; ioDelay = 0; opcodeDelay = 5; // 5ms ioTimeout = 5000; // 5s waitBOOTME = true; }
// Public Constructor public AIS_Parser(AisHostType hostType, AisSecureType secType, LogFxnDelegate hostLogFxn, ReadFxnDelegate hostReadFxn, WriteFxnDelegate hostWriteFxn) { // apply specified params this.hostDevice = hostType; this.readFxn = hostReadFxn; this.writeFxn = hostWriteFxn; this.logFxn = hostLogFxn; this.secureType = secType; // use defaults for others posN = 2; ioBits = 8; ioDelay = 0; opcodeDelay = 5; ioTimeout = 5000; // 5s waitBOOTME = true; if (secureType == AisSecureType.GENERIC) { sigSize = 32; } else if (secureType == AisSecureType.CUSTOM) { sigSize = 128; // default to RSA1024 to start } else { sigSize = 0; } }
// invoke version; can be called safely from another thread public void UTIL_log_INVOKE(String text) { LogFxnDelegate temp_delegate = new LogFxnDelegate(UTIL_log); this.Invoke(temp_delegate, new object[] { text }); }
// invoke version; can be called safely from another thread public void UTIL_log_INVOKE(String text) { LogFxnDelegate temp_delegate = new LogFxnDelegate(UTIL_log); this.Invoke(temp_delegate, new object[] { text }); }