y-scope / yscope-log-viewer

A tool that can be used to view logs compressed in CLP's IR Stream format.
Apache License 2.0
11 stars 12 forks source link

Add support for IR format protocol version 0.0.2 except for gracefully ignoring UtcOffsetChange packets #47

Closed Henry8192 closed 4 months ago

Henry8192 commented 4 months ago

References

clp UtcOffsetChange PR

Description

As mentioned in the reference, clp now has a UtcOffsetChange packet in its IR stream. This PR ignores this packet so that log viewer won't give out errors when opening this format.

To properly handle this, a TIMESTAMP_UTC_OFFSET_CHANGE tag is added to PROTOCOL.js with value 0x3F. TIMESTAMP_NULL and TIMESTAMP_NULL_VAL are removed accordingly because:

  1. No one is currently using these variables;
  2. The current value of TIMESTAMP_NULL conflicts with the new value TIMESTAMP_UTC_OFFSET_CHANGE.

Then in FourByteClpIrStreamReader.js, _readLogEvent catches TIMESTAMP_UTC_OFFSET_CHANGE tag and then drop the 64 bit packet.

Validation performed