Beispiel #1
0
        /// <summary>
        /// Send a command using TCP port
        /// </summary>
        /// <param name="mi">The method info</param>
        /// <param name="methodValues">The method values</param>
        public bool SendCommand(System.Reflection.MethodInfo mi, object[] methodValues)
        {
            // if port not open then open it
            if (_clsComm == null || !_clsComm.IsOpen)
            {
                _clsComm = new CommDll();
                _settings.OpenComm(_clsComm);
            }

            // Serialize the method
            string usbp = KioskProtocol.Serialize(mi, methodValues);

            // send the command
            return(WriteData(usbp));
        }
Beispiel #2
0
 public KioskComm()
 {
     _clsComm  = new CommDll();
     _settings = new OTI.Reader.CommunicationsSettings();
     _thread   = new Thread(ReceiveMessageFromDevice);
 }