fpp/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTelemetryTesterBase.ref.cpp
2024-05-09 23:13:24 -07:00

2044 lines
48 KiB
C++

// ======================================================================
// \title ActiveTelemetryTesterBase.cpp
// \author Generated by fpp-to-cpp
// \brief cpp file for ActiveTelemetry component test harness base class
// ======================================================================
#include <cstdlib>
#include <cstring>
#include "test-base/ActiveTelemetryTesterBase.hpp"
// ----------------------------------------------------------------------
// Component initialization
// ----------------------------------------------------------------------
void ActiveTelemetryTesterBase ::
init(FwEnumStoreType instance)
{
// Initialize base class
Fw::PassiveComponentBase::init(instance);
// Connect input port timeGetOut
for (
FwIndexType port = 0;
port < static_cast<FwIndexType>(this->getNum_from_timeGetOut());
port++
) {
this->m_from_timeGetOut[port].init();
this->m_from_timeGetOut[port].addCallComp(
this,
from_timeGetOut_static
);
this->m_from_timeGetOut[port].setPortNum(port);
#if FW_OBJECT_NAMES == 1
Fw::ObjectName portName;
portName.format(
"%s_from_timeGetOut[%" PRI_PlatformIntType "]",
this->m_objName.toChar(),
port
);
this->m_from_timeGetOut[port].setObjName(portName.toChar());
#endif
}
// Connect input port tlmOut
for (
FwIndexType port = 0;
port < static_cast<FwIndexType>(this->getNum_from_tlmOut());
port++
) {
this->m_from_tlmOut[port].init();
this->m_from_tlmOut[port].addCallComp(
this,
from_tlmOut_static
);
this->m_from_tlmOut[port].setPortNum(port);
#if FW_OBJECT_NAMES == 1
Fw::ObjectName portName;
portName.format(
"%s_from_tlmOut[%" PRI_PlatformIntType "]",
this->m_objName.toChar(),
port
);
this->m_from_tlmOut[port].setObjName(portName.toChar());
#endif
}
// Connect input port noArgsOut
for (
FwIndexType port = 0;
port < static_cast<FwIndexType>(this->getNum_from_noArgsOut());
port++
) {
this->m_from_noArgsOut[port].init();
this->m_from_noArgsOut[port].addCallComp(
this,
from_noArgsOut_static
);
this->m_from_noArgsOut[port].setPortNum(port);
#if FW_OBJECT_NAMES == 1
Fw::ObjectName portName;
portName.format(
"%s_from_noArgsOut[%" PRI_PlatformIntType "]",
this->m_objName.toChar(),
port
);
this->m_from_noArgsOut[port].setObjName(portName.toChar());
#endif
}
// Connect input port noArgsReturnOut
for (
FwIndexType port = 0;
port < static_cast<FwIndexType>(this->getNum_from_noArgsReturnOut());
port++
) {
this->m_from_noArgsReturnOut[port].init();
this->m_from_noArgsReturnOut[port].addCallComp(
this,
from_noArgsReturnOut_static
);
this->m_from_noArgsReturnOut[port].setPortNum(port);
#if FW_OBJECT_NAMES == 1
Fw::ObjectName portName;
portName.format(
"%s_from_noArgsReturnOut[%" PRI_PlatformIntType "]",
this->m_objName.toChar(),
port
);
this->m_from_noArgsReturnOut[port].setObjName(portName.toChar());
#endif
}
// Connect input port typedOut
for (
FwIndexType port = 0;
port < static_cast<FwIndexType>(this->getNum_from_typedOut());
port++
) {
this->m_from_typedOut[port].init();
this->m_from_typedOut[port].addCallComp(
this,
from_typedOut_static
);
this->m_from_typedOut[port].setPortNum(port);
#if FW_OBJECT_NAMES == 1
Fw::ObjectName portName;
portName.format(
"%s_from_typedOut[%" PRI_PlatformIntType "]",
this->m_objName.toChar(),
port
);
this->m_from_typedOut[port].setObjName(portName.toChar());
#endif
}
// Connect input port typedReturnOut
for (
FwIndexType port = 0;
port < static_cast<FwIndexType>(this->getNum_from_typedReturnOut());
port++
) {
this->m_from_typedReturnOut[port].init();
this->m_from_typedReturnOut[port].addCallComp(
this,
from_typedReturnOut_static
);
this->m_from_typedReturnOut[port].setPortNum(port);
#if FW_OBJECT_NAMES == 1
Fw::ObjectName portName;
portName.format(
"%s_from_typedReturnOut[%" PRI_PlatformIntType "]",
this->m_objName.toChar(),
port
);
this->m_from_typedReturnOut[port].setObjName(portName.toChar());
#endif
}
// Connect output port noArgsAsync
for (
FwIndexType port = 0;
port < static_cast<FwIndexType>(this->getNum_to_noArgsAsync());
port++
) {
this->m_to_noArgsAsync[port].init();
#if FW_OBJECT_NAMES == 1
Fw::ObjectName portName;
portName.format(
"%s_to_noArgsAsync[%" PRI_PlatformIntType "]",
this->m_objName.toChar(),
port
);
this->m_to_noArgsAsync[port].setObjName(portName.toChar());
#endif
}
// Connect output port noArgsGuarded
for (
FwIndexType port = 0;
port < static_cast<FwIndexType>(this->getNum_to_noArgsGuarded());
port++
) {
this->m_to_noArgsGuarded[port].init();
#if FW_OBJECT_NAMES == 1
Fw::ObjectName portName;
portName.format(
"%s_to_noArgsGuarded[%" PRI_PlatformIntType "]",
this->m_objName.toChar(),
port
);
this->m_to_noArgsGuarded[port].setObjName(portName.toChar());
#endif
}
// Connect output port noArgsReturnGuarded
for (
FwIndexType port = 0;
port < static_cast<FwIndexType>(this->getNum_to_noArgsReturnGuarded());
port++
) {
this->m_to_noArgsReturnGuarded[port].init();
#if FW_OBJECT_NAMES == 1
Fw::ObjectName portName;
portName.format(
"%s_to_noArgsReturnGuarded[%" PRI_PlatformIntType "]",
this->m_objName.toChar(),
port
);
this->m_to_noArgsReturnGuarded[port].setObjName(portName.toChar());
#endif
}
// Connect output port noArgsReturnSync
for (
FwIndexType port = 0;
port < static_cast<FwIndexType>(this->getNum_to_noArgsReturnSync());
port++
) {
this->m_to_noArgsReturnSync[port].init();
#if FW_OBJECT_NAMES == 1
Fw::ObjectName portName;
portName.format(
"%s_to_noArgsReturnSync[%" PRI_PlatformIntType "]",
this->m_objName.toChar(),
port
);
this->m_to_noArgsReturnSync[port].setObjName(portName.toChar());
#endif
}
// Connect output port noArgsSync
for (
FwIndexType port = 0;
port < static_cast<FwIndexType>(this->getNum_to_noArgsSync());
port++
) {
this->m_to_noArgsSync[port].init();
#if FW_OBJECT_NAMES == 1
Fw::ObjectName portName;
portName.format(
"%s_to_noArgsSync[%" PRI_PlatformIntType "]",
this->m_objName.toChar(),
port
);
this->m_to_noArgsSync[port].setObjName(portName.toChar());
#endif
}
// Connect output port typedAsync
for (
FwIndexType port = 0;
port < static_cast<FwIndexType>(this->getNum_to_typedAsync());
port++
) {
this->m_to_typedAsync[port].init();
#if FW_OBJECT_NAMES == 1
Fw::ObjectName portName;
portName.format(
"%s_to_typedAsync[%" PRI_PlatformIntType "]",
this->m_objName.toChar(),
port
);
this->m_to_typedAsync[port].setObjName(portName.toChar());
#endif
}
// Connect output port typedAsyncAssert
for (
FwIndexType port = 0;
port < static_cast<FwIndexType>(this->getNum_to_typedAsyncAssert());
port++
) {
this->m_to_typedAsyncAssert[port].init();
#if FW_OBJECT_NAMES == 1
Fw::ObjectName portName;
portName.format(
"%s_to_typedAsyncAssert[%" PRI_PlatformIntType "]",
this->m_objName.toChar(),
port
);
this->m_to_typedAsyncAssert[port].setObjName(portName.toChar());
#endif
}
// Connect output port typedAsyncBlockPriority
for (
FwIndexType port = 0;
port < static_cast<FwIndexType>(this->getNum_to_typedAsyncBlockPriority());
port++
) {
this->m_to_typedAsyncBlockPriority[port].init();
#if FW_OBJECT_NAMES == 1
Fw::ObjectName portName;
portName.format(
"%s_to_typedAsyncBlockPriority[%" PRI_PlatformIntType "]",
this->m_objName.toChar(),
port
);
this->m_to_typedAsyncBlockPriority[port].setObjName(portName.toChar());
#endif
}
// Connect output port typedAsyncDropPriority
for (
FwIndexType port = 0;
port < static_cast<FwIndexType>(this->getNum_to_typedAsyncDropPriority());
port++
) {
this->m_to_typedAsyncDropPriority[port].init();
#if FW_OBJECT_NAMES == 1
Fw::ObjectName portName;
portName.format(
"%s_to_typedAsyncDropPriority[%" PRI_PlatformIntType "]",
this->m_objName.toChar(),
port
);
this->m_to_typedAsyncDropPriority[port].setObjName(portName.toChar());
#endif
}
// Connect output port typedGuarded
for (
FwIndexType port = 0;
port < static_cast<FwIndexType>(this->getNum_to_typedGuarded());
port++
) {
this->m_to_typedGuarded[port].init();
#if FW_OBJECT_NAMES == 1
Fw::ObjectName portName;
portName.format(
"%s_to_typedGuarded[%" PRI_PlatformIntType "]",
this->m_objName.toChar(),
port
);
this->m_to_typedGuarded[port].setObjName(portName.toChar());
#endif
}
// Connect output port typedReturnGuarded
for (
FwIndexType port = 0;
port < static_cast<FwIndexType>(this->getNum_to_typedReturnGuarded());
port++
) {
this->m_to_typedReturnGuarded[port].init();
#if FW_OBJECT_NAMES == 1
Fw::ObjectName portName;
portName.format(
"%s_to_typedReturnGuarded[%" PRI_PlatformIntType "]",
this->m_objName.toChar(),
port
);
this->m_to_typedReturnGuarded[port].setObjName(portName.toChar());
#endif
}
// Connect output port typedReturnSync
for (
FwIndexType port = 0;
port < static_cast<FwIndexType>(this->getNum_to_typedReturnSync());
port++
) {
this->m_to_typedReturnSync[port].init();
#if FW_OBJECT_NAMES == 1
Fw::ObjectName portName;
portName.format(
"%s_to_typedReturnSync[%" PRI_PlatformIntType "]",
this->m_objName.toChar(),
port
);
this->m_to_typedReturnSync[port].setObjName(portName.toChar());
#endif
}
// Connect output port typedSync
for (
FwIndexType port = 0;
port < static_cast<FwIndexType>(this->getNum_to_typedSync());
port++
) {
this->m_to_typedSync[port].init();
#if FW_OBJECT_NAMES == 1
Fw::ObjectName portName;
portName.format(
"%s_to_typedSync[%" PRI_PlatformIntType "]",
this->m_objName.toChar(),
port
);
this->m_to_typedSync[port].setObjName(portName.toChar());
#endif
}
}
// ----------------------------------------------------------------------
// Connectors for to ports
// ----------------------------------------------------------------------
void ActiveTelemetryTesterBase ::
connect_to_cmdIn(
FwIndexType portNum,
Fw::InputCmdPort* port
)
{
FW_ASSERT(
portNum < this->getNum_to_cmdIn(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_cmdIn[portNum].addCallPort(port);
}
void ActiveTelemetryTesterBase ::
connect_to_noArgsAsync(
FwIndexType portNum,
Ports::InputNoArgsPort* port
)
{
FW_ASSERT(
portNum < this->getNum_to_noArgsAsync(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_noArgsAsync[portNum].addCallPort(port);
}
void ActiveTelemetryTesterBase ::
connect_to_noArgsGuarded(
FwIndexType portNum,
Ports::InputNoArgsPort* port
)
{
FW_ASSERT(
portNum < this->getNum_to_noArgsGuarded(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_noArgsGuarded[portNum].addCallPort(port);
}
void ActiveTelemetryTesterBase ::
connect_to_noArgsReturnGuarded(
FwIndexType portNum,
Ports::InputNoArgsReturnPort* port
)
{
FW_ASSERT(
portNum < this->getNum_to_noArgsReturnGuarded(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_noArgsReturnGuarded[portNum].addCallPort(port);
}
void ActiveTelemetryTesterBase ::
connect_to_noArgsReturnSync(
FwIndexType portNum,
Ports::InputNoArgsReturnPort* port
)
{
FW_ASSERT(
portNum < this->getNum_to_noArgsReturnSync(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_noArgsReturnSync[portNum].addCallPort(port);
}
void ActiveTelemetryTesterBase ::
connect_to_noArgsSync(
FwIndexType portNum,
Ports::InputNoArgsPort* port
)
{
FW_ASSERT(
portNum < this->getNum_to_noArgsSync(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_noArgsSync[portNum].addCallPort(port);
}
void ActiveTelemetryTesterBase ::
connect_to_typedAsync(
FwIndexType portNum,
Ports::InputTypedPort* port
)
{
FW_ASSERT(
portNum < this->getNum_to_typedAsync(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_typedAsync[portNum].addCallPort(port);
}
void ActiveTelemetryTesterBase ::
connect_to_typedAsyncAssert(
FwIndexType portNum,
Ports::InputTypedPort* port
)
{
FW_ASSERT(
portNum < this->getNum_to_typedAsyncAssert(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_typedAsyncAssert[portNum].addCallPort(port);
}
void ActiveTelemetryTesterBase ::
connect_to_typedAsyncBlockPriority(
FwIndexType portNum,
Ports::InputTypedPort* port
)
{
FW_ASSERT(
portNum < this->getNum_to_typedAsyncBlockPriority(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_typedAsyncBlockPriority[portNum].addCallPort(port);
}
void ActiveTelemetryTesterBase ::
connect_to_typedAsyncDropPriority(
FwIndexType portNum,
Ports::InputTypedPort* port
)
{
FW_ASSERT(
portNum < this->getNum_to_typedAsyncDropPriority(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_typedAsyncDropPriority[portNum].addCallPort(port);
}
void ActiveTelemetryTesterBase ::
connect_to_typedGuarded(
FwIndexType portNum,
Ports::InputTypedPort* port
)
{
FW_ASSERT(
portNum < this->getNum_to_typedGuarded(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_typedGuarded[portNum].addCallPort(port);
}
void ActiveTelemetryTesterBase ::
connect_to_typedReturnGuarded(
FwIndexType portNum,
Ports::InputTypedReturnPort* port
)
{
FW_ASSERT(
portNum < this->getNum_to_typedReturnGuarded(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_typedReturnGuarded[portNum].addCallPort(port);
}
void ActiveTelemetryTesterBase ::
connect_to_typedReturnSync(
FwIndexType portNum,
Ports::InputTypedReturnPort* port
)
{
FW_ASSERT(
portNum < this->getNum_to_typedReturnSync(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_typedReturnSync[portNum].addCallPort(port);
}
void ActiveTelemetryTesterBase ::
connect_to_typedSync(
FwIndexType portNum,
Ports::InputTypedPort* port
)
{
FW_ASSERT(
portNum < this->getNum_to_typedSync(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_typedSync[portNum].addCallPort(port);
}
// ----------------------------------------------------------------------
// Getters for from ports
// ----------------------------------------------------------------------
Fw::InputCmdRegPort* ActiveTelemetryTesterBase ::
get_from_cmdRegOut(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_from_cmdRegOut(),
static_cast<FwAssertArgType>(portNum)
);
return &this->m_from_cmdRegOut[portNum];
}
Fw::InputCmdResponsePort* ActiveTelemetryTesterBase ::
get_from_cmdResponseOut(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_from_cmdResponseOut(),
static_cast<FwAssertArgType>(portNum)
);
return &this->m_from_cmdResponseOut[portNum];
}
Fw::InputLogPort* ActiveTelemetryTesterBase ::
get_from_eventOut(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_from_eventOut(),
static_cast<FwAssertArgType>(portNum)
);
return &this->m_from_eventOut[portNum];
}
Fw::InputPrmGetPort* ActiveTelemetryTesterBase ::
get_from_prmGetOut(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_from_prmGetOut(),
static_cast<FwAssertArgType>(portNum)
);
return &this->m_from_prmGetOut[portNum];
}
Fw::InputPrmSetPort* ActiveTelemetryTesterBase ::
get_from_prmSetOut(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_from_prmSetOut(),
static_cast<FwAssertArgType>(portNum)
);
return &this->m_from_prmSetOut[portNum];
}
#if FW_ENABLE_TEXT_LOGGING == 1
Fw::InputLogTextPort* ActiveTelemetryTesterBase ::
get_from_textEventOut(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_from_textEventOut(),
static_cast<FwAssertArgType>(portNum)
);
return &this->m_from_textEventOut[portNum];
}
#endif
Fw::InputTimePort* ActiveTelemetryTesterBase ::
get_from_timeGetOut(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_from_timeGetOut(),
static_cast<FwAssertArgType>(portNum)
);
return &this->m_from_timeGetOut[portNum];
}
Fw::InputTlmPort* ActiveTelemetryTesterBase ::
get_from_tlmOut(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_from_tlmOut(),
static_cast<FwAssertArgType>(portNum)
);
return &this->m_from_tlmOut[portNum];
}
Ports::InputNoArgsPort* ActiveTelemetryTesterBase ::
get_from_noArgsOut(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_from_noArgsOut(),
static_cast<FwAssertArgType>(portNum)
);
return &this->m_from_noArgsOut[portNum];
}
Ports::InputNoArgsReturnPort* ActiveTelemetryTesterBase ::
get_from_noArgsReturnOut(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_from_noArgsReturnOut(),
static_cast<FwAssertArgType>(portNum)
);
return &this->m_from_noArgsReturnOut[portNum];
}
Ports::InputTypedPort* ActiveTelemetryTesterBase ::
get_from_typedOut(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_from_typedOut(),
static_cast<FwAssertArgType>(portNum)
);
return &this->m_from_typedOut[portNum];
}
Ports::InputTypedReturnPort* ActiveTelemetryTesterBase ::
get_from_typedReturnOut(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_from_typedReturnOut(),
static_cast<FwAssertArgType>(portNum)
);
return &this->m_from_typedReturnOut[portNum];
}
// ----------------------------------------------------------------------
// Component construction and destruction
// ----------------------------------------------------------------------
ActiveTelemetryTesterBase ::
ActiveTelemetryTesterBase(
const char* const compName,
const U32 maxHistorySize
) :
Fw::PassiveComponentBase(compName)
{
// Initialize port histories
this->fromPortHistory_typedOut = new History<FromPortEntry_typedOut>(maxHistorySize);
this->fromPortHistory_typedReturnOut = new History<FromPortEntry_typedReturnOut>(maxHistorySize);
// Initialize telemetry histories
this->tlmHistory_ChannelU32Format = new History<TlmEntry_ChannelU32Format>(maxHistorySize);
this->tlmHistory_ChannelF32Format = new History<TlmEntry_ChannelF32Format>(maxHistorySize);
this->tlmHistory_ChannelStringFormat = new History<TlmEntry_ChannelStringFormat>(maxHistorySize);
this->tlmHistory_ChannelEnum = new History<TlmEntry_ChannelEnum>(maxHistorySize);
this->tlmHistory_ChannelArrayFreq = new History<TlmEntry_ChannelArrayFreq>(maxHistorySize);
this->tlmHistory_ChannelStructFreq = new History<TlmEntry_ChannelStructFreq>(maxHistorySize);
this->tlmHistory_ChannelU32Limits = new History<TlmEntry_ChannelU32Limits>(maxHistorySize);
this->tlmHistory_ChannelF32Limits = new History<TlmEntry_ChannelF32Limits>(maxHistorySize);
this->tlmHistory_ChannelF64 = new History<TlmEntry_ChannelF64>(maxHistorySize);
this->tlmHistory_ChannelU32OnChange = new History<TlmEntry_ChannelU32OnChange>(maxHistorySize);
this->tlmHistory_ChannelEnumOnChange = new History<TlmEntry_ChannelEnumOnChange>(maxHistorySize);
// Clear history
this->clearHistory();
}
ActiveTelemetryTesterBase ::
~ActiveTelemetryTesterBase()
{
// Destroy port histories
delete this->fromPortHistory_typedOut;
delete this->fromPortHistory_typedReturnOut;
// Destroy telemetry histories
delete this->tlmHistory_ChannelU32Format;
delete this->tlmHistory_ChannelF32Format;
delete this->tlmHistory_ChannelStringFormat;
delete this->tlmHistory_ChannelEnum;
delete this->tlmHistory_ChannelArrayFreq;
delete this->tlmHistory_ChannelStructFreq;
delete this->tlmHistory_ChannelU32Limits;
delete this->tlmHistory_ChannelF32Limits;
delete this->tlmHistory_ChannelF64;
delete this->tlmHistory_ChannelU32OnChange;
delete this->tlmHistory_ChannelEnumOnChange;
}
// ----------------------------------------------------------------------
// Default handler implementations for typed from ports
// You can override these implementation with more specific behavior
// ----------------------------------------------------------------------
void ActiveTelemetryTesterBase ::
from_noArgsOut_handler(FwIndexType portNum)
{
this->pushFromPortEntry_noArgsOut();
}
U32 ActiveTelemetryTesterBase ::
from_noArgsReturnOut_handler(FwIndexType portNum)
{
this->pushFromPortEntry_noArgsReturnOut();
return 0;
}
void ActiveTelemetryTesterBase ::
from_typedOut_handler(
FwIndexType portNum,
U32 u32,
F32 f32,
bool b,
const Fw::StringBase& str1,
const E& e,
const A& a,
const S& s
)
{
this->pushFromPortEntry_typedOut(u32, f32, b, str1, e, a, s);
}
F32 ActiveTelemetryTesterBase ::
from_typedReturnOut_handler(
FwIndexType portNum,
U32 u32,
F32 f32,
bool b,
const Fw::StringBase& str2,
const E& e,
const A& a,
const S& s
)
{
this->pushFromPortEntry_typedReturnOut(u32, f32, b, str2, e, a, s);
return 0.0f;
}
// ----------------------------------------------------------------------
// Handler base-class functions for from ports
// ----------------------------------------------------------------------
void ActiveTelemetryTesterBase ::
from_noArgsOut_handlerBase(FwIndexType portNum)
{
// Make sure port number is valid
FW_ASSERT(
portNum < this->getNum_from_noArgsOut(),
static_cast<FwAssertArgType>(portNum)
);
this->from_noArgsOut_handler(portNum);
}
U32 ActiveTelemetryTesterBase ::
from_noArgsReturnOut_handlerBase(FwIndexType portNum)
{
// Make sure port number is valid
FW_ASSERT(
portNum < this->getNum_from_noArgsReturnOut(),
static_cast<FwAssertArgType>(portNum)
);
return this->from_noArgsReturnOut_handler(portNum);
}
void ActiveTelemetryTesterBase ::
from_typedOut_handlerBase(
FwIndexType portNum,
U32 u32,
F32 f32,
bool b,
const Fw::StringBase& str1,
const E& e,
const A& a,
const S& s
)
{
// Make sure port number is valid
FW_ASSERT(
portNum < this->getNum_from_typedOut(),
static_cast<FwAssertArgType>(portNum)
);
this->from_typedOut_handler(
portNum,
u32,
f32,
b,
str1,
e,
a,
s
);
}
F32 ActiveTelemetryTesterBase ::
from_typedReturnOut_handlerBase(
FwIndexType portNum,
U32 u32,
F32 f32,
bool b,
const Fw::StringBase& str2,
const E& e,
const A& a,
const S& s
)
{
// Make sure port number is valid
FW_ASSERT(
portNum < this->getNum_from_typedReturnOut(),
static_cast<FwAssertArgType>(portNum)
);
return this->from_typedReturnOut_handler(
portNum,
u32,
f32,
b,
str2,
e,
a,
s
);
}
// ----------------------------------------------------------------------
// Invocation functions for to ports
// ----------------------------------------------------------------------
void ActiveTelemetryTesterBase ::
invoke_to_noArgsAsync(FwIndexType portNum)
{
// Make sure port number is valid
FW_ASSERT(
portNum < this->getNum_to_noArgsAsync(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_noArgsAsync[portNum].invoke();
}
void ActiveTelemetryTesterBase ::
invoke_to_noArgsGuarded(FwIndexType portNum)
{
// Make sure port number is valid
FW_ASSERT(
portNum < this->getNum_to_noArgsGuarded(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_noArgsGuarded[portNum].invoke();
}
U32 ActiveTelemetryTesterBase ::
invoke_to_noArgsReturnGuarded(FwIndexType portNum)
{
// Make sure port number is valid
FW_ASSERT(
portNum < this->getNum_to_noArgsReturnGuarded(),
static_cast<FwAssertArgType>(portNum)
);
return this->m_to_noArgsReturnGuarded[portNum].invoke();
}
U32 ActiveTelemetryTesterBase ::
invoke_to_noArgsReturnSync(FwIndexType portNum)
{
// Make sure port number is valid
FW_ASSERT(
portNum < this->getNum_to_noArgsReturnSync(),
static_cast<FwAssertArgType>(portNum)
);
return this->m_to_noArgsReturnSync[portNum].invoke();
}
void ActiveTelemetryTesterBase ::
invoke_to_noArgsSync(FwIndexType portNum)
{
// Make sure port number is valid
FW_ASSERT(
portNum < this->getNum_to_noArgsSync(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_noArgsSync[portNum].invoke();
}
void ActiveTelemetryTesterBase ::
invoke_to_typedAsync(
FwIndexType portNum,
U32 u32,
F32 f32,
bool b,
const Fw::StringBase& str1,
const E& e,
const A& a,
const S& s
)
{
// Make sure port number is valid
FW_ASSERT(
portNum < this->getNum_to_typedAsync(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_typedAsync[portNum].invoke(
u32,
f32,
b,
str1,
e,
a,
s
);
}
void ActiveTelemetryTesterBase ::
invoke_to_typedAsyncAssert(
FwIndexType portNum,
U32 u32,
F32 f32,
bool b,
const Fw::StringBase& str1,
const E& e,
const A& a,
const S& s
)
{
// Make sure port number is valid
FW_ASSERT(
portNum < this->getNum_to_typedAsyncAssert(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_typedAsyncAssert[portNum].invoke(
u32,
f32,
b,
str1,
e,
a,
s
);
}
void ActiveTelemetryTesterBase ::
invoke_to_typedAsyncBlockPriority(
FwIndexType portNum,
U32 u32,
F32 f32,
bool b,
const Fw::StringBase& str1,
const E& e,
const A& a,
const S& s
)
{
// Make sure port number is valid
FW_ASSERT(
portNum < this->getNum_to_typedAsyncBlockPriority(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_typedAsyncBlockPriority[portNum].invoke(
u32,
f32,
b,
str1,
e,
a,
s
);
}
void ActiveTelemetryTesterBase ::
invoke_to_typedAsyncDropPriority(
FwIndexType portNum,
U32 u32,
F32 f32,
bool b,
const Fw::StringBase& str1,
const E& e,
const A& a,
const S& s
)
{
// Make sure port number is valid
FW_ASSERT(
portNum < this->getNum_to_typedAsyncDropPriority(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_typedAsyncDropPriority[portNum].invoke(
u32,
f32,
b,
str1,
e,
a,
s
);
}
void ActiveTelemetryTesterBase ::
invoke_to_typedGuarded(
FwIndexType portNum,
U32 u32,
F32 f32,
bool b,
const Fw::StringBase& str1,
const E& e,
const A& a,
const S& s
)
{
// Make sure port number is valid
FW_ASSERT(
portNum < this->getNum_to_typedGuarded(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_typedGuarded[portNum].invoke(
u32,
f32,
b,
str1,
e,
a,
s
);
}
F32 ActiveTelemetryTesterBase ::
invoke_to_typedReturnGuarded(
FwIndexType portNum,
U32 u32,
F32 f32,
bool b,
const Fw::StringBase& str2,
const E& e,
const A& a,
const S& s
)
{
// Make sure port number is valid
FW_ASSERT(
portNum < this->getNum_to_typedReturnGuarded(),
static_cast<FwAssertArgType>(portNum)
);
return this->m_to_typedReturnGuarded[portNum].invoke(
u32,
f32,
b,
str2,
e,
a,
s
);
}
F32 ActiveTelemetryTesterBase ::
invoke_to_typedReturnSync(
FwIndexType portNum,
U32 u32,
F32 f32,
bool b,
const Fw::StringBase& str2,
const E& e,
const A& a,
const S& s
)
{
// Make sure port number is valid
FW_ASSERT(
portNum < this->getNum_to_typedReturnSync(),
static_cast<FwAssertArgType>(portNum)
);
return this->m_to_typedReturnSync[portNum].invoke(
u32,
f32,
b,
str2,
e,
a,
s
);
}
void ActiveTelemetryTesterBase ::
invoke_to_typedSync(
FwIndexType portNum,
U32 u32,
F32 f32,
bool b,
const Fw::StringBase& str1,
const E& e,
const A& a,
const S& s
)
{
// Make sure port number is valid
FW_ASSERT(
portNum < this->getNum_to_typedSync(),
static_cast<FwAssertArgType>(portNum)
);
this->m_to_typedSync[portNum].invoke(
u32,
f32,
b,
str1,
e,
a,
s
);
}
// ----------------------------------------------------------------------
// Getters for port counts
// ----------------------------------------------------------------------
FwIndexType ActiveTelemetryTesterBase ::
getNum_to_cmdIn() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_to_cmdIn));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_to_noArgsAsync() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_to_noArgsAsync));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_to_noArgsGuarded() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_to_noArgsGuarded));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_to_noArgsReturnGuarded() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_to_noArgsReturnGuarded));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_to_noArgsReturnSync() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_to_noArgsReturnSync));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_to_noArgsSync() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_to_noArgsSync));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_to_typedAsync() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_to_typedAsync));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_to_typedAsyncAssert() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_to_typedAsyncAssert));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_to_typedAsyncBlockPriority() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_to_typedAsyncBlockPriority));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_to_typedAsyncDropPriority() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_to_typedAsyncDropPriority));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_to_typedGuarded() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_to_typedGuarded));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_to_typedReturnGuarded() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_to_typedReturnGuarded));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_to_typedReturnSync() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_to_typedReturnSync));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_to_typedSync() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_to_typedSync));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_from_cmdRegOut() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_from_cmdRegOut));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_from_cmdResponseOut() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_from_cmdResponseOut));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_from_eventOut() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_from_eventOut));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_from_prmGetOut() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_from_prmGetOut));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_from_prmSetOut() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_from_prmSetOut));
}
#if FW_ENABLE_TEXT_LOGGING == 1
FwIndexType ActiveTelemetryTesterBase ::
getNum_from_textEventOut() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_from_textEventOut));
}
#endif
FwIndexType ActiveTelemetryTesterBase ::
getNum_from_timeGetOut() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_from_timeGetOut));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_from_tlmOut() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_from_tlmOut));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_from_noArgsOut() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_from_noArgsOut));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_from_noArgsReturnOut() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_from_noArgsReturnOut));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_from_typedOut() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_from_typedOut));
}
FwIndexType ActiveTelemetryTesterBase ::
getNum_from_typedReturnOut() const
{
return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_from_typedReturnOut));
}
// ----------------------------------------------------------------------
// Connection status queries for to ports
// ----------------------------------------------------------------------
bool ActiveTelemetryTesterBase ::
isConnected_to_cmdIn(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_to_cmdIn(),
static_cast<FwAssertArgType>(portNum)
);
return this->m_to_cmdIn[portNum].isConnected();
}
bool ActiveTelemetryTesterBase ::
isConnected_to_noArgsAsync(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_to_noArgsAsync(),
static_cast<FwAssertArgType>(portNum)
);
return this->m_to_noArgsAsync[portNum].isConnected();
}
bool ActiveTelemetryTesterBase ::
isConnected_to_noArgsGuarded(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_to_noArgsGuarded(),
static_cast<FwAssertArgType>(portNum)
);
return this->m_to_noArgsGuarded[portNum].isConnected();
}
bool ActiveTelemetryTesterBase ::
isConnected_to_noArgsReturnGuarded(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_to_noArgsReturnGuarded(),
static_cast<FwAssertArgType>(portNum)
);
return this->m_to_noArgsReturnGuarded[portNum].isConnected();
}
bool ActiveTelemetryTesterBase ::
isConnected_to_noArgsReturnSync(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_to_noArgsReturnSync(),
static_cast<FwAssertArgType>(portNum)
);
return this->m_to_noArgsReturnSync[portNum].isConnected();
}
bool ActiveTelemetryTesterBase ::
isConnected_to_noArgsSync(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_to_noArgsSync(),
static_cast<FwAssertArgType>(portNum)
);
return this->m_to_noArgsSync[portNum].isConnected();
}
bool ActiveTelemetryTesterBase ::
isConnected_to_typedAsync(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_to_typedAsync(),
static_cast<FwAssertArgType>(portNum)
);
return this->m_to_typedAsync[portNum].isConnected();
}
bool ActiveTelemetryTesterBase ::
isConnected_to_typedAsyncAssert(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_to_typedAsyncAssert(),
static_cast<FwAssertArgType>(portNum)
);
return this->m_to_typedAsyncAssert[portNum].isConnected();
}
bool ActiveTelemetryTesterBase ::
isConnected_to_typedAsyncBlockPriority(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_to_typedAsyncBlockPriority(),
static_cast<FwAssertArgType>(portNum)
);
return this->m_to_typedAsyncBlockPriority[portNum].isConnected();
}
bool ActiveTelemetryTesterBase ::
isConnected_to_typedAsyncDropPriority(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_to_typedAsyncDropPriority(),
static_cast<FwAssertArgType>(portNum)
);
return this->m_to_typedAsyncDropPriority[portNum].isConnected();
}
bool ActiveTelemetryTesterBase ::
isConnected_to_typedGuarded(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_to_typedGuarded(),
static_cast<FwAssertArgType>(portNum)
);
return this->m_to_typedGuarded[portNum].isConnected();
}
bool ActiveTelemetryTesterBase ::
isConnected_to_typedReturnGuarded(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_to_typedReturnGuarded(),
static_cast<FwAssertArgType>(portNum)
);
return this->m_to_typedReturnGuarded[portNum].isConnected();
}
bool ActiveTelemetryTesterBase ::
isConnected_to_typedReturnSync(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_to_typedReturnSync(),
static_cast<FwAssertArgType>(portNum)
);
return this->m_to_typedReturnSync[portNum].isConnected();
}
bool ActiveTelemetryTesterBase ::
isConnected_to_typedSync(FwIndexType portNum)
{
FW_ASSERT(
portNum < this->getNum_to_typedSync(),
static_cast<FwAssertArgType>(portNum)
);
return this->m_to_typedSync[portNum].isConnected();
}
// ----------------------------------------------------------------------
// Functions for testing telemetry
// ----------------------------------------------------------------------
void ActiveTelemetryTesterBase ::
dispatchTlm(
FwChanIdType id,
const Fw::Time& timeTag,
Fw::TlmBuffer& val
)
{
val.resetDeser();
const U32 idBase = this->getIdBase();
FW_ASSERT(id >= idBase, id, idBase);
switch (id - idBase) {
case ActiveTelemetryComponentBase::CHANNELID_CHANNELU32FORMAT: {
U32 arg;
const Fw::SerializeStatus _status = val.deserialize(arg);
if (_status != Fw::FW_SERIALIZE_OK) {
printf("Error deserializing ChannelU32Format: %d\n", _status);
return;
}
this->tlmInput_ChannelU32Format(timeTag, arg);
break;
}
case ActiveTelemetryComponentBase::CHANNELID_CHANNELF32FORMAT: {
F32 arg;
const Fw::SerializeStatus _status = val.deserialize(arg);
if (_status != Fw::FW_SERIALIZE_OK) {
printf("Error deserializing ChannelF32Format: %d\n", _status);
return;
}
this->tlmInput_ChannelF32Format(timeTag, arg);
break;
}
case ActiveTelemetryComponentBase::CHANNELID_CHANNELSTRINGFORMAT: {
Fw::TlmString arg;
const Fw::SerializeStatus _status = val.deserialize(arg);
if (_status != Fw::FW_SERIALIZE_OK) {
printf("Error deserializing ChannelStringFormat: %d\n", _status);
return;
}
this->tlmInput_ChannelStringFormat(timeTag, arg);
break;
}
case ActiveTelemetryComponentBase::CHANNELID_CHANNELENUM: {
E arg;
const Fw::SerializeStatus _status = val.deserialize(arg);
if (_status != Fw::FW_SERIALIZE_OK) {
printf("Error deserializing ChannelEnum: %d\n", _status);
return;
}
this->tlmInput_ChannelEnum(timeTag, arg);
break;
}
case ActiveTelemetryComponentBase::CHANNELID_CHANNELARRAYFREQ: {
A arg;
const Fw::SerializeStatus _status = val.deserialize(arg);
if (_status != Fw::FW_SERIALIZE_OK) {
printf("Error deserializing ChannelArrayFreq: %d\n", _status);
return;
}
this->tlmInput_ChannelArrayFreq(timeTag, arg);
break;
}
case ActiveTelemetryComponentBase::CHANNELID_CHANNELSTRUCTFREQ: {
S arg;
const Fw::SerializeStatus _status = val.deserialize(arg);
if (_status != Fw::FW_SERIALIZE_OK) {
printf("Error deserializing ChannelStructFreq: %d\n", _status);
return;
}
this->tlmInput_ChannelStructFreq(timeTag, arg);
break;
}
case ActiveTelemetryComponentBase::CHANNELID_CHANNELU32LIMITS: {
U32 arg;
const Fw::SerializeStatus _status = val.deserialize(arg);
if (_status != Fw::FW_SERIALIZE_OK) {
printf("Error deserializing ChannelU32Limits: %d\n", _status);
return;
}
this->tlmInput_ChannelU32Limits(timeTag, arg);
break;
}
case ActiveTelemetryComponentBase::CHANNELID_CHANNELF32LIMITS: {
F32 arg;
const Fw::SerializeStatus _status = val.deserialize(arg);
if (_status != Fw::FW_SERIALIZE_OK) {
printf("Error deserializing ChannelF32Limits: %d\n", _status);
return;
}
this->tlmInput_ChannelF32Limits(timeTag, arg);
break;
}
case ActiveTelemetryComponentBase::CHANNELID_CHANNELF64: {
F64 arg;
const Fw::SerializeStatus _status = val.deserialize(arg);
if (_status != Fw::FW_SERIALIZE_OK) {
printf("Error deserializing ChannelF64: %d\n", _status);
return;
}
this->tlmInput_ChannelF64(timeTag, arg);
break;
}
case ActiveTelemetryComponentBase::CHANNELID_CHANNELU32ONCHANGE: {
U32 arg;
const Fw::SerializeStatus _status = val.deserialize(arg);
if (_status != Fw::FW_SERIALIZE_OK) {
printf("Error deserializing ChannelU32OnChange: %d\n", _status);
return;
}
this->tlmInput_ChannelU32OnChange(timeTag, arg);
break;
}
case ActiveTelemetryComponentBase::CHANNELID_CHANNELENUMONCHANGE: {
E arg;
const Fw::SerializeStatus _status = val.deserialize(arg);
if (_status != Fw::FW_SERIALIZE_OK) {
printf("Error deserializing ChannelEnumOnChange: %d\n", _status);
return;
}
this->tlmInput_ChannelEnumOnChange(timeTag, arg);
break;
}
default: {
FW_ASSERT(0, id);
break;
}
}
}
void ActiveTelemetryTesterBase ::
tlmInput_ChannelU32Format(
const Fw::Time& timeTag,
const U32 val
)
{
TlmEntry_ChannelU32Format e = { timeTag, val };
this->tlmHistory_ChannelU32Format->push_back(e);
this->tlmSize++;
}
void ActiveTelemetryTesterBase ::
tlmInput_ChannelF32Format(
const Fw::Time& timeTag,
const F32 val
)
{
TlmEntry_ChannelF32Format e = { timeTag, val };
this->tlmHistory_ChannelF32Format->push_back(e);
this->tlmSize++;
}
void ActiveTelemetryTesterBase ::
tlmInput_ChannelStringFormat(
const Fw::Time& timeTag,
const Fw::StringBase& val
)
{
TlmEntry_ChannelStringFormat e = { timeTag, val };
this->tlmHistory_ChannelStringFormat->push_back(e);
this->tlmSize++;
}
void ActiveTelemetryTesterBase ::
tlmInput_ChannelEnum(
const Fw::Time& timeTag,
const E& val
)
{
TlmEntry_ChannelEnum e = { timeTag, val };
this->tlmHistory_ChannelEnum->push_back(e);
this->tlmSize++;
}
void ActiveTelemetryTesterBase ::
tlmInput_ChannelArrayFreq(
const Fw::Time& timeTag,
const A& val
)
{
TlmEntry_ChannelArrayFreq e = { timeTag, val };
this->tlmHistory_ChannelArrayFreq->push_back(e);
this->tlmSize++;
}
void ActiveTelemetryTesterBase ::
tlmInput_ChannelStructFreq(
const Fw::Time& timeTag,
const S& val
)
{
TlmEntry_ChannelStructFreq e = { timeTag, val };
this->tlmHistory_ChannelStructFreq->push_back(e);
this->tlmSize++;
}
void ActiveTelemetryTesterBase ::
tlmInput_ChannelU32Limits(
const Fw::Time& timeTag,
const U32 val
)
{
TlmEntry_ChannelU32Limits e = { timeTag, val };
this->tlmHistory_ChannelU32Limits->push_back(e);
this->tlmSize++;
}
void ActiveTelemetryTesterBase ::
tlmInput_ChannelF32Limits(
const Fw::Time& timeTag,
const F32 val
)
{
TlmEntry_ChannelF32Limits e = { timeTag, val };
this->tlmHistory_ChannelF32Limits->push_back(e);
this->tlmSize++;
}
void ActiveTelemetryTesterBase ::
tlmInput_ChannelF64(
const Fw::Time& timeTag,
const F64 val
)
{
TlmEntry_ChannelF64 e = { timeTag, val };
this->tlmHistory_ChannelF64->push_back(e);
this->tlmSize++;
}
void ActiveTelemetryTesterBase ::
tlmInput_ChannelU32OnChange(
const Fw::Time& timeTag,
const U32 val
)
{
TlmEntry_ChannelU32OnChange e = { timeTag, val };
this->tlmHistory_ChannelU32OnChange->push_back(e);
this->tlmSize++;
}
void ActiveTelemetryTesterBase ::
tlmInput_ChannelEnumOnChange(
const Fw::Time& timeTag,
const E& val
)
{
TlmEntry_ChannelEnumOnChange e = { timeTag, val };
this->tlmHistory_ChannelEnumOnChange->push_back(e);
this->tlmSize++;
}
// ----------------------------------------------------------------------
// Functions to test time
// ----------------------------------------------------------------------
void ActiveTelemetryTesterBase ::
setTestTime(const Fw::Time& timeTag)
{
this->m_testTime = timeTag;
}
// ----------------------------------------------------------------------
// History functions
// ----------------------------------------------------------------------
void ActiveTelemetryTesterBase ::
clearHistory()
{
this->clearFromPortHistory();
this->clearTlm();
}
void ActiveTelemetryTesterBase ::
clearFromPortHistory()
{
this->fromPortHistorySize = 0;
this->fromPortHistorySize_noArgsOut = 0;
this->fromPortHistorySize_noArgsReturnOut = 0;
this->fromPortHistory_typedOut->clear();
this->fromPortHistory_typedReturnOut->clear();
}
void ActiveTelemetryTesterBase ::
pushFromPortEntry_noArgsOut()
{
this->fromPortHistorySize_noArgsOut++;
this->fromPortHistorySize++;
}
void ActiveTelemetryTesterBase ::
pushFromPortEntry_noArgsReturnOut()
{
this->fromPortHistorySize_noArgsReturnOut++;
this->fromPortHistorySize++;
}
void ActiveTelemetryTesterBase ::
pushFromPortEntry_typedOut(
U32 u32,
F32 f32,
bool b,
const Fw::StringBase& str1,
const E& e,
const A& a,
const S& s
)
{
FromPortEntry_typedOut _e;
_e.u32 = u32;
_e.f32 = f32;
_e.b = b;
_e.str1 = str1;
_e.e = e;
_e.a = a;
_e.s = s;
this->fromPortHistory_typedOut->push_back(_e);
this->fromPortHistorySize++;
}
void ActiveTelemetryTesterBase ::
pushFromPortEntry_typedReturnOut(
U32 u32,
F32 f32,
bool b,
const Fw::StringBase& str2,
const E& e,
const A& a,
const S& s
)
{
FromPortEntry_typedReturnOut _e;
_e.u32 = u32;
_e.f32 = f32;
_e.b = b;
_e.str2 = str2;
_e.e = e;
_e.a = a;
_e.s = s;
this->fromPortHistory_typedReturnOut->push_back(_e);
this->fromPortHistorySize++;
}
void ActiveTelemetryTesterBase ::
clearTlm()
{
this->tlmSize = 0;
this->tlmHistory_ChannelU32Format->clear();
this->tlmHistory_ChannelF32Format->clear();
this->tlmHistory_ChannelStringFormat->clear();
this->tlmHistory_ChannelEnum->clear();
this->tlmHistory_ChannelArrayFreq->clear();
this->tlmHistory_ChannelStructFreq->clear();
this->tlmHistory_ChannelU32Limits->clear();
this->tlmHistory_ChannelF32Limits->clear();
this->tlmHistory_ChannelF64->clear();
this->tlmHistory_ChannelU32OnChange->clear();
this->tlmHistory_ChannelEnumOnChange->clear();
}
// ----------------------------------------------------------------------
// Static functions for output ports
// ----------------------------------------------------------------------
void ActiveTelemetryTesterBase ::
from_timeGetOut_static(
Fw::PassiveComponentBase* const callComp,
FwIndexType portNum,
Fw::Time& time
)
{
ActiveTelemetryTesterBase* _testerBase = static_cast<ActiveTelemetryTesterBase*>(callComp);
time = _testerBase->m_testTime;
}
void ActiveTelemetryTesterBase ::
from_tlmOut_static(
Fw::PassiveComponentBase* const callComp,
FwIndexType portNum,
FwChanIdType id,
Fw::Time& timeTag,
Fw::TlmBuffer& val
)
{
ActiveTelemetryTesterBase* _testerBase = static_cast<ActiveTelemetryTesterBase*>(callComp);
_testerBase->dispatchTlm(id, timeTag, val);
}
void ActiveTelemetryTesterBase ::
from_noArgsOut_static(
Fw::PassiveComponentBase* const callComp,
FwIndexType portNum
)
{
FW_ASSERT(callComp != nullptr);
ActiveTelemetryTesterBase* _testerBase = static_cast<ActiveTelemetryTesterBase*>(callComp);
_testerBase->from_noArgsOut_handlerBase(portNum);
}
U32 ActiveTelemetryTesterBase ::
from_noArgsReturnOut_static(
Fw::PassiveComponentBase* const callComp,
FwIndexType portNum
)
{
FW_ASSERT(callComp != nullptr);
ActiveTelemetryTesterBase* _testerBase = static_cast<ActiveTelemetryTesterBase*>(callComp);
return _testerBase->from_noArgsReturnOut_handlerBase(portNum);
}
void ActiveTelemetryTesterBase ::
from_typedOut_static(
Fw::PassiveComponentBase* const callComp,
FwIndexType portNum,
U32 u32,
F32 f32,
bool b,
const Fw::StringBase& str1,
const E& e,
const A& a,
const S& s
)
{
FW_ASSERT(callComp != nullptr);
ActiveTelemetryTesterBase* _testerBase = static_cast<ActiveTelemetryTesterBase*>(callComp);
_testerBase->from_typedOut_handlerBase(
portNum,
u32,
f32,
b,
str1,
e,
a,
s
);
}
F32 ActiveTelemetryTesterBase ::
from_typedReturnOut_static(
Fw::PassiveComponentBase* const callComp,
FwIndexType portNum,
U32 u32,
F32 f32,
bool b,
const Fw::StringBase& str2,
const E& e,
const A& a,
const S& s
)
{
FW_ASSERT(callComp != nullptr);
ActiveTelemetryTesterBase* _testerBase = static_cast<ActiveTelemetryTesterBase*>(callComp);
return _testerBase->from_typedReturnOut_handlerBase(
portNum,
u32,
f32,
b,
str2,
e,
a,
s
);
}