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

Update/passive rg #2051

Merged
merged 11 commits into from
May 30, 2023
Merged

Update/passive rg #2051

merged 11 commits into from
May 30, 2023

Conversation

LeStarch
Copy link
Collaborator

Originating Project/Creator
Affected Component
Affected Architectures(s)
Related Issue(s)
Has Unit Tests (y/n)
Builds Without Errors (y/n)
Unit Tests Pass (y/n)
Documentation Included (y/n)

Change Description

Adds a passive rate group!

LeStarch added 8 commits May 26, 2023 08:22
 Copying fprime-open-source-review/Svc/PassiveRateGroup [revision: v3.2.0-20-gca5d909e9] to srh-fsw-base/lib/fprime/Svc/PassiveRateGroup
 Running fpp-from-xml on fprime-open-source-review/Svc/PassiveRateGroup/PassiveRateGroupComponentAi.xml to srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroup.fpp
 Running fpp-format on srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroup.fpp
 Rewriting C++ syntax of srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroupImpl.cpp
 Rewriting C++ syntax of srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroupImpl.hpp
 Rewriting C++ syntax of srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/TesterBase.cpp
 Rewriting C++ syntax of srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/GTestBase.cpp
 Rewriting C++ syntax of srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/PassiveRateGroupTester.cpp
 Rewriting C++ syntax of srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/PassiveRateGroupImplTester.cpp
 Formatting the following files:
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroupImpl.cpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroupImpl.hpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/TesterBase.cpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/GTestBase.cpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/PassiveRateGroupTester.cpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/PassiveRateGroupImplTester.cpp
 Writing fprime-open-source-review/Svc/PassiveRateGroup/mod.mk to srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/CMakeLists.txt
 Added srh-fsw-base/lib/fprime/Svc/PassiveRateGroup as subdirectory to:
    srh-fsw-base/lib/fprime/Svc/CMakeLists.txt
    srh-fsw-base/srh-fsw-base.cmake
…_clean_up

 Removing the following:
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroupComponentAi.xml
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/mod.mk
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/Makefile
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/ComponentReport.txt
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/GTestBase.cpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/GTestBase.hpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/TesterBase.cpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/TesterBase.hpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/output
@LeStarch LeStarch requested review from timcanham and thomas-bc May 26, 2023 23:49
@ThibFrgsGmz
Copy link
Contributor

Wouldn't it be better to have a sequence diagram in mermaid?

Copy link
Collaborator

@timcanham timcanham left a comment

Choose a reason for hiding this comment

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

Leftover files, old headers and other minor comments.

Svc/CMakeLists.txt Outdated Show resolved Hide resolved
Svc/PassiveRateGroup/docs/PassiveRateGroup.md Outdated Show resolved Hide resolved
Svc/PassiveRateGroup/docs/sdd.md Outdated Show resolved Hide resolved
Svc/PassiveRateGroup/test/mod.mk Outdated Show resolved Hide resolved
Svc/PassiveRateGroup/test/ut/Readme.txt Outdated Show resolved Hide resolved
Svc/PassiveRateGroup/test/ut/mod.mk Outdated Show resolved Hide resolved
Svc/PassiveRateGroup/test/ut/runtest_CYGWIN Outdated Show resolved Hide resolved
Svc/PassiveRateGroup/test/ut/runtest_DARWIN Outdated Show resolved Hide resolved
Svc/PassiveRateGroup/test/ut/runtest_LINUX Outdated Show resolved Hide resolved

class PassiveRateGroupTester: public PassiveRateGroupGTestBase {
public:
PassiveRateGroupTester(Svc::PassiveRateGroup& inst);

Check warning

Code scanning / CppCheck

Single-parameter constructors should be marked explicit.

Single-parameter constructors should be marked explicit.

class PassiveRateGroupTester: public PassiveRateGroupGTestBase {
public:
PassiveRateGroupTester(Svc::PassiveRateGroup& inst);

Check warning

Code scanning / CppCheck

Single-parameter constructors should be marked explicit.

Single-parameter constructors should be marked explicit.
U32 m_cycles; //!< cycles executed
U32 m_maxTime; //!< maximum execution time in microseconds
NATIVE_INT_TYPE m_numContexts; //!< number of contexts
NATIVE_INT_TYPE m_contexts[NUM_RATEGROUPMEMBEROUT_OUTPUT_PORTS]; //!< Must match number of output ports

Check notice

Code scanning / CodeQL

Use of basic integral type

m_contexts uses the basic integral type int rather than a typedef with size and signedness.

U32 m_cycles; //!< cycles executed
U32 m_maxTime; //!< maximum execution time in microseconds
NATIVE_INT_TYPE m_numContexts; //!< number of contexts

Check notice

Code scanning / CodeQL

Use of basic integral type

m_numContexts uses the basic integral type int rather than a typedef with size and signedness.
}


void PassiveRateGroup::CycleIn_handler(NATIVE_INT_TYPE portNum, Svc::TimerVal& cycleStart) {

Check notice

Code scanning / CodeQL

Use of basic integral type

portNum uses the basic integral type int rather than a typedef with size and signedness.

PassiveRateGroup::~PassiveRateGroup(void) {}

void PassiveRateGroup::configure(NATIVE_INT_TYPE contexts[], NATIVE_INT_TYPE numContexts) {

Check notice

Code scanning / CodeQL

Use of basic integral type

contexts uses the basic integral type int rather than a typedef with size and signedness.

PassiveRateGroup::~PassiveRateGroup(void) {}

void PassiveRateGroup::configure(NATIVE_INT_TYPE contexts[], NATIVE_INT_TYPE numContexts) {

Check notice

Code scanning / CodeQL

Use of basic integral type

numContexts uses the basic integral type int rather than a typedef with size and signedness.
#include <Svc/PassiveRateGroup/PassiveRateGroup.hpp>

namespace Svc {
PassiveRateGroup::PassiveRateGroup(const char* compName)

Check notice

Code scanning / CodeQL

Use of basic integral type

compName uses the basic integral type char rather than a typedef with size and signedness.
FW_ASSERT(this->m_numContexts);

// invoke any members of the rate group
for (NATIVE_INT_TYPE port = 0; port < this->getNum_RateGroupMemberOut_OutputPorts(); port++) {

Check notice

Code scanning / CodeQL

Use of basic integral type

port uses the basic integral type int rather than a typedef with size and signedness.

this->m_numContexts = numContexts;
// copy context values
for (NATIVE_INT_TYPE entry = 0; entry < this->m_numContexts; entry++) {

Check notice

Code scanning / CodeQL

Use of basic integral type

entry uses the basic integral type int rather than a typedef with size and signedness.
}


void PassiveRateGroup::CycleIn_handler(NATIVE_INT_TYPE portNum, Svc::TimerVal& cycleStart) {

Check notice

Code scanning / CodeQL

Long function without assertion

All functions of more than 10 lines should have at least one assertion.

PassiveRateGroup::~PassiveRateGroup(void) {}

void PassiveRateGroup::configure(NATIVE_INT_TYPE contexts[], NATIVE_INT_TYPE numContexts) {

Check notice

Code scanning / CodeQL

Long function without assertion

All functions of more than 10 lines should have at least one assertion.
Svc/PassiveRateGroup/PassiveRateGroup.cpp Fixed Show fixed Hide fixed
Comment on lines +46 to +50
for (NATIVE_INT_TYPE port = 0; port < this->getNum_RateGroupMemberOut_OutputPorts(); port++) {
if (this->isConnected_RateGroupMemberOut_OutputPort(port)) {
this->RateGroupMemberOut_out(port, this->m_contexts[port]);
}
}

Check warning

Code scanning / CodeQL

Unbounded loop

This loop does not have a fixed bound.
end.take();

// get rate group execution time
U32 cycle_time = end.diffUSec(cycleStart);

Check warning

Code scanning / CodeQL

Unchecked function argument

This use of parameter cycleStart has not been checked.

PassiveRateGroup::~PassiveRateGroup(void) {}

void PassiveRateGroup::configure(NATIVE_INT_TYPE contexts[], NATIVE_INT_TYPE numContexts) {

Check notice

Code scanning / CodeQL

No raw arrays in interfaces

Raw arrays should not be used in interfaces. A container class should be used instead.
@LeStarch LeStarch requested a review from timcanham May 29, 2023 18:57
: PassiveRateGroupComponentBase(compName), m_cycles(0), m_maxTime(0), m_numContexts(0) {
}

PassiveRateGroup::~PassiveRateGroup() {}

Check notice

Code scanning / CodeQL

More than one statement per line

This line contains 2 statements; only one is allowed.
@LeStarch
Copy link
Collaborator Author

@timcanham ready for re-review. Your comments and @ThibFrgsGmz's comments addressed.

@LeStarch LeStarch merged commit 4448bd2 into nasa:devel May 30, 2023
Boehm-Michael pushed a commit to Boehm-Michael/fprime that referenced this pull request Jun 22, 2023
* AUTO: Svc/PassiveRateGroup transformed by copy_sources

 Copying fprime-open-source-review/Svc/PassiveRateGroup [revision: v3.2.0-20-gca5d909e9] to srh-fsw-base/lib/fprime/Svc/PassiveRateGroup

* AUTO: Svc/PassiveRateGroup transformed by fppify

 Running fpp-from-xml on fprime-open-source-review/Svc/PassiveRateGroup/PassiveRateGroupComponentAi.xml to srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroup.fpp

* AUTO: Svc/PassiveRateGroup transformed by fpp_formater

 Running fpp-format on srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroup.fpp

* AUTO: Svc/PassiveRateGroup transformed by cpp_source_updater

 Rewriting C++ syntax of srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroupImpl.cpp
 Rewriting C++ syntax of srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroupImpl.hpp
 Rewriting C++ syntax of srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/TesterBase.cpp
 Rewriting C++ syntax of srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/GTestBase.cpp
 Rewriting C++ syntax of srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/PassiveRateGroupTester.cpp
 Rewriting C++ syntax of srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/PassiveRateGroupImplTester.cpp

* AUTO: Svc/PassiveRateGroup transformed by cpp_format

 Formatting the following files:
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroupImpl.cpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroupImpl.hpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/TesterBase.cpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/GTestBase.cpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/PassiveRateGroupTester.cpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/PassiveRateGroupImplTester.cpp

* AUTO: Svc/PassiveRateGroup transformed by cmakeify

 Writing fprime-open-source-review/Svc/PassiveRateGroup/mod.mk to srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/CMakeLists.txt
 Added srh-fsw-base/lib/fprime/Svc/PassiveRateGroup as subdirectory to:
    srh-fsw-base/lib/fprime/Svc/CMakeLists.txt
    srh-fsw-base/srh-fsw-base.cmake

* AUTO: Svc/PassiveRateGroup transformed by clean_up_clean_up_everybody_clean_up

 Removing the following:
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroupComponentAi.xml
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/mod.mk
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/Makefile
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/ComponentReport.txt
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/GTestBase.cpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/GTestBase.hpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/TesterBase.cpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/TesterBase.hpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/output

* Adding passive rate group

* Fixing UT and review concerns

* Fixing (void) arguments

* Fixing (void) and broken links
thomas-bc pushed a commit that referenced this pull request Aug 4, 2023
* AUTO: Svc/PassiveRateGroup transformed by copy_sources

 Copying fprime-open-source-review/Svc/PassiveRateGroup [revision: v3.2.0-20-gca5d909e9] to srh-fsw-base/lib/fprime/Svc/PassiveRateGroup

* AUTO: Svc/PassiveRateGroup transformed by fppify

 Running fpp-from-xml on fprime-open-source-review/Svc/PassiveRateGroup/PassiveRateGroupComponentAi.xml to srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroup.fpp

* AUTO: Svc/PassiveRateGroup transformed by fpp_formater

 Running fpp-format on srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroup.fpp

* AUTO: Svc/PassiveRateGroup transformed by cpp_source_updater

 Rewriting C++ syntax of srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroupImpl.cpp
 Rewriting C++ syntax of srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroupImpl.hpp
 Rewriting C++ syntax of srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/TesterBase.cpp
 Rewriting C++ syntax of srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/GTestBase.cpp
 Rewriting C++ syntax of srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/PassiveRateGroupTester.cpp
 Rewriting C++ syntax of srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/PassiveRateGroupImplTester.cpp

* AUTO: Svc/PassiveRateGroup transformed by cpp_format

 Formatting the following files:
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroupImpl.cpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroupImpl.hpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/TesterBase.cpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/GTestBase.cpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/PassiveRateGroupTester.cpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/PassiveRateGroupImplTester.cpp

* AUTO: Svc/PassiveRateGroup transformed by cmakeify

 Writing fprime-open-source-review/Svc/PassiveRateGroup/mod.mk to srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/CMakeLists.txt
 Added srh-fsw-base/lib/fprime/Svc/PassiveRateGroup as subdirectory to:
    srh-fsw-base/lib/fprime/Svc/CMakeLists.txt
    srh-fsw-base/srh-fsw-base.cmake

* AUTO: Svc/PassiveRateGroup transformed by clean_up_clean_up_everybody_clean_up

 Removing the following:
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/PassiveRateGroupComponentAi.xml
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/mod.mk
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/Makefile
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/ComponentReport.txt
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/GTestBase.cpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/GTestBase.hpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/TesterBase.cpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/TesterBase.hpp
    srh-fsw-base/lib/fprime/Svc/PassiveRateGroup/test/ut/output

* Adding passive rate group

* Fixing UT and review concerns

* Fixing (void) arguments

* Fixing (void) and broken links
thomas-bc added a commit that referenced this pull request Aug 4, 2023
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.

3 participants