When the DoD is constructed with a starting serial number and total number of serial numbers, this method is called to get the next available serial number in the sequence.
True if there are more numbers available, false if not
This method raises an NumbersConsumed Event when there are no more numbers left in the serial number range.
//create a 96 bit epc number with serial numbers starting at 0 and going to 10
DoD dod = new DoD(96,0,10);
//encode the CAGE,Filter and a serial number of 0
dod.Encode("2S194",0,0);
//go while there are serial numbers available
while(dod.GetNext()) {
//Write ot the TagURI, You could also write out the PureIdentity, XML, or Format the EPC Number in Binary or Hex
Console.WriteLine(dod.ToTagURI());
}
//Results would be:
//urn:epc:tag:usdod-96:[Filter].[CAGE].[Serial Number]
urn:epc:tag:usdod-96:0000.2S194.0
urn:epc:tag:usdod-96:0000.2S194.1
urn:epc:tag:usdod-96:0000.2S194.2
urn:epc:tag:usdod-96:0000.2S194.3
urn:epc:tag:usdod-96:0000.2S194.4
urn:epc:tag:usdod-96:0000.2S194.5
urn:epc:tag:usdod-96:0000.2S194.6
urn:epc:tag:usdod-96:0000.2S194.7
urn:epc:tag:usdod-96:0000.2S194.8
urn:epc:tag:usdod-96:0000.2S194.9
urn:epc:tag:usdod-96:0000.2S194.10
DoD Class | Apostrophe.EPC Namespace