ModuleAPI C# Version Developer's Guide
Synchronous Inventory
  
Synchronous inventory is implemented using the Reader.Read method, which blocks until the end of the inventory. When the user needs to perform a short period of inventory operation, and the number of tags is not a lot, the Reader.Read method is a good choice. You can use the method anytime.

Read Method

Implementing synchronous inventory operation, You must ensure that the ReadPlan parameter is set before calling this method, otherwise an exception will be thrown.
 
Method Signature
  
public abstract ModuleTech.TagReadData[] Read(int milliseconds)
  
Parameters
Parameter Description
milliseconds The execution time duration in milliseconds. The method would block at least this time duration.
 
Return Value
The tags inverntoried, an instance of the TagReadData class contains all the information of the tag.
 
Example
Tag Inventory with antenna1, 3 and 4, only read the tags that its EPC code starts with 0x1234, embedded reading instruction which read data of two blocks from the second block of TID area.
  
EmbededCmdData ecd = new EmbededCmdData(MemBank.TID, 2, 4);
rdr.ParamSet("EmbededCmdOfInventory", ecd);
byte[] fdata = ByteFormat.FromHex(“1234”);
Gen2TagFilter filter = new Gen2TagFilter(fdata.Length*8, fdata ,ModuleTech.Gen2.MemBank.EPC, 32, false);
rdr.ParamSet("Singulation", filter);
int [] ants = new int[]{1, 3, 4};
SimpleReadPlan searchPlan = new SimpleReadPlan(ants);
rdr.ParamSet("ReadPlan", searchPlan);
TagReadData[] tags = rdr.Read(500);