Gs |
In the bar code representation of GS1 Element String data, the order of AIs must conform to certain rules, namely that certain AIs of pre-defined size (as specified in the GS1 General Specifications) must occur first. The BarCodeCharacters property rearranges the order of AIs as necessary to accomplish this.
In the RFID representation of GS1 Element String data, different AIs are written to different RFID memory banks. In particular, the RFID EPC bank may only contain one of the following AI combinations:
EPC Scheme | AIs |
---|---|
SGTIN | GTIN (AI 01) + SERIAL (AI 21) |
SSCC | SSCC (AI 00) |
SGLN | GLN (AI 414), with or without GLN Extension (AI 254) |
GRAI | GRAI (AI 8003) that includes the optional serial number |
GIAI | GIAI (AI 8004) |
GDTI | GDTI (AI 253) that includes the optional serial number |
GSRN | GSRN-Recipient (AI 8018) |
GSRNP | GSRN-Provider (AI 8017) |
CPI | CPID (AI 8010) + CPID SERIAL (AI 8011) |
SGCN | GCN (AI 255) that includes the optional serial number |
GINC | GINC (AI 401) |
GSIN | GSIN (AI 402) |
ITIP | ITIP (AI 8006) + SERIAL (AI 21) |
In addition, to convert one of the above AI combinations to an EPC the application must specify the number of digits in the GS1 Company Prefix embedded within the AI. The methods take an argument to provide this.
public class Gs1ElementString
The Gs1ElementString type exposes the following members.
Name | Description | |
---|---|---|
![]() | Ais | Returns the GS1 Application Identifiers (AIs) in this GS1 Element String. |
![]() | BarCodeCharacters | Returns the string of characters representing this GS1 element string as it would be represented within a bar code. Each AI is represented by the AI number (with no parentheses) followed by the value. Fixed-length AIs come before variable-length AIs, and each variable-length AI except the last is followed by a GS separator character (the character whose code is 29 decimal). |
Name | Description | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() | Equals |
Test equality with another object
(Overrides ObjectEquals(Object)) | ||||||||||||||||||||||||||||
![]() ![]() | FromAis | Constructs a Gs1ElementString instance from the specified AIs. | ||||||||||||||||||||||||||||
![]() ![]() | FromBarCodeCharacters(String) | Constructs a Gs1ElementString instance from the specified bar code representation. In the bar code representation, there are no whitespace characters, and each AI is written as its AI number followed immediately by its value. Each variable length AI except the last must be followed by a GS character (the character whose code is 29 in decimal). | ||||||||||||||||||||||||||||
![]() ![]() | FromBarCodeCharacters(String, Char) | Constructs a Gs1ElementString instance from the specified bar code representation, using a specified separator character for variable-length AIs. In the bar code representation, there are no whitespace characters, and each AI is written as its AI number followed immediately by its value. Each variable length AI except the last must be followed by the specified separator character. The input string may optionally contain a three-character bar code symbology identifier beginning with a right square bracket (]) character. The recognized symbology identifiers are as follows:
| ||||||||||||||||||||||||||||
![]() ![]() | FromHumanReadable | Constructs a Gs1ElementString instnace from the specified human readable representation. | ||||||||||||||||||||||||||||
![]() | GetHashCode |
Returns hash code of current object
(Overrides ObjectGetHashCode) | ||||||||||||||||||||||||||||
![]() | GetHumanReadable | Returns a human-readable string representing this GS1 element string. Each AI is represented by the AI number in parentheses followed by the value. | ||||||||||||||||||||||||||||
![]() | GetType | Gets the Type of the current instance. (Inherited from Object) | ||||||||||||||||||||||||||||
![]() | ToEpc(GcpLengthTable) |
Returns an Epc instance corresponding to the AIs in this GS1 element string
that can be interpreted as an EPC. This element string must contain exactly one set of
AIs that can be interpreted as an EPC, namely one of the following combinations:
| ||||||||||||||||||||||||||||
![]() | ToEpc(Int32) |
Returns an Epc instance corresponding to the AIs in this GS1 element string
that can be interpreted as an EPC. This element string must contain exactly one set of
AIs that can be interpreted as an EPC, namely one of the following combinations:
| ||||||||||||||||||||||||||||
![]() | ToEpc(GcpLengthTable, EpcScheme) |
Returns an Epc instance having the specified EPC scheme, derived
from the corresponding AIs in this GS1 element string.
This element string must contain the AI or AIs corresponding to the specified
EPC scheme as follows:
| ||||||||||||||||||||||||||||
![]() | ToEpc(GcpLengthTable, EpcScheme) | Returns an Epc instance having one of the specified EPC schemes, derived from the corresponding AIs in this GS1 element string. The EPC scheme of the result will be the scheme having the least index in the specified array, such that this element string contains the AI(s) required to construct an EPC of that scheme. This element string may contain other AIs apart from the AI(s) used to construct the result; they are ignored. | ||||||||||||||||||||||||||||
![]() | ToEpc(Int32, EpcScheme) |
Returns an Epc instance having the specified EPC scheme, derived
from the corresponding AIs in this GS1 element string.
This element string must contain the AI or AIs corresponding to the specified
EPC scheme as follows:
| ||||||||||||||||||||||||||||
![]() | ToEpc(Int32, EpcScheme) | Returns an Epc instance having one of the specified EPC schemes, derived from the corresponding AIs in this GS1 element string. The EPC scheme of the result will be the scheme having the least index in the specified array, such that this element string contains the AI(s) required to construct an EPC of that scheme. This element string may contain other AIs apart from the AI(s) used to construct the result; they are ignored. | ||||||||||||||||||||||||||||
![]() | ToRfidUserBank(Boolean) |
Returns an RfidUserBank instance containing some or all of the
AIs in this GS1 element string.
If includeAllAis is true, then all AIs in the element string are included in the result, even AIs that could be converted to an EPC. If includeAllAis is false, then the AI(s) corresponding to an EPC are omitted from the result. AI(s) corresponding to an EPC are one of the following combinations:
Equivalently, ToRfidUserBank(false) returns an RfidUserBank instance that includes all AIs except the AIs that would be included in the result of ToEpc(gcpLength), if the latter method would not raise an exception due to having more than one candidate EPC. | ||||||||||||||||||||||||||||
![]() | ToRfidUserBank(EpcScheme) |
Returns an RfidUserBank instance containing the
AIs in this GS1 element string except for the AI(s)
corresponding to the specified EPC scheme.
This element string must contain the AI or AIs corresponding to the specified
EPC scheme as follows:
| ||||||||||||||||||||||||||||
![]() | ToRfidUserBank(EpcScheme) |
Returns an RfidUserBank instance containing the
AIs in this GS1 element string except for the AI(s)
corresponding to one of the specified EPC schemes. The AI(s) omitted from the result
will be those corresponding to the EPC scheme having the least index in the specified array,
such that this element
string contains the AI(s) required to construct an EPC of that scheme.
Equivalently, ToRfidUserBank(preferredSchemes) returns an RfidUserBank instance that includes all AIs except the AI(s) that would be included in the result of toEpc(preferredSchemes), if the latter method would not raise an exception. | ||||||||||||||||||||||||||||
![]() | ToString | Returns a string that represents the current object. (Inherited from Object) |
Name | Description | |
---|---|---|
![]() ![]() | GS1_AI_DATA_FORMAT_NUMBER | The ISO Data Format number for GS1 AIs. |
![]() ![]() | GS1_AI_ROOT_OID | The root OID for GS1 AIs: {1 0 15961 9} (urn:oid:1.0.15961.9) |