public CANFrameInfoArgs(FrameInfo frame) { try { if (frame == null) { throw new CANexception("CANFrameInfoArgs 参数不能为空"); } //_canFrameInfos = frameInfos; _canFrameInfo = frame; } catch (Exception e) { LogHelper.WriteErrorLog(e.Message); } }
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); } }
public CanFrameArgs(FrameInfo frame) { _canFrame = frame; }
/// <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); } }
/// <summary> /// 初始化 /// </summary> /// public CanListManager() { _list = new ConcurrentQueue<FrameInfo>(); _lastList = new FrameInfo("1", "1", "1", "1", "1"); }