mirror of
https://github.com/nasa/fprime.git
synced 2025-12-11 23:38:06 -06:00
* Updates for FppTest/dp and FppTest/component corresponding to UT cmake update for protected/private * Refactor Fpp/state_machine/internal_instance/state teststo be in their own Tester classes * Standardize headers * Remove old ifndef from BasicGuardTester.hpp * More cleanup of BasicGuardTester * Remove extra /dp files (leftover from rename) and fix a header comment typo * Revert accidentally checked in cmake * Enable UT_AUTO_HELPERS for FppTest/dp * Revert FppTest/state_machine/internal_instance/state * Update state_machine/internal_instance/state/ component names to append Tester * pdate state_machine/internal_instance/choice/ component names * Update state_machine/internal_instance/initial/ component names * Reformat code --------- Co-authored-by: Rob Bocchino <bocchino@jpl.nasa.gov>
97 lines
3.6 KiB
C++
97 lines
3.6 KiB
C++
// ======================================================================
|
|
// \title BasicTestArrayTester.hpp
|
|
// \author bocchino
|
|
// \brief hpp file for BasicTestArrayTester component implementation class
|
|
// ======================================================================
|
|
|
|
#ifndef FppTest_SmInstanceState_BasicTestArray_HPP
|
|
#define FppTest_SmInstanceState_BasicTestArray_HPP
|
|
|
|
#include "FppTest/state_machine/internal/harness/Harness.hpp"
|
|
#include "FppTest/state_machine/internal_instance/state/BasicTestArrayComponentAc.hpp"
|
|
|
|
namespace FppTest {
|
|
|
|
namespace SmInstanceState {
|
|
|
|
class BasicTestArrayTester : public BasicTestArrayComponentBase {
|
|
// ----------------------------------------------------------------------
|
|
// Constants
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! The history size
|
|
static constexpr FwSizeType historySize = 10;
|
|
|
|
//! The queue depth
|
|
static constexpr FwSizeType queueDepth = 10;
|
|
|
|
//! The instance ID
|
|
static constexpr FwEnumStoreType instanceId = 0;
|
|
|
|
public:
|
|
// ----------------------------------------------------------------------
|
|
// Component construction and destruction
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Construct BasicTestArrayTester object
|
|
BasicTestArrayTester(const char* const compName //!< The component name
|
|
);
|
|
|
|
//! Destroy BasicTestArrayTester object
|
|
~BasicTestArrayTester();
|
|
|
|
private:
|
|
// ----------------------------------------------------------------------
|
|
// Types
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! The type FppTest_SmState_BasicTestArray
|
|
using SmState_BasicTestArray = FppTest_SmState_BasicTestArray;
|
|
|
|
private:
|
|
// ----------------------------------------------------------------------
|
|
// Implementations for internal state machine actions
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Implementation for action a of state machine FppTest_SmState_BasicTestArray
|
|
//!
|
|
//! Action a
|
|
void FppTest_SmState_BasicTestArray_action_a(SmId smId, //!< The state machine id
|
|
FppTest_SmState_BasicTestArray::Signal signal //!< The signal
|
|
) override;
|
|
|
|
//! Implementation for action b of state machine FppTest_SmState_BasicTestArray
|
|
//!
|
|
//! Action b
|
|
void FppTest_SmState_BasicTestArray_action_b(SmId smId, //!< The state machine id
|
|
FppTest_SmState_BasicTestArray::Signal signal, //!< The signal
|
|
const SmHarness::TestArray& value //!< The value
|
|
) override;
|
|
|
|
public:
|
|
// ----------------------------------------------------------------------
|
|
// Tests
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Run the test
|
|
void test();
|
|
|
|
private:
|
|
// ----------------------------------------------------------------------
|
|
// Member variables
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! The history associated with action a of smStateBasicTestArray
|
|
SmHarness::History<SmState_BasicTestArray::Signal, historySize> m_smStateBasicTestArray_action_a_history;
|
|
|
|
//! The history associated with action b of smStateBasicTestArray
|
|
SmHarness::SignalValueHistory<SmState_BasicTestArray::Signal, SmHarness::TestArray, historySize>
|
|
m_smStateBasicTestArray_action_b_history;
|
|
};
|
|
|
|
} // namespace SmInstanceState
|
|
|
|
} // namespace FppTest
|
|
|
|
#endif
|