Skip to content

Conversation

@ineskhou
Copy link
Contributor

@ineskhou ineskhou commented Nov 27, 2025

Create New Router With Command Loss

Description

New Router

Created a component called ComCcsdsLora in order to replace the FramingSubtopology from lib/fprime. The module defines a Subtopology matching the original FramingSubtopology structure. The topology now imports ComCcsdsLora.Subtopology instead of ComCcsds.FramingSubtopology.

. To keep custom code out of lib/fprime, ComCcsdsLora follows the ComCcsdsUart pattern: it uses ComCcsds::Allocation::memAllocator from lib/fprime's Svc_Subtopologies_ComCcsds_ComCcsdsConfig dependency, includes the same headers (ComCcsdsConfig/ComCcsdsSubtopologyConfig.hpp and Svc/Subtopologies/ComCcsds/ComCcsdsConfig/FppConstantsAc.hpp), and is registered as an INTERFACE module. )

Later, we will want to do this with the S Band Radio and remove the UART connectoins!!

###Command Loss Time

The component tracks the time since the last command via a periodic scheduler (schedIn). When the elapsed time exceeds the configurable LOSS_MAX_TIME parameter (default 3 days), it emits a CommandLossTimeExpired event and sends a SafeModeOn signal to the safe mode port.

The implementation supports both RTC and monotonic time sources with separate persistent files (loss_max_time.txt and loss_max_time_monotonic.txt), automatically detects time source switches (e.g., RTC fault reverting to monotonic), and updates the right file. It does depend on the file system to persit accross boots.

The last command time is persisted across boots and only overwritten when commands are received or when the file contains invalid data (e.g., zero values from uninitialized RTC).

Also telemetry channels LastCommandPacketTime, CommandLossSafeOn to check if events are missed in the health telemerey channel

Related Issues/Tickets

Closes #107

How Has This Been Tested?

  • Unit tests
  • Integration tests
  • Z Tests
  • Manual testing (describe steps)

Running with manual testing across reboots with a time set to 10 seconds

we shoudl do tests for the time we want the command loss time to persist and with more reboot and more swithcing between monotonic and RTC

ALso should get intergraiton tests in

Screenshots / Recordings (if applicable)

image image

Checklist

  • Written detailed sdd with requirements, channels, ports, commands, telemetry defined and correctly formatted and spelled
  • Have written relevant integration tests and have documented them in the sdd
  • Have done a code review with
  • Have tested this PR on every supported board with correct board definitions

Further Notes / Considerations

@ineskhou ineskhou self-assigned this Nov 27, 2025
@ineskhou ineskhou requested a review from yudataguy November 27, 2025 22:37
@ineskhou ineskhou moved this to In progress in v0.1-v0.3 Nov 30, 2025
@nateinaction nateinaction added this to the New Software Freeze milestone Nov 30, 2025
@ineskhou ineskhou removed the status in v0.1-v0.3 Dec 2, 2025
@Mikefly123 Mikefly123 moved this to In review in v0.1-v0.3 Dec 3, 2025
@ineskhou ineskhou removed this from v0.1-v0.3 Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Command Loss Time Component

5 participants