Gs1ElementStringToRfidUserBank(Boolean) Method |
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:
- 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 includes the optional serial number
- ITIP (AI 8006) + SERIAL (AI 21)
If this element string contains none of the above combinations, then all AI(s) are
included in the result. If this element string contains exactly one of the above
combinations, then that combination is omitted from the result and all other AI(s)
are included. If this element string contains two or more of the above combinations,
then a
Gs1Exception is thrown.
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.
Namespace: GS1.EPC.ApiAssembly: epc-epconly (in epc-epconly.dll) Version: 2.1.0.28145 (2.1.0.0)
Syntaxpublic virtual RfidUserBank ToRfidUserBank(
bool includeAllAis
)
Parameters
- includeAllAis Boolean
- If true, include all AIs in this element string in the result.
If false, include all AIs except an AI combination that can be converted
to an EPC, or raise a Gs1Exception if this element string includes
two or more such combinations.
Return Value
RfidUserBank
ExceptionsException | Condition |
---|
Gs1Exception | if includeAllAis is false and this element string
contains two or more of the AI combinations listed above.
|
See Also