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

Implements #2723: Adds Os::Console to replace Os::Log #2831

Merged
merged 16 commits into from
Aug 16, 2024

Conversation

LeStarch
Copy link
Collaborator

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

Change Description

Refactors Os::Log into a cmake implementation called Os::Console.

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.

Fw/Logger/test/ut/LoggerRules.hpp Fixed Show fixed Hide fixed
Fw/Logger/test/ut/LoggerRules.hpp Fixed Show fixed Hide fixed
Fw/Logger/test/ut/LoggerRules.hpp Fixed Show fixed Hide fixed
Fw/Logger/test/ut/LoggerRules.hpp Fixed Show fixed Hide fixed
Os/Posix/Console.cpp Fixed Show fixed Hide fixed
Os/Stub/Console.cpp Fixed Show fixed Hide fixed
Os/Stub/test/Console.cpp Fixed Show fixed Hide fixed
Fw/Logger/Logger.hpp Dismissed Show dismissed Hide dismissed
Fw/Types/StringBase.cpp Dismissed Show resolved Hide resolved
Fw/Types/StringBase.cpp Dismissed Show dismissed Hide dismissed
Fw/Types/StringUtils.cpp Dismissed Show dismissed Hide dismissed
Os/Console.cpp Fixed Show fixed Hide fixed
Os/Console.hpp Dismissed Show dismissed Hide dismissed
Os/Posix/Console.cpp Dismissed Show dismissed Hide dismissed
Drv/Ip/IpSocket.cpp Fixed Show fixed Hide fixed
Drv/Ip/UdpSocket.cpp Fixed Show fixed Hide fixed
Fw/FilePacket/PathName.cpp Dismissed Show dismissed Hide dismissed
Fw/Types/StringBase.cpp Fixed Show fixed Hide fixed
Fw/Types/StringBase.cpp Dismissed Show dismissed Hide dismissed
Os/Posix/Console.cpp Fixed Show fixed Hide fixed
Os/Posix/Console.cpp Fixed Show fixed Hide fixed
Os/Posix/Console.cpp Dismissed Show dismissed Hide dismissed
Svc/ActiveTextLogger/ActiveTextLogger.cpp Fixed Show fixed Hide fixed
Os/Console.cpp Fixed Show fixed Hide fixed
@LeStarch LeStarch added the Update Instructions Needed Need to add instructions in the release notes for updates. label Aug 15, 2024
Os/Posix/Console.cpp Fixed Show fixed Hide fixed
Svc/ActiveTextLogger/ActiveTextLogger.cpp Dismissed Show dismissed Hide dismissed
Svc/FatalHandler/FatalHandlerComponentLinuxImpl.cpp Dismissed Show dismissed Hide dismissed
LeStarch added a commit to fprime-community/fprime-workshop-led-blinker that referenced this pull request Aug 15, 2024
LeStarch added a commit to fprime-community/fprime-tutorial-math-component that referenced this pull request Aug 15, 2024
LeStarch added a commit to fprime-community/fprime-tutorial-hello-world that referenced this pull request Aug 15, 2024
Os/Console.cpp Dismissed Show dismissed Hide dismissed
@LeStarch LeStarch linked an issue Aug 16, 2024 that may be closed by this pull request
10 tasks
//! the supplied format string. The format string uses C-style (printf function family) formatting.
//! \param format: format string
//! \param ...: var-args list of arguments to inject into format string.
static void log(const char* format, ...);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we be interested in aliasing this to logMsg(format, ...) as well for backwards compatibility? Otherwise we should flag this PR as a breaking change for release notes

Copy link
Collaborator

Choose a reason for hiding this comment

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

nevermind ... just saw it has the label already

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The old format was very dangerous, so we want to force users to update with consideration. Typically, this is a better approach except when the old way is dangerous.

@LeStarch LeStarch merged commit 7159e7e into nasa:devel Aug 16, 2024
35 checks passed
thomas-bc pushed a commit to fprime-community/fprime-workshop-led-blinker that referenced this pull request Aug 16, 2024
* Fixes for nasa/fprime#2831

* Missing logger import
thomas-bc pushed a commit to fprime-community/fprime-tutorial-hello-world that referenced this pull request Aug 16, 2024
thomas-bc pushed a commit to fprime-community/fprime-tutorial-math-component that referenced this pull request Aug 16, 2024
kevin-f-ortega pushed a commit to fprime-community/fprime-workshop-led-blinker that referenced this pull request Oct 10, 2024
* Fixes for nasa/fprime#2831

* Missing logger import
LeStarch added a commit to fprime-community/fprime-workshop-led-blinker that referenced this pull request Oct 16, 2024
* Update fpp model (#56)

* Fixing changes to OSAL Tasks (#65)

Co-authored-by: Michael D Starch <[email protected]>

* Update hpp copy paste code to include the override keyword to match the generated code (#68)

* Update instructions to reference install guide (#57)

* Update pre-requisites (#59)

* Update project name (#60)

* Add override to parameterUpdated (#63)

* Fix typos in requirements.md (#64)

* Update fprime git submodule to use https (#66)

* update hpp copy paste code to include the override keyword to match the generated code

---------

Co-authored-by: Thomas Boyer-Chammard <[email protected]>
Co-authored-by: Nate Gay <[email protected]>
Co-authored-by: Roberto Valenzuela <[email protected]>
Co-authored-by: Joshua Anderson <[email protected]>
Co-authored-by: crsmith <[email protected]>

* Fixes for nasa/fprime#2831  (#71)

* Fixes for nasa/fprime#2831

* Missing logger import

* Fixes for nasa/fprime#2823 (#73)

* update for compatibility with fpp #349

* update integration tests

---------

Co-authored-by: jawest <[email protected]>

* Update LedBlinkerPackets.xml (#74)

Remove systemResources TLM channels from deployment so pr-2866 can run successfully

Co-authored-by: Shivaly-Reddy <[email protected]>

* Phase 1 State Machine changes (nasa/fprime#2829) (#75)

* Reworking tutorial to match improved workflow

reordering the sections so they better match best software engineering practices
updated parameterUpdated to use a switch statement
formatting
enum argument checking happens under the hood; so, removing the check from command handler. Also removing the EVR from fpp
marking which portion of the documentation needs to be updated to remove non-existing evr
using async instead of sync. No real good reason to use sync here, and async makes the code implementation issuer (avoid using mutex)
removing mutex and its use since we switch run handler to async port
updating documentation to remove mutex/lock
using member variable convention
updated member variables to use correct name. also fixed formatting
updated documentation to use new member variables
updated documentation to use new member variables
updated documentation to use new member variables
Adding formatting file from fprime
added missing step
Added clarifying note
updated day of component implementation
typo
using async port. improving parameterUpdated function
Added sequence diagram explaining blink command
removed unneeded tlm xml section. cleaned up code to use switch statement
adding missing dodispatch now that the run port in an async port
Having this parameter is critical for the unit test portion. Add it here and not leave it up to the students to add
Updating uts so they don't depend on 'try it yourself' activity
updated UT doc
fixed typos
fixed markdown formatting
making comments and signatures consistent with latest fprime-util
formatting
adding default value to parameter
adding default value to parameter
typo
Readding param get try-it-yourself task. It's a good exercise for the students to have
Readding since it's better for the reader to exercise these aspects
simplified run handler
Updated documentation so that all design for day 1 is together and all initial implementation for day 2 is together. This better follows the design and implementation workflow that we use when developing software
minor format updates
Updating words per review
Updated documentation so that all design for day 2 is together and all continued implementation for day 2 is together. This better follows the design and implementation workflow that we use when developing software
Using event instead of EVR since the word event is more consitent throughout the tutorial
Formatting
Formatting
Fixing title
giving member variable a better name and updating code in tutorial to match latest code
Updated documents per review
Adding spoiler tags around answers
fixing camelcase and comments
fixed code formatting to match fprime's formatting
fixing formatting
Updating per review.
fixing. want to use camel case
fixed formatting of UTs

* fixing formatting of code

* updated fprime pointer to point to latest in devel

* updated to work with packet tlm xml commented out. Also loading parameters as we should be

* Updated pointer to use latest fprime tag 3.5.0

* Escaping key word

* typo

* fixing gpio configuration to match with fprime 3.5.0

* fixed code for config of gpio

* updated led blinker for fprime 3.5.0

* Adding answer so tut flows better

---------

Co-authored-by: Rob Bocchino <[email protected]>
Co-authored-by: Thomas Boyer-Chammard <[email protected]>
Co-authored-by: Michael D Starch <[email protected]>
Co-authored-by: csmith608 <[email protected]>
Co-authored-by: Nate Gay <[email protected]>
Co-authored-by: Roberto Valenzuela <[email protected]>
Co-authored-by: Joshua Anderson <[email protected]>
Co-authored-by: crsmith <[email protected]>
Co-authored-by: M Starch <[email protected]>
Co-authored-by: Justine West <[email protected]>
Co-authored-by: jawest <[email protected]>
Co-authored-by: Shivaly-Reddy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Update Instructions Needed Need to add instructions in the release notes for updates.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor Os::Log into CMake Selection
2 participants