예제 #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;
 }