52 #ifndef __RKHTRC_FILTER_H__
53 #define __RKHTRC_FILTER_H__
64 #if RKH_CFG_TRC_EN == RKH_ENABLED && RKH_CFG_TRC_RTFIL_EN == RKH_ENABLED
72 #define RKH_FILTER_ON_GROUP(grp) \
73 rkh_trc_filter_group_(FILTER_ON, (grp), EUNCHANGE)
82 #define RKH_FILTER_OFF_GROUP(grp) \
83 rkh_trc_filter_group_(FILTER_OFF, (grp), EUNCHANGE)
92 #define RKH_FILTER_ON_EVENT(evt) \
93 rkh_trc_filter_event_(FILTER_ON, (evt))
105 #define RKH_FILTER_OFF_EVENT(evt) \
106 rkh_trc_filter_event_(FILTER_OFF, (evt))
114 #define RKH_FILTER_ON_GROUP_ALL_EVENTS(grp) \
115 rkh_trc_filter_group_(FILTER_ON, (grp), ECHANGE)
126 #define RKH_FILTER_OFF_GROUP_ALL_EVENTS(grp) \
127 rkh_trc_filter_group_(FILTER_OFF, (grp), ECHANGE)
129 #if RKH_CFG_TRC_RTFIL_SMA_EN == RKH_ENABLED
138 #define RKH_FILTER_ON_SMA(sma) \
139 rkh_trc_symFil(RKHFilterSma, RKH_SMA_ACCESS_CONST(sma, prio), \
148 #define RKH_FILTER_ON_ALL_SMA() \
149 rkh_trc_symFil(RKHFilterSma, 0, RKH_TRC_SET_ALL(FILTER_ON))
158 #define RKH_FILTER_OFF_SMA(sma) \
159 rkh_trc_symFil(RKHFilterSma, RKH_SMA_ACCESS_CONST(sma, prio), \
168 #define RKH_FILTER_OFF_ALL_SMA() \
169 rkh_trc_symFil(RKHFilterSma, 0, RKH_TRC_SET_ALL(FILTER_OFF))
172 #define RKH_FILTER_ON_SMA(sma) (void)0
173 #define RKH_FILTER_ON_ALL_SMA() (void)0
174 #define RKH_FILTER_OFF_SMA(sma) (void)0
175 #define RKH_FILTER_OFF_ALL_SMA() (void)0
178 #if RKH_CFG_TRC_RTFIL_SIGNAL_EN == RKH_ENABLED
186 #define RKH_FILTER_ON_SIGNAL(sig) \
187 rkh_trc_symFil(RKHFilterSignal, (sig), FILTER_ON)
195 #define RKH_FILTER_ON_ALL_SIGNALS() \
196 rkh_trc_symFil(RKHFilterSignal, 0, RKH_TRC_SET_ALL(FILTER_ON))
205 #define RKH_FILTER_OFF_SIGNAL(sig) \
206 rkh_trc_symFil(RKHFilterSignal, (sig), FILTER_OFF)
214 #define RKH_FILTER_OFF_ALL_SIGNALS() \
215 rkh_trc_symFil(RKHFilterSignal, 0, RKH_TRC_SET_ALL(FILTER_OFF))
217 #define RKH_FILTER_ON_SIGNAL(sig) (void)0
218 #define RKH_FILTER_ON_ALL_SIGNALS() (void)0
219 #define RKH_FILTER_OFF_SIGNAL(sig) (void)0
220 #define RKH_FILTER_OFF_ALL_SIGNALS() (void)0
223 #define RKH_FILTER_ON_GROUP(grp) (void)0
224 #define RKH_FILTER_OFF_GROUP(grp) (void)0
225 #define RKH_FILTER_ON_EVENT(evt) (void)0
226 #define RKH_FILTER_OFF_EVENT(evt) (void)0
227 #define RKH_FILTER_ON_GROUP_ALL_EVENTS(grp) (void)0
228 #define RKH_FILTER_OFF_GROUP_ALL_EVENTS(grp) (void)0
229 #define RKH_FILTER_ON_SMA(sma) (void)0
230 #define RKH_FILTER_ON_ALL_SMA() (void)0
231 #define RKH_FILTER_OFF_SMA(sma) (void)0
232 #define RKH_FILTER_OFF_ALL_SMA() (void)0
233 #define RKH_FILTER_ON_SIGNAL(sig) (void)0
234 #define RKH_FILTER_ON_ALL_SIGNALS() (void)0
235 #define RKH_FILTER_OFF_SIGNAL(sig) (void)0
236 #define RKH_FILTER_OFF_ALL_SIGNALS() (void)0
245 #if RKH_TRC_MAX_SMA > RKH_TRC_MAX_SIGNALS
246 #if (RKH_TRC_MAX_SMA * 8) <= RKH_BIT(8)
248 #elif (RKH_TRC_MAX_SMA * 8) <= RKH_BIT(16)
250 #elif (RKH_TRC_MAX_SMA * 8) <= RKH_BIT(32)
256 #if (RKH_TRC_MAX_SIGNALS * 8) <= RKH_BIT(8)
258 #elif (RKH_TRC_MAX_SIGNALS * 8) <= RKH_BIT(16)
260 #elif (RKH_TRC_MAX_SIGNALS * 8) <= RKH_BIT(32)
279 FILTER_ON, FILTER_OFF
282 typedef enum RKHFilter
284 RKHFilterTrcEvt, RKHFilterSignal, RKHFilterSma,
288 typedef struct RKH_FilterTbl
294 const RKH_GMTBL_T *grpFilMap;
Defines constants and macros which are internally used by RKH trace facility.
rui8_t RKH_TG_T
Group of events.
rui8_t RKH_TE_ID_T
Describes a trace event identification (ID).
void rkh_trc_filter_group_(rui8_t ctrl, RKH_TG_T grp, rui8_t mode)
Emit or suppress all trace events from a specific group.
void rkh_trc_filter_event_(rui8_t ctrl, RKH_TE_ID_T evt)
Emit or suppress a specific event.
rbool_t rkh_trc_symFil_isoff(RKHFilter fd, RKH_TRC_FSLOT slot)
Test the active objecto or signal filter condition.
rbool_t rkh_trc_isoff_(RKH_TE_ID_T e)
Test the group and event filter condition.
void rkh_trc_filter_get(RKH_FilterTbl *outFilterTbl)
Get a memory reference to every trace filter table.
rui8_t RKH_TRC_FSLOT
This data type defines the size of filter table for AO and signals.
void rkh_trc_symFil(RKHFilter fd, RKH_TRC_FSLOT slot, rui8_t mode)
Emmit or suppresse trace events related to a particular active object or event signal.
Represents the filter of signal and active object.