Add FW_TIME_BASE_DEFAULT constant to dict#5401
Conversation
Coverage report — base
|
| Module | Line | Δ | Function | Δ | Branch | Δ |
|---|---|---|---|---|---|---|
Fw/DataStructures |
98.30 | +0.09 | 96.95 | -0.19 | 83.03 | +0.19 |
Os/Generic |
89.29 | +0.13 | 88.16 | +0.00 | 73.11 | +0.00 |
Os/Generic/Types |
92.39 | +0.36 | 92.86 | +0.00 | 73.33 | +0.95 |
Modules without UTs
CFDP/Checksum/GTest, Drv/ByteStreamDriverModel, Drv/Interfaces, Drv/LinuxGpioDriver, Drv/LinuxI2cDriver, Drv/LinuxSpiDriver, Drv/LinuxUartDriver, Drv/Ports, Drv/Ports/DataTypes, FppTestProject/FppTest/interfaces, FppTestProject/FppTest/topology/async, FppTestProject/FppTest/topology/components/Comp, FppTestProject/FppTest/topology/components/Framework, FppTestProject/FppTest/topology/components/Receiver, FppTestProject/FppTest/topology/components/Sender, FppTestProject/FppTest/topology/guarded, FppTestProject/FppTest/topology/ports, FppTestProject/FppTest/topology/sync, FppTestProject/FppTest/topology/top_ports, FppTestProject/FppTest/topology/types, Fw/Cmd, Fw/Com, Fw/Comp, Fw/FilePacket/GTest, Fw/Fpy, Fw/Interfaces, Fw/Obj, Fw/Port, Fw/Ports/CompletionStatus, Fw/Ports/Ready, Fw/Ports/Signal, Fw/Ports/SuccessCondition, Fw/Prm, Fw/SerializableFile/test/TestSerializable, Fw/Sm, Fw/Test, Fw/Types/GTest, Os/Models, Svc/Cycle, Svc/DpPorts, Svc/Fatal, Svc/FatalHandler, Svc/FileDownlinkPorts, Svc/FprimeProtocol, Svc/Interfaces, Svc/PassiveConsoleTextLogger, Svc/Ping, Svc/PolyIf, Svc/Ports/CommsPorts, Svc/Ports/FilePorts, Svc/Ports/OsTimeEpoch, Svc/Ports/TlmPacketizerPorts, Svc/Ports/VersionPorts, Svc/Sched, Svc/Seq, Svc/Subtopologies/CdhCore, Svc/Subtopologies/ComCcsds, Svc/Subtopologies/ComFprime, Svc/Subtopologies/ComLoggerTee, Svc/Subtopologies/DataProducts, Svc/Subtopologies/DpCompression, Svc/Subtopologies/FileHandling, Svc/Types/TlmPacketizerTypes, Svc/WatchDog, TestDeploymentsProject/Ref/PingReceiver, TestDeploymentsProject/Ref/RecvBuffApp, TestDeploymentsProject/Ref/SendBuffApp, TestDeploymentsProject/Ref/Top, TestDeploymentsProject/Ref/TypeDemo, cmake/test/data/TestDeployment/TestBuildAutocoder, cmake/test/data/TestDeployment/TestChainedAutocoder, cmake/test/data/TestDeployment/TestHeaderAutocoder, cmake/test/data/TestDeployment/TestTargetAutocoder, cmake/test/data/test-fprime-library/TestLibrary/TestComponent, cmake/test/data/test-fprime-library2/TestLibrary2/TestComponent
| @@ -94,3 +94,6 @@ dictionary enum TimeBase : FwTimeBaseStoreType { | |||
| TB_SC_TIME = 3, @< Time as reported by the spacecraft clock. | |||
| TB_DONT_CARE = 0xFFFF @< Don't care value for sequences. If FwTimeBaseStoreType is changed, value should be changed (Required) | |||
| } default TB_NONE; | |||
There was a problem hiding this comment.
Should we use the value as the actual default of the TimeBase enum?
There was a problem hiding this comment.
I thought about this for a while. I decided against it, because I think they're doing two unrelated things. One is configuring what the default ground software option for TIME_BASE should be. The other is configuring what the default value should be when you construct this enum, and I just don't think those are necessarily the same thing.
There was a problem hiding this comment.
ah I see - I did not catch that nuance. thanks
There was a problem hiding this comment.
would be worth clarifying in the docstring not to confuse the next reader :D
There was a problem hiding this comment.
That's fair, I can clarify that!
Change Description
Rationale
Allows ground data tools not to guess when choosing a default time base. Saves a decent bit of time for anyone who has to manually input times again and again. This was present in Fpy, users have to pass TB_WORKSTATION_TIME to the
time()function again and again when constructing ISO 8601 dates.AI Usage (see policy)
None