Beispiel #1
0
        public static bool Test(string message)
        {
            var data = new LedEntity().GetBytes(0, message);//根据实时数据窗口的位置发送实时数据

            data.ForEach(d => {
                Console.WriteLine(d.ToString());
            });
            return(false);
        }
Beispiel #2
0
 public bool Display(List <Tuple <int, string> > messageList)
 {
     try
     {
         var transport = TransportFactory.CreateTransport(transportType, this.Host, this.Args, 5000);
         messageList.ForEach(item => {
             var data = new LedEntity().GetBytes(item.Item1, item.Item2); //根据实时数据窗口的位置发送实时数据
             data.ForEach(d => {
                 transport.Send(d);                                       //分包512字节发送
             });
         });
         transport.Dispose();
         return(true);
     }
     catch (Exception ex)
     {
         XTrace.WriteException(ex);
         return(false);
     }
 }