示例#1
0
 public CANFrameInfoArgs(FrameInfo frame)
 {
     try
     {
         if (frame == null)
         {
             throw new CANexception("CANFrameInfoArgs 参数不能为空");
         }
         //_canFrameInfos = frameInfos;
         _canFrameInfo = frame;
     }
     catch (Exception e)
     {
         LogHelper.WriteErrorLog(e.Message);
     }
 }
示例#2
0
文件: CANhelper.cs 项目: ZhaoLion/CAN
 void OnFrameInfoArgs(FrameInfo canframe)
 {
     try
     {
         EventHandler<CANFrameInfoArgs> temp = ReceviedData;
         CANFrameInfoArgs e = new CANFrameInfoArgs(canframe);
         if (temp != null)
         {
             temp(this, e);
         }
     }
     catch (Exception e)
     {
         LogHelper.WriteErrorLog("OnFrameInfoArgs" + e.Message);
     }
 }
示例#3
0
 public CanFrameArgs(FrameInfo frame)
 {
     _canFrame = frame;
 }
示例#4
0
 /// <summary>
 /// 增加数据到管理队列
 /// </summary>
 /// <param name="data">数据串</param>
 /// <returns></returns>
 public void Add(FrameInfo data)
 {
     try
     {
         _list.Enqueue(data);
         OnCanReceviedEvent(new CanFrameArgs(data));
     }
     catch (Exception e)
     {
         LogHelper.WriteErrorLog(e.Message);
     }
 }
示例#5
0
 /// <summary>
 /// 初始化
 /// </summary>
 /// 
 public CanListManager()
 {
     _list = new ConcurrentQueue<FrameInfo>();
     _lastList = new FrameInfo("1", "1", "1", "1", "1");
 }
示例#6
0
 public CanFrameArgs(FrameInfo frame)
 {
     _canFrame = frame;
 }