Click or drag to resize

Gs1ElementStringToEpc(GcpLengthTable, EpcScheme) Method

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:
EPC SchemeAIs
SGTINGTIN (AI 01) + SERIAL (AI 21)
SSCCSSCC (AI 00)
SGLNGLN (AI 414), with or without GLN Extension (AI 254)
GRAIGRAI (AI 8003) that includes the optional serial number
GIAIGIAI (AI 8004)
GDTIGDTI (AI 253) that includes the optional serial number
GSRNGSRN-Recipient (AI 8018)
GSRNPGSRN-Provider (AI 8017)
CPICPID (AI 8010) + CPID SERIAL (AI 8011)
SGCNGCN (AI 255) that includes the optional serial number
GINCGINC (AI 401)
GSINGSIN (AI 402)
ITIPITIP (AI 8006) + SERIAL (AI 21)
This element string may contain other AIs; they are ignored.

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(
	GcpLengthTable gcpLengthTable,
	EpcScheme scheme
)

Parameters

gcpLengthTable  GcpLengthTable
Table from which to infer the length of the GS1 Company Prefix from the information in the specified length table
scheme  EpcScheme
The desired EPC scheme

Return Value

Epc
Exceptions
ExceptionCondition
Gs1Exception if this element string does not contain the AI(s) required to create an EPC of the specified scheme.
UnknownGcpLengthException if the GS1 Company Prefix length could not be inferred
See Also