Open rG2ee opened 2 years ago
Maybe this helps: GS1 Tag Data Standard Line 2363 starts a whole chapter on filter values.
Maybe you can deduct filter values form binary values.
You already provide the filter value in one of your functions.
In pyepc/epc.py: Patching SGTIN 96-bit (line 554-560) and SGTIN 198-bit (line 583-589):
return cls(
company_prefix,
indicator,
item_ref,
utils.decode_integer(serial),
default_filter_value=str(int(filter_value, 2))
)
These two additional lines fix the issue. The question is if it breakes other things. (in this case one may use a different variable than default_filter_value
).
If it's ok for you, I would create a PR and write some tests.
I think it's ok to set the default_filter_value with the filter_value that was decoded from an SGTIN.
Do you want to send a pull request for this? If yes, please include a test case.
Hello, this is more like a question rather than an issue. I tried
So the third bit is reserved for filtering. Is there a way to access the filter from an encoded epc like this:
Every other attribute is stored on the instance but I haven't found the filter.
Thanks in advance!