using System.Threading; namespace Mesnac.DeviceAdapter.Fuchs { public class AntListInfo { public static AntInfo[] AntList { get { if (_AntList == null) { _AntList = new AntInfo[8]; for (int i = 0; i < 8; i++) { AntInfo a = new AntInfo(); _AntList[i] = a; } } return _AntList; } set { _AntList = value; } } public static AntInfo[] _AntList; } public class AntInfo { public ushort iDeviceId; /// /// 是否超高频读头 /// public bool UHFAntenna { get; set; } /// /// 当前读取数据 /// public byte[] ReadData { get; set; } /// /// 当前是否正在读取 /// public bool IsReading; private int _readType = -1; /// /// 读取状态,0为当前没有读取,1当前为自动读取,2当前为MES主动读取 /// public int readType { get { return _readType; } set { lock (string.Empty) { _readType = value; } } } public System.Threading.Timer m_Timer = null; //根据读取时间间隔设置的定时器 /// /// 当前任务是否完成信号量 /// public Semaphore m_Waiting = new Semaphore(0, 100000); /// /// 数据返回信号量 /// public Semaphore m_WaitResult = new Semaphore(0, 100000); /// /// 连续识别停止返回信号量 /// public Semaphore m_StopResult = new Semaphore(0, 100000); /// /// 高频读头连续识别停止返回信号量 /// public Semaphore s_BeginEvent = new Semaphore(0, 100000); /// /// 超高频读头连续识别停止返回信号量 /// public Semaphore s_UHFBeginEvent = new Semaphore(0, 100000); } }