Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FpySequencer 0.1 #3334

Open
wants to merge 40 commits into
base: devel
Choose a base branch
from
Open

Conversation

zimri-leisher
Copy link
Collaborator

@zimri-leisher zimri-leisher commented Mar 5, 2025

Related Issue(s) #3023
Has Unit Tests (y/n) WIP
Documentation Included (y/n) WIP

Change Description

The 0.1 version of the FpySequencer, which replicates the functionality of the existing CmdSequencer component.
Features:

  • Dispatching arbitrary commands
  • Absolute and relative delays between commands
  • Configurable timeout
  • Cancelling sequences
  • Validating and running as separate commands
  • Blocking/non-blocking running of sequences

It uses FPP state machines extensively.
~1300 lines of CPP
~550 lines of FPP

Rationale

This is the first part of the roadmap for the implementation of the advanced sequencing language.

Zimri Leisher and others added 30 commits November 25, 2024 16:39
this->sequencer_sendSignal_statementResponseIn(
FpySequencer_StatementResponse(m_runtime.currentStatementOpcode, Fw::CmdResponse::OK));
}
} // namespace Svc

Check warning

Code scanning / CppCheck

Could not find a newline character at the end of the file. Warning

Could not find a newline character at the end of the file.
return m_goalState == FpySequencer_GoalState::RUNNING;
}

} // namespace Svc

Check warning

Code scanning / CppCheck

Could not find a newline character at the end of the file. Warning

Could not find a newline character at the end of the file.
return true;
}

} // namespace Svc

Check warning

Code scanning / CppCheck

Could not find a newline character at the end of the file. Warning

Could not find a newline character at the end of the file.
return this->m_bufferData;
}

bool StatementArgBuffer::operator==(const StatementArgBuffer& other) const {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had to make another one of these Bufs cuz none of the other ones were usable in an fpp struct

<channel name="Ref.cmdSeq.CS_CancelCommands"/>
<channel name="Ref.cmdSeq.CS_CommandsExecuted"/>
<channel name="Ref.cmdSeq.CS_SequencesCompleted"/>
<channel name="Ref.fpySeq.SequencesCompleted"/>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added to ref topo for now, down to discuss

@@ -102,6 +102,10 @@ module Ref {
stack size Default.STACK_SIZE \
priority 96

instance fpySeq: Svc.FpySequencer base id 0x1200 \
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo delete old seq

result = dispatchCommand(nextStatement);
}

m_runtime.statementIndex++;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to indicate this is the next statement idx


Fw::Time currentTime = getTime();

if (currentTime.getTimeBase() != m_runtime.wakeupTime.getTimeBase()) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment explaining what has happened... tb changed

void FpySequencer::directive_waitAbs_internalInterfaceHandler(const Svc::FpySequencer_WaitAbsDirective& directive) {
m_runtime.wakeupTime = directive.getwakeupTime();
}
} // namespace Svc

Check warning

Code scanning / CppCheck

Could not find a newline character at the end of the file. Warning

Could not find a newline character at the end of the file.
StatementArgBuffer::~StatementArgBuffer() {
}

StatementArgBuffer::StatementArgBuffer(const StatementArgBuffer& other) : Fw::SerializeBufferBase() {

Check warning

Code scanning / CppCheck

Member variable 'StatementArgBuffer::m_bufferData' is not assigned in the copy constructor. Should it be copied? Warning

Member variable 'StatementArgBuffer::m_bufferData' is not assigned in the copy constructor. Should it be copied?
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@zimri-leisher zimri-leisher changed the title [DRAFT] FpySequencer 0.1 FpySequencer 0.1 Mar 12, 2025
elif type_name == "Fw::Time":
return 11
elif type_name == "Fw::TimeInterval":
return 8
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need a more permanent solution for this.

@zimri-leisher
Copy link
Collaborator Author

@LeStarch can you add everyone who you think should review this PR?

// Construction, initialization, and destruction
// ----------------------------------------------------------------------

FpySequencer ::FpySequencer(const char* const compName) : FpySequencerComponentBase(compName) {}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO construct member types here

FwEnumStoreType m_allocatorId;

// assigned by the user via cmd
Fw::String m_sequenceFilePath;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo consider putting validation state items inside a Validation struct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant