20 ActiveLoggerComponentBase(name)
23 this->m_filterState[FilterSeverity::WARNING_HI].enabled =
25 this->m_filterState[FilterSeverity::WARNING_LO].enabled =
27 this->m_filterState[FilterSeverity::COMMAND].enabled =
29 this->m_filterState[FilterSeverity::ACTIVITY_HI].enabled =
31 this->m_filterState[FilterSeverity::ACTIVITY_LO].enabled =
33 this->m_filterState[FilterSeverity::DIAGNOSTIC].enabled =
36 memset(m_filteredIDs,0,
sizeof(m_filteredIDs));
47 ActiveLoggerComponentBase::init(queueDepth,instance);
56 case Fw::LogSeverity::FATAL:
58 case Fw::LogSeverity::WARNING_HI:
59 if (this->m_filterState[FilterSeverity::WARNING_HI].enabled == Enabled::DISABLED) {
63 case Fw::LogSeverity::WARNING_LO:
64 if (this->m_filterState[FilterSeverity::WARNING_LO].enabled == Enabled::DISABLED) {
68 case Fw::LogSeverity::COMMAND:
69 if (this->m_filterState[FilterSeverity::COMMAND].enabled == Enabled::DISABLED) {
73 case Fw::LogSeverity::ACTIVITY_HI:
74 if (this->m_filterState[FilterSeverity::ACTIVITY_HI].enabled == Enabled::DISABLED) {
78 case Fw::LogSeverity::ACTIVITY_LO:
79 if (this->m_filterState[FilterSeverity::ACTIVITY_LO].enabled == Enabled::DISABLED) {
83 case Fw::LogSeverity::DIAGNOSTIC:
84 if (this->m_filterState[FilterSeverity::DIAGNOSTIC].enabled == Enabled::DISABLED) {
96 (m_filteredIDs[entry] ==
id) &&
97 (severity != Fw::LogSeverity::FATAL)
104 this->loqQueue_internalInterfaceInvoke(
id,timeTag,severity,args);
107 if (Fw::LogSeverity::FATAL == severity.e) {
108 if (this->isConnected_FatalAnnounce_OutputPort(0)) {
109 this->FatalAnnounce_out(0,
id);
117 this->m_logPacket.
setId(
id);
124 if (this->isConnected_PktSend_OutputPort(0)) {
125 this->PktSend_out(0, this->m_comBuffer,0);
130 this->m_filterState[filterLevel.e].enabled = filterEnable;
131 this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK);
134 void ActiveLoggerImpl::SET_ID_FILTER_cmdHandler(
141 if (Enabled::ENABLED == idEnabled.e) {
144 if (this->m_filteredIDs[entry] == ID) {
145 this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK);
146 this->log_ACTIVITY_HI_ID_FILTER_ENABLED(ID);
152 if (this->m_filteredIDs[entry] == 0) {
153 this->m_filteredIDs[entry] = ID;
154 this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK);
155 this->log_ACTIVITY_HI_ID_FILTER_ENABLED(ID);
160 this->log_WARNING_LO_ID_FILTER_LIST_FULL(ID);
161 this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::EXECUTION_ERROR);
165 if (this->m_filteredIDs[entry] == ID) {
166 this->m_filteredIDs[entry] = 0;
167 this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK);
168 this->log_ACTIVITY_HI_ID_FILTER_REMOVED(ID);
173 this->log_WARNING_LO_ID_FILTER_NOT_FOUND(ID);
174 this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::EXECUTION_ERROR);
179 void ActiveLoggerImpl::DUMP_FILTER_STATE_cmdHandler(
185 for (
NATIVE_UINT_TYPE filter = 0; filter < FilterSeverity::NUM_CONSTANTS; filter++) {
186 FilterSeverity filterState(
static_cast<FilterSeverity::t
>(filter));
187 this->log_ACTIVITY_LO_SEVERITY_FILTER_STATE(
189 Enabled::ENABLED == this->m_filterState[filter].enabled.e
195 if (this->m_filteredIDs[entry] != 0) {
196 this->log_ACTIVITY_HI_ID_FILTER_ENABLED(this->m_filteredIDs[entry]);
200 this->cmdResponse_out(opCode,cmdSeq,Fw::CmdResponse::OK);
203 void ActiveLoggerImpl::pingIn_handler(
209 this->pingOut_out(0,key);
@ FILTER_WARNING_HI_DEFAULT
WARNING HI events are filtered at input.
@ FILTER_WARNING_LO_DEFAULT
WARNING LO events are filtered at input.
@ FILTER_ACTIVITY_HI_DEFAULT
ACTIVITY HI events are filtered at input.
@ FILTER_ACTIVITY_LO_DEFAULT
ACTIVITY LO events are filtered at input.
@ FILTER_COMMAND_DEFAULT
COMMAND events are filtered at input.
@ FILTER_DIAGNOSTIC_DEFAULT
DIAGNOSTIC events are filtered at input.
@ TELEM_ID_FILTER_SIZE
Size of telemetry ID filter.
PlatformIntType NATIVE_INT_TYPE
PlatformUIntType NATIVE_UINT_TYPE
SerializeStatus serialize(SerializeBufferBase &buffer) const
serialize contents
void setId(FwEventIdType id)
void setTimeTag(const Fw::Time &timeTag)
void setLogBuffer(const LogBuffer &buffer)
void resetSer()
reset to beginning of buffer to reuse for serialization
ActiveLoggerImpl(const char *compName)
constructor
virtual ~ActiveLoggerImpl()
destructor
void init(NATIVE_INT_TYPE queueDepth, NATIVE_INT_TYPE instance)
initialization function
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
ActiveLogger_Enabled Enabled
ActiveLogger_FilterSeverity FilterSeverity