Creates the next Serial Number in EPC Number
Returns true if there are available serial numbers.
This example shows a DoD-96 EPC Number using the GetNext() method.
//initialize the DoD EPC Object
DoD next = new DoD(96,0,10);
//Set the CAGE, Filter, and Serial Number (in this case SerialNumber=0)
next.Encode("2S194",0,0);
//Loop while there are numbers available
while(next.GetNext()) {
//Write the Tag URI
Console.WriteLine(next.ToTagURI());
}
You can also handle the NumbersConsumed event in this situation. Once the serial numbers are consumed, the NumbersConsumed event is fired to let you know that ore serial numbers are needed. At this point, you could contact a Number Manager for more numbers and continue generating EPC Numbers.
EPCBase Class | Apostrophe.EPC Namespace