Ejemplo n.º 1
0
        public SiMessageQueue CreateMessageQueue()
        {
            var queue = new SiMessageQueue(messages.Count);

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

            reader = new SerialPortCommReader(messageQueue, port);
            return(messageQueue);
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 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();
        }
Ejemplo n.º 5
0
 public MockCommPort(SiMessage[] siMessages)
 {
     comm         = new MockComm();
     messageQueue = new SiMessageQueue(siMessages.Length + 1, 1);
     siMessages.ToList().ForEach(messageQueue.Add);
 }