RKH
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
test_trace.c
Go to the documentation of this file.
1 /*
2  * --------------------------------------------------------------------------
3  *
4  * Framework RKH
5  * -------------
6  *
7  * State-machine framework for reactive embedded systems
8  *
9  * Copyright (C) 2010 Leandro Francucci.
10  * All rights reserved. Protected by international copyright laws.
11  *
12  *
13  * RKH is free software: you can redistribute it and/or modify it under the
14  * terms of the GNU General Public License as published by the Free Software
15  * Foundation, either version 3 of the License, or (at your option) any
16  * later version.
17  *
18  * RKH is distributed in the hope that it will be useful, but WITHOUT ANY
19  * WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
21  * more details.
22  *
23  * You should have received a copy of the GNU General Public License along
24  * with RKH, see copying.txt file.
25  *
26  * Contact information:
27  * RKH web site: http://sourceforge.net/projects/rkh-reactivesys/
28  * e-mail: francuccilea@gmail.com
29  * ---------------------------------------------------------------------------
30  */
31 
44 /* -------------------------- Development history -------------------------- */
45 /*
46  * 2015.11.19 LeFr v2.4.05 ---
47  */
48 
49 /* -------------------------------- Authors -------------------------------- */
50 /*
51  * LeFr Leandro Francucci francuccilea@gmail.com
52  */
53 
54 /* --------------------------------- Notes --------------------------------- */
55 /* ----------------------------- Include files ----------------------------- */
56 
57 #include "unity_fixture.h"
58 #include "rkh.h"
59 #include "rkhassert_stub.h"
60 
61 /* ----------------------------- Local macros ------------------------------ */
62 /* ------------------------------- Constants ------------------------------- */
63 
64 #define SIZEOF_BIT_TBL RKH_TRC_MAX_EVENTS_IN_BYTES
65 #define MAX_NUM_BITS (SIZEOF_BIT_TBL * 8)
66 #define FILTER_ON_BYTE 0
67 #define FILTER_OFF_BYTE 0xff
68 
69 /* ---------------------------- Local data types --------------------------- */
70 /* ---------------------------- Global variables --------------------------- */
71 
72 TEST_GROUP(trace_filter);
73 TEST_GROUP(trace);
74 
75 /* ---------------------------- Local variables ---------------------------- */
76 
77 static RKH_FilterTbl filStatus;
78 static rui8_t bitTbl[SIZEOF_BIT_TBL];
79 
80 /* ----------------------- Local function prototypes ----------------------- */
81 /* ---------------------------- Local functions ---------------------------- */
82 
83 static
84 void
85 setBitTbl(rui8_t *bt, rui16_t bit, rui8_t value)
86 {
87  rui8_t bitPos;
88  rui16_t ix;
89 
90  TEST_ASSERT_TRUE( (bt != (rui8_t *)0) ||
91  (bit < MAX_NUM_BITS) ||
92  (value <= 1));
93 
94  bitPos = (rui8_t)(bit & 7);
95  ix = (rui16_t)(bit >> 3);
96 
97  if (value == 1)
98  *(bt + ix) |= rkh_maptbl[bitPos];
99  else
100  *(bt + ix) &= ~rkh_maptbl[bitPos];
101 }
102 
103 static
104 ruint
105 getBitTbl(rui8_t *bt, rui16_t bit)
106 {
107  rui8_t bitPos;
108  rui16_t ix;
109  rui8_t bitVal;
110 
111  TEST_ASSERT_TRUE( (bt != (rui8_t *)0) ||
112  (bit < MAX_NUM_BITS));
113 
114  bitPos = (rui8_t)(bit & 0x07);
115  ix = (rui16_t)(bit >> 3);
116 
117  bitVal = (*(bt + ix) & rkh_maptbl[bitPos]) != 0;
118  return bitVal;
119 }
120 
121 static
122 void
123 setAllBitTbl(rui8_t *bt, ruint value, ruint size)
124 {
125  TEST_ASSERT_TRUE(bt != (rui8_t *)0);
126  memset(bitTbl, value, size);
127 }
128 
129 static
130 rbool_t
131 checkBitTblAreOn(rui8_t *bt, rui16_t size)
132 {
133  rui16_t i;
134  rui8_t *p;
135  rbool_t res;
136 
137  for (i = 0, p = bt, res = RKH_OK; i < size; ++i, ++p)
138  {
139  if (*p != FILTER_ON_BYTE)
140  {
141  res = RKH_FAIL;
142  break;
143  }
144  }
145  return res;
146 }
147 
148 static
149 void
150 setBlockBit(rui8_t *bt, ruint value, ruint to)
151 {
152  ruint bitPos;
153 
154  for (bitPos = 0; bitPos < to; ++bitPos)
155  {
156  setBitTbl(bt, bitPos, value);
157  }
158 }
159 
160 /* It could be added to rkhtrc module */
161 static
162 void
163 rkh_trc_filterAllOn(rui8_t *ft, RKH_TE_ID_T ftSize)
164 {
165  RKH_TE_ID_T cnt;
166  rui8_t *p;
167 
168  for (cnt = 0, p = ft; cnt < ftSize; ++cnt, ++p)
169  {
170  *p = FILTER_ON_BYTE;
171  }
172 }
173 
174 /* It could be added to rkhtrc module */
175 void
176 rkh_trc_filter_init(void)
177 {
178  rkh_trc_filterAllOn(filStatus.signal->tbl,
179  (RKH_TE_ID_T)(filStatus.signal->size));
180  rkh_trc_filterAllOn(filStatus.ao->tbl,
181  (RKH_TE_ID_T)(filStatus.ao->size));
182  rkh_trc_filterAllOn(filStatus.event,
184  rkh_trc_filterAllOn(filStatus.group,
185  (RKH_TE_ID_T)(sizeof(RKH_TG_T)));
186 }
187 
188 /* ---------------------------- Global functions --------------------------- */
189 
190 /* =========================== Filter test group =========================== */
191 
192 TEST_SETUP(trace_filter)
193 {
194 }
195 
196 TEST_TEAR_DOWN(trace_filter)
197 {
198 }
199 
207 TEST(trace_filter, getBitIndex0)
208 {
209  setAllBitTbl(bitTbl, 0, SIZEOF_BIT_TBL);
210  bitTbl[0] = 0x82;
211 
212  TEST_ASSERT_EQUAL(0, getBitTbl(bitTbl, 0));
213  TEST_ASSERT_EQUAL(1, getBitTbl(bitTbl, 1));
214  TEST_ASSERT_EQUAL(1, getBitTbl(bitTbl, 7));
215 }
216 
217 TEST(trace_filter, getBitIndexX)
218 {
219  setAllBitTbl(bitTbl, 0, SIZEOF_BIT_TBL);
220  bitTbl[0] = 0x80;
221  bitTbl[1] = 0x03;
222  bitTbl[2] = 0xc0;
223 
224  TEST_ASSERT_EQUAL(0, getBitTbl(bitTbl, 0));
225  TEST_ASSERT_EQUAL(1, getBitTbl(bitTbl, 7));
226  TEST_ASSERT_EQUAL(1, getBitTbl(bitTbl, 8));
227  TEST_ASSERT_EQUAL(1, getBitTbl(bitTbl, 9));
228  TEST_ASSERT_EQUAL(0, getBitTbl(bitTbl, 10));
229  TEST_ASSERT_EQUAL(1, getBitTbl(bitTbl, 22));
230  TEST_ASSERT_EQUAL(1, getBitTbl(bitTbl, 23));
231 }
232 
233 TEST(trace_filter, setBitIndex0)
234 {
235  setAllBitTbl(bitTbl, 0, SIZEOF_BIT_TBL);
236 
237  setBitTbl(bitTbl, 0, 1);
238  TEST_ASSERT_EQUAL_HEX8(0x01, bitTbl[0]);
239  TEST_ASSERT_EQUAL(1, getBitTbl(bitTbl, 0));
240 
241  setBitTbl(bitTbl, 7, 1);
242  TEST_ASSERT_EQUAL_HEX8(0x81, bitTbl[0]);
243  TEST_ASSERT_EQUAL(1, getBitTbl(bitTbl, 7));
244 
245  TEST_ASSERT_EQUAL_HEX8(0x00, bitTbl[1]);
246  TEST_ASSERT_EQUAL_HEX8(0x00, bitTbl[2]);
247  TEST_ASSERT_EQUAL_HEX8(0x00, bitTbl[3]);
248 }
249 
250 TEST(trace_filter, resetBitIndex0)
251 {
252  setAllBitTbl(bitTbl, 0xff, SIZEOF_BIT_TBL);
253 
254  setBitTbl(bitTbl, 0, 0);
255  TEST_ASSERT_EQUAL_HEX8(0xfe, bitTbl[0]);
256  TEST_ASSERT_EQUAL(0, getBitTbl(bitTbl, 0));
257 
258  setBitTbl(bitTbl, 7, 0);
259  TEST_ASSERT_EQUAL_HEX8(0x7e, bitTbl[0]);
260  TEST_ASSERT_EQUAL(0, getBitTbl(bitTbl, 7));
261 
262  TEST_ASSERT_EQUAL_HEX8(0xff, bitTbl[1]);
263  TEST_ASSERT_EQUAL_HEX8(0xff, bitTbl[2]);
264  TEST_ASSERT_EQUAL_HEX8(0xff, bitTbl[3]);
265 }
266 
267 TEST(trace_filter, setBitIndexX)
268 {
269  setAllBitTbl(bitTbl, 0, SIZEOF_BIT_TBL);
270 
271  setBitTbl(bitTbl, 8, 1);
272  TEST_ASSERT_EQUAL_HEX8(0x01, bitTbl[1]);
273  TEST_ASSERT_EQUAL(1, getBitTbl(bitTbl, 8));
274 
275  setBitTbl(bitTbl, 17, 1);
276  TEST_ASSERT_EQUAL_HEX8(0x02, bitTbl[2]);
277  TEST_ASSERT_EQUAL(1, getBitTbl(bitTbl, 17));
278 
279  TEST_ASSERT_EQUAL_HEX8(0x00, bitTbl[0]);
280  TEST_ASSERT_EQUAL_HEX8(0x00, bitTbl[3]);
281 }
282 
283 TEST(trace_filter, resetBitIndexX)
284 {
285  setAllBitTbl(bitTbl, 0xff, SIZEOF_BIT_TBL);
286 
287  setBitTbl(bitTbl, 8, 0);
288  TEST_ASSERT_EQUAL_HEX8(0xfe, bitTbl[1]);
289  TEST_ASSERT_EQUAL(0, getBitTbl(bitTbl, 8));
290 
291  setBitTbl(bitTbl, 17, 0);
292  TEST_ASSERT_EQUAL_HEX8(0xfd, bitTbl[2]);
293  TEST_ASSERT_EQUAL(0, getBitTbl(bitTbl, 17));
294 
295  TEST_ASSERT_EQUAL_HEX8(0xff, bitTbl[0]);
296  TEST_ASSERT_EQUAL_HEX8(0xff, bitTbl[3]);
297 }
298 
302 /* ============================ Trace test group =========================== */
303 
304 TEST_SETUP(trace)
305 {
306  rkh_trc_filter_get(&filStatus);
307  rkh_trc_filter_init();
308  memset(bitTbl, FILTER_ON_BYTE, RKH_TRC_MAX_EVENTS_IN_BYTES);
309  rkh_assertStub_reset();
310 }
311 
312 TEST_TEAR_DOWN(trace)
313 {
314 }
315 
323 TEST(trace, filEventsAreOnAfterInit)
324 {
325  TEST_ASSERT_TRUE(checkBitTblAreOn(filStatus.signal->tbl,
326  filStatus.signal->size) == RKH_OK);
327 
328  TEST_ASSERT_TRUE(checkBitTblAreOn(filStatus.ao->tbl,
329  filStatus.ao->size) == RKH_OK);
330 
331  TEST_ASSERT_TRUE(checkBitTblAreOn(filStatus.event,
333 
334  TEST_ASSERT_TRUE(checkBitTblAreOn(filStatus.group,
335  sizeof(RKH_TG_T)) == RKH_OK);
336 }
337 
338 TEST(trace, turnOffOneFilEvent)
339 {
340  RKH_GM_OFFSET_T offset;
341 
342  offset = RKH_SM_TTBL_OFFSET;
343  bitTbl[offset] = 0x01;
344 
346 
347  TEST_ASSERT_EQUAL(1, getBitTbl(&filStatus.event[offset], 0));
348  TEST_ASSERT_EQUAL_MEMORY(bitTbl, filStatus.event,
350  TEST_ASSERT_EQUAL_HEX8(0x01,
351  filStatus.event[offset + GETEVT(RKH_TE_SM_INIT)]);
352  TEST_ASSERT_EQUAL_HEX8(0x08, *filStatus.group);
353 }
354 
355 TEST(trace, turnOnOneFilEvent)
356 {
357  bitTbl[RKH_SM_TTBL_OFFSET + 0] = 0x02;
358 
362 
363  TEST_ASSERT_EQUAL_MEMORY(bitTbl, filStatus.event,
365  TEST_ASSERT_EQUAL_HEX8(0x08, *filStatus.group);
366 }
367 
368 TEST(trace, turnOffMultipleFilEvent)
369 {
370  RKH_GM_OFFSET_T offset;
371 
372  offset = RKH_SM_TTBL_OFFSET;
373  bitTbl[offset] = 0x01;
374  bitTbl[offset + 1] = 0x01;
375 
378 
379  TEST_ASSERT_EQUAL_MEMORY(bitTbl, filStatus.event,
381 }
382 
383 TEST(trace, allOffFilEvent)
384 {
385  memset(bitTbl, FILTER_OFF_BYTE, RKH_TRC_MAX_EVENTS_IN_BYTES);
386 
388  TEST_ASSERT_EQUAL_MEMORY(bitTbl, filStatus.event,
390  TEST_ASSERT_EQUAL_HEX8(0xff, *filStatus.group);
391 }
392 
393 TEST(trace, allOnFilEvent)
394 {
396  TEST_ASSERT_EQUAL_MEMORY(bitTbl, filStatus.event,
398  TEST_ASSERT_EQUAL_HEX8(0x00, *filStatus.group);
399 }
400 
401 TEST(trace, isOnOffFilEvent)
402 {
403  TEST_ASSERT_TRUE(rkh_trc_isoff_(RKH_TE_FWK_OBJ) == RKH_FALSE);
404 
405  setBitTbl(filStatus.event, RKH_TE_MP_INIT, FILTER_OFF);
406  setBitTbl(filStatus.group, RKH_TG_MP, FILTER_OFF);
407  TEST_ASSERT_TRUE(rkh_trc_isoff_(RKH_TE_MP_INIT) == RKH_TRUE);
408 
409  setBitTbl(filStatus.event, RKH_TE_MP_INIT, FILTER_ON);
410  TEST_ASSERT_TRUE(rkh_trc_isoff_(RKH_TE_MP_INIT) == RKH_FALSE);
411 }
412 
413 TEST(trace, upperAndLowerBoundsFilEvent)
414 {
415  bitTbl[0] = 0x01;
416  bitTbl[RKH_TRC_MAX_EVENTS_IN_BYTES - 2] = 0x80;
417 
419  rkh_trc_filter_event_(FILTER_OFF, RKH_TE_UT_IGNORE_ARG);
420 
421  TEST_ASSERT_EQUAL_MEMORY(bitTbl, filStatus.event,
423 }
424 
425 TEST(trace, setAllEventsFromOneGroup)
426 {
427  RKH_TE_ID_T filter, filterFrom, filterTo, offset;
428 
429  filterFrom = RKH_SM_START;
430  filterTo = RKH_SM_END;
431  offset = filStatus.grpFilMap[GETGRP(RKH_SM_START)].offset;
432  setBlockBit(&bitTbl[offset], 1, filterTo - filterFrom);
433 
434  for (filter = filterFrom; filter < filterTo; ++filter)
435  {
436  rkh_trc_filter_event_(FILTER_OFF, filter);
437  }
438 
439  TEST_ASSERT_EQUAL_MEMORY(bitTbl, filStatus.event,
441 }
442 
443 TEST(trace, outOfBoundsProducesRuntimeError)
444 {
445  rkh_trc_filter_event_(FILTER_OFF, RKH_TRC_ALL_EVENTS + 1);
446  TEST_ASSERT_EQUAL_STRING("RKH assertion", rkh_assertStub_getLastError());
447 }
448 
449 TEST(trace, turnOffOneGroup)
450 {
451  rkh_trc_filter_group_(FILTER_OFF, RKH_TG_MP, EUNCHANGE);
452  TEST_ASSERT_EQUAL_HEX8(0x01, *filStatus.group);
453 }
454 
455 TEST(trace, turnOnOneGroup)
456 {
457  rkh_trc_filter_group_(FILTER_OFF, RKH_TG_MP, EUNCHANGE);
458  rkh_trc_filter_group_(FILTER_ON, RKH_TG_MP, EUNCHANGE);
459  TEST_ASSERT_EQUAL_HEX8(0x00, *filStatus.group);
460 }
461 
462 TEST(trace, allOnOffGroup)
463 {
464  rkh_trc_filter_group_(FILTER_OFF, RKH_TRC_ALL_GROUPS, EUNCHANGE);
465  TEST_ASSERT_EQUAL_HEX8(0xff, *filStatus.group);
466  rkh_trc_filter_group_(FILTER_ON, RKH_TRC_ALL_GROUPS, EUNCHANGE);
467  TEST_ASSERT_EQUAL_HEX8(0x00, *filStatus.group);
468 }
469 
470 TEST(trace, turnOnOffMultipleGroups)
471 {
472  rkh_trc_filter_group_(FILTER_OFF, RKH_TG_MP, EUNCHANGE);
473  rkh_trc_filter_group_(FILTER_OFF, RKH_TG_SM, EUNCHANGE);
474  rkh_trc_filter_group_(FILTER_OFF, RKH_TG_UT, EUNCHANGE);
475  TEST_ASSERT_EQUAL_HEX8(0x89, *filStatus.group);
476 
477  rkh_trc_filter_group_(FILTER_ON, RKH_TG_MP, EUNCHANGE);
478  rkh_trc_filter_group_(FILTER_ON, RKH_TG_SM, EUNCHANGE);
479  rkh_trc_filter_group_(FILTER_ON, RKH_TG_UT, EUNCHANGE);
480  TEST_ASSERT_EQUAL_HEX8(0x00, *filStatus.group);
481 }
482 
483 TEST(trace, turnOffOneGroupChangedItsEventFilters)
484 {
485  RKHROM RKH_GMTBL_T *pTrcMap;
486 
487  rkh_trc_filter_group_(FILTER_OFF, RKH_TG_UT, ECHANGE);
488  TEST_ASSERT_EQUAL_HEX8(0x80, *filStatus.group);
489 
490  pTrcMap = &filStatus.grpFilMap[RKH_TG_UT];
491  memset(&bitTbl[pTrcMap->offset], FILTER_OFF_BYTE, pTrcMap->range);
492 
493  TEST_ASSERT_EQUAL_MEMORY(bitTbl, filStatus.event,
495 }
496 
497 TEST(trace, turnOffOneSymFil)
498 {
499  bitTbl[0] = 0x01;
500  rkh_trc_symFil(filStatus.ao, 0, FILTER_OFF);
501  TEST_ASSERT_EQUAL_MEMORY(bitTbl, filStatus.ao->tbl, RKH_TRC_MAX_SMA);
502 }
503 
504 TEST(trace, turnOnOneSymFil)
505 {
506  bitTbl[0] = 0x00;
507  rkh_trc_symFil(filStatus.ao, RKH_TRC_MAX_SMA - 1, FILTER_OFF);
508  rkh_trc_symFil(filStatus.ao, RKH_TRC_MAX_SMA - 1, FILTER_ON);
509  TEST_ASSERT_EQUAL_MEMORY(bitTbl, filStatus.ao->tbl, RKH_TRC_MAX_SMA);
510 }
511 
512 TEST(trace, turnOnOffMultipleSymFil)
513 {
514  bitTbl[0] = 0x89;
515  rkh_trc_symFil(filStatus.ao, 0, FILTER_OFF);
516  rkh_trc_symFil(filStatus.ao, 3, FILTER_OFF);
517  rkh_trc_symFil(filStatus.ao, 7, FILTER_OFF);
518  TEST_ASSERT_EQUAL_MEMORY(bitTbl, filStatus.ao->tbl, RKH_TRC_MAX_SMA);
519 }
520 
521 TEST(trace, allOffOnSymFil)
522 {
523  setAllBitTbl(bitTbl, FILTER_OFF_BYTE, RKH_TRC_MAX_SMA);
524  rkh_trc_symFil(filStatus.ao, 0, RKH_TRC_SET_ALL(FILTER_OFF));
525  TEST_ASSERT_EQUAL_MEMORY(bitTbl, filStatus.ao->tbl, RKH_TRC_MAX_SMA);
526 
527  setAllBitTbl(bitTbl, FILTER_ON_BYTE, RKH_TRC_MAX_SMA);
528  rkh_trc_symFil(filStatus.ao, 0, RKH_TRC_SET_ALL(FILTER_ON));
529  TEST_ASSERT_EQUAL_MEMORY(bitTbl, filStatus.ao->tbl, RKH_TRC_MAX_SMA);
530 }
531 
532 TEST(trace, isOnOffSymFil)
533 {
534  TEST_ASSERT_TRUE(rkh_trc_symFil_isoff(filStatus.ao, 0) == RKH_FALSE);
535 
536  setBitTbl(filStatus.ao->tbl, 0, FILTER_OFF);
537  setBitTbl(filStatus.ao->tbl, 3, FILTER_OFF);
538  TEST_ASSERT_TRUE(rkh_trc_symFil_isoff(filStatus.ao, 0) == RKH_TRUE);
539  TEST_ASSERT_TRUE(rkh_trc_symFil_isoff(filStatus.ao, 3) == RKH_TRUE);
540 
541  setBitTbl(filStatus.ao->tbl, 0, FILTER_ON);
542  TEST_ASSERT_TRUE(rkh_trc_symFil_isoff(filStatus.ao, 0) == RKH_FALSE);
543 }
544 
545 TEST(trace, upperAndLowerBoundsSymFil)
546 {
547  setBitTbl(bitTbl, 0, FILTER_OFF);
548  setBitTbl(bitTbl, RKH_TRC_MAX_SMA * 8, FILTER_OFF);
549 
550  rkh_trc_symFil(filStatus.ao, 0, FILTER_OFF);
551  rkh_trc_symFil(filStatus.ao, RKH_TRC_MAX_SMA * 8, FILTER_OFF);
552 
553  TEST_ASSERT_EQUAL_MEMORY(bitTbl, filStatus.ao->tbl, RKH_TRC_MAX_SMA);
554 }
555 
556 TEST(trace, outOfBoundsProducesRuntimeErrorSymFil)
557 {
558  rkh_trc_symFil(filStatus.ao, (filStatus.ao->size * 8) + 1, FILTER_OFF);
559  TEST_ASSERT_EQUAL_STRING("RKH assertion", rkh_assertStub_getLastError());
560 
561  rkh_trc_symFil(0, 0, FILTER_OFF);
562  TEST_ASSERT_EQUAL_STRING("RKH assertion", rkh_assertStub_getLastError());
563 }
564 
569 /* ------------------------------ End of file ------------------------------ */
#define RKH_FAIL
Standard define.
Definition: rkhdef.h:276
Entry symbol table for memory object.
Definition: rkhtrc.h:3382
rui8_t RKH_TG_T
Group of events.
Definition: rkhtrc.h:3073
void rkh_trc_filter_event_(rui8_t ctrl, RKH_TE_ID_T evt)
Emit or suppress a specific event.
Initializes the previously allocated memory pool data strcuture RKH_MP_T.
Definition: rkhtrc.h:3319
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.
Inits a previously created state machine calling its initializing action.
Definition: rkhtrc.h:3346
#define RKH_OK
Standard define.
Definition: rkhdef.h:277
#define RKH_TRC_ALL_GROUPS
Emit or suppress tracing for all groups and events.
Definition: rkhtrc.h:500
Unit test harness group (UT)
Definition: rkhtrc.h:3127
#define RKH_FALSE
Standard define.
Definition: rkhdef.h:255
State Machine group (SM)
Definition: rkhtrc.h:3103
Destination state or pseudostate of a transition segment.
Definition: rkhtrc.h:3354
rui8_t RKH_TE_ID_T
Describes a trace event identification (ID).
Definition: rkhtrc.h:3060
Memory Pool group (MP)
Definition: rkhtrc.h:3085
#define RKH_TRC_MAX_EVENTS_IN_BYTES
Defines the size of trace filter table according to RKH_TOT_NUM_TRC_EVTS and RKH_TRC_MAX_EVENTS.
Definition: rkhtrc.h:448
RKHROM rui8_t rkh_maptbl[8]
rkh_maptbl[] is a table in ROM, used to equate an index from 0 to 7 to a bit mask.
void rkh_trc_symFil(const RKH_TRC_FIL_T *filter, RKH_TRC_FSLOT slot, rui8_t mode)
Emmit or suppresse trace events related to a particular active object or event signal.
void rkh_trc_filter_get(RKH_FilterTbl *outFilterTbl)
Get a memory reference to every trace filter table.
#define RKH_TRUE
Standard define.
Definition: rkhdef.h:256
#define RKH_TRC_ALL_EVENTS
Emit or suppress all trace events.
Definition: rkhtrc.h:506
RKH framwwork platform - independent interface.
rbool_t rkh_trc_symFil_isoff(const RKH_TRC_FIL_T *filter, 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.
#define RKH_SM_START
Trace event offset.
Definition: rkhtrc.h:406
#define RKH_TRC_SET_ALL(mode_)
Emit or supress tracing for all signal/active objects.
Definition: rkhtrc.h:512
Erase the history of a state. It can be a shallow or deep history.
Definition: rkhtrc.h:3347