Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        public virtual void Init()
        {
            mComm = Device.GetCommChannel();
            if (mComm != null)
            {
                mComm.CommChangedEvent += MComm_CommChangedEvent;
                mComm.RegistorReceiveCallBack(OnReceiveData);

                foreach (var vv in Device.ListTags())
                {
                    if (!string.IsNullOrEmpty(vv.DeviceInfo))
                    {
                        if (mCachTags.ContainsKey(vv.DeviceInfo))
                        {
                            mCachTags[vv.DeviceInfo].Add(vv.Id);
                        }
                        else
                        {
                            mCachTags.Add(vv.DeviceInfo, new List <int>()
                            {
                                vv.Id
                            });
                        }
                    }
                }
                mComm.Init();
            }
        }
Beispiel #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="mComm"></param>
 public override void RegistorReceiveCallBack(ICommChannel mComm)
 {
     mComm.RegistorReceiveCallBack(this.OnReceiveData2);
 }
Beispiel #3
0
 /// <summary>
 ///
 /// </summary>
 public virtual void RegistorReceiveCallBack(ICommChannel mComm)
 {
     mComm.RegistorReceiveCallBack(OnReceiveData);
 }