Closed RalphTro closed 3 years ago
In this file there are a lot of events. I guess we should ensure that:
~event 1 and 2 get the same hash (they currently dont)~ event 1 and 2 may be based on the same measurements, but at different aggregation levels
[x] all other events should be distinct (there currently is a collission)
anything else?
The collision was due to the first example event already being present in another example file. I have deleted the other one.
Now https://github.com/gs1/EPCIS/blob/master/XSD/SensorDataExamples.xml is part of the tests. https://github.com/RalphTro/epcis-event-hash-generator/commit/389e4c351b22f6b8d5772c503f8ceb3ee0797691
@RalphTro the prehashes are in https://github.com/RalphTro/epcis-event-hash-generator/blob/master/tests/examples/SensorDataExamples.prehashes
Anything in particular that you are looking for?
Dear @Echsecutor ,
Thanks a lot for this! I just checked the pre-hash string of the last transformation event and came only across three issues:
(a) the user extensions in the errorDeclaration element do not yet appear. Namely:
Ah, many thanks for pointing that out! Indeed, our way of providing an explicit list with the ordering of elements to be included into the hash string leads to elements not appearing in this list to be ignored. I will change the algorithm such as to include also those unknown fields
@RalphTro after reading 19. a few times, I still want to make sure:
right?
Dear @Echsecutor , with regard to the second bullet point: correct
Regarding the first one and just to prevent any misunderstanding :-): What do you mean with "...before the namespace before the key"? If you consider a standard field with an extension point a "mother element " and the latter conveys a user extension, then yes: when concatenating its content to the pre-hash string, we first need to indicate the mother element (let's say "readPoint"), followed by the respective keys or key value pairs (where all keys are always prefixed with their namespace) - depending of whether it is a complex or ordinary element.
So, concatenation in this case works similarly as with e.g. event-level extensions - the only difference is that the entire sub-string needs to be singularly prefixed with the mother/standard element's name.
Was I able to answer your question? ;-)
If you think that the wording of #19 should be improved, please let me know!
Many thanks! I think I got it. ;)
I suggest that we test the correct concatenation of all kind of user extensions that can appear as part of an EPCIS event. For that purpose, I prepared an EPCIS event which IMO should illustrate all areas in which it is possible to insert user extensions, see #12 in https://github.com/gs1/EPCIS/blob/master/XSD/SensorDataExamples.xml: