Utilities¶
- epc.utils.decode_epc(hex_string)¶
Attempt to decode a hex string to an EPC tag. Returns a tag object if successful.
- Parameters
epc (str) – Hexadecimal EPC tag data
- Raises
NotImplementedError – Unable to determine tag encoding.
NotImplementedError – Scheme not implemented for tag.
- Returns
EPC tag object
- Return type
object
- epc.utils.get_epc_encoding(hex_string)¶
Determine the encoding used on the provided tag.
- Parameters
epc (str) – Hexadecimal EPC tag data
- Raises
LookupError – Unable to match encoding.
- Returns
Matching EPC scheme
- Return type
class
- epc.utils.barcode.decode_barcode(barcode_string, company_prefix_length)¶
Attempt to decode a barcode to an EPC tag. Returns a tag object if successful.
- Parameters
barcode_string (str) – Barcode data
company_prefix_length (int) – Number of digits in the company prefix
- Raises
NotImplementedError – Unable to determine tag encoding.
NotImplementedError – Scheme not implemented for barcode.
- Returns
EPC tag object
- Return type
object