Added an additional conversion function #584

Merged
gaisser merged 15 commits from eive/fsfw:mueller/clock-addition into development 2022-04-25 15:22:15 +02:00
Owner
  • timeval to TimeOfDay_t
  • Added Mutex for gmtime calls: (compare http://www.opengate.at/blog/2020/01/timeless/)
  • Moved the statics used by Clock in ClockCommon.cpp to this file.
  • Introduced better check for leapSeconds
  • Added Unittests for Clock (only getter)
  • Added Unittests for timevalOperations
  • Applied clang format.
- timeval to TimeOfDay_t - Added Mutex for gmtime calls: (compare http://www.opengate.at/blog/2020/01/timeless/) - Moved the statics used by Clock in ClockCommon.cpp to this file. - Introduced better check for leapSeconds - Added Unittests for Clock (only getter) - Added Unittests for timevalOperations - Applied clang format.
muellerr added 1 commit 2022-03-22 17:55:45 +01:00
fsfw/fsfw/pipeline/pr-development This commit looks good Details
9ce59d3c75
added an additional conversion function
- timeval to TimeOfDay_t
muellerr requested review from gaisser 2022-03-22 17:55:58 +01:00
muellerr added this to the v5.0.0 milestone 2022-03-22 17:56:00 +01:00
gaisser requested changes 2022-03-24 16:55:53 +01:00
Dismissed
gaisser left a comment
Owner

Can you replace calls to:

ReturnValue_t CCSDSTime::convertTimevalToTimeOfDay(Clock::TimeOfDay_t* to, timeval* from)

with this function and remove the CCSDSTime one? Afterwards it would be very easy to add an unittest. (If you don't have time I can do that).

I'm not sure about gmtime being available in any case. Some recommend gmtime_s but this seems to be broken at least for Windows (inverse parameter order) or unavailable in some cases.

See https://en.cppreference.com/w/c/chrono/gmtime

Can you replace calls to: ``` c++ ReturnValue_t CCSDSTime::convertTimevalToTimeOfDay(Clock::TimeOfDay_t* to, timeval* from) ``` with this function and remove the CCSDSTime one? Afterwards it would be very easy to add an unittest. (If you don't have time I can do that). I'm not sure about gmtime being available in any case. Some recommend gmtime_s but this seems to be broken at least for Windows (inverse parameter order) or unavailable in some cases. See https://en.cppreference.com/w/c/chrono/gmtime
muellerr added 1 commit 2022-03-25 13:34:09 +01:00
fsfw/fsfw/pipeline/pr-development This commit looks good Details
7ffb4107d2
added missing docs
muellerr added 1 commit 2022-03-25 13:34:39 +01:00
fsfw/fsfw/pipeline/pr-development There was a failure building this commit Details
7095999bd2
remove CCSDSTime function
Author
Owner

Hmm I didn't even see that there already is an (empty) implementation. Would have been interesting to see why this is tricky according to the comment. I implemented the suggestions and added an informative comment about the Windows CRT incompatibility. Theoretically shouldn't be an issue since gmtime_s is not used.

It would be great if you could add unittests :)

Hmm I didn't even see that there already is an (empty) implementation. Would have been interesting to see why this is tricky according to the comment. I implemented the suggestions and added an informative comment about the Windows CRT incompatibility. Theoretically shouldn't be an issue since `gmtime_s` is not used. It would be great if you could add unittests :)
muellerr added 1 commit 2022-03-25 13:41:37 +01:00
fsfw/fsfw/pipeline/pr-development There was a failure building this commit Details
59ab54b2fb
call corrections
muellerr added 1 commit 2022-03-25 13:42:50 +01:00
fsfw/fsfw/pipeline/pr-development This commit looks good Details
d0fec93dc3
argument order inversion
gaisser changed title from added an additional conversion function to WIP: dded an additional conversion function 2022-03-25 18:39:32 +01:00
gaisser changed title from WIP: dded an additional conversion function to WIP: added an additional conversion function 2022-03-25 18:39:39 +01:00
gaisser added 1 commit 2022-03-25 18:48:18 +01:00
fsfw/fsfw/pipeline/pr-development This commit looks good Details
10398855a9
Added more unittest coverage
Added Mutex for gmtime functions
Moved Statics used in ClockCommon to ClockCommon
gaisser added 1 commit 2022-03-25 18:49:09 +01:00
fsfw/fsfw/pipeline/pr-development This commit looks good Details
665d8cd479
Applied clang format
gaisser dismissed gaisser’s review 2022-03-25 18:51:20 +01:00
Reason:

I wrote some of the code myself

gaisser requested review from mohr 2022-03-25 18:52:03 +01:00
gaisser changed title from WIP: added an additional conversion function to Added an additional conversion function 2022-03-25 18:53:17 +01:00
gaisser added 1 commit 2022-03-28 14:51:27 +02:00
fsfw/fsfw/pipeline/pr-development This commit looks good Details
631a531212
Merge branch 'development' into mueller/clock-addition
gaisser added 1 commit 2022-03-28 15:18:14 +02:00
fsfw/fsfw/pipeline/pr-development This commit looks good Details
0b3255e463
Fixed tests
gaisser approved these changes 2022-03-28 15:35:06 +02:00
gaisser left a comment
Owner

(My review is subjective as I have written parts of this code.)

(My review is subjective as I have written parts of this code.)
gaisser added 1 commit 2022-03-28 15:46:03 +02:00
fsfw/fsfw/pipeline/pr-development This commit looks good Details
a887f852c8
Merge branch 'development' into mueller/clock-addition
gaisser added 2 commits 2022-03-28 18:33:43 +02:00
fsfw/fsfw/pipeline/pr-development This commit looks good Details
b4effe7a46
Clang format
gaisser added a new dependency 2022-03-28 21:27:05 +02:00
gaisser added the
bug
Breaking API Change
labels 2022-04-25 14:51:59 +02:00
mohr refused to review 2022-04-25 14:53:44 +02:00
muellerr added 1 commit 2022-04-25 14:54:28 +02:00
fsfw/fsfw/pipeline/pr-development This commit looks good Details
ff98c42514
Merge branch 'development' into mueller/clock-addition
muellerr added 1 commit 2022-04-25 15:10:57 +02:00
fsfw/fsfw/pipeline/pr-development This commit looks good Details
29015b340b
update changelog
gaisser added 1 commit 2022-04-25 15:12:33 +02:00
fsfw/fsfw/pipeline/pr-development This commit looks good Details
ac5a54b5da
Merge branch 'development' into mueller/clock-addition
gaisser merged commit b8516b15cb into development 2022-04-25 15:22:15 +02:00
gaisser deleted branch mueller/clock-addition 2022-04-25 15:22:17 +02:00
gaisser added the
feature
label 2022-04-25 15:29:14 +02:00
Sign in to join this conversation.
No description provided.