Click or drag to resize

Gs1ElementStringToEpc(Int32) Method

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:
  • GTIN (AI 01) + SERIAL (AI 21)
  • SSCC (AI 00)
  • GLN (AI 414)
  • GLN (AI 414) + GLN Extension (AI 254)
  • GRAI (AI 8003) that includes the optional serial number
  • GIAI (AI 8004)
  • GDTI (AI 253) that includes the optional serial number
  • GSRN-Recipient (AI 8018)
  • GSRN-Provider (AI 8017)
  • CPID (AI 8010) + CPID SERIAL (AI 8011)
  • GCN (AI 255) that includeds the optional serial number
This element string may contain other AIs, but not more than one of the combinations listed above.

Namespace: GS1.EPC.Api
Assembly: epc-epconly (in epc-epconly.dll) Version: 2.1.0.28145 (2.1.0.0)
Syntax
C#
public virtual Epc ToEpc(
	int gcpLength
)

Parameters

gcpLength  Int32
The length of the GS1 Company Prefix contained within the AI to be converted to an EPC

Return Value

Epc
Exceptions
ExceptionCondition
Gs1Exception if this element string contains none of the AI combinations listed above, or contains more than one such combination.
See Also