Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.2.6.3 OSI trace file example: Bug in script #856

Open
localhorst87 opened this issue Feb 21, 2025 · 1 comment
Open

2.2.6.3 OSI trace file example: Bug in script #856

localhorst87 opened this issue Feb 21, 2025 · 1 comment

Comments

@localhorst87
Copy link

localhorst87 commented Feb 21, 2025

Just a minor thing: In the example how to generate a trace file from scratch, using python in 2.2.6.3 of the documentation, the following section is creating timestamps that violate the given rules:

# Increment the time
if sv_ground_truth.timestamp.nanos > 1000000000:
   sv_ground_truth.timestamp.seconds += 1
   sv_ground_truth.timestamp.nanos = 0
sv_ground_truth.timestamp.nanos += NANO_INCREMENT

It generates two timestamps each second where the nanos are equal or higher than 1e9.

The section can be rewritten to

# Increment the time
sv_ground_truth.timestamp.nanos += NANO_INCREMENT
if sv_ground_truth.timestamp.nanos > 999999999:
   sv_ground_truth.timestamp.seconds += 1
   sv_ground_truth.timestamp.nanos = 0

to work as expected.

@thomassedlmayer
Copy link
Contributor

See #842.

Some time ago (I don't remember who was involved in the discussion) we thought about removing the example code from the documentation completely, as it is not up to date and apparently not even correct. For writing/reading trace files it is planned to refer to reference implementations of such tools (osi3trace, asam-osi-utilities). This will probably be discussed in the next OSI maintenance project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants