Added timestamp struct based vspec, and posix timestamp as unit (#1)#884
Added timestamp struct based vspec, and posix timestamp as unit (#1)#884ali-momin12 wants to merge 4 commits intoCOVESA:masterfrom
Conversation
ali-momin12
commented
Mar 2, 2026
- Added timestamp struct based vspec, and nanosecond as unit in units.yaml
- This change is a pre-requisite to the issue 878 which then as all the concerned stakeholders agreed upon as an enhancement in vss-tools (an upcoming PR in vss-tools repo)
9be1917 to
170f206
Compare
|
At least for me the diff seems a bit strange, only highlighting changes already on master. I think I have seen similar results in the past sometimes when there have been a merge/rebase on the source branch which makes github confused. Not sure if a rebase and force push of source/head branch can help |
Apologies for the confusion due to rebase (i was getting the DCO check failed due to one commit not being signed off and after rebasing, the confusion happened) I have fixed this, kindly review whenever you can. thanks. |
spec/include/Timestamp.vspec
Outdated
|
|
||
| # | ||
| # Identifier | ||
| # Based on OAuth 2.0. Subject is the UserID inside the claim of the Issuer Domain. |
There was a problem hiding this comment.
This is a copy paste error, right?
|
Thanks for the PR, we will bring it up at the next VSS meeting. As this would be the first time we would enter datatypes to the standard catalog (even if not used for any signal in catalog) we need to align on how to handle it. I would like to see that the file actually is used in tests, and one potential idea is to create a file If we would do it like that we could extend our |
spec/include/Timestamp.vspec
Outdated
| # Based on OAuth 2.0. Subject is the UserID inside the claim of the Issuer Domain. | ||
| # | ||
|
|
||
| Time_t: |
There was a problem hiding this comment.
Why the _t suffix? Because of the posix C header? I would just name it Timestamp.
spec/include/Timestamp.vspec
Outdated
| type: struct | ||
| description: A point in time | ||
|
|
||
| Time_t.t_sec: |
There was a problem hiding this comment.
The t_ prefix also seems unnecessary. What about seconds and nanos?
spec/include/Timestamp.vspec
Outdated
| type: property | ||
| unit: unix-time | ||
| datatype: int64 # seconds (may use sentinel negative values) | ||
| description: time measured in seconds |
There was a problem hiding this comment.
Maybe a hint to Unix time? If that's what we even want to express?
Something like "Unix epoch seconds"
spec/include/Timestamp.vspec
Outdated
| type: property | ||
| unit: ns | ||
| datatype: int64 # nanoseconds in [0, 1e9] | ||
| description: time measured in nanoseconds |
There was a problem hiding this comment.
"Nanosecond offset" maybe?
Based on COVESA/vss-tools#484 we now require unique unit names. This gives problems here. We could alternatively remove the old mpg unit. Signed-off-by: Erik Jaegervall <erik.jaegervall@se.bosch.com> Signed-off-by: Ali Momin <ali_momin@jp.honda>
Signed-off-by: Ali Momin <ali_momin@jp.honda>
Signed-off-by: Ali Momin <ali_momin@jp.honda>
Updates done to timestamp.vspec contents as per the feedback. --------- Signed-off-by: Ali Momin <ali_momin@jp.honda>
51ecedc to
effbca6
Compare
| Timestamp.nanoseconds: | ||
| type: property | ||
| unit: ns | ||
| datatype: int64 # nanoseconds in [0, 1e9] |
There was a problem hiding this comment.
I am not a math expert, but shall range possibly be described as [0, 1e9), i.e. max value is 999999999 nanoseconds.
We support min/max also for properties, found this example in vss-tools, so possibly we could specify min and max explicitly. Technically a uint32 would suffice right? is int64 proposed because some other framework or std definition use int64 for the nanosecond part.
NestedStruct.x:
type: property
description: "x property"
datatype: double
min: -10
NestedStruct.y:
type: property
description: "y property"
datatype: double
max: 10
|
MoM:
|
|
Agreed that it should be in the type tree |