/// <summary> /// Returns a String that represents the current Object. /// </summary> /// <returns>A String that represents the current Object.</returns> public override string ToString() { return(String.Format( "Iso180006b.Select:[{0}{1},{2},0x{3:X2},{4}]", (Invert ? "Invert," : ""), Op, Address, Mask, ByteFormat.ToHex(Data))); }
public static string SaveSimpleReadPlan(Object value) { string readPlan = string.Empty; ReadPlan rp = (ReadPlan)value; readPlan += "SimpleReadPlan:["; SimpleReadPlan srp = (SimpleReadPlan)rp; readPlan += "Antennas=" + ArrayToString(srp.Antennas); readPlan += "," + "Protocol=" + srp.Protocol.ToString(); if (srp.Filter != null) { if (srp.Filter is Gen2.Select) { Gen2.Select sf = (Gen2.Select)srp.Filter; readPlan += "," + string.Format("Filter=Gen2.Select:[Invert={0},Bank={1},BitPointer={2},BitLength={3},Mask={4}]", (sf.Invert?"true" : "false"), sf.Bank, sf.BitPointer, sf.BitLength, ByteFormat.ToHex(sf.Mask)); } else { Gen2.TagData td = (Gen2.TagData)srp.Filter; readPlan += "," + string.Format("Filter=TagData:[EPC={0}]", td.EpcString); } } else { readPlan += ",Filter=null"; } if (srp.Op != null) { if (srp.Op is Gen2.ReadData) { Gen2.ReadData rd = (Gen2.ReadData)srp.Op; readPlan += "," + string.Format("Op=ReadData:[Bank={0},WordAddress={1},Len={2}]", rd.Bank, rd.WordAddress, rd.Len); } else { readPlan += ",Op=null"; } } else { readPlan += ",Op=null"; } readPlan += "," + "UseFastSearch=" + srp.UseFastSearch.ToString(); readPlan += "," + "Weight=" + srp.Weight.ToString() + "]"; return(readPlan); }