示例#1
0
        public SiMessageQueue CreateMessageQueue()
        {
            var queue = new SiMessageQueue(messages.Count);

            messages.ForEach(queue.Add);
            return(queue);
        }
示例#2
0
        public SiMessageQueue CreateMessageQueue()
        {
            var messageQueue = new SiMessageQueue(10, 10 * 1000);

            reader = new SerialPortCommReader(messageQueue, port);
            return(messageQueue);
        }
示例#3
0
 public SerialPortCommReader(SiMessageQueue messageQueue, System.IO.Ports.SerialPort port)
 {
     // TODO: Complete member initialization
     this.messageQueue  = messageQueue;
     this.port          = port;
     this.messageQueue  = messageQueue;
     timeoutDelay       = 500;
     lastTime           = 0;
     port.DataReceived += port_DataReceived;
 }
示例#4
0
        public void setUp()
        {
            siHandlerMock = new Mock <SiHandler>();
            siHandler     = siHandlerMock.Object;
            writerMock    = new Mock <ICommWriter>();
            writer        = writerMock.Object;

            queue = new SiMessageQueue(10, 1);
            SiDriverState.setSicard6_192PunchesMode(false);
            GecoSiLogger.Open();
        }
示例#5
0
 public MockCommPort(SiMessage[] siMessages)
 {
     comm         = new MockComm();
     messageQueue = new SiMessageQueue(siMessages.Length + 1, 1);
     siMessages.ToList().ForEach(messageQueue.Add);
 }