// 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; }