The SGLN Class will translate a GLN to an SGLN.
For a list of all members of this type, see SGLN Members.
System.Object
Apostrophe.EPC.EPCBase
Apostrophe.EPC.SGLN
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
The Serial Number is reserved and shouldn't be used as specified in the EPC Global Tag Data Specifiation 1.1 Rev 27. However, the Apostrophe EPC Generator will allow the setting of this field. Unlike the other encoding types in this API that support either a Serial Number or Serial Reference, you cannot supply the serial number through the encoding methods. You can use the SetSerialNumber method to place a serial number in the encoded SGLN.
SGLN sgln = new SGLN(96);
//Pass in the GLN and use the Encode Override that will use the UPC's Location Reference
sgln.Encode("0490004388001",3);
//ow set the serial number if you wish
sgln.SetSerialNumber(1234567);
//calling sgln.ToXml() will return the following xml document
<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<Tag type='SGLN' size='96'>
<Fields>
<Field name='Header' value='50'/>
<Field name='Filter' value='3'/>
<Field name='Partition' value='5'/>
<Field name='CompanyPrefix' value='049000'/>
<Field name='LocationReference' value='438800'/>
<Field name='SerialNumber' value='0'/>
</Fields>
<Encodings>
<Encoding name='HEX' value='327402FDA164200000000000'/>
<Encoding name='BINARY' value='001100100111010000000010111111011010000101100100001000000000000000000000000000000000000000000000'/>
<Encoding name='URI' value='urn:epc:tag:sgln-96:049000.438800.0'/>
<Encoding name='PUREIDENTITY' value='urn:epc:id:sgln:049000.438800.0'/>
</Encodings>
</Tag>
Namespace: Apostrophe.EPC
Assembly: Apostrophe.EPC (in Apostrophe.EPC.dll)
SGLN Members | Apostrophe.EPC Namespace