public void Update(ReadTagParameter param) { IsLoop = param.IsLoop; AccessPassword = param.AccessPassword; IsReturnEPC = param.IsReturnEPC; IsReturnTID = param.IsReturnTID; UserPtr = param.UserPtr; UserLen = param.UserLen; IsReturnReserved = param.IsReturnReserved; ReadCount = param.ReadCount; ReadTime = param.ReadTime; }
public MsgTagRead(ReadTagParameter param) { this.param = param; if (param.IsLoop) { isReturn = false; if (param.TagFilteringTime != 65535 || param.ReadTime != 65535 || param.StopTime != 65535) { base.OnExecuting += MsgTagRead_OnExecuting1; } } if (param.SelectTagParam != null) { base.OnExecuting += MsgTagRead_OnExecuting2; } setReadMsgBody(param); }
internal void setReadMsgBody(ReadTagParameter param) { List <byte> list = new List <byte>(); list.Add((byte)(param.IsLoop ? 1 : 0)); list.AddRange(param.AccessPassword); list.Add((byte)(param.IsReturnEPC ? 1 : 0)); if (param.IsReturnTID) { list.AddRange(new byte[3] { 0, 6, 1 }); } else { list.AddRange(new byte[3]); } list.AddRange(EVB.ConvertToEvb(param.UserPtr)); list.Add(param.UserLen); if (param.IsReturnReserved) { list.AddRange(new byte[2] { 0, 4 }); } else { list.AddRange(new byte[2]); } list.Add((byte)(param.ReadCount >> 8)); list.Add((byte)(param.ReadCount & 0xFF)); list.Add((byte)(param.TotalReadTime >> 8)); list.Add((byte)(param.TotalReadTime & 0xFF)); msgBody = list.ToArray(); }
public TagDatabase(ReadTagParameter param) { Update(param); }