mirror of
https://github.com/nasa/fpp.git
synced 2025-12-14 10:38:08 -06:00
2355 lines
58 KiB
C++
2355 lines
58 KiB
C++
// ======================================================================
|
|
// \title PassiveTelemetryComponentAc.cpp
|
|
// \author Generated by fpp-to-cpp
|
|
// \brief cpp file for PassiveTelemetry component base class
|
|
// ======================================================================
|
|
|
|
#include <cstdio>
|
|
|
|
#include "Fw/Types/Assert.hpp"
|
|
#if FW_ENABLE_TEXT_LOGGING
|
|
#include "Fw/Types/String.hpp"
|
|
#endif
|
|
#include "base/PassiveTelemetryComponentAc.hpp"
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Component initialization
|
|
// ----------------------------------------------------------------------
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
init(NATIVE_INT_TYPE instance)
|
|
{
|
|
// Initialize base class
|
|
Fw::PassiveComponentBase::init(instance);
|
|
|
|
// Connect input port cmdIn
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_cmdIn_InputPorts());
|
|
port++
|
|
) {
|
|
this->m_cmdIn_InputPort[port].init();
|
|
this->m_cmdIn_InputPort[port].addCallComp(
|
|
this,
|
|
m_p_cmdIn_in
|
|
);
|
|
this->m_cmdIn_InputPort[port].setPortNum(port);
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_cmdIn_InputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_cmdIn_InputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_cmdIn_InputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
|
|
// Connect input port noArgsGuarded
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_noArgsGuarded_InputPorts());
|
|
port++
|
|
) {
|
|
this->m_noArgsGuarded_InputPort[port].init();
|
|
this->m_noArgsGuarded_InputPort[port].addCallComp(
|
|
this,
|
|
m_p_noArgsGuarded_in
|
|
);
|
|
this->m_noArgsGuarded_InputPort[port].setPortNum(port);
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_noArgsGuarded_InputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_noArgsGuarded_InputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_noArgsGuarded_InputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
|
|
// Connect input port noArgsReturnGuarded
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_noArgsReturnGuarded_InputPorts());
|
|
port++
|
|
) {
|
|
this->m_noArgsReturnGuarded_InputPort[port].init();
|
|
this->m_noArgsReturnGuarded_InputPort[port].addCallComp(
|
|
this,
|
|
m_p_noArgsReturnGuarded_in
|
|
);
|
|
this->m_noArgsReturnGuarded_InputPort[port].setPortNum(port);
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_noArgsReturnGuarded_InputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_noArgsReturnGuarded_InputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_noArgsReturnGuarded_InputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
|
|
// Connect input port noArgsReturnSync
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_noArgsReturnSync_InputPorts());
|
|
port++
|
|
) {
|
|
this->m_noArgsReturnSync_InputPort[port].init();
|
|
this->m_noArgsReturnSync_InputPort[port].addCallComp(
|
|
this,
|
|
m_p_noArgsReturnSync_in
|
|
);
|
|
this->m_noArgsReturnSync_InputPort[port].setPortNum(port);
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_noArgsReturnSync_InputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_noArgsReturnSync_InputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_noArgsReturnSync_InputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
|
|
// Connect input port noArgsSync
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_noArgsSync_InputPorts());
|
|
port++
|
|
) {
|
|
this->m_noArgsSync_InputPort[port].init();
|
|
this->m_noArgsSync_InputPort[port].addCallComp(
|
|
this,
|
|
m_p_noArgsSync_in
|
|
);
|
|
this->m_noArgsSync_InputPort[port].setPortNum(port);
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_noArgsSync_InputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_noArgsSync_InputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_noArgsSync_InputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
|
|
// Connect input port typedGuarded
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_typedGuarded_InputPorts());
|
|
port++
|
|
) {
|
|
this->m_typedGuarded_InputPort[port].init();
|
|
this->m_typedGuarded_InputPort[port].addCallComp(
|
|
this,
|
|
m_p_typedGuarded_in
|
|
);
|
|
this->m_typedGuarded_InputPort[port].setPortNum(port);
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_typedGuarded_InputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_typedGuarded_InputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_typedGuarded_InputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
|
|
// Connect input port typedReturnGuarded
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_typedReturnGuarded_InputPorts());
|
|
port++
|
|
) {
|
|
this->m_typedReturnGuarded_InputPort[port].init();
|
|
this->m_typedReturnGuarded_InputPort[port].addCallComp(
|
|
this,
|
|
m_p_typedReturnGuarded_in
|
|
);
|
|
this->m_typedReturnGuarded_InputPort[port].setPortNum(port);
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_typedReturnGuarded_InputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_typedReturnGuarded_InputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_typedReturnGuarded_InputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
|
|
// Connect input port typedReturnSync
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_typedReturnSync_InputPorts());
|
|
port++
|
|
) {
|
|
this->m_typedReturnSync_InputPort[port].init();
|
|
this->m_typedReturnSync_InputPort[port].addCallComp(
|
|
this,
|
|
m_p_typedReturnSync_in
|
|
);
|
|
this->m_typedReturnSync_InputPort[port].setPortNum(port);
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_typedReturnSync_InputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_typedReturnSync_InputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_typedReturnSync_InputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
|
|
// Connect input port typedSync
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_typedSync_InputPorts());
|
|
port++
|
|
) {
|
|
this->m_typedSync_InputPort[port].init();
|
|
this->m_typedSync_InputPort[port].addCallComp(
|
|
this,
|
|
m_p_typedSync_in
|
|
);
|
|
this->m_typedSync_InputPort[port].setPortNum(port);
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_typedSync_InputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_typedSync_InputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_typedSync_InputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
|
|
// Connect output port cmdRegOut
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_cmdRegOut_OutputPorts());
|
|
port++
|
|
) {
|
|
this->m_cmdRegOut_OutputPort[port].init();
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_cmdRegOut_OutputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_cmdRegOut_OutputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_cmdRegOut_OutputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
|
|
// Connect output port cmdResponseOut
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_cmdResponseOut_OutputPorts());
|
|
port++
|
|
) {
|
|
this->m_cmdResponseOut_OutputPort[port].init();
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_cmdResponseOut_OutputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_cmdResponseOut_OutputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_cmdResponseOut_OutputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
|
|
// Connect output port eventOut
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_eventOut_OutputPorts());
|
|
port++
|
|
) {
|
|
this->m_eventOut_OutputPort[port].init();
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_eventOut_OutputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_eventOut_OutputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_eventOut_OutputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
|
|
// Connect output port prmGetOut
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_prmGetOut_OutputPorts());
|
|
port++
|
|
) {
|
|
this->m_prmGetOut_OutputPort[port].init();
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_prmGetOut_OutputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_prmGetOut_OutputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_prmGetOut_OutputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
|
|
// Connect output port prmSetOut
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_prmSetOut_OutputPorts());
|
|
port++
|
|
) {
|
|
this->m_prmSetOut_OutputPort[port].init();
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_prmSetOut_OutputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_prmSetOut_OutputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_prmSetOut_OutputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
|
|
#if FW_ENABLE_TEXT_LOGGING == 1
|
|
// Connect output port textEventOut
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_textEventOut_OutputPorts());
|
|
port++
|
|
) {
|
|
this->m_textEventOut_OutputPort[port].init();
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_textEventOut_OutputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_textEventOut_OutputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_textEventOut_OutputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
#endif
|
|
|
|
// Connect output port timeGetOut
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_timeGetOut_OutputPorts());
|
|
port++
|
|
) {
|
|
this->m_timeGetOut_OutputPort[port].init();
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_timeGetOut_OutputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_timeGetOut_OutputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_timeGetOut_OutputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
|
|
// Connect output port tlmOut
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_tlmOut_OutputPorts());
|
|
port++
|
|
) {
|
|
this->m_tlmOut_OutputPort[port].init();
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_tlmOut_OutputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_tlmOut_OutputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_tlmOut_OutputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
|
|
// Connect output port noArgsOut
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_noArgsOut_OutputPorts());
|
|
port++
|
|
) {
|
|
this->m_noArgsOut_OutputPort[port].init();
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_noArgsOut_OutputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_noArgsOut_OutputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_noArgsOut_OutputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
|
|
// Connect output port noArgsReturnOut
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_noArgsReturnOut_OutputPorts());
|
|
port++
|
|
) {
|
|
this->m_noArgsReturnOut_OutputPort[port].init();
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_noArgsReturnOut_OutputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_noArgsReturnOut_OutputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_noArgsReturnOut_OutputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
|
|
// Connect output port typedOut
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_typedOut_OutputPorts());
|
|
port++
|
|
) {
|
|
this->m_typedOut_OutputPort[port].init();
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_typedOut_OutputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_typedOut_OutputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_typedOut_OutputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
|
|
// Connect output port typedReturnOut
|
|
for (
|
|
PlatformIntType port = 0;
|
|
port < static_cast<PlatformIntType>(this->getNum_typedReturnOut_OutputPorts());
|
|
port++
|
|
) {
|
|
this->m_typedReturnOut_OutputPort[port].init();
|
|
|
|
#if FW_OBJECT_NAMES == 1
|
|
// Handle up to 9999 ports
|
|
constexpr FwSizeType MAX_NUM_IDX_DIGITS = 4;
|
|
constexpr FwSizeType PORT_NAME_MAX_SIZE =
|
|
FW_OBJ_NAME_MAX_SIZE +
|
|
// Size includes terminating '\0'
|
|
(sizeof "_typedReturnOut_OutputPort[") +
|
|
MAX_NUM_IDX_DIGITS +
|
|
// Size includes terminating '\0'
|
|
(sizeof "]");
|
|
char portName[PORT_NAME_MAX_SIZE];
|
|
(void) snprintf(
|
|
portName,
|
|
sizeof portName,
|
|
"%s" "_typedReturnOut_OutputPort[" "%" PRI_PlatformIntType "]",
|
|
this->m_objName,
|
|
port
|
|
);
|
|
this->m_typedReturnOut_OutputPort[port].setObjName(portName);
|
|
#endif
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Getters for special input ports
|
|
// ----------------------------------------------------------------------
|
|
|
|
Fw::InputCmdPort* PassiveTelemetryComponentBase ::
|
|
get_cmdIn_InputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_cmdIn_InputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return &this->m_cmdIn_InputPort[portNum];
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Getters for typed input ports
|
|
// ----------------------------------------------------------------------
|
|
|
|
Ports::InputNoArgsPort* PassiveTelemetryComponentBase ::
|
|
get_noArgsGuarded_InputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_noArgsGuarded_InputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return &this->m_noArgsGuarded_InputPort[portNum];
|
|
}
|
|
|
|
Ports::InputNoArgsReturnPort* PassiveTelemetryComponentBase ::
|
|
get_noArgsReturnGuarded_InputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_noArgsReturnGuarded_InputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return &this->m_noArgsReturnGuarded_InputPort[portNum];
|
|
}
|
|
|
|
Ports::InputNoArgsReturnPort* PassiveTelemetryComponentBase ::
|
|
get_noArgsReturnSync_InputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_noArgsReturnSync_InputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return &this->m_noArgsReturnSync_InputPort[portNum];
|
|
}
|
|
|
|
Ports::InputNoArgsPort* PassiveTelemetryComponentBase ::
|
|
get_noArgsSync_InputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_noArgsSync_InputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return &this->m_noArgsSync_InputPort[portNum];
|
|
}
|
|
|
|
Ports::InputTypedPort* PassiveTelemetryComponentBase ::
|
|
get_typedGuarded_InputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_typedGuarded_InputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return &this->m_typedGuarded_InputPort[portNum];
|
|
}
|
|
|
|
Ports::InputTypedReturnPort* PassiveTelemetryComponentBase ::
|
|
get_typedReturnGuarded_InputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_typedReturnGuarded_InputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return &this->m_typedReturnGuarded_InputPort[portNum];
|
|
}
|
|
|
|
Ports::InputTypedReturnPort* PassiveTelemetryComponentBase ::
|
|
get_typedReturnSync_InputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_typedReturnSync_InputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return &this->m_typedReturnSync_InputPort[portNum];
|
|
}
|
|
|
|
Ports::InputTypedPort* PassiveTelemetryComponentBase ::
|
|
get_typedSync_InputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_typedSync_InputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return &this->m_typedSync_InputPort[portNum];
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Connect input ports to special output ports
|
|
// ----------------------------------------------------------------------
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_cmdRegOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Fw::InputCmdRegPort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_cmdRegOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_cmdRegOut_OutputPort[portNum].addCallPort(port);
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_cmdResponseOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Fw::InputCmdResponsePort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_cmdResponseOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_cmdResponseOut_OutputPort[portNum].addCallPort(port);
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_eventOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Fw::InputLogPort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_eventOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_eventOut_OutputPort[portNum].addCallPort(port);
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_prmGetOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Fw::InputPrmGetPort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_prmGetOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_prmGetOut_OutputPort[portNum].addCallPort(port);
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_prmSetOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Fw::InputPrmSetPort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_prmSetOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_prmSetOut_OutputPort[portNum].addCallPort(port);
|
|
}
|
|
|
|
#if FW_ENABLE_TEXT_LOGGING == 1
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_textEventOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Fw::InputLogTextPort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_textEventOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_textEventOut_OutputPort[portNum].addCallPort(port);
|
|
}
|
|
|
|
#endif
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_timeGetOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Fw::InputTimePort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_timeGetOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_timeGetOut_OutputPort[portNum].addCallPort(port);
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_tlmOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Fw::InputTlmPort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_tlmOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_tlmOut_OutputPort[portNum].addCallPort(port);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Connect typed input ports to typed output ports
|
|
// ----------------------------------------------------------------------
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_noArgsOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Ports::InputNoArgsPort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_noArgsOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_noArgsOut_OutputPort[portNum].addCallPort(port);
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_noArgsReturnOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Ports::InputNoArgsReturnPort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_noArgsReturnOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_noArgsReturnOut_OutputPort[portNum].addCallPort(port);
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_typedOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Ports::InputTypedPort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_typedOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_typedOut_OutputPort[portNum].addCallPort(port);
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_typedReturnOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Ports::InputTypedReturnPort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_typedReturnOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_typedReturnOut_OutputPort[portNum].addCallPort(port);
|
|
}
|
|
|
|
#if FW_PORT_SERIALIZATION
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Connect serial input ports to special output ports
|
|
// ----------------------------------------------------------------------
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_cmdRegOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Fw::InputSerializePort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_cmdRegOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_cmdResponseOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Fw::InputSerializePort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_cmdResponseOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_eventOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Fw::InputSerializePort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_eventOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_prmSetOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Fw::InputSerializePort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_prmSetOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_prmSetOut_OutputPort[portNum].registerSerialPort(port);
|
|
}
|
|
|
|
#if FW_ENABLE_TEXT_LOGGING == 1
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_textEventOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Fw::InputSerializePort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_textEventOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_textEventOut_OutputPort[portNum].registerSerialPort(port);
|
|
}
|
|
|
|
#endif
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_timeGetOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Fw::InputSerializePort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_timeGetOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_timeGetOut_OutputPort[portNum].registerSerialPort(port);
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_tlmOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Fw::InputSerializePort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_tlmOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
|
|
}
|
|
|
|
#endif
|
|
|
|
#if FW_PORT_SERIALIZATION
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Connect serial input ports to typed output ports
|
|
// ----------------------------------------------------------------------
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_noArgsOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Fw::InputSerializePort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_noArgsOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_noArgsOut_OutputPort[portNum].registerSerialPort(port);
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
set_typedOut_OutputPort(
|
|
NATIVE_INT_TYPE portNum,
|
|
Fw::InputSerializePort* port
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_typedOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
this->m_typedOut_OutputPort[portNum].registerSerialPort(port);
|
|
}
|
|
|
|
#endif
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Component construction and destruction
|
|
// ----------------------------------------------------------------------
|
|
|
|
PassiveTelemetryComponentBase ::
|
|
PassiveTelemetryComponentBase(const char* compName) :
|
|
Fw::PassiveComponentBase(compName)
|
|
{
|
|
// Write telemetry channel ChannelU32OnChange
|
|
this->m_first_update_ChannelU32OnChange = true;
|
|
this->m_last_ChannelU32OnChange = 0;
|
|
|
|
// Write telemetry channel ChannelEnumOnChange
|
|
this->m_first_update_ChannelEnumOnChange = true;
|
|
}
|
|
|
|
PassiveTelemetryComponentBase ::
|
|
~PassiveTelemetryComponentBase()
|
|
{
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Getters for numbers of special input ports
|
|
// ----------------------------------------------------------------------
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_cmdIn_InputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_cmdIn_InputPort));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Getters for numbers of typed input ports
|
|
// ----------------------------------------------------------------------
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_noArgsGuarded_InputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_noArgsGuarded_InputPort));
|
|
}
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_noArgsReturnGuarded_InputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_noArgsReturnGuarded_InputPort));
|
|
}
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_noArgsReturnSync_InputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_noArgsReturnSync_InputPort));
|
|
}
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_noArgsSync_InputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_noArgsSync_InputPort));
|
|
}
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_typedGuarded_InputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_typedGuarded_InputPort));
|
|
}
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_typedReturnGuarded_InputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_typedReturnGuarded_InputPort));
|
|
}
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_typedReturnSync_InputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_typedReturnSync_InputPort));
|
|
}
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_typedSync_InputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_typedSync_InputPort));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Getters for numbers of special output ports
|
|
// ----------------------------------------------------------------------
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_cmdRegOut_OutputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_cmdRegOut_OutputPort));
|
|
}
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_cmdResponseOut_OutputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_cmdResponseOut_OutputPort));
|
|
}
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_eventOut_OutputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_eventOut_OutputPort));
|
|
}
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_prmGetOut_OutputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_prmGetOut_OutputPort));
|
|
}
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_prmSetOut_OutputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_prmSetOut_OutputPort));
|
|
}
|
|
|
|
#if FW_ENABLE_TEXT_LOGGING == 1
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_textEventOut_OutputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_textEventOut_OutputPort));
|
|
}
|
|
|
|
#endif
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_timeGetOut_OutputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_timeGetOut_OutputPort));
|
|
}
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_tlmOut_OutputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_tlmOut_OutputPort));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Getters for numbers of typed output ports
|
|
// ----------------------------------------------------------------------
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_noArgsOut_OutputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_noArgsOut_OutputPort));
|
|
}
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_noArgsReturnOut_OutputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_noArgsReturnOut_OutputPort));
|
|
}
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_typedOut_OutputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_typedOut_OutputPort));
|
|
}
|
|
|
|
NATIVE_INT_TYPE PassiveTelemetryComponentBase ::
|
|
getNum_typedReturnOut_OutputPorts() const
|
|
{
|
|
return static_cast<NATIVE_INT_TYPE>(FW_NUM_ARRAY_ELEMENTS(this->m_typedReturnOut_OutputPort));
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Connection status queries for special output ports
|
|
// ----------------------------------------------------------------------
|
|
|
|
bool PassiveTelemetryComponentBase ::
|
|
isConnected_cmdRegOut_OutputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_cmdRegOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return this->m_cmdRegOut_OutputPort[portNum].isConnected();
|
|
}
|
|
|
|
bool PassiveTelemetryComponentBase ::
|
|
isConnected_cmdResponseOut_OutputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_cmdResponseOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return this->m_cmdResponseOut_OutputPort[portNum].isConnected();
|
|
}
|
|
|
|
bool PassiveTelemetryComponentBase ::
|
|
isConnected_eventOut_OutputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_eventOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return this->m_eventOut_OutputPort[portNum].isConnected();
|
|
}
|
|
|
|
bool PassiveTelemetryComponentBase ::
|
|
isConnected_prmGetOut_OutputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_prmGetOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return this->m_prmGetOut_OutputPort[portNum].isConnected();
|
|
}
|
|
|
|
bool PassiveTelemetryComponentBase ::
|
|
isConnected_prmSetOut_OutputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_prmSetOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return this->m_prmSetOut_OutputPort[portNum].isConnected();
|
|
}
|
|
|
|
#if FW_ENABLE_TEXT_LOGGING == 1
|
|
|
|
bool PassiveTelemetryComponentBase ::
|
|
isConnected_textEventOut_OutputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_textEventOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return this->m_textEventOut_OutputPort[portNum].isConnected();
|
|
}
|
|
|
|
#endif
|
|
|
|
bool PassiveTelemetryComponentBase ::
|
|
isConnected_timeGetOut_OutputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_timeGetOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return this->m_timeGetOut_OutputPort[portNum].isConnected();
|
|
}
|
|
|
|
bool PassiveTelemetryComponentBase ::
|
|
isConnected_tlmOut_OutputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_tlmOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return this->m_tlmOut_OutputPort[portNum].isConnected();
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Connection status queries for typed output ports
|
|
// ----------------------------------------------------------------------
|
|
|
|
bool PassiveTelemetryComponentBase ::
|
|
isConnected_noArgsOut_OutputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_noArgsOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return this->m_noArgsOut_OutputPort[portNum].isConnected();
|
|
}
|
|
|
|
bool PassiveTelemetryComponentBase ::
|
|
isConnected_noArgsReturnOut_OutputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_noArgsReturnOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return this->m_noArgsReturnOut_OutputPort[portNum].isConnected();
|
|
}
|
|
|
|
bool PassiveTelemetryComponentBase ::
|
|
isConnected_typedOut_OutputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_typedOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return this->m_typedOut_OutputPort[portNum].isConnected();
|
|
}
|
|
|
|
bool PassiveTelemetryComponentBase ::
|
|
isConnected_typedReturnOut_OutputPort(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_typedReturnOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
return this->m_typedReturnOut_OutputPort[portNum].isConnected();
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Port handler base-class functions for typed input ports
|
|
//
|
|
// Call these functions directly to bypass the corresponding ports
|
|
// ----------------------------------------------------------------------
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
noArgsGuarded_handlerBase(NATIVE_INT_TYPE portNum)
|
|
{
|
|
// Make sure port number is valid
|
|
FW_ASSERT(
|
|
portNum < this->getNum_noArgsGuarded_InputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
// Lock guard mutex before calling
|
|
this->lock();
|
|
|
|
// Call handler function
|
|
this->noArgsGuarded_handler(portNum);
|
|
|
|
// Unlock guard mutex
|
|
this->unLock();
|
|
}
|
|
|
|
U32 PassiveTelemetryComponentBase ::
|
|
noArgsReturnGuarded_handlerBase(NATIVE_INT_TYPE portNum)
|
|
{
|
|
// Make sure port number is valid
|
|
FW_ASSERT(
|
|
portNum < this->getNum_noArgsReturnGuarded_InputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
U32 retVal;
|
|
|
|
// Lock guard mutex before calling
|
|
this->lock();
|
|
|
|
// Call handler function
|
|
retVal = this->noArgsReturnGuarded_handler(portNum);
|
|
|
|
// Unlock guard mutex
|
|
this->unLock();
|
|
|
|
return retVal;
|
|
}
|
|
|
|
U32 PassiveTelemetryComponentBase ::
|
|
noArgsReturnSync_handlerBase(NATIVE_INT_TYPE portNum)
|
|
{
|
|
// Make sure port number is valid
|
|
FW_ASSERT(
|
|
portNum < this->getNum_noArgsReturnSync_InputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
U32 retVal;
|
|
|
|
// Call handler function
|
|
retVal = this->noArgsReturnSync_handler(portNum);
|
|
|
|
return retVal;
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
noArgsSync_handlerBase(NATIVE_INT_TYPE portNum)
|
|
{
|
|
// Make sure port number is valid
|
|
FW_ASSERT(
|
|
portNum < this->getNum_noArgsSync_InputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
// Call handler function
|
|
this->noArgsSync_handler(portNum);
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
typedGuarded_handlerBase(
|
|
NATIVE_INT_TYPE portNum,
|
|
U32 u32,
|
|
F32 f32,
|
|
bool b,
|
|
const Ports::TypedPortStrings::StringSize80& str1,
|
|
const E& e,
|
|
const A& a,
|
|
const S& s
|
|
)
|
|
{
|
|
// Make sure port number is valid
|
|
FW_ASSERT(
|
|
portNum < this->getNum_typedGuarded_InputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
// Lock guard mutex before calling
|
|
this->lock();
|
|
|
|
// Call handler function
|
|
this->typedGuarded_handler(
|
|
portNum,
|
|
u32,
|
|
f32,
|
|
b,
|
|
str1,
|
|
e,
|
|
a,
|
|
s
|
|
);
|
|
|
|
// Unlock guard mutex
|
|
this->unLock();
|
|
}
|
|
|
|
F32 PassiveTelemetryComponentBase ::
|
|
typedReturnGuarded_handlerBase(
|
|
NATIVE_INT_TYPE portNum,
|
|
U32 u32,
|
|
F32 f32,
|
|
bool b,
|
|
const Ports::TypedReturnPortStrings::StringSize80& str2,
|
|
const E& e,
|
|
const A& a,
|
|
const S& s
|
|
)
|
|
{
|
|
// Make sure port number is valid
|
|
FW_ASSERT(
|
|
portNum < this->getNum_typedReturnGuarded_InputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
F32 retVal;
|
|
|
|
// Lock guard mutex before calling
|
|
this->lock();
|
|
|
|
// Call handler function
|
|
retVal = this->typedReturnGuarded_handler(
|
|
portNum,
|
|
u32,
|
|
f32,
|
|
b,
|
|
str2,
|
|
e,
|
|
a,
|
|
s
|
|
);
|
|
|
|
// Unlock guard mutex
|
|
this->unLock();
|
|
|
|
return retVal;
|
|
}
|
|
|
|
F32 PassiveTelemetryComponentBase ::
|
|
typedReturnSync_handlerBase(
|
|
NATIVE_INT_TYPE portNum,
|
|
U32 u32,
|
|
F32 f32,
|
|
bool b,
|
|
const Ports::TypedReturnPortStrings::StringSize80& str2,
|
|
const E& e,
|
|
const A& a,
|
|
const S& s
|
|
)
|
|
{
|
|
// Make sure port number is valid
|
|
FW_ASSERT(
|
|
portNum < this->getNum_typedReturnSync_InputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
F32 retVal;
|
|
|
|
// Call handler function
|
|
retVal = this->typedReturnSync_handler(
|
|
portNum,
|
|
u32,
|
|
f32,
|
|
b,
|
|
str2,
|
|
e,
|
|
a,
|
|
s
|
|
);
|
|
|
|
return retVal;
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
typedSync_handlerBase(
|
|
NATIVE_INT_TYPE portNum,
|
|
U32 u32,
|
|
F32 f32,
|
|
bool b,
|
|
const Ports::TypedPortStrings::StringSize80& str1,
|
|
const E& e,
|
|
const A& a,
|
|
const S& s
|
|
)
|
|
{
|
|
// Make sure port number is valid
|
|
FW_ASSERT(
|
|
portNum < this->getNum_typedSync_InputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
|
|
// Call handler function
|
|
this->typedSync_handler(
|
|
portNum,
|
|
u32,
|
|
f32,
|
|
b,
|
|
str1,
|
|
e,
|
|
a,
|
|
s
|
|
);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Invocation functions for typed output ports
|
|
// ----------------------------------------------------------------------
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
noArgsOut_out(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_noArgsOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
this->m_noArgsOut_OutputPort[portNum].invoke();
|
|
}
|
|
|
|
U32 PassiveTelemetryComponentBase ::
|
|
noArgsReturnOut_out(NATIVE_INT_TYPE portNum)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_noArgsReturnOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
return this->m_noArgsReturnOut_OutputPort[portNum].invoke();
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
typedOut_out(
|
|
NATIVE_INT_TYPE portNum,
|
|
U32 u32,
|
|
F32 f32,
|
|
bool b,
|
|
const Ports::TypedPortStrings::StringSize80& str1,
|
|
const E& e,
|
|
const A& a,
|
|
const S& s
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_typedOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
this->m_typedOut_OutputPort[portNum].invoke(
|
|
u32,
|
|
f32,
|
|
b,
|
|
str1,
|
|
e,
|
|
a,
|
|
s
|
|
);
|
|
}
|
|
|
|
F32 PassiveTelemetryComponentBase ::
|
|
typedReturnOut_out(
|
|
NATIVE_INT_TYPE portNum,
|
|
U32 u32,
|
|
F32 f32,
|
|
bool b,
|
|
const Ports::TypedReturnPortStrings::StringSize80& str2,
|
|
const E& e,
|
|
const A& a,
|
|
const S& s
|
|
)
|
|
{
|
|
FW_ASSERT(
|
|
portNum < this->getNum_typedReturnOut_OutputPorts(),
|
|
static_cast<FwAssertArgType>(portNum)
|
|
);
|
|
return this->m_typedReturnOut_OutputPort[portNum].invoke(
|
|
u32,
|
|
f32,
|
|
b,
|
|
str2,
|
|
e,
|
|
a,
|
|
s
|
|
);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Telemetry write functions
|
|
// ----------------------------------------------------------------------
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
tlmWrite_ChannelU32Format(
|
|
U32 arg,
|
|
Fw::Time _tlmTime
|
|
)
|
|
{
|
|
if (this->m_tlmOut_OutputPort[0].isConnected()) {
|
|
if (
|
|
this->m_timeGetOut_OutputPort[0].isConnected() &&
|
|
(_tlmTime == Fw::ZERO_TIME)
|
|
) {
|
|
this->m_timeGetOut_OutputPort[0].invoke(_tlmTime);
|
|
}
|
|
|
|
Fw::TlmBuffer _tlmBuff;
|
|
Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
|
|
FW_ASSERT(
|
|
_stat == Fw::FW_SERIALIZE_OK,
|
|
static_cast<FwAssertArgType>(_stat)
|
|
);
|
|
|
|
FwChanIdType _id;
|
|
|
|
_id = this->getIdBase() + CHANNELID_CHANNELU32FORMAT;
|
|
|
|
this->m_tlmOut_OutputPort[0].invoke(
|
|
_id,
|
|
_tlmTime,
|
|
_tlmBuff
|
|
);
|
|
}
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
tlmWrite_ChannelF32Format(
|
|
F32 arg,
|
|
Fw::Time _tlmTime
|
|
)
|
|
{
|
|
if (this->m_tlmOut_OutputPort[0].isConnected()) {
|
|
if (
|
|
this->m_timeGetOut_OutputPort[0].isConnected() &&
|
|
(_tlmTime == Fw::ZERO_TIME)
|
|
) {
|
|
this->m_timeGetOut_OutputPort[0].invoke(_tlmTime);
|
|
}
|
|
|
|
Fw::TlmBuffer _tlmBuff;
|
|
Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
|
|
FW_ASSERT(
|
|
_stat == Fw::FW_SERIALIZE_OK,
|
|
static_cast<FwAssertArgType>(_stat)
|
|
);
|
|
|
|
FwChanIdType _id;
|
|
|
|
_id = this->getIdBase() + CHANNELID_CHANNELF32FORMAT;
|
|
|
|
this->m_tlmOut_OutputPort[0].invoke(
|
|
_id,
|
|
_tlmTime,
|
|
_tlmBuff
|
|
);
|
|
}
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
tlmWrite_ChannelStringFormat(
|
|
const Fw::TlmString& arg,
|
|
Fw::Time _tlmTime
|
|
)
|
|
{
|
|
if (this->m_tlmOut_OutputPort[0].isConnected()) {
|
|
if (
|
|
this->m_timeGetOut_OutputPort[0].isConnected() &&
|
|
(_tlmTime == Fw::ZERO_TIME)
|
|
) {
|
|
this->m_timeGetOut_OutputPort[0].invoke(_tlmTime);
|
|
}
|
|
|
|
Fw::TlmBuffer _tlmBuff;
|
|
Fw::SerializeStatus _stat = arg.serialize(_tlmBuff, 80);
|
|
FW_ASSERT(
|
|
_stat == Fw::FW_SERIALIZE_OK,
|
|
static_cast<FwAssertArgType>(_stat)
|
|
);
|
|
|
|
FwChanIdType _id;
|
|
|
|
_id = this->getIdBase() + CHANNELID_CHANNELSTRINGFORMAT;
|
|
|
|
this->m_tlmOut_OutputPort[0].invoke(
|
|
_id,
|
|
_tlmTime,
|
|
_tlmBuff
|
|
);
|
|
}
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
tlmWrite_ChannelEnum(
|
|
const E& arg,
|
|
Fw::Time _tlmTime
|
|
)
|
|
{
|
|
if (this->m_tlmOut_OutputPort[0].isConnected()) {
|
|
if (
|
|
this->m_timeGetOut_OutputPort[0].isConnected() &&
|
|
(_tlmTime == Fw::ZERO_TIME)
|
|
) {
|
|
this->m_timeGetOut_OutputPort[0].invoke(_tlmTime);
|
|
}
|
|
|
|
Fw::TlmBuffer _tlmBuff;
|
|
Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
|
|
FW_ASSERT(
|
|
_stat == Fw::FW_SERIALIZE_OK,
|
|
static_cast<FwAssertArgType>(_stat)
|
|
);
|
|
|
|
FwChanIdType _id;
|
|
|
|
_id = this->getIdBase() + CHANNELID_CHANNELENUM;
|
|
|
|
this->m_tlmOut_OutputPort[0].invoke(
|
|
_id,
|
|
_tlmTime,
|
|
_tlmBuff
|
|
);
|
|
}
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
tlmWrite_ChannelArrayFreq(
|
|
const A& arg,
|
|
Fw::Time _tlmTime
|
|
)
|
|
{
|
|
if (this->m_tlmOut_OutputPort[0].isConnected()) {
|
|
if (
|
|
this->m_timeGetOut_OutputPort[0].isConnected() &&
|
|
(_tlmTime == Fw::ZERO_TIME)
|
|
) {
|
|
this->m_timeGetOut_OutputPort[0].invoke(_tlmTime);
|
|
}
|
|
|
|
Fw::TlmBuffer _tlmBuff;
|
|
Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
|
|
FW_ASSERT(
|
|
_stat == Fw::FW_SERIALIZE_OK,
|
|
static_cast<FwAssertArgType>(_stat)
|
|
);
|
|
|
|
FwChanIdType _id;
|
|
|
|
_id = this->getIdBase() + CHANNELID_CHANNELARRAYFREQ;
|
|
|
|
this->m_tlmOut_OutputPort[0].invoke(
|
|
_id,
|
|
_tlmTime,
|
|
_tlmBuff
|
|
);
|
|
}
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
tlmWrite_ChannelStructFreq(
|
|
const S& arg,
|
|
Fw::Time _tlmTime
|
|
)
|
|
{
|
|
if (this->m_tlmOut_OutputPort[0].isConnected()) {
|
|
if (
|
|
this->m_timeGetOut_OutputPort[0].isConnected() &&
|
|
(_tlmTime == Fw::ZERO_TIME)
|
|
) {
|
|
this->m_timeGetOut_OutputPort[0].invoke(_tlmTime);
|
|
}
|
|
|
|
Fw::TlmBuffer _tlmBuff;
|
|
Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
|
|
FW_ASSERT(
|
|
_stat == Fw::FW_SERIALIZE_OK,
|
|
static_cast<FwAssertArgType>(_stat)
|
|
);
|
|
|
|
FwChanIdType _id;
|
|
|
|
_id = this->getIdBase() + CHANNELID_CHANNELSTRUCTFREQ;
|
|
|
|
this->m_tlmOut_OutputPort[0].invoke(
|
|
_id,
|
|
_tlmTime,
|
|
_tlmBuff
|
|
);
|
|
}
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
tlmWrite_ChannelU32Limits(
|
|
U32 arg,
|
|
Fw::Time _tlmTime
|
|
)
|
|
{
|
|
if (this->m_tlmOut_OutputPort[0].isConnected()) {
|
|
if (
|
|
this->m_timeGetOut_OutputPort[0].isConnected() &&
|
|
(_tlmTime == Fw::ZERO_TIME)
|
|
) {
|
|
this->m_timeGetOut_OutputPort[0].invoke(_tlmTime);
|
|
}
|
|
|
|
Fw::TlmBuffer _tlmBuff;
|
|
Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
|
|
FW_ASSERT(
|
|
_stat == Fw::FW_SERIALIZE_OK,
|
|
static_cast<FwAssertArgType>(_stat)
|
|
);
|
|
|
|
FwChanIdType _id;
|
|
|
|
_id = this->getIdBase() + CHANNELID_CHANNELU32LIMITS;
|
|
|
|
this->m_tlmOut_OutputPort[0].invoke(
|
|
_id,
|
|
_tlmTime,
|
|
_tlmBuff
|
|
);
|
|
}
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
tlmWrite_ChannelF32Limits(
|
|
F32 arg,
|
|
Fw::Time _tlmTime
|
|
)
|
|
{
|
|
if (this->m_tlmOut_OutputPort[0].isConnected()) {
|
|
if (
|
|
this->m_timeGetOut_OutputPort[0].isConnected() &&
|
|
(_tlmTime == Fw::ZERO_TIME)
|
|
) {
|
|
this->m_timeGetOut_OutputPort[0].invoke(_tlmTime);
|
|
}
|
|
|
|
Fw::TlmBuffer _tlmBuff;
|
|
Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
|
|
FW_ASSERT(
|
|
_stat == Fw::FW_SERIALIZE_OK,
|
|
static_cast<FwAssertArgType>(_stat)
|
|
);
|
|
|
|
FwChanIdType _id;
|
|
|
|
_id = this->getIdBase() + CHANNELID_CHANNELF32LIMITS;
|
|
|
|
this->m_tlmOut_OutputPort[0].invoke(
|
|
_id,
|
|
_tlmTime,
|
|
_tlmBuff
|
|
);
|
|
}
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
tlmWrite_ChannelF64(
|
|
F64 arg,
|
|
Fw::Time _tlmTime
|
|
)
|
|
{
|
|
if (this->m_tlmOut_OutputPort[0].isConnected()) {
|
|
if (
|
|
this->m_timeGetOut_OutputPort[0].isConnected() &&
|
|
(_tlmTime == Fw::ZERO_TIME)
|
|
) {
|
|
this->m_timeGetOut_OutputPort[0].invoke(_tlmTime);
|
|
}
|
|
|
|
Fw::TlmBuffer _tlmBuff;
|
|
Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
|
|
FW_ASSERT(
|
|
_stat == Fw::FW_SERIALIZE_OK,
|
|
static_cast<FwAssertArgType>(_stat)
|
|
);
|
|
|
|
FwChanIdType _id;
|
|
|
|
_id = this->getIdBase() + CHANNELID_CHANNELF64;
|
|
|
|
this->m_tlmOut_OutputPort[0].invoke(
|
|
_id,
|
|
_tlmTime,
|
|
_tlmBuff
|
|
);
|
|
}
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
tlmWrite_ChannelU32OnChange(
|
|
U32 arg,
|
|
Fw::Time _tlmTime
|
|
)
|
|
{
|
|
// Check to see if it is the first time
|
|
if (not this->m_first_update_ChannelU32OnChange) {
|
|
// Check to see if value has changed. If not, don't write it.
|
|
if (arg == this->m_last_ChannelU32OnChange) {
|
|
return;
|
|
}
|
|
else {
|
|
this->m_last_ChannelU32OnChange = arg;
|
|
}
|
|
}
|
|
else {
|
|
this->m_first_update_ChannelU32OnChange = false;
|
|
this->m_last_ChannelU32OnChange = arg;
|
|
}
|
|
|
|
if (this->m_tlmOut_OutputPort[0].isConnected()) {
|
|
if (
|
|
this->m_timeGetOut_OutputPort[0].isConnected() &&
|
|
(_tlmTime == Fw::ZERO_TIME)
|
|
) {
|
|
this->m_timeGetOut_OutputPort[0].invoke(_tlmTime);
|
|
}
|
|
|
|
Fw::TlmBuffer _tlmBuff;
|
|
Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
|
|
FW_ASSERT(
|
|
_stat == Fw::FW_SERIALIZE_OK,
|
|
static_cast<FwAssertArgType>(_stat)
|
|
);
|
|
|
|
FwChanIdType _id;
|
|
|
|
_id = this->getIdBase() + CHANNELID_CHANNELU32ONCHANGE;
|
|
|
|
this->m_tlmOut_OutputPort[0].invoke(
|
|
_id,
|
|
_tlmTime,
|
|
_tlmBuff
|
|
);
|
|
}
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
tlmWrite_ChannelEnumOnChange(
|
|
const E& arg,
|
|
Fw::Time _tlmTime
|
|
)
|
|
{
|
|
// Check to see if it is the first time
|
|
if (not this->m_first_update_ChannelEnumOnChange) {
|
|
// Check to see if value has changed. If not, don't write it.
|
|
if (arg == this->m_last_ChannelEnumOnChange) {
|
|
return;
|
|
}
|
|
else {
|
|
this->m_last_ChannelEnumOnChange = arg;
|
|
}
|
|
}
|
|
else {
|
|
this->m_first_update_ChannelEnumOnChange = false;
|
|
this->m_last_ChannelEnumOnChange = arg;
|
|
}
|
|
|
|
if (this->m_tlmOut_OutputPort[0].isConnected()) {
|
|
if (
|
|
this->m_timeGetOut_OutputPort[0].isConnected() &&
|
|
(_tlmTime == Fw::ZERO_TIME)
|
|
) {
|
|
this->m_timeGetOut_OutputPort[0].invoke(_tlmTime);
|
|
}
|
|
|
|
Fw::TlmBuffer _tlmBuff;
|
|
Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
|
|
FW_ASSERT(
|
|
_stat == Fw::FW_SERIALIZE_OK,
|
|
static_cast<FwAssertArgType>(_stat)
|
|
);
|
|
|
|
FwChanIdType _id;
|
|
|
|
_id = this->getIdBase() + CHANNELID_CHANNELENUMONCHANGE;
|
|
|
|
this->m_tlmOut_OutputPort[0].invoke(
|
|
_id,
|
|
_tlmTime,
|
|
_tlmBuff
|
|
);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Time
|
|
// ----------------------------------------------------------------------
|
|
|
|
Fw::Time PassiveTelemetryComponentBase ::
|
|
getTime()
|
|
{
|
|
if (this->m_timeGetOut_OutputPort[0].isConnected()) {
|
|
Fw::Time _time;
|
|
this->m_timeGetOut_OutputPort[0].invoke(_time);
|
|
return _time;
|
|
}
|
|
else {
|
|
return Fw::Time(TB_NONE, 0, 0);
|
|
}
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Mutex operations for guarded ports
|
|
//
|
|
// You can override these operations to provide more sophisticated
|
|
// synchronization
|
|
// ----------------------------------------------------------------------
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
lock()
|
|
{
|
|
this->m_guardedPortMutex.lock();
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
unLock()
|
|
{
|
|
this->m_guardedPortMutex.unLock();
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Calls for messages received on special input ports
|
|
// ----------------------------------------------------------------------
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
m_p_cmdIn_in(
|
|
Fw::PassiveComponentBase* callComp,
|
|
NATIVE_INT_TYPE portNum,
|
|
FwOpcodeType opCode,
|
|
U32 cmdSeq,
|
|
Fw::CmdArgBuffer& args
|
|
)
|
|
{
|
|
FW_ASSERT(callComp);
|
|
|
|
const U32 idBase = callComp->getIdBase();
|
|
FW_ASSERT(opCode >= idBase, opCode, idBase);
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Calls for messages received on typed input ports
|
|
// ----------------------------------------------------------------------
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
m_p_noArgsGuarded_in(
|
|
Fw::PassiveComponentBase* callComp,
|
|
NATIVE_INT_TYPE portNum
|
|
)
|
|
{
|
|
FW_ASSERT(callComp);
|
|
PassiveTelemetryComponentBase* compPtr = static_cast<PassiveTelemetryComponentBase*>(callComp);
|
|
compPtr->noArgsGuarded_handlerBase(portNum);
|
|
}
|
|
|
|
U32 PassiveTelemetryComponentBase ::
|
|
m_p_noArgsReturnGuarded_in(
|
|
Fw::PassiveComponentBase* callComp,
|
|
NATIVE_INT_TYPE portNum
|
|
)
|
|
{
|
|
FW_ASSERT(callComp);
|
|
PassiveTelemetryComponentBase* compPtr = static_cast<PassiveTelemetryComponentBase*>(callComp);
|
|
return compPtr->noArgsReturnGuarded_handlerBase(portNum);
|
|
}
|
|
|
|
U32 PassiveTelemetryComponentBase ::
|
|
m_p_noArgsReturnSync_in(
|
|
Fw::PassiveComponentBase* callComp,
|
|
NATIVE_INT_TYPE portNum
|
|
)
|
|
{
|
|
FW_ASSERT(callComp);
|
|
PassiveTelemetryComponentBase* compPtr = static_cast<PassiveTelemetryComponentBase*>(callComp);
|
|
return compPtr->noArgsReturnSync_handlerBase(portNum);
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
m_p_noArgsSync_in(
|
|
Fw::PassiveComponentBase* callComp,
|
|
NATIVE_INT_TYPE portNum
|
|
)
|
|
{
|
|
FW_ASSERT(callComp);
|
|
PassiveTelemetryComponentBase* compPtr = static_cast<PassiveTelemetryComponentBase*>(callComp);
|
|
compPtr->noArgsSync_handlerBase(portNum);
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
m_p_typedGuarded_in(
|
|
Fw::PassiveComponentBase* callComp,
|
|
NATIVE_INT_TYPE portNum,
|
|
U32 u32,
|
|
F32 f32,
|
|
bool b,
|
|
const Ports::TypedPortStrings::StringSize80& str1,
|
|
const E& e,
|
|
const A& a,
|
|
const S& s
|
|
)
|
|
{
|
|
FW_ASSERT(callComp);
|
|
PassiveTelemetryComponentBase* compPtr = static_cast<PassiveTelemetryComponentBase*>(callComp);
|
|
compPtr->typedGuarded_handlerBase(
|
|
portNum,
|
|
u32,
|
|
f32,
|
|
b,
|
|
str1,
|
|
e,
|
|
a,
|
|
s
|
|
);
|
|
}
|
|
|
|
F32 PassiveTelemetryComponentBase ::
|
|
m_p_typedReturnGuarded_in(
|
|
Fw::PassiveComponentBase* callComp,
|
|
NATIVE_INT_TYPE portNum,
|
|
U32 u32,
|
|
F32 f32,
|
|
bool b,
|
|
const Ports::TypedReturnPortStrings::StringSize80& str2,
|
|
const E& e,
|
|
const A& a,
|
|
const S& s
|
|
)
|
|
{
|
|
FW_ASSERT(callComp);
|
|
PassiveTelemetryComponentBase* compPtr = static_cast<PassiveTelemetryComponentBase*>(callComp);
|
|
return compPtr->typedReturnGuarded_handlerBase(
|
|
portNum,
|
|
u32,
|
|
f32,
|
|
b,
|
|
str2,
|
|
e,
|
|
a,
|
|
s
|
|
);
|
|
}
|
|
|
|
F32 PassiveTelemetryComponentBase ::
|
|
m_p_typedReturnSync_in(
|
|
Fw::PassiveComponentBase* callComp,
|
|
NATIVE_INT_TYPE portNum,
|
|
U32 u32,
|
|
F32 f32,
|
|
bool b,
|
|
const Ports::TypedReturnPortStrings::StringSize80& str2,
|
|
const E& e,
|
|
const A& a,
|
|
const S& s
|
|
)
|
|
{
|
|
FW_ASSERT(callComp);
|
|
PassiveTelemetryComponentBase* compPtr = static_cast<PassiveTelemetryComponentBase*>(callComp);
|
|
return compPtr->typedReturnSync_handlerBase(
|
|
portNum,
|
|
u32,
|
|
f32,
|
|
b,
|
|
str2,
|
|
e,
|
|
a,
|
|
s
|
|
);
|
|
}
|
|
|
|
void PassiveTelemetryComponentBase ::
|
|
m_p_typedSync_in(
|
|
Fw::PassiveComponentBase* callComp,
|
|
NATIVE_INT_TYPE portNum,
|
|
U32 u32,
|
|
F32 f32,
|
|
bool b,
|
|
const Ports::TypedPortStrings::StringSize80& str1,
|
|
const E& e,
|
|
const A& a,
|
|
const S& s
|
|
)
|
|
{
|
|
FW_ASSERT(callComp);
|
|
PassiveTelemetryComponentBase* compPtr = static_cast<PassiveTelemetryComponentBase*>(callComp);
|
|
compPtr->typedSync_handlerBase(
|
|
portNum,
|
|
u32,
|
|
f32,
|
|
b,
|
|
str1,
|
|
e,
|
|
a,
|
|
s
|
|
);
|
|
}
|