mirror of
https://github.com/nasa/fpp.git
synced 2025-12-11 19:23:13 -06:00
1691 lines
54 KiB
C++
Vendored
1691 lines
54 KiB
C++
Vendored
// ======================================================================
|
|
// \title QueuedCommandsTesterBase.hpp
|
|
// \author Generated by fpp-to-cpp
|
|
// \brief hpp file for QueuedCommands component test harness base class
|
|
// ======================================================================
|
|
|
|
#ifndef QueuedCommandsTesterBase_HPP
|
|
#define QueuedCommandsTesterBase_HPP
|
|
|
|
#include <cstdio>
|
|
|
|
#include "Fw/Comp/PassiveComponentBase.hpp"
|
|
#include "Fw/Port/InputSerializePort.hpp"
|
|
#include "Fw/Types/Assert.hpp"
|
|
#include "Fw/Types/ExternalString.hpp"
|
|
#include "test-base/QueuedCommandsComponentAc.hpp"
|
|
|
|
//! \class QueuedCommandsTesterBase
|
|
//! \brief Auto-generated base for QueuedCommands component test harness
|
|
class QueuedCommandsTesterBase :
|
|
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;
|
|
};
|
|
|
|
public:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Component initialization
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Initialize object QueuedCommandsTesterBase
|
|
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 aliasTypedAsync[portNum]
|
|
void connect_to_aliasTypedAsync(
|
|
FwIndexType portNum, //!< The port number
|
|
Ports::InputAliasTypedPort* 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 noArgsAsync[portNum]
|
|
void connect_to_noArgsAsync(
|
|
FwIndexType portNum, //!< The port number
|
|
Ports::InputNoArgsPort* 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 typedAsync[portNum]
|
|
void connect_to_typedAsync(
|
|
FwIndexType portNum, //!< The port number
|
|
Ports::InputTypedPort* port //!< The input port
|
|
);
|
|
|
|
//! Connect port to typedAsyncAssert[portNum]
|
|
void connect_to_typedAsyncAssert(
|
|
FwIndexType portNum, //!< The port number
|
|
Ports::InputTypedPort* port //!< The input port
|
|
);
|
|
|
|
//! Connect port to typedAsyncBlockPriority[portNum]
|
|
void connect_to_typedAsyncBlockPriority(
|
|
FwIndexType portNum, //!< The port number
|
|
Ports::InputTypedPort* port //!< The input port
|
|
);
|
|
|
|
//! Connect port to typedAsyncDropPriority[portNum]
|
|
void connect_to_typedAsyncDropPriority(
|
|
FwIndexType portNum, //!< The port number
|
|
Ports::InputTypedPort* 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
|
|
);
|
|
|
|
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
|
|
);
|
|
|
|
protected:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Component construction and destruction
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Construct object QueuedCommandsTesterBase
|
|
QueuedCommandsTesterBase(
|
|
const char* const compName, //!< The component name
|
|
const U32 maxHistorySize //!< The maximum size of each history
|
|
);
|
|
|
|
//! Destroy object QueuedCommandsTesterBase
|
|
virtual ~QueuedCommandsTesterBase();
|
|
|
|
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:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// 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
|
|
);
|
|
|
|
protected:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Invocation functions for to ports
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Invoke the to port connected to aliasTypedAsync
|
|
void invoke_to_aliasTypedAsync(
|
|
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 noArgsAliasStringReturnSync
|
|
Fw::String invoke_to_noArgsAliasStringReturnSync(
|
|
FwIndexType portNum //!< The port number
|
|
);
|
|
|
|
//! Invoke the to port connected to noArgsAsync
|
|
void invoke_to_noArgsAsync(
|
|
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 typedAsync
|
|
void invoke_to_typedAsync(
|
|
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 typedAsyncAssert
|
|
void invoke_to_typedAsyncAssert(
|
|
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 typedAsyncBlockPriority
|
|
void invoke_to_typedAsyncBlockPriority(
|
|
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 typedAsyncDropPriority
|
|
void invoke_to_typedAsyncDropPriority(
|
|
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 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
|
|
);
|
|
|
|
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_aliasTypedAsync ports
|
|
//!
|
|
//! \return The number of to_aliasTypedAsync ports
|
|
FwIndexType getNum_to_aliasTypedAsync() 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_noArgsAsync ports
|
|
//!
|
|
//! \return The number of to_noArgsAsync ports
|
|
FwIndexType getNum_to_noArgsAsync() 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_typedAsync ports
|
|
//!
|
|
//! \return The number of to_typedAsync ports
|
|
FwIndexType getNum_to_typedAsync() const;
|
|
|
|
//! Get the number of to_typedAsyncAssert ports
|
|
//!
|
|
//! \return The number of to_typedAsyncAssert ports
|
|
FwIndexType getNum_to_typedAsyncAssert() const;
|
|
|
|
//! Get the number of to_typedAsyncBlockPriority ports
|
|
//!
|
|
//! \return The number of to_typedAsyncBlockPriority ports
|
|
FwIndexType getNum_to_typedAsyncBlockPriority() const;
|
|
|
|
//! Get the number of to_typedAsyncDropPriority ports
|
|
//!
|
|
//! \return The number of to_typedAsyncDropPriority ports
|
|
FwIndexType getNum_to_typedAsyncDropPriority() 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 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;
|
|
|
|
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_aliasTypedAsync is connected
|
|
//!
|
|
//! \return Whether port to_aliasTypedAsync is connected
|
|
bool isConnected_to_aliasTypedAsync(
|
|
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_noArgsAsync is connected
|
|
//!
|
|
//! \return Whether port to_noArgsAsync is connected
|
|
bool isConnected_to_noArgsAsync(
|
|
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_typedAsync is connected
|
|
//!
|
|
//! \return Whether port to_typedAsync is connected
|
|
bool isConnected_to_typedAsync(
|
|
FwIndexType portNum //!< The port number
|
|
);
|
|
|
|
//! Check whether port to_typedAsyncAssert is connected
|
|
//!
|
|
//! \return Whether port to_typedAsyncAssert is connected
|
|
bool isConnected_to_typedAsyncAssert(
|
|
FwIndexType portNum //!< The port number
|
|
);
|
|
|
|
//! Check whether port to_typedAsyncBlockPriority is connected
|
|
//!
|
|
//! \return Whether port to_typedAsyncBlockPriority is connected
|
|
bool isConnected_to_typedAsyncBlockPriority(
|
|
FwIndexType portNum //!< The port number
|
|
);
|
|
|
|
//! Check whether port to_typedAsyncDropPriority is connected
|
|
//!
|
|
//! \return Whether port to_typedAsyncDropPriority is connected
|
|
bool isConnected_to_typedAsyncDropPriority(
|
|
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
|
|
);
|
|
|
|
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
|
|
);
|
|
|
|
//! Send a CMD_ASYNC command
|
|
void sendCmd_CMD_ASYNC(
|
|
const FwEnumStoreType instance, //!< The instance number
|
|
U32 cmdSeq //!< The command sequence number
|
|
);
|
|
|
|
//! Send a CMD_PRIORITY command
|
|
void sendCmd_CMD_PRIORITY(
|
|
const FwEnumStoreType instance, //!< The instance number
|
|
U32 cmdSeq //!< The command sequence number
|
|
);
|
|
|
|
//! Send a CMD_PARAMS_PRIORITY command
|
|
void sendCmd_CMD_PARAMS_PRIORITY(
|
|
const FwEnumStoreType instance, //!< The instance number
|
|
U32 cmdSeq, //!< The command sequence number
|
|
U32 u32
|
|
);
|
|
|
|
//! Send a CMD_DROP command
|
|
void sendCmd_CMD_DROP(
|
|
const FwEnumStoreType instance, //!< The instance number
|
|
U32 cmdSeq //!< The command sequence number
|
|
);
|
|
|
|
//! Send a CMD_PARAMS_PRIORITY_DROP command
|
|
void sendCmd_CMD_PARAMS_PRIORITY_DROP(
|
|
const FwEnumStoreType instance, //!< The instance number
|
|
U32 cmdSeq, //!< The command sequence number
|
|
U32 u32
|
|
);
|
|
|
|
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
|
|
);
|
|
|
|
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_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_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
|
|
);
|
|
|
|
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;
|
|
|
|
private:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// To ports
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! To port connected to cmdIn
|
|
Fw::OutputCmdPort m_to_cmdIn[1];
|
|
|
|
//! To port connected to aliasTypedAsync
|
|
Ports::OutputAliasTypedPort m_to_aliasTypedAsync[1];
|
|
|
|
//! To port connected to noArgsAliasStringReturnSync
|
|
Ports::OutputNoArgsAliasStringReturnPort m_to_noArgsAliasStringReturnSync[1];
|
|
|
|
//! To port connected to noArgsAsync
|
|
Ports::OutputNoArgsPort m_to_noArgsAsync[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 typedAsync
|
|
Ports::OutputTypedPort m_to_typedAsync[1];
|
|
|
|
//! To port connected to typedAsyncAssert
|
|
Ports::OutputTypedPort m_to_typedAsyncAssert[1];
|
|
|
|
//! To port connected to typedAsyncBlockPriority
|
|
Ports::OutputTypedPort m_to_typedAsyncBlockPriority[1];
|
|
|
|
//! To port connected to typedAsyncDropPriority
|
|
Ports::OutputTypedPort m_to_typedAsyncDropPriority[1];
|
|
|
|
//! 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];
|
|
|
|
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];
|
|
|
|
private:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Time variables
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Test time stamp
|
|
Fw::Time m_testTime;
|
|
|
|
};
|
|
|
|
#endif
|