Exemplo n.º 1
0
        // 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;
            }
        }
Exemplo n.º 2
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;
        }
Exemplo n.º 4
0
        // 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;
              }
        }
Exemplo n.º 5
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 });
        }
Exemplo n.º 6
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 });
 }