fpp/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSerialTesterBase.ref.hpp
Rob Bocchino 3d33756463 Revise state machine code gen
Revise comments
Update test harness to comply with changes to F Prime
2025-07-07 11:09:41 -07:00

2325 lines
73 KiB
C++
Vendored

// ======================================================================
// \title PassiveSerialTesterBase.hpp
// \author Generated by fpp-to-cpp
// \brief hpp file for PassiveSerial component test harness base class
// ======================================================================
#ifndef PassiveSerialTesterBase_HPP
#define PassiveSerialTesterBase_HPP
#include <cstdio>
#include "Fw/Comp/PassiveComponentBase.hpp"
#include "Fw/Port/InputSerializePort.hpp"
#include "Fw/Prm/PrmExternalTypes.hpp"
#include "Fw/Types/Assert.hpp"
#include "Fw/Types/ExternalString.hpp"
#include "test-base/PassiveSerialComponentAc.hpp"
//! \class PassiveSerialTesterBase
//! \brief Auto-generated base for PassiveSerial component test harness
class PassiveSerialTesterBase :
public Fw::PassiveComponentBase
{
protected:
// ----------------------------------------------------------------------
// History class
// ----------------------------------------------------------------------
//! \class History
//! \brief A history of port inputs
//!
template<typename T>
class History
{
public:
//! Create a History
History(
const U32 maxSize //!< The maximum history size
) :
m_numEntries(0),
m_maxSize(maxSize)
{
this->m_entries = new T[maxSize];
}
//! Destroy a History
~History()
{
delete[] this->m_entries;
}
//! Clear the history
//!
void clear()
{
this->m_numEntries = 0;
}
//! Push an item onto the history
//!
void push_back(
const T& entry //!< The item
)
{
FW_ASSERT(this->m_numEntries < this->m_maxSize);
this->m_entries[this->m_numEntries++] = entry;
}
//! Get an item at an index
//!
//! \return The item at index i
const T& at(
const U32 i //!< The index
) const
{
FW_ASSERT(i < this->m_numEntries);
return this->m_entries[i];
}
//! Get the number of entries in the history
//!
//! \return The number of entries in the history
U32 size() const
{
return this->m_numEntries;
}
private:
//! The number of entries in the history
U32 m_numEntries;
//! The maximum history size
const U32 m_maxSize;
//! The entries
T* m_entries;
};
protected:
// ----------------------------------------------------------------------
// History types
// ----------------------------------------------------------------------
//! A history entry for port from_typedAliasOut
struct FromPortEntry_typedAliasOut {
FromPortEntry_typedAliasOut() :
u32(),
f32(),
b(),
str2(__fprime_ac_str2_buffer, sizeof __fprime_ac_str2_buffer),
e(),
a(),
s()
{}
AliasPrim1 u32;
AliasPrim2 f32;
AliasBool b;
char __fprime_ac_str2_buffer[Fw::StringBase::BUFFER_SIZE(32)];
Fw::ExternalString str2;
AliasEnum e;
AliasArray a;
AliasStruct s;
};
//! A history entry for port from_typedAliasReturnOut
struct FromPortEntry_typedAliasReturnOut {
FromPortEntry_typedAliasReturnOut() :
u32(),
f32(),
b(),
str2(__fprime_ac_str2_buffer, sizeof __fprime_ac_str2_buffer),
e(),
a(),
s()
{}
AliasPrim1 u32;
AliasPrim2 f32;
AliasBool b;
char __fprime_ac_str2_buffer[Fw::StringBase::BUFFER_SIZE(32)];
Fw::ExternalString str2;
AliasEnum e;
AliasArray a;
AliasStruct s;
};
//! A history entry for port from_typedAliasReturnStringOut
struct FromPortEntry_typedAliasReturnStringOut {
FromPortEntry_typedAliasReturnStringOut() :
u32(),
f32(),
b(),
str2(__fprime_ac_str2_buffer, sizeof __fprime_ac_str2_buffer),
e(),
a(),
s()
{}
AliasPrim1 u32;
AliasPrim2 f32;
AliasBool b;
char __fprime_ac_str2_buffer[Fw::StringBase::BUFFER_SIZE(32)];
Fw::ExternalString str2;
AliasEnum e;
AliasArray a;
AnotherAliasStruct s;
};
//! A history entry for port from_typedOut
struct FromPortEntry_typedOut {
FromPortEntry_typedOut() :
u32(),
f32(),
b(),
str1(__fprime_ac_str1_buffer, sizeof __fprime_ac_str1_buffer),
e(),
a(),
s()
{}
U32 u32;
F32 f32;
bool b;
char __fprime_ac_str1_buffer[Fw::StringBase::BUFFER_SIZE(80)];
Fw::ExternalString str1;
E e;
A a;
S s;
};
//! A history entry for port from_typedReturnOut
struct FromPortEntry_typedReturnOut {
FromPortEntry_typedReturnOut() :
u32(),
f32(),
b(),
str2(__fprime_ac_str2_buffer, sizeof __fprime_ac_str2_buffer),
e(),
a(),
s()
{}
U32 u32;
F32 f32;
bool b;
char __fprime_ac_str2_buffer[Fw::StringBase::BUFFER_SIZE(80)];
Fw::ExternalString str2;
E e;
A a;
S s;
};
//! A type representing a command response
struct CmdResponse {
FwOpcodeType opCode;
U32 cmdSeq;
Fw::CmdResponse response;
};
#if FW_ENABLE_TEXT_LOGGING
//! A history entry for text log events
struct TextLogEntry {
U32 id;
Fw::Time timeTag;
Fw::LogSeverity severity;
Fw::TextLogString text;
};
#endif
//! A history entry for event EventActivityLowThrottled
struct EventEntry_EventActivityLowThrottled {
U32 u32;
F32 f32;
bool b;
};
//! A history entry for event EventCommand
struct EventEntry_EventCommand {
Fw::LogStringArg str1;
Fw::LogStringArg str2;
};
//! A history entry for event EventDiagnostic
struct EventEntry_EventDiagnostic {
E e;
};
//! A history entry for event EventFatalThrottled
struct EventEntry_EventFatalThrottled {
A a;
};
//! A history entry for event EventWarningHigh
struct EventEntry_EventWarningHigh {
S s;
};
//! A history entry for telemetry channel ChannelU32Format
struct TlmEntry_ChannelU32Format {
Fw::Time timeTag;
U32 arg;
};
//! A history entry for telemetry channel ChannelF32Format
struct TlmEntry_ChannelF32Format {
Fw::Time timeTag;
F32 arg;
};
//! A history entry for telemetry channel ChannelStringFormat
struct TlmEntry_ChannelStringFormat {
Fw::Time timeTag;
Fw::TlmString arg;
};
//! A history entry for telemetry channel ChannelEnum
struct TlmEntry_ChannelEnum {
Fw::Time timeTag;
E arg;
};
//! A history entry for telemetry channel ChannelArrayFreq
struct TlmEntry_ChannelArrayFreq {
Fw::Time timeTag;
A arg;
};
//! A history entry for telemetry channel ChannelStructFreq
struct TlmEntry_ChannelStructFreq {
Fw::Time timeTag;
S arg;
};
//! A history entry for telemetry channel ChannelU32Limits
struct TlmEntry_ChannelU32Limits {
Fw::Time timeTag;
U32 arg;
};
//! A history entry for telemetry channel ChannelF32Limits
struct TlmEntry_ChannelF32Limits {
Fw::Time timeTag;
F32 arg;
};
//! A history entry for telemetry channel ChannelF64
struct TlmEntry_ChannelF64 {
Fw::Time timeTag;
F64 arg;
};
//! A history entry for telemetry channel ChannelU32OnChange
struct TlmEntry_ChannelU32OnChange {
Fw::Time timeTag;
U32 arg;
};
//! A history entry for telemetry channel ChannelEnumOnChange
struct TlmEntry_ChannelEnumOnChange {
Fw::Time timeTag;
E arg;
};
//! External Parameter Delegate
class PassiveSerialComponentBaseParamExternalDelegate :
public Fw::ParamExternalDelegate
{
public:
// ----------------------------------------------------------------------
// Parameter validity flags
// ----------------------------------------------------------------------
//! True if ParamI32Ext was successfully received
Fw::ParamValid m_param_ParamI32Ext_valid;
//! True if ParamF64Ext was successfully received
Fw::ParamValid m_param_ParamF64Ext_valid;
//! True if ParamStringExt was successfully received
Fw::ParamValid m_param_ParamStringExt_valid;
//! True if ParamEnumExt was successfully received
Fw::ParamValid m_param_ParamEnumExt_valid;
//! True if ParamArrayExt was successfully received
Fw::ParamValid m_param_ParamArrayExt_valid;
//! True if ParamStructExt was successfully received
Fw::ParamValid m_param_ParamStructExt_valid;
public:
// ----------------------------------------------------------------------
// Parameter variables
// ----------------------------------------------------------------------
//! Parameter ParamI32Ext
//!
//! An externally stored parameter with I32 data
//! Second line of annotation
I32 m_param_ParamI32Ext;
//! Parameter ParamF64Ext
//!
//! An externally stored parameter with F64 data
F64 m_param_ParamF64Ext;
//! Parameter ParamStringExt
//!
//! An externally stored parameter with string data and default value
Fw::ParamString m_param_ParamStringExt;
//! Parameter ParamEnumExt
//!
//! An externally stored parameter with enum data
E m_param_ParamEnumExt;
//! Parameter ParamArrayExt
//!
//! An externally stored parameter with array data, default value, and save opcode
A m_param_ParamArrayExt;
//! Parameter ParamStructExt
//!
//! An externally stored parameter with struct data and set/save opcodes
S m_param_ParamStructExt;
public:
// ----------------------------------------------------------------------
// Unit test implementation of external parameter delegate serialization/deserialization
// ----------------------------------------------------------------------
//! Parameter deserialization function for external parameter unit testing
Fw::SerializeStatus deserializeParam(
const FwPrmIdType baseId, //!< The component base parameter ID to deserialize
const FwPrmIdType localId, //!< The parameter local ID to deserialize
const Fw::ParamValid prmStat, //!< The parameter validity status
Fw::SerializeBufferBase& buff //!< The buffer containing the parameter to deserialize
) override;
//! Parameter serialization function for external parameter unit testing
Fw::SerializeStatus serializeParam(
const FwPrmIdType baseId, //!< The component base parameter ID to serialize
const FwPrmIdType localId, //!< The parameter local ID to serialize
Fw::SerializeBufferBase& buff //!< The buffer to serialize the parameter into
) const override;
};
public:
// ----------------------------------------------------------------------
// Component initialization
// ----------------------------------------------------------------------
//! Initialize object PassiveSerialTesterBase
virtual void init(
FwEnumStoreType instance = 0 //!< The instance number
);
public:
// ----------------------------------------------------------------------
// Connectors for to ports
// ----------------------------------------------------------------------
//! Connect port to cmdIn[portNum]
void connect_to_cmdIn(
FwIndexType portNum, //!< The port number
Fw::InputCmdPort* port //!< The input port
);
//! Connect port to noArgsAliasStringReturnSync[portNum]
void connect_to_noArgsAliasStringReturnSync(
FwIndexType portNum, //!< The port number
Ports::InputNoArgsAliasStringReturnPort* port //!< The input port
);
//! Connect port to noArgsGuarded[portNum]
void connect_to_noArgsGuarded(
FwIndexType portNum, //!< The port number
Ports::InputNoArgsPort* port //!< The input port
);
//! Connect port to noArgsReturnGuarded[portNum]
void connect_to_noArgsReturnGuarded(
FwIndexType portNum, //!< The port number
Ports::InputNoArgsReturnPort* port //!< The input port
);
//! Connect port to noArgsReturnSync[portNum]
void connect_to_noArgsReturnSync(
FwIndexType portNum, //!< The port number
Ports::InputNoArgsReturnPort* port //!< The input port
);
//! Connect port to noArgsStringReturnSync[portNum]
void connect_to_noArgsStringReturnSync(
FwIndexType portNum, //!< The port number
Ports::InputNoArgsStringReturnPort* port //!< The input port
);
//! Connect port to noArgsSync[portNum]
void connect_to_noArgsSync(
FwIndexType portNum, //!< The port number
Ports::InputNoArgsPort* port //!< The input port
);
//! Connect port to typedAliasGuarded[portNum]
void connect_to_typedAliasGuarded(
FwIndexType portNum, //!< The port number
Ports::InputAliasTypedPort* port //!< The input port
);
//! Connect port to typedAliasReturnSync[portNum]
void connect_to_typedAliasReturnSync(
FwIndexType portNum, //!< The port number
Ports::InputAliasTypedReturnPort* port //!< The input port
);
//! Connect port to typedAliasStringReturnSync[portNum]
void connect_to_typedAliasStringReturnSync(
FwIndexType portNum, //!< The port number
Ports::InputAliasTypedReturnStringPort* port //!< The input port
);
//! Connect port to typedGuarded[portNum]
void connect_to_typedGuarded(
FwIndexType portNum, //!< The port number
Ports::InputTypedPort* port //!< The input port
);
//! Connect port to typedReturnGuarded[portNum]
void connect_to_typedReturnGuarded(
FwIndexType portNum, //!< The port number
Ports::InputTypedReturnPort* port //!< The input port
);
//! Connect port to typedReturnSync[portNum]
void connect_to_typedReturnSync(
FwIndexType portNum, //!< The port number
Ports::InputTypedReturnPort* port //!< The input port
);
//! Connect port to typedSync[portNum]
void connect_to_typedSync(
FwIndexType portNum, //!< The port number
Ports::InputTypedPort* port //!< The input port
);
//! Connect port to serialGuarded[portNum]
void connect_to_serialGuarded(
FwIndexType portNum, //!< The port number
Fw::InputSerializePort* port //!< The input port
);
//! Connect port to serialSync[portNum]
void connect_to_serialSync(
FwIndexType portNum, //!< The port number
Fw::InputSerializePort* port //!< The input port
);
public:
// ----------------------------------------------------------------------
// Getters for from ports
// ----------------------------------------------------------------------
//! Get from port at index
//!
//! \return from_cmdRegOut[portNum]
Fw::InputCmdRegPort* get_from_cmdRegOut(
FwIndexType portNum //!< The port number
);
//! Get from port at index
//!
//! \return from_cmdResponseOut[portNum]
Fw::InputCmdResponsePort* get_from_cmdResponseOut(
FwIndexType portNum //!< The port number
);
//! Get from port at index
//!
//! \return from_eventOut[portNum]
Fw::InputLogPort* get_from_eventOut(
FwIndexType portNum //!< The port number
);
//! Get from port at index
//!
//! \return from_prmGetOut[portNum]
Fw::InputPrmGetPort* get_from_prmGetOut(
FwIndexType portNum //!< The port number
);
//! Get from port at index
//!
//! \return from_prmSetOut[portNum]
Fw::InputPrmSetPort* get_from_prmSetOut(
FwIndexType portNum //!< The port number
);
#if FW_ENABLE_TEXT_LOGGING == 1
//! Get from port at index
//!
//! \return from_textEventOut[portNum]
Fw::InputLogTextPort* get_from_textEventOut(
FwIndexType portNum //!< The port number
);
#endif
//! Get from port at index
//!
//! \return from_timeGetOut[portNum]
Fw::InputTimePort* get_from_timeGetOut(
FwIndexType portNum //!< The port number
);
//! Get from port at index
//!
//! \return from_tlmOut[portNum]
Fw::InputTlmPort* get_from_tlmOut(
FwIndexType portNum //!< The port number
);
//! Get from port at index
//!
//! \return from_noArgsOut[portNum]
Ports::InputNoArgsPort* get_from_noArgsOut(
FwIndexType portNum //!< The port number
);
//! Get from port at index
//!
//! \return from_noArgsReturnOut[portNum]
Ports::InputNoArgsReturnPort* get_from_noArgsReturnOut(
FwIndexType portNum //!< The port number
);
//! Get from port at index
//!
//! \return from_noArgsStringReturnOut[portNum]
Ports::InputNoArgsStringReturnPort* get_from_noArgsStringReturnOut(
FwIndexType portNum //!< The port number
);
//! Get from port at index
//!
//! \return from_typedAliasOut[portNum]
Ports::InputAliasTypedPort* get_from_typedAliasOut(
FwIndexType portNum //!< The port number
);
//! Get from port at index
//!
//! \return from_typedAliasReturnOut[portNum]
Ports::InputAliasTypedReturnPort* get_from_typedAliasReturnOut(
FwIndexType portNum //!< The port number
);
//! Get from port at index
//!
//! \return from_typedAliasReturnStringOut[portNum]
Ports::InputAliasTypedReturnStringPort* get_from_typedAliasReturnStringOut(
FwIndexType portNum //!< The port number
);
//! Get from port at index
//!
//! \return from_typedOut[portNum]
Ports::InputTypedPort* get_from_typedOut(
FwIndexType portNum //!< The port number
);
//! Get from port at index
//!
//! \return from_typedReturnOut[portNum]
Ports::InputTypedReturnPort* get_from_typedReturnOut(
FwIndexType portNum //!< The port number
);
//! Get from port at index
//!
//! \return from_serialOut[portNum]
Fw::InputSerializePort* get_from_serialOut(
FwIndexType portNum //!< The port number
);
protected:
// ----------------------------------------------------------------------
// Component construction and destruction
// ----------------------------------------------------------------------
//! Construct object PassiveSerialTesterBase
PassiveSerialTesterBase(
const char* const compName, //!< The component name
const U32 maxHistorySize //!< The maximum size of each history
);
//! Destroy object PassiveSerialTesterBase
virtual ~PassiveSerialTesterBase();
protected:
// ----------------------------------------------------------------------
// Default handler implementations for typed from ports
// You can override these implementation with more specific behavior
// ----------------------------------------------------------------------
//! Default handler implementation for from_noArgsOut
virtual void from_noArgsOut_handler(
FwIndexType portNum //!< The port number
);
//! Default handler implementation for from_noArgsReturnOut
virtual U32 from_noArgsReturnOut_handler(
FwIndexType portNum //!< The port number
);
//! Default handler implementation for from_noArgsStringReturnOut
virtual Fw::String from_noArgsStringReturnOut_handler(
FwIndexType portNum //!< The port number
);
//! Default handler implementation for from_typedAliasOut
virtual void from_typedAliasOut_handler(
FwIndexType portNum, //!< The port number
AliasPrim1 u32, //!< A primitive
AliasPrim2 f32, //!< Another primtive
AliasBool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const AliasEnum& e, //!< An enum
const AliasArray& a, //!< An array
const AliasStruct& s //!< A struct
);
//! Default handler implementation for from_typedAliasReturnOut
virtual AliasPrim2 from_typedAliasReturnOut_handler(
FwIndexType portNum, //!< The port number
AliasPrim1 u32, //!< A primitive
AliasPrim2 f32, //!< Another primtive
AliasBool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const AliasEnum& e, //!< An enum
const AliasArray& a, //!< An array
const AliasStruct& s //!< A struct
);
//! Default handler implementation for from_typedAliasReturnStringOut
virtual Fw::String from_typedAliasReturnStringOut_handler(
FwIndexType portNum, //!< The port number
AliasPrim1 u32, //!< A primitive
AliasPrim2 f32, //!< Another primtive
AliasBool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const AliasEnum& e, //!< An enum
const AliasArray& a, //!< An array
const AnotherAliasStruct& s //!< A struct
);
//! Default handler implementation for from_typedOut
virtual void from_typedOut_handler(
FwIndexType portNum, //!< The port number
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b, //!< A boolean
const Fw::StringBase& str1, //!< A string
const E& e, //!< An enum
const A& a, //!< An array
const S& s //!< A struct
);
//! Default handler implementation for from_typedReturnOut
virtual F32 from_typedReturnOut_handler(
FwIndexType portNum, //!< The port number
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const E& e, //!< An enum
const A& a, //!< An array
const S& s //!< A struct
);
protected:
// ----------------------------------------------------------------------
// Default handler implementations for serial from ports
// You can override these implementation with more specific behavior
// ----------------------------------------------------------------------
//! Default handler implementation for from_serialOut
virtual void from_serialOut_handler(
FwIndexType portNum, //!< The port number
Fw::SerializeBufferBase& buffer //!< The serialization buffer
);
protected:
// ----------------------------------------------------------------------
// Handler base-class functions for from ports
// ----------------------------------------------------------------------
//! Handler base-class function for from_noArgsOut
void from_noArgsOut_handlerBase(
FwIndexType portNum //!< The port number
);
//! Handler base-class function for from_noArgsReturnOut
U32 from_noArgsReturnOut_handlerBase(
FwIndexType portNum //!< The port number
);
//! Handler base-class function for from_noArgsStringReturnOut
Fw::String from_noArgsStringReturnOut_handlerBase(
FwIndexType portNum //!< The port number
);
//! Handler base-class function for from_typedAliasOut
void from_typedAliasOut_handlerBase(
FwIndexType portNum, //!< The port number
AliasPrim1 u32, //!< A primitive
AliasPrim2 f32, //!< Another primtive
AliasBool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const AliasEnum& e, //!< An enum
const AliasArray& a, //!< An array
const AliasStruct& s //!< A struct
);
//! Handler base-class function for from_typedAliasReturnOut
AliasPrim2 from_typedAliasReturnOut_handlerBase(
FwIndexType portNum, //!< The port number
AliasPrim1 u32, //!< A primitive
AliasPrim2 f32, //!< Another primtive
AliasBool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const AliasEnum& e, //!< An enum
const AliasArray& a, //!< An array
const AliasStruct& s //!< A struct
);
//! Handler base-class function for from_typedAliasReturnStringOut
Fw::String from_typedAliasReturnStringOut_handlerBase(
FwIndexType portNum, //!< The port number
AliasPrim1 u32, //!< A primitive
AliasPrim2 f32, //!< Another primtive
AliasBool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const AliasEnum& e, //!< An enum
const AliasArray& a, //!< An array
const AnotherAliasStruct& s //!< A struct
);
//! Handler base-class function for from_typedOut
void from_typedOut_handlerBase(
FwIndexType portNum, //!< The port number
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b, //!< A boolean
const Fw::StringBase& str1, //!< A string
const E& e, //!< An enum
const A& a, //!< An array
const S& s //!< A struct
);
//! Handler base-class function for from_typedReturnOut
F32 from_typedReturnOut_handlerBase(
FwIndexType portNum, //!< The port number
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const E& e, //!< An enum
const A& a, //!< An array
const S& s //!< A struct
);
//! Handler base-class function for from_serialOut
void from_serialOut_handlerBase(
FwIndexType portNum, //!< The port number
Fw::SerializeBufferBase& buffer //!< The serialization buffer
);
protected:
// ----------------------------------------------------------------------
// Invocation functions for to ports
// ----------------------------------------------------------------------
//! Invoke the to port connected to noArgsAliasStringReturnSync
Fw::String invoke_to_noArgsAliasStringReturnSync(
FwIndexType portNum //!< The port number
);
//! Invoke the to port connected to noArgsGuarded
void invoke_to_noArgsGuarded(
FwIndexType portNum //!< The port number
);
//! Invoke the to port connected to noArgsReturnGuarded
U32 invoke_to_noArgsReturnGuarded(
FwIndexType portNum //!< The port number
);
//! Invoke the to port connected to noArgsReturnSync
U32 invoke_to_noArgsReturnSync(
FwIndexType portNum //!< The port number
);
//! Invoke the to port connected to noArgsStringReturnSync
Fw::String invoke_to_noArgsStringReturnSync(
FwIndexType portNum //!< The port number
);
//! Invoke the to port connected to noArgsSync
void invoke_to_noArgsSync(
FwIndexType portNum //!< The port number
);
//! Invoke the to port connected to typedAliasGuarded
void invoke_to_typedAliasGuarded(
FwIndexType portNum, //!< The port number
AliasPrim1 u32, //!< A primitive
AliasPrim2 f32, //!< Another primtive
AliasBool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const AliasEnum& e, //!< An enum
const AliasArray& a, //!< An array
const AliasStruct& s //!< A struct
);
//! Invoke the to port connected to typedAliasReturnSync
AliasPrim2 invoke_to_typedAliasReturnSync(
FwIndexType portNum, //!< The port number
AliasPrim1 u32, //!< A primitive
AliasPrim2 f32, //!< Another primtive
AliasBool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const AliasEnum& e, //!< An enum
const AliasArray& a, //!< An array
const AliasStruct& s //!< A struct
);
//! Invoke the to port connected to typedAliasStringReturnSync
Fw::String invoke_to_typedAliasStringReturnSync(
FwIndexType portNum, //!< The port number
AliasPrim1 u32, //!< A primitive
AliasPrim2 f32, //!< Another primtive
AliasBool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const AliasEnum& e, //!< An enum
const AliasArray& a, //!< An array
const AnotherAliasStruct& s //!< A struct
);
//! Invoke the to port connected to typedGuarded
void invoke_to_typedGuarded(
FwIndexType portNum, //!< The port number
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b, //!< A boolean
const Fw::StringBase& str1, //!< A string
const E& e, //!< An enum
const A& a, //!< An array
const S& s //!< A struct
);
//! Invoke the to port connected to typedReturnGuarded
F32 invoke_to_typedReturnGuarded(
FwIndexType portNum, //!< The port number
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const E& e, //!< An enum
const A& a, //!< An array
const S& s //!< A struct
);
//! Invoke the to port connected to typedReturnSync
F32 invoke_to_typedReturnSync(
FwIndexType portNum, //!< The port number
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const E& e, //!< An enum
const A& a, //!< An array
const S& s //!< A struct
);
//! Invoke the to port connected to typedSync
void invoke_to_typedSync(
FwIndexType portNum, //!< The port number
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b, //!< A boolean
const Fw::StringBase& str1, //!< A string
const E& e, //!< An enum
const A& a, //!< An array
const S& s //!< A struct
);
//! Invoke the to port connected to serialGuarded
void invoke_to_serialGuarded(
FwIndexType portNum, //!< The port number
Fw::SerializeBufferBase& buffer //!< The serialization buffer
);
//! Invoke the to port connected to serialSync
void invoke_to_serialSync(
FwIndexType portNum, //!< The port number
Fw::SerializeBufferBase& buffer //!< The serialization buffer
);
protected:
// ----------------------------------------------------------------------
// Getters for port counts
// ----------------------------------------------------------------------
//! Get the number of to_cmdIn ports
//!
//! \return The number of to_cmdIn ports
FwIndexType getNum_to_cmdIn() const;
//! Get the number of to_noArgsAliasStringReturnSync ports
//!
//! \return The number of to_noArgsAliasStringReturnSync ports
FwIndexType getNum_to_noArgsAliasStringReturnSync() const;
//! Get the number of to_noArgsGuarded ports
//!
//! \return The number of to_noArgsGuarded ports
FwIndexType getNum_to_noArgsGuarded() const;
//! Get the number of to_noArgsReturnGuarded ports
//!
//! \return The number of to_noArgsReturnGuarded ports
FwIndexType getNum_to_noArgsReturnGuarded() const;
//! Get the number of to_noArgsReturnSync ports
//!
//! \return The number of to_noArgsReturnSync ports
FwIndexType getNum_to_noArgsReturnSync() const;
//! Get the number of to_noArgsStringReturnSync ports
//!
//! \return The number of to_noArgsStringReturnSync ports
FwIndexType getNum_to_noArgsStringReturnSync() const;
//! Get the number of to_noArgsSync ports
//!
//! \return The number of to_noArgsSync ports
FwIndexType getNum_to_noArgsSync() const;
//! Get the number of to_typedAliasGuarded ports
//!
//! \return The number of to_typedAliasGuarded ports
FwIndexType getNum_to_typedAliasGuarded() const;
//! Get the number of to_typedAliasReturnSync ports
//!
//! \return The number of to_typedAliasReturnSync ports
FwIndexType getNum_to_typedAliasReturnSync() const;
//! Get the number of to_typedAliasStringReturnSync ports
//!
//! \return The number of to_typedAliasStringReturnSync ports
FwIndexType getNum_to_typedAliasStringReturnSync() const;
//! Get the number of to_typedGuarded ports
//!
//! \return The number of to_typedGuarded ports
FwIndexType getNum_to_typedGuarded() const;
//! Get the number of to_typedReturnGuarded ports
//!
//! \return The number of to_typedReturnGuarded ports
FwIndexType getNum_to_typedReturnGuarded() const;
//! Get the number of to_typedReturnSync ports
//!
//! \return The number of to_typedReturnSync ports
FwIndexType getNum_to_typedReturnSync() const;
//! Get the number of to_typedSync ports
//!
//! \return The number of to_typedSync ports
FwIndexType getNum_to_typedSync() const;
//! Get the number of to_serialGuarded ports
//!
//! \return The number of to_serialGuarded ports
FwIndexType getNum_to_serialGuarded() const;
//! Get the number of to_serialSync ports
//!
//! \return The number of to_serialSync ports
FwIndexType getNum_to_serialSync() const;
//! Get the number of from_cmdRegOut ports
//!
//! \return The number of from_cmdRegOut ports
FwIndexType getNum_from_cmdRegOut() const;
//! Get the number of from_cmdResponseOut ports
//!
//! \return The number of from_cmdResponseOut ports
FwIndexType getNum_from_cmdResponseOut() const;
//! Get the number of from_eventOut ports
//!
//! \return The number of from_eventOut ports
FwIndexType getNum_from_eventOut() const;
//! Get the number of from_prmGetOut ports
//!
//! \return The number of from_prmGetOut ports
FwIndexType getNum_from_prmGetOut() const;
//! Get the number of from_prmSetOut ports
//!
//! \return The number of from_prmSetOut ports
FwIndexType getNum_from_prmSetOut() const;
#if FW_ENABLE_TEXT_LOGGING == 1
//! Get the number of from_textEventOut ports
//!
//! \return The number of from_textEventOut ports
FwIndexType getNum_from_textEventOut() const;
#endif
//! Get the number of from_timeGetOut ports
//!
//! \return The number of from_timeGetOut ports
FwIndexType getNum_from_timeGetOut() const;
//! Get the number of from_tlmOut ports
//!
//! \return The number of from_tlmOut ports
FwIndexType getNum_from_tlmOut() const;
//! Get the number of from_noArgsOut ports
//!
//! \return The number of from_noArgsOut ports
FwIndexType getNum_from_noArgsOut() const;
//! Get the number of from_noArgsReturnOut ports
//!
//! \return The number of from_noArgsReturnOut ports
FwIndexType getNum_from_noArgsReturnOut() const;
//! Get the number of from_noArgsStringReturnOut ports
//!
//! \return The number of from_noArgsStringReturnOut ports
FwIndexType getNum_from_noArgsStringReturnOut() const;
//! Get the number of from_typedAliasOut ports
//!
//! \return The number of from_typedAliasOut ports
FwIndexType getNum_from_typedAliasOut() const;
//! Get the number of from_typedAliasReturnOut ports
//!
//! \return The number of from_typedAliasReturnOut ports
FwIndexType getNum_from_typedAliasReturnOut() const;
//! Get the number of from_typedAliasReturnStringOut ports
//!
//! \return The number of from_typedAliasReturnStringOut ports
FwIndexType getNum_from_typedAliasReturnStringOut() const;
//! Get the number of from_typedOut ports
//!
//! \return The number of from_typedOut ports
FwIndexType getNum_from_typedOut() const;
//! Get the number of from_typedReturnOut ports
//!
//! \return The number of from_typedReturnOut ports
FwIndexType getNum_from_typedReturnOut() const;
//! Get the number of from_serialOut ports
//!
//! \return The number of from_serialOut ports
FwIndexType getNum_from_serialOut() const;
protected:
// ----------------------------------------------------------------------
// Connection status queries for to ports
// ----------------------------------------------------------------------
//! Check whether port to_cmdIn is connected
//!
//! \return Whether port to_cmdIn is connected
bool isConnected_to_cmdIn(
FwIndexType portNum //!< The port number
);
//! Check whether port to_noArgsAliasStringReturnSync is connected
//!
//! \return Whether port to_noArgsAliasStringReturnSync is connected
bool isConnected_to_noArgsAliasStringReturnSync(
FwIndexType portNum //!< The port number
);
//! Check whether port to_noArgsGuarded is connected
//!
//! \return Whether port to_noArgsGuarded is connected
bool isConnected_to_noArgsGuarded(
FwIndexType portNum //!< The port number
);
//! Check whether port to_noArgsReturnGuarded is connected
//!
//! \return Whether port to_noArgsReturnGuarded is connected
bool isConnected_to_noArgsReturnGuarded(
FwIndexType portNum //!< The port number
);
//! Check whether port to_noArgsReturnSync is connected
//!
//! \return Whether port to_noArgsReturnSync is connected
bool isConnected_to_noArgsReturnSync(
FwIndexType portNum //!< The port number
);
//! Check whether port to_noArgsStringReturnSync is connected
//!
//! \return Whether port to_noArgsStringReturnSync is connected
bool isConnected_to_noArgsStringReturnSync(
FwIndexType portNum //!< The port number
);
//! Check whether port to_noArgsSync is connected
//!
//! \return Whether port to_noArgsSync is connected
bool isConnected_to_noArgsSync(
FwIndexType portNum //!< The port number
);
//! Check whether port to_typedAliasGuarded is connected
//!
//! \return Whether port to_typedAliasGuarded is connected
bool isConnected_to_typedAliasGuarded(
FwIndexType portNum //!< The port number
);
//! Check whether port to_typedAliasReturnSync is connected
//!
//! \return Whether port to_typedAliasReturnSync is connected
bool isConnected_to_typedAliasReturnSync(
FwIndexType portNum //!< The port number
);
//! Check whether port to_typedAliasStringReturnSync is connected
//!
//! \return Whether port to_typedAliasStringReturnSync is connected
bool isConnected_to_typedAliasStringReturnSync(
FwIndexType portNum //!< The port number
);
//! Check whether port to_typedGuarded is connected
//!
//! \return Whether port to_typedGuarded is connected
bool isConnected_to_typedGuarded(
FwIndexType portNum //!< The port number
);
//! Check whether port to_typedReturnGuarded is connected
//!
//! \return Whether port to_typedReturnGuarded is connected
bool isConnected_to_typedReturnGuarded(
FwIndexType portNum //!< The port number
);
//! Check whether port to_typedReturnSync is connected
//!
//! \return Whether port to_typedReturnSync is connected
bool isConnected_to_typedReturnSync(
FwIndexType portNum //!< The port number
);
//! Check whether port to_typedSync is connected
//!
//! \return Whether port to_typedSync is connected
bool isConnected_to_typedSync(
FwIndexType portNum //!< The port number
);
//! Check whether port to_serialGuarded is connected
//!
//! \return Whether port to_serialGuarded is connected
bool isConnected_to_serialGuarded(
FwIndexType portNum //!< The port number
);
//! Check whether port to_serialSync is connected
//!
//! \return Whether port to_serialSync is connected
bool isConnected_to_serialSync(
FwIndexType portNum //!< The port number
);
protected:
// ----------------------------------------------------------------------
// Functions for testing commands
// ----------------------------------------------------------------------
//! Handle a command response
virtual void cmdResponseIn(
FwOpcodeType opCode, //!< The opcode
U32 cmdSeq, //!< The command sequence number
Fw::CmdResponse response //!< The command response
);
//! Send command buffers directly (used for intentional command encoding errors)
void sendRawCmd(
FwOpcodeType opCode, //!< The opcode
U32 cmdSeq, //!< The command sequence number
Fw::CmdArgBuffer& buf //!< The command argument buffer
);
//! Send a CMD_SYNC command
void sendCmd_CMD_SYNC(
const FwEnumStoreType instance, //!< The instance number
U32 cmdSeq //!< The command sequence number
);
//! Send a CMD_SYNC_PRIMITIVE command
void sendCmd_CMD_SYNC_PRIMITIVE(
const FwEnumStoreType instance, //!< The instance number
U32 cmdSeq, //!< The command sequence number
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b //!< A boolean
);
//! Send a CMD_SYNC_STRING command
void sendCmd_CMD_SYNC_STRING(
const FwEnumStoreType instance, //!< The instance number
U32 cmdSeq, //!< The command sequence number
const Fw::StringBase& str1, //!< A string
const Fw::StringBase& str2 //!< Another string
);
//! Send a CMD_SYNC_ENUM command
void sendCmd_CMD_SYNC_ENUM(
const FwEnumStoreType instance, //!< The instance number
U32 cmdSeq, //!< The command sequence number
E e //!< An enum
);
//! Send a CMD_SYNC_ARRAY command
void sendCmd_CMD_SYNC_ARRAY(
const FwEnumStoreType instance, //!< The instance number
U32 cmdSeq, //!< The command sequence number
A a //!< An array
);
//! Send a CMD_SYNC_STRUCT command
void sendCmd_CMD_SYNC_STRUCT(
const FwEnumStoreType instance, //!< The instance number
U32 cmdSeq, //!< The command sequence number
S s //!< A struct
);
//! Send a CMD_GUARDED command
void sendCmd_CMD_GUARDED(
const FwEnumStoreType instance, //!< The instance number
U32 cmdSeq //!< The command sequence number
);
//! Send a CMD_GUARDED_PRIMITIVE command
void sendCmd_CMD_GUARDED_PRIMITIVE(
const FwEnumStoreType instance, //!< The instance number
U32 cmdSeq, //!< The command sequence number
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b //!< A boolean
);
//! Send a CMD_GUARDED_STRING command
void sendCmd_CMD_GUARDED_STRING(
const FwEnumStoreType instance, //!< The instance number
U32 cmdSeq, //!< The command sequence number
const Fw::StringBase& str1, //!< A string
const Fw::StringBase& str2 //!< Another string
);
//! Send a CMD_GUARDED_ENUM command
void sendCmd_CMD_GUARDED_ENUM(
const FwEnumStoreType instance, //!< The instance number
U32 cmdSeq, //!< The command sequence number
E e //!< An enum
);
//! Send a CMD_GUARDED_ARRAY command
void sendCmd_CMD_GUARDED_ARRAY(
const FwEnumStoreType instance, //!< The instance number
U32 cmdSeq, //!< The command sequence number
A a //!< An array
);
//! Send a CMD_GUARDED_STRUCT command
void sendCmd_CMD_GUARDED_STRUCT(
const FwEnumStoreType instance, //!< The instance number
U32 cmdSeq, //!< The command sequence number
S s //!< A struct
);
protected:
// ----------------------------------------------------------------------
// Functions for testing events
// ----------------------------------------------------------------------
//! Dispatch an event
void dispatchEvents(
FwEventIdType id, //!< The event ID
const Fw::Time& timeTag, //!< The time
const Fw::LogSeverity severity, //!< The severity
Fw::LogBuffer& args //!< The serialized arguments
);
#if FW_ENABLE_TEXT_LOGGING
//! Handle a text event
virtual void textLogIn(
FwEventIdType id, //!< The event ID
const Fw::Time& timeTag, //!< The time
const Fw::LogSeverity severity, //!< The severity
const Fw::TextLogString& text //!< The event string
);
#endif
//! Handle event EventActivityHigh
virtual void logIn_ACTIVITY_HI_EventActivityHigh();
//! Handle event EventActivityLowThrottled
virtual void logIn_ACTIVITY_LO_EventActivityLowThrottled(
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b //!< A boolean
);
//! Handle event EventCommand
virtual void logIn_COMMAND_EventCommand(
const Fw::StringBase& str1, //!< A string
const Fw::StringBase& str2 //!< Another string
);
//! Handle event EventDiagnostic
virtual void logIn_DIAGNOSTIC_EventDiagnostic(
E e //!< An enum
);
//! Handle event EventFatalThrottled
virtual void logIn_FATAL_EventFatalThrottled(
A a //!< An array
);
//! Handle event EventWarningHigh
virtual void logIn_WARNING_HI_EventWarningHigh(
S s //!< A struct
);
//! Handle event EventWarningLowThrottled
virtual void logIn_WARNING_LO_EventWarningLowThrottled();
protected:
// ----------------------------------------------------------------------
// Functions for testing telemetry
// ----------------------------------------------------------------------
//! Dispatch telemetry
void dispatchTlm(
FwChanIdType id, //!< The channel id
const Fw::Time& timeTag, //!< The time
Fw::TlmBuffer& val //!< The channel value
);
//! Handle channel ChannelU32Format
void tlmInput_ChannelU32Format(
const Fw::Time& timeTag, //!< The time
const U32 val //!< The channel value
);
//! Handle channel ChannelF32Format
void tlmInput_ChannelF32Format(
const Fw::Time& timeTag, //!< The time
const F32 val //!< The channel value
);
//! Handle channel ChannelStringFormat
void tlmInput_ChannelStringFormat(
const Fw::Time& timeTag, //!< The time
const Fw::StringBase& val //!< The channel value
);
//! Handle channel ChannelEnum
void tlmInput_ChannelEnum(
const Fw::Time& timeTag, //!< The time
const E& val //!< The channel value
);
//! Handle channel ChannelArrayFreq
void tlmInput_ChannelArrayFreq(
const Fw::Time& timeTag, //!< The time
const A& val //!< The channel value
);
//! Handle channel ChannelStructFreq
void tlmInput_ChannelStructFreq(
const Fw::Time& timeTag, //!< The time
const S& val //!< The channel value
);
//! Handle channel ChannelU32Limits
void tlmInput_ChannelU32Limits(
const Fw::Time& timeTag, //!< The time
const U32 val //!< The channel value
);
//! Handle channel ChannelF32Limits
void tlmInput_ChannelF32Limits(
const Fw::Time& timeTag, //!< The time
const F32 val //!< The channel value
);
//! Handle channel ChannelF64
void tlmInput_ChannelF64(
const Fw::Time& timeTag, //!< The time
const F64 val //!< The channel value
);
//! Handle channel ChannelU32OnChange
void tlmInput_ChannelU32OnChange(
const Fw::Time& timeTag, //!< The time
const U32 val //!< The channel value
);
//! Handle channel ChannelEnumOnChange
void tlmInput_ChannelEnumOnChange(
const Fw::Time& timeTag, //!< The time
const E& val //!< The channel value
);
protected:
// ----------------------------------------------------------------------
// Functions to test parameters
// ----------------------------------------------------------------------
//! Set parameter ParamU32
void paramSet_ParamU32(
const U32& val, //!< The parameter value
Fw::ParamValid valid //!< The parameter valid flag
);
//! Send parameter ParamU32
void paramSend_ParamU32(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Save parameter ParamU32
void paramSave_ParamU32(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Set parameter ParamF64
void paramSet_ParamF64(
const F64& val, //!< The parameter value
Fw::ParamValid valid //!< The parameter valid flag
);
//! Send parameter ParamF64
void paramSend_ParamF64(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Save parameter ParamF64
void paramSave_ParamF64(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Set parameter ParamString
void paramSet_ParamString(
const Fw::StringBase& val, //!< The parameter value
Fw::ParamValid valid //!< The parameter valid flag
);
//! Send parameter ParamString
void paramSend_ParamString(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Save parameter ParamString
void paramSave_ParamString(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Set parameter ParamEnum
void paramSet_ParamEnum(
const E& val, //!< The parameter value
Fw::ParamValid valid //!< The parameter valid flag
);
//! Send parameter ParamEnum
void paramSend_ParamEnum(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Save parameter ParamEnum
void paramSave_ParamEnum(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Set parameter ParamArray
void paramSet_ParamArray(
const A& val, //!< The parameter value
Fw::ParamValid valid //!< The parameter valid flag
);
//! Send parameter ParamArray
void paramSend_ParamArray(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Save parameter ParamArray
void paramSave_ParamArray(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Set parameter ParamStruct
void paramSet_ParamStruct(
const S& val, //!< The parameter value
Fw::ParamValid valid //!< The parameter valid flag
);
//! Send parameter ParamStruct
void paramSend_ParamStruct(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Save parameter ParamStruct
void paramSave_ParamStruct(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Set parameter ParamI32Ext
void paramSet_ParamI32Ext(
const I32& val, //!< The parameter value
Fw::ParamValid valid //!< The parameter valid flag
);
//! Send parameter ParamI32Ext
void paramSend_ParamI32Ext(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Save parameter ParamI32Ext
void paramSave_ParamI32Ext(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Set parameter ParamF64Ext
void paramSet_ParamF64Ext(
const F64& val, //!< The parameter value
Fw::ParamValid valid //!< The parameter valid flag
);
//! Send parameter ParamF64Ext
void paramSend_ParamF64Ext(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Save parameter ParamF64Ext
void paramSave_ParamF64Ext(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Set parameter ParamStringExt
void paramSet_ParamStringExt(
const Fw::StringBase& val, //!< The parameter value
Fw::ParamValid valid //!< The parameter valid flag
);
//! Send parameter ParamStringExt
void paramSend_ParamStringExt(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Save parameter ParamStringExt
void paramSave_ParamStringExt(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Set parameter ParamEnumExt
void paramSet_ParamEnumExt(
const E& val, //!< The parameter value
Fw::ParamValid valid //!< The parameter valid flag
);
//! Send parameter ParamEnumExt
void paramSend_ParamEnumExt(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Save parameter ParamEnumExt
void paramSave_ParamEnumExt(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Set parameter ParamArrayExt
void paramSet_ParamArrayExt(
const A& val, //!< The parameter value
Fw::ParamValid valid //!< The parameter valid flag
);
//! Send parameter ParamArrayExt
void paramSend_ParamArrayExt(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Save parameter ParamArrayExt
void paramSave_ParamArrayExt(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Set parameter ParamStructExt
void paramSet_ParamStructExt(
const S& val, //!< The parameter value
Fw::ParamValid valid //!< The parameter valid flag
);
//! Send parameter ParamStructExt
void paramSend_ParamStructExt(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
//! Save parameter ParamStructExt
void paramSave_ParamStructExt(
FwEnumStoreType instance, //!< The component instance
U32 cmdSeq //!< The command sequence number
);
protected:
// ----------------------------------------------------------------------
// Functions to test time
// ----------------------------------------------------------------------
//! Set the test time for events and telemetry
void setTestTime(
const Fw::Time& timeTag //!< The time
);
protected:
// ----------------------------------------------------------------------
// History functions
// ----------------------------------------------------------------------
//! Clear all history
void clearHistory();
//! Clear from port history
void clearFromPortHistory();
//! Push an entry on the history for from_noArgsOut
void pushFromPortEntry_noArgsOut();
//! Push an entry on the history for from_noArgsReturnOut
void pushFromPortEntry_noArgsReturnOut();
//! Push an entry on the history for from_noArgsStringReturnOut
void pushFromPortEntry_noArgsStringReturnOut();
//! Push an entry on the history for from_typedAliasOut
void pushFromPortEntry_typedAliasOut(
AliasPrim1 u32, //!< A primitive
AliasPrim2 f32, //!< Another primtive
AliasBool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const AliasEnum& e, //!< An enum
const AliasArray& a, //!< An array
const AliasStruct& s //!< A struct
);
//! Push an entry on the history for from_typedAliasReturnOut
void pushFromPortEntry_typedAliasReturnOut(
AliasPrim1 u32, //!< A primitive
AliasPrim2 f32, //!< Another primtive
AliasBool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const AliasEnum& e, //!< An enum
const AliasArray& a, //!< An array
const AliasStruct& s //!< A struct
);
//! Push an entry on the history for from_typedAliasReturnStringOut
void pushFromPortEntry_typedAliasReturnStringOut(
AliasPrim1 u32, //!< A primitive
AliasPrim2 f32, //!< Another primtive
AliasBool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const AliasEnum& e, //!< An enum
const AliasArray& a, //!< An array
const AnotherAliasStruct& s //!< A struct
);
//! Push an entry on the history for from_typedOut
void pushFromPortEntry_typedOut(
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b, //!< A boolean
const Fw::StringBase& str1, //!< A string
const E& e, //!< An enum
const A& a, //!< An array
const S& s //!< A struct
);
//! Push an entry on the history for from_typedReturnOut
void pushFromPortEntry_typedReturnOut(
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const E& e, //!< An enum
const A& a, //!< An array
const S& s //!< A struct
);
//! Clear event history
void clearEvents();
#if FW_ENABLE_TEXT_LOGGING
//! Print a text log history entry
static void printTextLogHistoryEntry(
const TextLogEntry& e,
FILE* file
);
//! Print the text log history
void printTextLogHistory(FILE* const file);
#endif
//! Clear telemetry history
void clearTlm();
private:
// ----------------------------------------------------------------------
// Static functions for output ports
// ----------------------------------------------------------------------
//! Static function for port from_cmdRegOut
static void from_cmdRegOut_static(
Fw::PassiveComponentBase* const callComp, //!< The component instance
FwIndexType portNum, //!< The port number
FwOpcodeType opCode //!< Command Op Code
);
//! Static function for port from_cmdResponseOut
static void from_cmdResponseOut_static(
Fw::PassiveComponentBase* const callComp, //!< The component instance
FwIndexType portNum, //!< The port number
FwOpcodeType opCode, //!< Command Op Code
U32 cmdSeq, //!< Command Sequence
const Fw::CmdResponse& response //!< The command response argument
);
//! Static function for port from_eventOut
static void from_eventOut_static(
Fw::PassiveComponentBase* const callComp, //!< The component instance
FwIndexType portNum, //!< The port number
FwEventIdType id, //!< Log ID
Fw::Time& timeTag, //!< Time Tag
const Fw::LogSeverity& severity, //!< The severity argument
Fw::LogBuffer& args //!< Buffer containing serialized log entry
);
//! Static function for port from_prmGetOut
static Fw::ParamValid from_prmGetOut_static(
Fw::PassiveComponentBase* const callComp, //!< The component instance
FwIndexType portNum, //!< The port number
FwPrmIdType id, //!< Parameter ID
Fw::ParamBuffer& val //!< Buffer containing serialized parameter value
);
//! Static function for port from_prmSetOut
static void from_prmSetOut_static(
Fw::PassiveComponentBase* const callComp, //!< The component instance
FwIndexType portNum, //!< The port number
FwPrmIdType id, //!< Parameter ID
Fw::ParamBuffer& val //!< Buffer containing serialized parameter value
);
#if FW_ENABLE_TEXT_LOGGING == 1
//! Static function for port from_textEventOut
static void from_textEventOut_static(
Fw::PassiveComponentBase* const callComp, //!< The component instance
FwIndexType portNum, //!< The port number
FwEventIdType id, //!< Log ID
Fw::Time& timeTag, //!< Time Tag
const Fw::LogSeverity& severity, //!< The severity argument
Fw::TextLogString& text //!< Text of log message
);
#endif
//! Static function for port from_timeGetOut
static void from_timeGetOut_static(
Fw::PassiveComponentBase* const callComp, //!< The component instance
FwIndexType portNum, //!< The port number
Fw::Time& time //!< Reference to Time object
);
//! Static function for port from_tlmOut
static void from_tlmOut_static(
Fw::PassiveComponentBase* const callComp, //!< The component instance
FwIndexType portNum, //!< The port number
FwChanIdType id, //!< Telemetry Channel ID
Fw::Time& timeTag, //!< Time Tag
Fw::TlmBuffer& val //!< Buffer containing serialized telemetry value
);
//! Static function for port from_noArgsOut
static void from_noArgsOut_static(
Fw::PassiveComponentBase* const callComp, //!< The component instance
FwIndexType portNum //!< The port number
);
//! Static function for port from_noArgsReturnOut
static U32 from_noArgsReturnOut_static(
Fw::PassiveComponentBase* const callComp, //!< The component instance
FwIndexType portNum //!< The port number
);
//! Static function for port from_noArgsStringReturnOut
static Fw::String from_noArgsStringReturnOut_static(
Fw::PassiveComponentBase* const callComp, //!< The component instance
FwIndexType portNum //!< The port number
);
//! Static function for port from_typedAliasOut
static void from_typedAliasOut_static(
Fw::PassiveComponentBase* const callComp, //!< The component instance
FwIndexType portNum, //!< The port number
AliasPrim1 u32, //!< A primitive
AliasPrim2 f32, //!< Another primtive
AliasBool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const AliasEnum& e, //!< An enum
const AliasArray& a, //!< An array
const AliasStruct& s //!< A struct
);
//! Static function for port from_typedAliasReturnOut
static AliasPrim2 from_typedAliasReturnOut_static(
Fw::PassiveComponentBase* const callComp, //!< The component instance
FwIndexType portNum, //!< The port number
AliasPrim1 u32, //!< A primitive
AliasPrim2 f32, //!< Another primtive
AliasBool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const AliasEnum& e, //!< An enum
const AliasArray& a, //!< An array
const AliasStruct& s //!< A struct
);
//! Static function for port from_typedAliasReturnStringOut
static Fw::String from_typedAliasReturnStringOut_static(
Fw::PassiveComponentBase* const callComp, //!< The component instance
FwIndexType portNum, //!< The port number
AliasPrim1 u32, //!< A primitive
AliasPrim2 f32, //!< Another primtive
AliasBool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const AliasEnum& e, //!< An enum
const AliasArray& a, //!< An array
const AnotherAliasStruct& s //!< A struct
);
//! Static function for port from_typedOut
static void from_typedOut_static(
Fw::PassiveComponentBase* const callComp, //!< The component instance
FwIndexType portNum, //!< The port number
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b, //!< A boolean
const Fw::StringBase& str1, //!< A string
const E& e, //!< An enum
const A& a, //!< An array
const S& s //!< A struct
);
//! Static function for port from_typedReturnOut
static F32 from_typedReturnOut_static(
Fw::PassiveComponentBase* const callComp, //!< The component instance
FwIndexType portNum, //!< The port number
U32 u32, //!< A U32
F32 f32, //!< An F32
bool b, //!< A boolean
const Fw::StringBase& str2, //!< A string
const E& e, //!< An enum
const A& a, //!< An array
const S& s //!< A struct
);
//! Static function for port from_serialOut
static void from_serialOut_static(
Fw::PassiveComponentBase* const callComp, //!< The component instance
FwIndexType portNum, //!< The port number
Fw::SerializeBufferBase& buffer //!< The serialization buffer
);
protected:
// ----------------------------------------------------------------------
// History member variables
// ----------------------------------------------------------------------
//! The total number of port entries
U32 fromPortHistorySize;
//! The size of history for from_noArgsOut
U32 fromPortHistorySize_noArgsOut;
//! The size of history for from_noArgsReturnOut
U32 fromPortHistorySize_noArgsReturnOut;
//! The size of history for from_noArgsStringReturnOut
U32 fromPortHistorySize_noArgsStringReturnOut;
//! The history for from_typedAliasOut
History<FromPortEntry_typedAliasOut>* fromPortHistory_typedAliasOut;
//! The history for from_typedAliasReturnOut
History<FromPortEntry_typedAliasReturnOut>* fromPortHistory_typedAliasReturnOut;
//! The history for from_typedAliasReturnStringOut
History<FromPortEntry_typedAliasReturnStringOut>* fromPortHistory_typedAliasReturnStringOut;
//! The history for from_typedOut
History<FromPortEntry_typedOut>* fromPortHistory_typedOut;
//! The history for from_typedReturnOut
History<FromPortEntry_typedReturnOut>* fromPortHistory_typedReturnOut;
//! The command response history
History<CmdResponse>* cmdResponseHistory;
//! The total number of events seen
U32 eventsSize;
#if FW_ENABLE_TEXT_LOGGING
//! The history of text log events
History<TextLogEntry>* textLogHistory;
#endif
//! Size of history for event EventActivityHigh
U32 eventsSize_EventActivityHigh;
//! The history of EventActivityLowThrottled events
History<EventEntry_EventActivityLowThrottled>* eventHistory_EventActivityLowThrottled;
//! The history of EventCommand events
History<EventEntry_EventCommand>* eventHistory_EventCommand;
//! The history of EventDiagnostic events
History<EventEntry_EventDiagnostic>* eventHistory_EventDiagnostic;
//! The history of EventFatalThrottled events
History<EventEntry_EventFatalThrottled>* eventHistory_EventFatalThrottled;
//! The history of EventWarningHigh events
History<EventEntry_EventWarningHigh>* eventHistory_EventWarningHigh;
//! Size of history for event EventWarningLowThrottled
U32 eventsSize_EventWarningLowThrottled;
//! The total number of telemetry inputs seen
U32 tlmSize;
//! The history of ChannelU32Format values
History<TlmEntry_ChannelU32Format>* tlmHistory_ChannelU32Format;
//! The history of ChannelF32Format values
History<TlmEntry_ChannelF32Format>* tlmHistory_ChannelF32Format;
//! The history of ChannelStringFormat values
History<TlmEntry_ChannelStringFormat>* tlmHistory_ChannelStringFormat;
//! The history of ChannelEnum values
History<TlmEntry_ChannelEnum>* tlmHistory_ChannelEnum;
//! The history of ChannelArrayFreq values
History<TlmEntry_ChannelArrayFreq>* tlmHistory_ChannelArrayFreq;
//! The history of ChannelStructFreq values
History<TlmEntry_ChannelStructFreq>* tlmHistory_ChannelStructFreq;
//! The history of ChannelU32Limits values
History<TlmEntry_ChannelU32Limits>* tlmHistory_ChannelU32Limits;
//! The history of ChannelF32Limits values
History<TlmEntry_ChannelF32Limits>* tlmHistory_ChannelF32Limits;
//! The history of ChannelF64 values
History<TlmEntry_ChannelF64>* tlmHistory_ChannelF64;
//! The history of ChannelU32OnChange values
History<TlmEntry_ChannelU32OnChange>* tlmHistory_ChannelU32OnChange;
//! The history of ChannelEnumOnChange values
History<TlmEntry_ChannelEnumOnChange>* tlmHistory_ChannelEnumOnChange;
private:
// ----------------------------------------------------------------------
// To ports
// ----------------------------------------------------------------------
//! To port connected to cmdIn
Fw::OutputCmdPort m_to_cmdIn[1];
//! To port connected to noArgsAliasStringReturnSync
Ports::OutputNoArgsAliasStringReturnPort m_to_noArgsAliasStringReturnSync[1];
//! To port connected to noArgsGuarded
Ports::OutputNoArgsPort m_to_noArgsGuarded[1];
//! To port connected to noArgsReturnGuarded
Ports::OutputNoArgsReturnPort m_to_noArgsReturnGuarded[1];
//! To port connected to noArgsReturnSync
Ports::OutputNoArgsReturnPort m_to_noArgsReturnSync[3];
//! To port connected to noArgsStringReturnSync
Ports::OutputNoArgsStringReturnPort m_to_noArgsStringReturnSync[1];
//! To port connected to noArgsSync
Ports::OutputNoArgsPort m_to_noArgsSync[3];
//! To port connected to typedAliasGuarded
Ports::OutputAliasTypedPort m_to_typedAliasGuarded[1];
//! To port connected to typedAliasReturnSync
Ports::OutputAliasTypedReturnPort m_to_typedAliasReturnSync[3];
//! To port connected to typedAliasStringReturnSync
Ports::OutputAliasTypedReturnStringPort m_to_typedAliasStringReturnSync[3];
//! To port connected to typedGuarded
Ports::OutputTypedPort m_to_typedGuarded[1];
//! To port connected to typedReturnGuarded
Ports::OutputTypedReturnPort m_to_typedReturnGuarded[1];
//! To port connected to typedReturnSync
Ports::OutputTypedReturnPort m_to_typedReturnSync[3];
//! To port connected to typedSync
Ports::OutputTypedPort m_to_typedSync[3];
//! To port connected to serialGuarded
Fw::OutputSerializePort m_to_serialGuarded[1];
//! To port connected to serialSync
Fw::OutputSerializePort m_to_serialSync[1];
private:
// ----------------------------------------------------------------------
// From ports
// ----------------------------------------------------------------------
//! From port connected to cmdRegOut
Fw::InputCmdRegPort m_from_cmdRegOut[1];
//! From port connected to cmdResponseOut
Fw::InputCmdResponsePort m_from_cmdResponseOut[1];
//! From port connected to eventOut
Fw::InputLogPort m_from_eventOut[1];
//! From port connected to prmGetOut
Fw::InputPrmGetPort m_from_prmGetOut[1];
//! From port connected to prmSetOut
Fw::InputPrmSetPort m_from_prmSetOut[1];
#if FW_ENABLE_TEXT_LOGGING == 1
//! From port connected to textEventOut
Fw::InputLogTextPort m_from_textEventOut[1];
#endif
//! From port connected to timeGetOut
Fw::InputTimePort m_from_timeGetOut[1];
//! From port connected to tlmOut
Fw::InputTlmPort m_from_tlmOut[1];
//! From port connected to noArgsOut
Ports::InputNoArgsPort m_from_noArgsOut[1];
//! From port connected to noArgsReturnOut
Ports::InputNoArgsReturnPort m_from_noArgsReturnOut[1];
//! From port connected to noArgsStringReturnOut
Ports::InputNoArgsStringReturnPort m_from_noArgsStringReturnOut[1];
//! From port connected to typedAliasOut
Ports::InputAliasTypedPort m_from_typedAliasOut[1];
//! From port connected to typedAliasReturnOut
Ports::InputAliasTypedReturnPort m_from_typedAliasReturnOut[1];
//! From port connected to typedAliasReturnStringOut
Ports::InputAliasTypedReturnStringPort m_from_typedAliasReturnStringOut[1];
//! From port connected to typedOut
Ports::InputTypedPort m_from_typedOut[1];
//! From port connected to typedReturnOut
Ports::InputTypedReturnPort m_from_typedReturnOut[1];
//! From port connected to serialOut
Fw::InputSerializePort m_from_serialOut[5];
private:
// ----------------------------------------------------------------------
// Parameter validity flags
// ----------------------------------------------------------------------
//! True if ParamU32 was successfully received
Fw::ParamValid m_param_ParamU32_valid;
//! True if ParamF64 was successfully received
Fw::ParamValid m_param_ParamF64_valid;
//! True if ParamString was successfully received
Fw::ParamValid m_param_ParamString_valid;
//! True if ParamEnum was successfully received
Fw::ParamValid m_param_ParamEnum_valid;
//! True if ParamArray was successfully received
Fw::ParamValid m_param_ParamArray_valid;
//! True if ParamStruct was successfully received
Fw::ParamValid m_param_ParamStruct_valid;
private:
// ----------------------------------------------------------------------
// Parameter variables
// ----------------------------------------------------------------------
//! Parameter ParamU32
//!
//! A parameter with U32 data
//! Second line of annotation
U32 m_param_ParamU32;
//! Parameter ParamF64
//!
//! A parameter with F64 data
F64 m_param_ParamF64;
//! Parameter ParamString
//!
//! A parameter with string data and default value
Fw::ParamString m_param_ParamString;
//! Parameter ParamEnum
//!
//! A parameter with enum data
E m_param_ParamEnum;
//! Parameter ParamArray
//!
//! A parameter with array data, default value, and save opcode
A m_param_ParamArray;
//! Parameter ParamStruct
//!
//! A parameter with struct data and set/save opcodes
S m_param_ParamStruct;
protected:
// ----------------------------------------------------------------------
// Parameter delegates
// ----------------------------------------------------------------------
//! Delegate to serialize/deserialize an externally stored parameter
PassiveSerialComponentBaseParamExternalDelegate paramTesterDelegate;
private:
// ----------------------------------------------------------------------
// Time variables
// ----------------------------------------------------------------------
//! Test time stamp
Fw::Time m_testTime;
};
#endif