Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,24 @@ Fw::Time StartupManager ::get_uptime() {
return time;
}

void StartupManager ::sequenceStarted_handler(FwIndexType portNum, const Fw::StringBase& fileName) {
// Reads in the file name of the start-up sequence from the sequenceStarted port and logs it.
this->m_sequence_file = fileName;
}

void StartupManager ::completeSequence_handler(FwIndexType portNum,
FwOpcodeType opCode,
U32 cmdSeq,
const Fw::CmdResponse& response) {
// Respond to the completion status of the start-up sequence
if (response == Fw::CmdResponse::OK) {
this->log_ACTIVITY_LO_StartupSequenceFinished();
} else {
this->log_WARNING_LO_StartupSequenceFailed(response);
// Emits a log event indicating the completion of the start-up sequence, and whether it was successful or not
// based on the information in m_sequence_file and the command response.

if (this->m_sequence_file == "//seq/startup.bin") {
if (response == Fw::CmdResponse::OK) {
this->log_ACTIVITY_LO_StartupSequenceFinished();
} else {
this->log_WARNING_LO_StartupSequenceFailed(response);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ module Components {
@ Port for receiving the status of the start-up sequence
sync input port completeSequence: Fw.CmdResponse

@ Port for receiving the indication that the start-up sequence has started
sync input port sequenceStarted: Svc.CmdSeqIn

@ Command to wait for system quiescence before proceeding with start-up
sync command WAIT_FOR_QUIESCENCE()

Expand All @@ -23,7 +26,8 @@ module Components {
telemetry QuiescenceEndTime: Fw.TimeValue update on change

@ Event emitted when getting boot count
event CurrentBootCount(i: I64) severity activity low format "Current boot count: {}"
event CurrentBootCount(i: I64) severity activity low \
format "Current boot count: {}"

@ Event emitted when failing to update the boot count file
event BootCountUpdateFailure() severity warning low \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ class StartupManager final : public StartupManagerComponentBase {
const Fw::CmdResponse& response //!< The command response argument
) override;

//! Handler implementation for sequenceStarted
void sequenceStarted_handler(FwIndexType portNum, //!< The port number
const Fw::StringBase& fileName //!< The file path for start-up sequence
) override;

//! Handler implementation for run
//!
//! Check RTC time diff
Expand Down Expand Up @@ -98,6 +103,7 @@ class StartupManager final : public StartupManagerComponentBase {
FwSizeType m_boot_count; //!< Current boot count
U32 m_stored_sequence; //!< Stored sequence number for delayed response
std::atomic<bool> m_waiting; //!< Indicates if waiting for quiescence
Fw::String m_sequence_file; //!< The filepath for the sequence last initiated
};

} // namespace Components
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ module ReferenceDeployment {
loraRetry.comStatusOut -> downlinkDelay.comStatusIn
downlinkDelay.comStatusOut ->ComCcsdsLora.framer.comStatusIn


startupManager.runSequence -> cmdSeq.seqRunIn
cmdSeq.seqStartOut -> startupManager.sequenceStarted
cmdSeq.seqDone -> startupManager.completeSequence

modeManager.runSequence -> safeModeSeq.seqRunIn
Expand Down
Loading