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

Swap regCommands() and configTopology + Move Buffmgr and Framing setup to front #208

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

Lex-ari
Copy link
Contributor

@Lex-ari Lex-ari commented Jul 2, 2024

Related Issue(s) nasa/fprime#2791
Has Unit Tests (y/n) n
Documentation Included (y/n) n

Change Description

Swap regCommands() and configureTopology() in Topology.cpp
Move BufferManager Setup and Framing/Deframing setup to front in configureTopology() in Topology.cpp

Rationale

  • Registering commands also generates events as a byproduct. In a hub pattern implementation connected to eventLogging, the hub will assert since it tries to handle the events before configureTopology() is called (and the bufferManager is not setup).

  • There may be other similar implementations from other projects that require a more specific setup before their components are ready to handle commands and events.

  • Have not found a use case to handle commands before the system setup is completed.

  • BufferManager and Framing/Deframing should be setup before readParamFile() is called. This also sends an event and the hub would assert before the bufferManager and deframer is setup.

Testing/Review Recommendations

CI to ensure standard projects are working correctly

CC: @timcanham @LeStarch @bocchino @Joshua-Anderson

Copy link
Contributor

@thomas-bc thomas-bc left a comment

Choose a reason for hiding this comment

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

The code change itself LGTM. I'll let @LeStarch confirm this is something we want to change

@thomas-bc thomas-bc requested a review from LeStarch July 2, 2024 17:59
@timcanham
Copy link
Collaborator

LGTM to me too. Order shouldn't matter.

Copy link
Collaborator

@LeStarch LeStarch left a comment

Choose a reason for hiding this comment

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

I approved this contingent upon @timcanham's approval, which we have.

@LeStarch
Copy link
Collaborator

LeStarch commented Jul 2, 2024

@Lex-ari: we need to also change the bootstrap templates.

@LeStarch LeStarch merged commit 4338b1a into nasa:devel Jul 2, 2024
29 checks passed
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.

4 participants