RKH
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
rkhtrc.h
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 
45 /* -------------------------- Development history -------------------------- */
46 /*
47  * 2015.10.24 LeFr v2.4.05 Initial version
48  */
49 
50 /* -------------------------------- Authors -------------------------------- */
51 /*
52  * LeFr Leandro Francucci francuccilea@gmail.com
53  */
54 
55 /* --------------------------------- Notes --------------------------------- */
56 /* --------------------------------- Module -------------------------------- */
57 #ifndef __RKHTRC_H__
58 #define __RKHTRC_H__
59 
60 /* ----------------------------- Include files ----------------------------- */
61 #include "rkhcfg.h"
62 #include "rkhtype.h"
63 #include "rkhplat.h"
64 #include "rkhevt.h"
65 
66 /* ---------------------- External C language linkage ---------------------- */
67 #ifdef __cplusplus
68 extern "C" {
69 #endif
70 
71 /* --------------------------------- Macros -------------------------------- */
82 #define RKH_CFG_TRC_SIZEOF_TE_ID 8
83 
84 #if RKH_CFG_TRC_SIZEOF_TE_ID == 8
85  #define RKH_TRC_TE_ID(teid) \
86  RKH_TRC_UI8(teid)
87 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 16
88  #define RKH_TRC_TE_ID(teid) \
89  RKH_TRC_UI16(teid)
90 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 32
91  #define RKH_TRC_TE_ID(teid) \
92  RKH_TRC_UI32(teid)
93 #else
94  #define RKH_TRC_TE_ID(teid) \
95  RKH_TRC_UI8(teid)
96 #endif
97 
98 #if RKH_CFG_TRC_TSTAMP_EN == RKH_ENABLED
99  #if RKH_CFGPORT_TRC_SIZEOF_TSTAMP == 8
100  #define RKH_TRC_TSTAMP() \
101  RKH_TRC_UI8(rkh_trc_getts())
102  #elif RKH_CFGPORT_TRC_SIZEOF_TSTAMP == 16
103  #define RKH_TRC_TSTAMP() \
104  RKH_TRC_UI16(rkh_trc_getts())
105  #elif RKH_CFGPORT_TRC_SIZEOF_TSTAMP == 32
106  #define RKH_TRC_TSTAMP() \
107  RKH_TRC_UI32(rkh_trc_getts())
108  #else
109  #define RKH_TRC_TSTAMP() \
110  RKH_TRC_UI16(rkh_trc_getts())
111  #endif
112 #else
113  #define RKH_TRC_TSTAMP()
114 #endif
115 
116 #if RKH_CFG_TRC_EN == RKH_ENABLED && \
117  RKH_CFG_TRC_RTFIL_EN == RKH_ENABLED
118 
125  #define RKH_FILTER_ON_GROUP(grp) \
126  rkh_trc_filter_group_(FILTER_ON, (grp), EUNCHANGE)
127 
135  #define RKH_FILTER_OFF_GROUP(grp) \
136  rkh_trc_filter_group_(FILTER_OFF, (grp), EUNCHANGE)
137 
145  #define RKH_FILTER_ON_EVENT(evt) \
146  rkh_trc_filter_event_(FILTER_ON, (evt))
147 
158  #define RKH_FILTER_OFF_EVENT(evt) \
159  rkh_trc_filter_event_(FILTER_OFF, (evt))
160 
167  #define RKH_FILTER_ON_GROUP_ALL_EVENTS(grp) \
168  rkh_trc_filter_group_(FILTER_ON, (grp), ECHANGE)
169 
179  #define RKH_FILTER_OFF_GROUP_ALL_EVENTS(grp) \
180  rkh_trc_filter_group_(FILTER_OFF, (grp), ECHANGE)
181 
182  #if RKH_CFG_TRC_RTFIL_SMA_EN == RKH_ENABLED
183 
191  #define RKH_FILTER_ON_SMA(sma) \
192  rkh_trc_symFil(&fsma, RKH_SMA_ACCESS_CONST(sma, prio), FILTER_ON)
193 
201  #define RKH_FILTER_ON_ALL_SMA() \
202  rkh_trc_symFil(&fsma, 0, RKH_TRC_SET_ALL(FILTER_ON))
203 
211  #define RKH_FILTER_OFF_SMA(sma) \
212  rkh_trc_symFil(&fsma, RKH_SMA_ACCESS_CONST(sma, prio), FILTER_OFF)
213 
220  #define RKH_FILTER_OFF_ALL_SMA() \
221  rkh_trc_symFil(&fsma, 0, RKH_TRC_SET_ALL(FILTER_OFF))
222 
223  #else
224  #define RKH_FILTER_ON_SMA(sma) (void)0
225  #define RKH_FILTER_ON_ALL_SMA() (void)0
226  #define RKH_FILTER_OFF_SMA(sma) (void)0
227  #define RKH_FILTER_OFF_ALL_SMA() (void)0
228  #endif
229 
230  #if RKH_CFG_TRC_RTFIL_SIGNAL_EN == RKH_ENABLED
231 
238  #define RKH_FILTER_ON_SIGNAL(sig) \
239  rkh_trc_symFil(&fsig, (sig), FILTER_ON)
240 
248  #define RKH_FILTER_ON_ALL_SIGNALS() \
249  rkh_trc_symFil(&fsig, 0, RKH_TRC_SET_ALL(FILTER_ON))
250 
258  #define RKH_FILTER_OFF_SIGNAL(sig) \
259  rkh_trc_symFil(&fsig, (sig), FILTER_OFF)
260 
267  #define RKH_FILTER_OFF_ALL_SIGNALS() \
268  rkh_trc_symFil(&fsig, 0, RKH_TRC_SET_ALL(FILTER_OFF))
269  #else
270  #define RKH_FILTER_ON_SIGNAL(sig) (void)0
271  #define RKH_FILTER_ON_ALL_SIGNALS() (void)0
272  #define RKH_FILTER_OFF_SIGNAL(sig) (void)0
273  #define RKH_FILTER_OFF_ALL_SIGNALS() (void)0
274  #endif
275 #else
276  #define RKH_FILTER_ON_GROUP(grp) (void)0
277  #define RKH_FILTER_OFF_GROUP(grp) (void)0
278  #define RKH_FILTER_ON_EVENT(evt) (void)0
279  #define RKH_FILTER_OFF_EVENT(evt) (void)0
280  #define RKH_FILTER_ON_GROUP_ALL_EVENTS(grp) (void)0
281  #define RKH_FILTER_OFF_GROUP_ALL_EVENTS(grp) (void)0
282  #define RKH_FILTER_ON_SMA(sma) (void)0
283  #define RKH_FILTER_ON_ALL_SMA() (void)0
284  #define RKH_FILTER_OFF_SMA(sma) (void)0
285  #define RKH_FILTER_OFF_ALL_SMA() (void)0
286  #define RKH_FILTER_ON_SIGNAL(sig) (void)0
287  #define RKH_FILTER_ON_ALL_SIGNALS() (void)0
288  #define RKH_FILTER_OFF_SIGNAL(sig) (void)0
289  #define RKH_FILTER_OFF_ALL_SIGNALS() (void)0
290 #endif
291 
305 #if RKH_CFG_TRC_RTFIL_SMA_EN == RKH_ENABLED
306  #define RKH_TRC_AO_ISOFF(prio) \
307  && rkh_trc_symFil_isoff(&fsma, (RKH_TRC_FSLOT)(prio))
308 #else
309  #define RKH_TRC_AO_ISOFF(prio)
310 #endif
311 
326 #if RKH_CFG_TRC_RTFIL_SIGNAL_EN == RKH_ENABLED
327  #define RKH_TRC_SIG_ISOFF(sig) \
328  && rkh_trc_symFil_isoff(&fsig, (RKH_TRC_FSLOT)(sig))
329 #else
330  #define RKH_TRC_SIG_ISOFF(sig)
331 #endif
332 
333 /* -------------------------------- Constants ------------------------------ */
334 #if RKH_CFG_TRC_SIZEOF_TE_ID == 8
335  #define RKH_NBITS_GROUP 3
336 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 16
337  #define RKH_NBITS_GROUP 8
338 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 32
339  #define RKH_NBITS_GROUP 8
340 #else
341  #define RKH_NBITS_GROUP 3
342 #endif
343 
344 #define RKH_NBIT_EVENT_PER_GROUP (RKH_CFG_TRC_SIZEOF_TE_ID - \
345  RKH_NBITS_GROUP)
346 #define RKH_TRC_MAX_GROUPS RKH_BIT(RKH_NBITS_GROUP)
347 #define RKH_MAX_NUM_TE_PER_GROUP RKH_BIT(RKH_NBIT_EVENT_PER_GROUP)
348 #define NGSH RKH_NBIT_EVENT_PER_GROUP
349 #define RKH_GRP_MASK \
350  (RKH_TE_ID_T)((RKH_BIT(RKH_NBITS_GROUP) - 1) << \
351  RKH_NBIT_EVENT_PER_GROUP)
352 #define RKH_TE_MASK \
353  (RKH_TE_ID_T)(RKH_BIT(RKH_NBIT_EVENT_PER_GROUP) - 1)
354 
361 #define RKH_TRC_MAX_EVENTS \
362  (RKH_MAX_NUM_TE_PER_GROUP * RKH_TRC_MAX_GROUPS)
363 
364 #if ((RKH_CFG_FWK_MAX_SMA & (8 - 1)) == 0)
365 
370  #define RKH_TRC_MAX_SMA (RKH_CFG_FWK_MAX_SMA / 8)
371 #else
372  #define RKH_TRC_MAX_SMA (RKH_CFG_FWK_MAX_SMA / 8 + 1)
373 #endif
374 
375 #if ((RKH_CFG_FWK_MAX_SIGNALS & (8 - 1)) == 0)
376 
381  #define RKH_TRC_MAX_SIGNALS (RKH_CFG_FWK_MAX_SIGNALS / 8)
382 #else
383  #define RKH_TRC_MAX_SIGNALS (RKH_CFG_FWK_MAX_SIGNALS / 8 + 1)
384 #endif
385 
403 #define RKH_MP_START GRPLSH(RKH_TG_MP)
404 #define RKH_RQ_START GRPLSH(RKH_TG_RQ)
405 #define RKH_SMA_START GRPLSH(RKH_TG_SMA)
406 #define RKH_SM_START GRPLSH(RKH_TG_SM)
407 #define RKH_TMR_START GRPLSH(RKH_TG_TMR)
408 #define RKH_FWK_START GRPLSH(RKH_TG_FWK)
409 #define RKH_USR_START GRPLSH(RKH_TG_USR)
410 #define RKH_UT_START GRPLSH(RKH_TG_UT)
411 
419 #define RKH_MP_TTBL_RANGE 1
420 #define RKH_RQ_TTBL_RANGE 1
421 #define RKH_SMA_TTBL_RANGE 1
422 #define RKH_SM_TTBL_RANGE 3
423 #define RKH_TIM_TTBL_RANGE 1
424 #define RKH_FWK_TTBL_RANGE 3
425 #define RKH_USR_TTBL_RANGE 4
426 #define RKH_UT_TTBL_RANGE 2
427 
432 #define RKH_TOT_NUM_TRC_EVTS \
433  (RKH_MP_TTBL_RANGE + \
434  RKH_RQ_TTBL_RANGE + \
435  RKH_SMA_TTBL_RANGE + \
436  RKH_SM_TTBL_RANGE + \
437  RKH_TIM_TTBL_RANGE + \
438  RKH_FWK_TTBL_RANGE + \
439  RKH_USR_TTBL_RANGE + \
440  RKH_UT_TTBL_RANGE)
441 
447 #if (RKH_TOT_NUM_TRC_EVTS <= RKH_TOT_NUM_TRC_EVTS)
448  #define RKH_TRC_MAX_EVENTS_IN_BYTES RKH_TOT_NUM_TRC_EVTS
449 #else
450  #error "rkhtrc.h, the total number of trace events represented"
451  #error "by RKH_TOT_NUM_TRC_EVTS must be <= RKH_TRC_MAX_EVENTS"
452 #endif
453 
454 #define RKH_MP_TTBL_OFFSET 0
455 #define RKH_RQ_TTBL_OFFSET (RKH_MP_TTBL_OFFSET + RKH_MP_TTBL_RANGE)
456 #define RKH_SMA_TTBL_OFFSET (RKH_RQ_TTBL_OFFSET + RKH_RQ_TTBL_RANGE)
457 #define RKH_SM_TTBL_OFFSET (RKH_SMA_TTBL_OFFSET + RKH_SMA_TTBL_RANGE)
458 #define RKH_TIM_TTBL_OFFSET (RKH_SM_TTBL_OFFSET + RKH_SM_TTBL_RANGE)
459 #define RKH_FWK_TTBL_OFFSET (RKH_TIM_TTBL_OFFSET + RKH_TIM_TTBL_RANGE)
460 #define RKH_USR_TTBL_OFFSET (RKH_FWK_TTBL_OFFSET + RKH_FWK_TTBL_RANGE)
461 #define RKH_UT_TTBL_OFFSET (RKH_USR_TTBL_OFFSET + RKH_USR_TTBL_RANGE)
462 
463 #define GRPLSH(grp) \
464  (RKH_TE_ID_T)(((grp) & (rui8_t)(RKH_TRC_MAX_GROUPS - 1)) << NGSH)
465 #define EXTE(te, grp) \
466  (RKH_TE_ID_T)((te) - GRPLSH(grp))
467 
468 #define GETGRP(e) \
469  (RKH_TG_T)(((e) & RKH_GRP_MASK) >> RKH_NBIT_EVENT_PER_GROUP)
470 #define GETEVT(e) \
471  (RKH_TE_ID_T)((e) & RKH_TE_MASK)
472 
473 #define ECHANGE 0
474 #define EUNCHANGE 1
475 
476 #if (((RKH_CFG_TRC_EN == 1) && (RKH_CFG_SMA_TRC_SNDR_EN == 1)) || \
477  (defined(RKH_EN_DOXYGEN) && RKH_EN_DOXYGEN == 1))
478 
493  #define RKH_USE_TRC_SENDER
494 #endif
495 
500 #define RKH_TRC_ALL_GROUPS RKH_TG_NGROUP
501 
506 #define RKH_TRC_ALL_EVENTS RKH_TE_NEVENT
507 
512 #define RKH_TRC_SET_ALL(mode_) \
513  ((mode_) | RKH_TRC_ALL_FILTERS)
514 
515 #define RKH_TRC_ALL_FILTERS 0x80
516 #define RKH_FILTER_MODE_MASK ~RKH_TRC_ALL_FILTERS
517 
519 #define RKH_XOR 0x20
520 
522 #define RKH_FLG 0x7E
523 
525 #define RKH_ESC 0x7D
526 
532 #if RKH_CFG_TRC_CHK_EN == RKH_ENABLED
533  #define RKH_TRC_CHK() \
534  chk = (rui8_t)(~chk + 1); \
535  rkh_trc_u8(chk)
536 #else
537  #define RKH_TRC_CHK()
538 #endif
539 
546 #define RKH_TRC_FLG() RKH_TRC_U8_RAW(RKH_FLG)
547 
548 #if RKH_CFG_TRC_RTFIL_EN == RKH_ENABLED
549 
568  #define RKH_TRC_BEGIN(eid_, prio_, sig_) \
569  if (rkh_trc_isoff_(eid_) \
570  RKH_TRC_AO_ISOFF(prio_) \
571  RKH_TRC_SIG_ISOFF(sig_)) \
572  { \
573  RKH_ENTER_CRITICAL_(); \
574  rkh_trc_begin(eid_);
575 
576  #define RKH_TRC_BEGIN_WOAO(eid_, sig_) \
577  if (rkh_trc_isoff_(eid_) \
578  RKH_TRC_SIG_ISOFF(sig_)) \
579  { \
580  RKH_ENTER_CRITICAL_(); \
581  rkh_trc_begin(eid_);
582 
583  #define RKH_TRC_BEGIN_WOSIG(eid_, prio_) \
584  if (rkh_trc_isoff_(eid_) \
585  RKH_TRC_AO_ISOFF(prio_)) \
586  { \
587  RKH_ENTER_CRITICAL_(); \
588  rkh_trc_begin(eid_);
589 
590  #define RKH_TRC_BEGIN_WOAOSIG(eid_) \
591  if (rkh_trc_isoff_(eid_)) \
592  { \
593  RKH_ENTER_CRITICAL_(); \
594  rkh_trc_begin(eid_);
595 
606  #define RKH_TRC_END() \
607  rkh_trc_end(); \
608  RKH_EXIT_CRITICAL_(); \
609  }
610 
618  #define RKH_TRC_BEGIN_NOCRIT(eid_, prio_, sig_) \
619  if (rkh_trc_isoff_(eid_) \
620  RKH_TRC_AO_ISOFF(prio_) \
621  RKH_TRC_SIG_ISOFF(sig_)) \
622  { \
623  rkh_trc_begin(eid_);
624 
632  #define RKH_TRC_BEGIN_WOAO_NOCRIT(eid_, sig_) \
633  if (rkh_trc_isoff_(eid_) \
634  RKH_TRC_SIG_ISOFF(sig_)) \
635  { \
636  rkh_trc_begin(eid_);
637 
645  #define RKH_TRC_BEGIN_WOSIG_NOCRIT(eid_, prio_) \
646  if (rkh_trc_isoff_(eid_) \
647  RKH_TRC_AO_ISOFF(prio_)) \
648  { \
649  rkh_trc_begin(eid_);
650 
657  #define RKH_TRC_BEGIN_WOAOSIG_NOCRIT(eid_) \
658  if (rkh_trc_isoff_(eid_)) \
659  { \
660  rkh_trc_begin(eid_);
661 
665  #define RKH_TRC_END_NOCRIT() \
666  rkh_trc_end(); \
667  }
668 #else
669  #define RKH_TRC_BEGIN(eid_, prio_, sig_) \
670  RKH_ENTER_CRITICAL_(); \
671  rkh_trc_begin(eid_);
672 
673  #define RKH_TRC_BEGIN_WOAO(eid_, sig_) \
674  RKH_ENTER_CRITICAL_(); \
675  rkh_trc_begin(eid_);
676 
677  #define RKH_TRC_BEGIN_WOSIG(eid_, prio_) \
678  RKH_ENTER_CRITICAL_(); \
679  rkh_trc_begin(eid_);
680 
681  #define RKH_TRC_BEGIN_WOAOSIG(eid_) \
682  RKH_ENTER_CRITICAL_(); \
683  rkh_trc_begin(eid_);
684 
685  #define RKH_TRC_END() \
686  rkh_trc_end(); \
687  RKH_EXIT_CRITICAL_();
688 
689  #define RKH_TRC_BEGIN_NOCRIT(eid_, prio_, sig_) \
690  rkh_trc_begin(eid_);
691 
692  #define RKH_TRC_BEGIN_WOAO_NOCRIT(eid_, sig_) \
693  rkh_trc_begin(eid_);
694 
695  #define RKH_TRC_BEGIN_WOSIG_NOCRIT(eid_, prio_) \
696  rkh_trc_begin(eid_);
697 
698  #define RKH_TRC_BEGIN_WOAOSIG_NOCRIT(eid_) \
699  rkh_trc_begin(eid_);
700 
701  #define RKH_TRC_END_NOCRIT() \
702  rkh_trc_end();
703 #endif
704 
709 #define RKH_TRC_BEGIN_WOFIL(eid_) \
710  RKH_SR_ALLOC(); \
711  RKH_ENTER_CRITICAL_(); \
712  rkh_trc_begin(eid_);
713 
718 #define RKH_TRC_END_WOFIL() \
719  rkh_trc_end(); \
720  RKH_EXIT_CRITICAL_();
721 
725 #define RKH_TRC_BEGIN_WOFIL_NOCRIT(eid_) \
726  rkh_trc_begin(eid_);
727 
732 #define RKH_TRC_END_WOFIL_NOCRIT() \
733  rkh_trc_end(); \
734 
735 
739 #define RKH_TRC_BEGIN_DFT(eid_) \
740  RKH_SR_ALLOC(); \
741  RKH_ENTER_CRITICAL_(); \
742  rkh_trc_clear_chk(); \
743  RKH_TRC_TE_ID(eid_);
744 
749 #define RKH_TRC_END_DFT() \
750  rkh_trc_end(); \
751  RKH_EXIT_CRITICAL_();
752 
757 #define RKH_TRC_U8_RAW(d) \
758  rkh_trc_put((d))
759 
764 #define RKH_TRC_UI8(d) \
765  rkh_trc_u8((rui8_t)(d))
766 
771 #define RKH_TRC_UI16(d) \
772  rkh_trc_u16((d))
773 
778 #define RKH_TRC_UI32(d) \
779  rkh_trc_u32((d))
780 
785 #define RKH_TRC_STR(s) \
786  rkh_trc_str((s))
787 
788 #if RKH_CFG_TRC_USER_TRACE_EN == RKH_ENABLED
789 
792  #define RKH_TRC_USR_BEGIN(eid_) \
793  RKH_SR_ALLOC(); \
794  if (rkh_trc_isoff_(eid_)) \
795  { \
796  RKH_ENTER_CRITICAL_(); \
797  rkh_trc_begin(eid_);
798 
802  #define RKH_TRC_USR_END() \
803  rkh_trc_end(); \
804  RKH_EXIT_CRITICAL_(); \
805  }
806 
810  #define RKH_TRC_USR_BEGIN_NOCRIT(eid_) \
811  if (rkh_trc_isoff_(eid_)) \
812  { \
813  rkh_trc_begin(eid_);
814 
818  #define RKH_TRC_USR_END_NOCRIT() \
819  rkh_trc_end(); \
820  }
821 
827  #define RKH_TUSR_I8(w_, d_) \
828  rkh_trc_fmt_u8((rui8_t)(((w_) << 4)) | (rui8_t)RKH_I8_T, \
829  (d_))
830 
835  #define RKH_TUSR_UI8(w_, d_) \
836  rkh_trc_fmt_u8((rui8_t)(((w_) << 4)) | (rui8_t)RKH_UI8_T, \
837  (d_))
838 
843  #define RKH_TUSR_I16(w_, d_) \
844  rkh_trc_fmt_u16((rui8_t)(((w_) << 4)) | (rui8_t)RKH_I16_T, \
845  (d_))
846 
851  #define RKH_TUSR_UI16(w_, d_) \
852  rkh_trc_fmt_u16((rui8_t)(((w_) << 4)) | (rui8_t)RKH_UI16_T, \
853  (d_))
854 
859  #define RKH_TUSR_I32(w_, d_) \
860  rkh_trc_fmt_u32((rui8_t)(((w_) << 4)) | (rui8_t)RKH_I32_T, \
861  (d_))
862 
867  #define RKH_TUSR_UI32(w_, d_) \
868  rkh_trc_fmt_u32((rui8_t)(((w_) << 4)) | (rui8_t)RKH_UI32_T, \
869  (d_))
870 
875  #define RKH_TUSR_X32(w_, d_) \
876  rkh_trc_fmt_u32((rui8_t)(((w_) << 4)) | (rui8_t)RKH_X32_T, \
877  (d_))
878 
883  #define RKH_TUSR_STR(s_) \
884  rkh_trc_fmt_str((s_))
885 
890  #define RKH_TUSR_MEM(mem_, size_) \
891  rkh_trc_fmt_mem((mem_), (size_))
892 
897  #if RKH_CFGPORT_TRC_SIZEOF_PTR == 16
898  #define RKH_TUSR_OBJ(obj_) \
899  rkh_trc_fmt_u16((rui8_t)RKH_OBJ_T, (rui16_t)(obj_))
900  #elif RKH_CFGPORT_TRC_SIZEOF_PTR == 32
901  #define RKH_TUSR_OBJ(obj_) \
902  rkh_trc_fmt_u32((rui8_t)RKH_OBJ_T, (rui32_t)(obj_))
903  #else
904  #define RKH_TUSR_OBJ(obj_) \
905  rkh_trc_fmt_u32((rui8_t)RKH_OBJ_T, (rui32_t)(obj_))
906  #endif
907 
912  #if RKH_CFGPORT_TRC_SIZEOF_FUN_PTR == 16u
913  #define RKH_TUSR_FUN(fun_) \
914  rkh_trc_fmt_u16((rui8_t)RKH_FUN_T, (rui16_t)(fun_))
915  #elif RKH_CFGPORT_TRC_SIZEOF_FUN_PTR == 32
916  #define RKH_TUSR_FUN(fun_) \
917  rkh_trc_fmt_u32((rui8_t)RKH_FUN_T, (rui32_t)(fun_))
918  #else
919  #define RKH_TUSR_FUN(fun_) \
920  rkh_trc_fmt_u32((rui8_t)RKH_FUN_T, (rui32_t)(fun_))
921  #endif
922 
927  #if RKH_CFG_FWK_SIZEOF_EVT == 8
928  #define RKH_TUSR_SIG(sig_) \
929  rkh_trc_fmt_u8((rui8_t)RKH_ESIG_T, (rui8_t)(sig_))
930  #elif RKH_CFG_FWK_SIZEOF_EVT == 16
931  #define RKH_TUSR_SIG(sig_) \
932  rkh_trc_fmt_u16((rui8_t)RKH_ESIG_T, (rui16_t)(sig_))
933  #elif RKH_CFG_FWK_SIZEOF_EVT == 32
934  #define RKH_TUSR_SIG(sig_) \
935  rkh_trc_fmt_u32((rui8_t)RKH_ESIG_T, (rui32_t)(sig_))
936  #else
937  #define RKH_TUSR_SIG(sig_) \
938  rkh_trc_fmt_u8((rui8_t)RKH_ESIG_T, (rui8_t)(sig_))
939  #endif
940 #else
941  #define RKH_TRC_USR_BEGIN(eid_) (void)0;
942  #define RKH_TRC_USR_END() (void)0
943  #define RKH_TRC_USR_BEGIN_NOCRIT(eid_) (void)0
944  #define RKH_TRC_USR_END_NOCRIT() (void)0
945  #define RKH_TUSR_I8(w_, d_) (void)0
946  #define RKH_TUSR_UI8(w_, d_) (void)0
947  #define RKH_TUSR_I16(w_, d_) (void)0
948  #define RKH_TUSR_UI16(w_, d_) (void)0
949  #define RKH_TUSR_I32(w_, d_) (void)0
950  #define RKH_TUSR_UI32(w_, d_) (void)0
951  #define RKH_TUSR_X32(w_, d_) (void)0
952  #define RKH_TUSR_STR(s_) (void)0
953  #define RKH_TUSR_MEM(mem_, size_) (void)0
954  #define RKH_TUSR_OBJ(obj_) (void)0
955  #define RKH_TUSR_FUN(fun_) (void)0
956  #define RKH_TUSR_SIG(sig_) (void)0
957 #endif
958 
963 #if RKH_CFG_TRC_NSEQ_EN == RKH_ENABLED
964  #define RKH_TRC_NSEQ() \
965  RKH_TRC_UI8(nseq); \
966  ++nseq
967 #else
968  #define RKH_TRC_NSEQ()
969 #endif
970 
975 #define RKH_TRC_HDR(eid) \
976  chk = 0; \
977  RKH_TRC_TE_ID(eid); \
978  RKH_TRC_NSEQ(); \
979  RKH_TRC_TSTAMP()
980 
985 #if RKH_CFGPORT_TRC_SIZEOF_PTR == 16
986  #define RKH_TRC_SYM(sym) \
987  RKH_TRC_UI16((rui16_t)sym)
988 #elif RKH_CFGPORT_TRC_SIZEOF_PTR == 32
989  #define RKH_TRC_SYM(sym) \
990  RKH_TRC_UI32((rui32_t)sym)
991 #else
992  #define RKH_TRC_SYM(sym) \
993  RKH_TRC_UI32((rui32_t)sym)
994 #endif
995 
1000 #if defined(RKH_USE_TRC_SENDER)
1001  #define RKH_TRC_SNDR(sym) \
1002  RKH_TRC_SYM(sym)
1003 #else
1004  #define RKH_TRC_SNDR(sym)
1005 #endif
1006 
1011 #if RKH_CFGPORT_TRC_SIZEOF_FUN_PTR == 16
1012  #define RKH_TRC_FUN(sym) \
1013  RKH_TRC_UI16((rui16_t)sym)
1014 #elif RKH_CFGPORT_TRC_SIZEOF_FUN_PTR == 32
1015  #define RKH_TRC_FUN(sym) \
1016  RKH_TRC_UI32((rui32_t)sym)
1017 #else
1018  #define RKH_TRC_FUN(sym) \
1019  RKH_TRC_UI32((rui32_t)sym)
1020 #endif
1021 
1025 #if RKH_CFG_TMR_SIZEOF_NTIMER == 8
1026  #define RKH_TRC_NTICK(nt) \
1027  RKH_TRC_UI8(nt)
1028 #elif RKH_CFG_TMR_SIZEOF_NTIMER == 16
1029  #define RKH_TRC_NTICK(nt) \
1030  RKH_TRC_UI16(nt)
1031 #elif RKH_CFG_TMR_SIZEOF_NTIMER == 32
1032  #define RKH_TRC_NTICK(nt) \
1033  RKH_TRC_UI32(nt)
1034 #else
1035  #define RKH_TRC_NTICK(nt) \
1036  RKH_TRC_UI8(nt)
1037 #endif
1038 
1042 #if RKH_CFG_MP_SIZEOF_NBLOCK == 8
1043  #define RKH_TRC_NBLK(nb) \
1044  RKH_TRC_UI8(nb)
1045  #if RKH_CFG_MP_GET_LWM_EN == RKH_ENABLED
1046  #define RKH_TRC_MP_NMIN(nm) \
1047  RKH_TRC_UI8(nm)
1048  #else
1049  #define RKH_TRC_MP_NMIN(nm)
1050  #endif
1051 #elif RKH_CFG_MP_SIZEOF_NBLOCK == 16
1052  #define RKH_TRC_NBLK(nb) \
1053  RKH_TRC_UI16(nb)
1054  #if RKH_CFG_MP_GET_LWM_EN == RKH_ENABLED
1055  #define RKH_TRC_MP_NMIN(nm) \
1056  RKH_TRC_UI16(nm)
1057  #else
1058  #define RKH_TRC_MP_NMIN(nm)
1059  #endif
1060 #elif RKH_CFG_MP_SIZEOF_NBLOCK == 32
1061  #define RKH_TRC_NBLK(nb) \
1062  RKH_TRC_UI32(nb)
1063  #if RKH_CFG_MP_GET_LWM_EN == RKH_ENABLED
1064  #define RKH_TRC_MP_NMIN(nm) \
1065  RKH_TRC_UI32(nm)
1066  #else
1067  #define RKH_TRC_MP_NMIN(nm)
1068  #endif
1069 #else
1070  #define RKH_TRC_NBLK(nb) \
1071  RKH_TRC_UI8(nb)
1072  #if RKH_CFG_MP_GET_LWM_EN == RKH_ENABLED
1073  #define RKH_TRC_MP_NMIN(nm) \
1074  RKH_TRC_UI8(nm)
1075  #else
1076  #define RKH_TRC_MP_NMIN(nm)
1077  #endif
1078 #endif
1079 
1083 #if RKH_CFG_MP_SIZEOF_BSIZE == 8
1084  #define RKH_TRC_BSIZE(bs) \
1085  RKH_TRC_UI8(bs)
1086 #elif RKH_CFG_MP_SIZEOF_BSIZE == 16
1087  #define RKH_TRC_BSIZE(bs) \
1088  RKH_TRC_UI16(bs)
1089 #elif RKH_CFG_MP_SIZEOF_BSIZE == 32
1090  #define RKH_TRC_BSIZE(bs) \
1091  RKH_TRC_UI32(bs)
1092 #else
1093  #define RKH_TRC_BSIZE(bs) \
1094  RKH_TRC_UI8(bs)
1095 #endif
1096 
1100 #if RKH_CFG_RQ_SIZEOF_NELEM == 8
1101  #define RKH_TRC_NE(ne) \
1102  RKH_TRC_UI8(ne)
1103  #if RKH_CFG_RQ_GET_LWMARK_EN == RKH_ENABLED
1104  #define RKH_TRC_RQ_NMIN(nm) \
1105  RKH_TRC_UI8(nm)
1106  #else
1107  #define RKH_TRC_RQ_NMIN(nm)
1108  #endif
1109 #elif RKH_CFG_RQ_SIZEOF_NELEM == 16
1110  #define RKH_TRC_NE(ne) \
1111  RKH_TRC_UI16(ne)
1112  #if RKH_CFG_RQ_GET_LWMARK_EN == RKH_ENABLED
1113  #define RKH_TRC_RQ_NMIN(nm) \
1114  RKH_TRC_UI16(nm)
1115  #else
1116  #define RKH_TRC_RQ_NMIN(nm)
1117  #endif
1118 #elif RKH_CFG_RQ_SIZEOF_NELEM == 32
1119  #define RKH_TRC_NE(ne) \
1120  RKH_TRC_UI32(ne)
1121  #if RKH_CFG_RQ_GET_LWMARK_EN == RKH_ENABLED
1122  #define RKH_TRC_RQ_NMIN(nm) \
1123  RKH_TRC_UI32(nm)
1124  #else
1125  #define RKH_TRC_RQ_NMIN(nm)
1126  #endif
1127 #else
1128  #define RKH_TRC_NE(ne) \
1129  RKH_TRC_UI8(ne)
1130  #if RKH_CFG_RQ_GET_LWMARK_EN == RKH_ENABLED
1131  #define RKH_TRC_RQ_NMIN(nm) \
1132  RKH_TRC_UI8(nm)
1133  #else
1134  #define RKH_TRC_RQ_NMIN(nm)
1135  #endif
1136 #endif
1137 
1141 #if RKH_CFG_FWK_SIZEOF_EVT == 8
1142  #define RKH_TRC_SIG(e) \
1143  RKH_TRC_UI8(e)
1144 #elif RKH_CFG_FWK_SIZEOF_EVT == 16
1145  #define RKH_TRC_SIG(e) \
1146  RKH_TRC_UI16(e)
1147 #elif RKH_CFG_FWK_SIZEOF_EVT == 32
1148  #define RKH_TRC_SIG(e) \
1149  RKH_TRC_UI32(e)
1150 #else
1151  #define RKH_TRC_SIG(e) \
1152  RKH_TRC_UI8(e)
1153 #endif
1154 
1158 #if RKH_CFG_FWK_SIZEOF_EVT_SIZE == 8
1159  #define RKH_TRC_ES(es) \
1160  RKH_TRC_UI8(es)
1161 #elif RKH_CFG_FWK_SIZEOF_EVT_SIZE == 16
1162  #define RKH_TRC_ES(es) \
1163  RKH_TRC_UI16(es)
1164 #elif RKH_CFG_FWK_SIZEOF_EVT_SIZE == 32
1165  #define RKH_TRC_ES(es) \
1166  RKH_TRC_UI32(es)
1167 #else
1168  #define RKH_TRC_ES(es) \
1169  RKH_TRC_UI8(es)
1170 #endif
1171 
1172 #if RKH_CFG_TRC_EN == RKH_ENABLED
1173  /* --- Memory Pool (MP) ------------------------------------------------ */
1174  #if RKH_CFG_TRC_ALL_EN == RKH_ENABLED || RKH_CFG_TRC_MP_EN == RKH_ENABLED
1175 
1195  #define RKH_TR_MP_INIT(memPool_, nBlocks_, blockSize_) \
1196  RKH_TRC_BEGIN_WOAOSIG(RKH_TE_MP_INIT) \
1197  RKH_TRC_SYM(memPool_); \
1198  RKH_TRC_NBLK(nBlocks_); \
1199  RKH_TRC_BSIZE(blockSize_); \
1200  RKH_TRC_END()
1201 
1216  #define RKH_TR_MP_GET(memPool_, nFree_, nMin_) \
1217  RKH_TRC_BEGIN_WOAOSIG_NOCRIT(RKH_TE_MP_GET) \
1218  RKH_TRC_SYM(memPool_); \
1219  RKH_TRC_NBLK(nFree_); \
1220  RKH_TRC_MP_NMIN(nMin_); \
1221  RKH_TRC_END_NOCRIT()
1222 
1234  #define RKH_TR_MP_PUT(memPool_, nFree_) \
1235  RKH_TRC_BEGIN_WOAOSIG_NOCRIT(RKH_TE_MP_PUT) \
1236  RKH_TRC_SYM(memPool_); \
1237  RKH_TRC_NBLK(nFree_); \
1238  RKH_TRC_END_NOCRIT()
1239 
1242  #else
1243  #define RKH_TR_MP_INIT(memPool_, nBlocks_, blockSize_) (void)0
1244  #define RKH_TR_MP_GET(memPool_, nFree_, nMin_) (void)0
1245  #define RKH_TR_MP_PUT(memPool_, nFree_) (void)0
1246  #endif
1247 
1248  /* --- Queue (RQ) ------------------------------------------------------ */
1249  #if RKH_CFG_TRC_ALL_EN == RKH_ENABLED || RKH_CFG_TRC_RQ_EN == RKH_ENABLED
1250 
1271  #define RKH_TR_RQ_INIT(queue_, actObj_, nElem_) \
1272  RKH_TRC_BEGIN_WOAOSIG(RKH_TE_RQ_INIT) \
1273  RKH_TRC_SYM(queue_); \
1274  RKH_TRC_SYM(actObj_); \
1275  RKH_TRC_NE(nElem_); \
1276  RKH_TRC_END()
1277 
1289  #define RKH_TR_RQ_GET(queue_, nElem_) \
1290  RKH_TRC_BEGIN_WOAOSIG_NOCRIT(RKH_TE_RQ_GET) \
1291  RKH_TRC_SYM(queue_); \
1292  RKH_TRC_NE(nElem_); \
1293  RKH_TRC_END_NOCRIT()
1294 
1308  #define RKH_TR_RQ_FIFO(queue_, nElem_, nMin_) \
1309  RKH_TRC_BEGIN_WOAOSIG(RKH_TE_RQ_FIFO) \
1310  RKH_TRC_SYM(queue_); \
1311  RKH_TRC_NE(nElem_); \
1312  RKH_TRC_RQ_NMIN(nMin_); \
1313  RKH_TRC_END()
1314 
1328  #define RKH_TR_RQ_LIFO(queue_, nElem_, nMin_) \
1329  RKH_TRC_BEGIN_WOAOSIG(RKH_TE_RQ_LIFO) \
1330  RKH_TRC_SYM(queue_); \
1331  RKH_TRC_NE(nElem_); \
1332  RKH_TRC_RQ_NMIN(nMin_); \
1333  RKH_TRC_END()
1334 
1345  #define RKH_TR_RQ_FULL(queue_) \
1346  RKH_TRC_BEGIN_WOAOSIG_NOCRIT(RKH_TE_RQ_FULL) \
1347  RKH_TRC_SYM(queue_); \
1348  RKH_TRC_END_NOCRIT()
1349 
1360  #define RKH_TR_RQ_DPT(queue_) \
1361  RKH_TRC_BEGIN_WOAOSIG_NOCRIT(RKH_TE_RQ_DPT) \
1362  RKH_TRC_SYM(queue_); \
1363  RKH_TRC_END_NOCRIT()
1364 
1375  #define RKH_TR_RQ_GET_LAST(queue_) \
1376  RKH_TRC_BEGIN_WOAOSIG_NOCRIT(RKH_TE_RQ_GET_LAST) \
1377  RKH_TRC_SYM(queue_); \
1378  RKH_TRC_END_NOCRIT()
1379 
1382  #else
1383  #define RKH_TR_RQ_INIT(queue_, actObj_, nElem_) (void)0
1384  #define RKH_TR_RQ_GET(queue_, nElem_) (void)0
1385  #define RKH_TR_RQ_FIFO(queue_, nElem_, nMin_) (void)0
1386  #define RKH_TR_RQ_LIFO(queue_, nElem_, nMin_) (void)0
1387  #define RKH_TR_RQ_FULL(queue_) (void)0
1388  #define RKH_TR_RQ_DPT(queue_) (void)0
1389  #define RKH_TR_RQ_GET_LAST(queue_) (void)0
1390  #endif
1391 
1392  /* --- State Machine Application (SMA) --------------------------------- */
1393  #if RKH_CFG_TRC_ALL_EN == RKH_ENABLED || \
1394  RKH_CFG_TRC_SMA_EN == RKH_ENABLED
1395 
1413  #define RKH_TR_SMA_ACT(actObj_, actObjPrio_) \
1414  RKH_TRC_BEGIN_WOSIG(RKH_TE_SMA_ACT, \
1415  RKH_SMA_ACCESS_CONST(actObj_, prio)) \
1416  RKH_TRC_SYM(actObj_); \
1417  RKH_TRC_UI8(actObjPrio_); \
1418  RKH_TRC_END()
1419 
1431  #define RKH_TR_SMA_TERM(actObj_, actObjPrio_) \
1432  RKH_TRC_BEGIN_WOSIG(RKH_TE_SMA_TERM, \
1433  RKH_SMA_ACCESS_CONST(actObj_, prio)) \
1434  RKH_TRC_SYM(actObj_); \
1435  RKH_TRC_UI8(actObjPrio_); \
1436  RKH_TRC_END()
1437 
1451  #define RKH_TR_SMA_GET(actObj_, evt_, poolID_, refCntr_) \
1452  RKH_TRC_BEGIN(RKH_TE_SMA_GET, \
1453  RKH_SMA_ACCESS_CONST(actObj_, prio), evt_->e) \
1454  RKH_TRC_SYM(actObj_); \
1455  RKH_TRC_SIG(evt_->e); \
1456  RKH_TRC_UI8(poolID_); \
1457  RKH_TRC_UI8(refCntr_); \
1458  RKH_TRC_END()
1459 
1474  #define RKH_TR_SMA_FIFO(actObj_, evt_, sender_, poolID_, refCntr_) \
1475  RKH_TRC_BEGIN_NOCRIT(RKH_TE_SMA_FIFO, \
1476  RKH_SMA_ACCESS_CONST(actObj_, prio), evt_->e) \
1477  RKH_TRC_SYM(actObj_); \
1478  RKH_TRC_SIG(evt_->e); \
1479  RKH_TRC_SNDR(sender_); \
1480  RKH_TRC_UI8(poolID_); \
1481  RKH_TRC_UI8(refCntr_); \
1482  RKH_TRC_END_NOCRIT()
1483 
1498  #define RKH_TR_SMA_LIFO(actObj_, evt_, sender_, poolID_, refCntr_) \
1499  RKH_TRC_BEGIN_NOCRIT(RKH_TE_SMA_LIFO, \
1500  RKH_SMA_ACCESS_CONST(actObj_, prio), evt_->e) \
1501  RKH_TRC_SYM(actObj_); \
1502  RKH_TRC_SIG(evt_->e); \
1503  RKH_TRC_SNDR(sender_); \
1504  RKH_TRC_UI8(poolID_); \
1505  RKH_TRC_UI8(refCntr_); \
1506  RKH_TRC_END_NOCRIT()
1507 
1519  #define RKH_TR_SMA_REG(actObj_, prio) \
1520  RKH_TRC_BEGIN_WOSIG_NOCRIT(RKH_TE_SMA_REG, \
1521  RKH_SMA_ACCESS_CONST(actObj_, prio)) \
1522  RKH_TRC_SYM(actObj_); \
1523  RKH_TRC_UI8(prio); \
1524  RKH_TRC_END_NOCRIT()
1525 
1537  #define RKH_TR_SMA_UNREG(actObj_, prio) \
1538  RKH_TRC_BEGIN_WOSIG_NOCRIT(RKH_TE_SMA_UNREG, \
1539  RKH_SMA_ACCESS_CONST(actObj_, prio)) \
1540  RKH_TRC_SYM(actObj_); \
1541  RKH_TRC_UI8(prio); \
1542  RKH_TRC_END_NOCRIT()
1543 
1546  #else
1547  #define RKH_TR_SMA_ACT(actObj_, actObjPrio_) (void)0
1548  #define RKH_TR_SMA_TERM(actObj_, actObjPrio_) (void)0
1549  #define RKH_TR_SMA_GET(actObj_, evt_, poolID_, refCntr_) (void)0
1550  #define RKH_TR_SMA_FIFO(actObj_, evt_, sender_, poolID_, refCntr_) \
1551  (void)0
1552  #define RKH_TR_SMA_LIFO(actObj_, evt_, sender_, poolID_, refCntr_) \
1553  (void)0
1554  #define RKH_TR_SMA_REG(actObj_, prio) (void)0
1555  #define RKH_TR_SMA_UNREG(actObj_, prio) (void)0
1556  #endif
1557 
1558  /* --- State machine (SM) ---------------------------------------------- */
1559  #if RKH_CFG_TRC_ALL_EN == RKH_ENABLED || RKH_CFG_TRC_SM_EN == RKH_ENABLED
1560 
1578  #if RKH_CFG_TRC_SM_INIT_EN == RKH_ENABLED
1579  #define RKH_TR_SM_INIT(actObj_, initState_) \
1580  RKH_TRC_BEGIN_WOSIG(RKH_TE_SM_INIT, \
1581  RKH_SMA_ACCESS_CONST(actObj_, prio)) \
1582  RKH_TRC_SYM(actObj_); \
1583  RKH_TRC_SYM(initState_); \
1584  RKH_TRC_END()
1585  #else
1586  #define RKH_TR_SM_INIT(actObj_, initState_) (void)0
1587  #endif
1588 
1605  #if RKH_CFG_TRC_SM_CLRH_EN == RKH_ENABLED
1606  #define RKH_TR_SM_CLRH(actObj_, history_) \
1607  RKH_TRC_BEGIN_WOSIG(RKH_TE_SM_CLRH, \
1608  RKH_SMA_ACCESS_CONST(actObj_, prio)) \
1609  RKH_TRC_SYM(actObj_); \
1610  RKH_TRC_SYM(history_); \
1611  RKH_TRC_END()
1612  #else
1613  #define RKH_TR_SM_CLRH(actObj_, history_) (void)0
1614  #endif
1615 
1628  #if RKH_CFG_TRC_SMA_DCH_EN == RKH_ENABLED
1629  #define RKH_TR_SMA_DCH(actObj_, evt_, state_) \
1630  RKH_TRC_BEGIN(RKH_TE_SMA_DCH, \
1631  RKH_SMA_ACCESS_CONST(actObj_, prio), \
1632  evt_->e) \
1633  RKH_TRC_SYM(actObj_); \
1634  RKH_TRC_SIG(evt_->e); \
1635  RKH_TRC_SYM(state_); \
1636  RKH_TRC_END()
1637  #else
1638  #define RKH_TR_SMA_DCH(actObj_, evt_, state_) (void)0
1639  #endif
1640 
1654  #if RKH_CFG_TRC_SM_TRN_EN == RKH_ENABLED
1655  #define RKH_TR_SM_TRN(actObj_, sourceState_, targetState_) \
1656  RKH_TRC_BEGIN_WOSIG(RKH_TE_SM_TRN, \
1657  RKH_SMA_ACCESS_CONST(actObj_, prio)) \
1658  RKH_TRC_SYM(actObj_); \
1659  RKH_TRC_SYM(sourceState_); \
1660  RKH_TRC_SYM(targetState_); \
1661  RKH_TRC_END()
1662  #else
1663  #define RKH_TR_SM_TRN(actObj_, sourceState_, targetState_) (void)0
1664  #endif
1665 
1677  #if RKH_CFG_TRC_SM_STATE_EN == RKH_ENABLED
1678  #define RKH_TR_SM_STATE(actObj_, state_) \
1679  RKH_TRC_BEGIN_WOSIG(RKH_TE_SM_STATE, \
1680  RKH_SMA_ACCESS_CONST(actObj_, prio)) \
1681  RKH_TRC_SYM(actObj_); \
1682  RKH_TRC_SYM(state_); \
1683  RKH_TRC_END()
1684  #else
1685  #define RKH_TR_SM_STATE(actObj_, state_) (void)0
1686  #endif
1687 
1699  #if RKH_CFG_TRC_SM_ENSTATE_EN == RKH_ENABLED
1700  #define RKH_TR_SM_ENSTATE(actObj_, state_) \
1701  RKH_TRC_BEGIN_WOSIG(RKH_TE_SM_ENSTATE, \
1702  RKH_SMA_ACCESS_CONST(actObj_, prio)) \
1703  RKH_TRC_SYM(actObj_); \
1704  RKH_TRC_SYM(state_); \
1705  RKH_TRC_END()
1706  #else
1707  #define RKH_TR_SM_ENSTATE(actObj_, state_) (void)0
1708  #endif
1709 
1721  #if RKH_CFG_TRC_SM_EXSTATE_EN == RKH_ENABLED
1722  #define RKH_TR_SM_EXSTATE(actObj_, state_) \
1723  RKH_TRC_BEGIN_WOSIG(RKH_TE_SM_EXSTATE, \
1724  RKH_SMA_ACCESS_CONST(actObj_, prio)) \
1725  RKH_TRC_SYM(actObj_); \
1726  RKH_TRC_SYM(state_); \
1727  RKH_TRC_END()
1728  #else
1729  #define RKH_TR_SM_EXSTATE(actObj_, state_) (void)0
1730  #endif
1731 
1744  #if RKH_CFG_TRC_SM_NENEX_EN == RKH_ENABLED
1745  #define RKH_TR_SM_NENEX(actObj_, nEnState_, nExState_) \
1746  RKH_TRC_BEGIN_WOSIG(RKH_TE_SM_NENEX, \
1747  RKH_SMA_ACCESS_CONST(actObj_, prio)) \
1748  RKH_TRC_SYM(actObj_); \
1749  RKH_TRC_UI8(nEnState_); \
1750  RKH_TRC_UI8(nExState_); \
1751  RKH_TRC_END()
1752  #else
1753  #define RKH_TR_SM_NENEX(actObj_, nEnState_, nExState_) \
1754  (void)nEnState_
1755  #endif
1756 
1769  #if RKH_CFG_TRC_SM_NTRNACT_EN == RKH_ENABLED
1770  #define RKH_TR_SM_NTRNACT(actObj_, nta, nts) \
1771  RKH_TRC_BEGIN_WOSIG(RKH_TE_SM_NTRNACT, \
1772  RKH_SMA_ACCESS_CONST(actObj_, prio)) \
1773  RKH_TRC_SYM(actObj_); \
1774  RKH_TRC_UI8(nta); \
1775  RKH_TRC_UI8(nts); \
1776  RKH_TRC_END()
1777  #else
1778  #define RKH_TR_SM_NTRNACT(actObj_, nta, nts) (void)0
1779  #endif
1780 
1792  #if RKH_CFG_TRC_SM_TS_STATE_EN == RKH_ENABLED
1793  #define RKH_TR_SM_TS_STATE(actObj_, state_) \
1794  RKH_TRC_BEGIN_WOSIG(RKH_TE_SM_TS_STATE, \
1795  RKH_SMA_ACCESS_CONST(actObj_, prio)) \
1796  RKH_TRC_SYM(actObj_); \
1797  RKH_TRC_SYM(state_); \
1798  RKH_TRC_END()
1799  #else
1800  #define RKH_TR_SM_TS_STATE(actObj_, state_) (void)0
1801  #endif
1802 
1803  #if RKH_CFG_TRC_SM_PROCESS_EN == RKH_ENABLED
1804 
1817  #define RKH_TR_SM_EVT_PROC(actObj_) \
1818  RKH_TRC_BEGIN_WOSIG(RKH_TE_SM_EVT_PROC, \
1819  RKH_SMA_ACCESS_CONST(actObj_, prio)) \
1820  RKH_TRC_SYM(actObj_); \
1821  RKH_TRC_END()
1822 
1835  #define RKH_TR_SM_EVT_NFOUND(actObj_, evt_) \
1836  RKH_TRC_BEGIN(RKH_TE_SM_EVT_NFOUND, \
1837  RKH_SMA_ACCESS_CONST(actObj_, prio), \
1838  evt_->e) \
1839  RKH_TRC_SYM(actObj_); \
1840  RKH_TRC_SIG(evt_->e); \
1841  RKH_TRC_END()
1842 
1853  #define RKH_TR_SM_GRD_FALSE(actObj_) \
1854  RKH_TRC_BEGIN_WOSIG(RKH_TE_SM_GRD_FALSE, \
1855  RKH_SMA_ACCESS_CONST(actObj_, prio)) \
1856  RKH_TRC_SYM(actObj_); \
1857  RKH_TRC_END()
1858 
1871  #define RKH_TR_SM_CND_NFOUND(actObj_) \
1872  RKH_TRC_BEGIN_WOSIG(RKH_TE_SM_CND_NFOUND, \
1873  RKH_SMA_ACCESS_CONST(actObj_, prio)) \
1874  RKH_TRC_SYM(actObj_); \
1875  RKH_TRC_END()
1876 
1888  #define RKH_TR_SM_UNKN_STATE(actObj_) \
1889  RKH_TRC_BEGIN_WOSIG(RKH_TE_SM_UNKN_STATE, \
1890  RKH_SMA_ACCESS_CONST(actObj_, prio)) \
1891  RKH_TRC_SYM(actObj_); \
1892  RKH_TRC_END()
1893 
1905  #define RKH_TR_SM_EX_HLEVEL(actObj_) \
1906  RKH_TRC_BEGIN_WOSIG(RKH_TE_SM_EX_HLEVEL, \
1907  RKH_SMA_ACCESS_CONST(actObj_, prio)) \
1908  RKH_TRC_SYM(actObj_); \
1909  RKH_TRC_END()
1910 
1923  #define RKH_TR_SM_EX_TSEG(actObj_) \
1924  RKH_TRC_BEGIN_WOSIG(RKH_TE_SM_EX_TSEG, \
1925  RKH_SMA_ACCESS_CONST(actObj_, prio)) \
1926  RKH_TRC_SYM(actObj_); \
1927  RKH_TRC_END()
1928  #else
1929  #define RKH_TR_SM_EVT_PROC(actObj_) (void)0
1930  #define RKH_TR_SM_EVT_NFOUND(actObj_, evt_) (void)0
1931  #define RKH_TR_SM_CND_NFOUND(actObj_) (void)0
1932  #define RKH_TR_SM_GRD_FALSE(actObj_) (void)0
1933  #define RKH_TR_SM_UNKN_STATE(actObj_) (void)0
1934  #define RKH_TR_SM_EX_HLEVEL(actObj_) (void)0
1935  #define RKH_TR_SM_EX_TSEG(actObj_) (void)0
1936  #endif
1937 
1952  #if RKH_CFG_TRC_SM_EXE_ACT_EN == RKH_ENABLED
1953  #define RKH_TR_SM_EXE_ACT(actionType_, actObj_, state_, action_) \
1954  RKH_TRC_BEGIN_WOSIG(RKH_TE_SM_EXE_ACT, \
1955  RKH_SMA_ACCESS_CONST(actObj_, prio)) \
1956  RKH_TRC_UI8(actionType_); \
1957  RKH_TRC_SYM(actObj_); \
1958  RKH_TRC_SYM(state_); \
1959  RKH_TRC_FUN(action_); \
1960  RKH_TRC_END()
1961  #else
1962  #define RKH_TR_SM_EXE_ACT(actionType_, actObj_, state_, action_) (void)0
1963  #endif
1964 
1967  #else
1968  #define RKH_TR_SM_INIT(actObj_, initState_) (void)0
1969  #define RKH_TR_SM_CLRH(actObj_, history_) (void)0
1970  #define RKH_TR_SMA_DCH(actObj_, evt_, state_) (void)0
1971  #define RKH_TR_SM_TRN(actObj_, sourceState_, targetState_) \
1972  (void)0
1973  #define RKH_TR_SM_STATE(actObj_, state_) (void)0
1974  #define RKH_TR_SM_ENSTATE(actObj_, state_) (void)0
1975  #define RKH_TR_SM_EXSTATE(actObj_, state_) (void)0
1976  #define RKH_TR_SM_NENEX(actObj_, nEnState_, nExState_) \
1977  (void)0
1978  #define RKH_TR_SM_NTRNACT(actObj_, nta, nts) (void)0
1979  #define RKH_TR_SM_TS_STATE(aaost) (void)0
1980  #define RKH_TR_SM_EVT_PROC(actObj_) (void)0
1981  #define RKH_TR_SM_EVT_NFOUND(actObj_, evt_) (void)0
1982  #define RKH_TR_SM_GRD_FALSE(actObj_) (void)0
1983  #define RKH_TR_SM_CND_NFOUND(actObj_) (void)0
1984  #define RKH_TR_SM_UNKN_STATE(actObj_) (void)0
1985  #define RKH_TR_SM_EX_HLEVEL(actObj_) (void)0
1986  #define RKH_TR_SM_EX_TSEG(actObj_) (void)0
1987  #define RKH_TR_SM_EXE_ACT(actionType_, actObj_, state_, action_) \
1988  (void)0
1989  #endif
1990 
1991  /* --- Timer (TIM) ----------------------------------------------------- */
1992  #if RKH_CFG_TRC_ALL_EN == RKH_ENABLED || \
1993  RKH_CFG_TRC_TMR_EN == RKH_ENABLED
1994 
2012  #define RKH_TR_TMR_INIT(timer_, signal_) \
2013  RKH_TRC_BEGIN_WOAOSIG_NOCRIT(RKH_TE_TMR_INIT) \
2014  RKH_TRC_SYM(timer_); \
2015  RKH_TRC_SIG(signal_); \
2016  RKH_TRC_END_NOCRIT()
2017 
2031  #define RKH_TR_TMR_START(timer_, actObj_, nTicks_, period_) \
2032  RKH_TRC_BEGIN_WOAOSIG_NOCRIT(RKH_TE_TMR_START) \
2033  RKH_TRC_SYM(timer_); \
2034  RKH_TRC_SYM(actObj_); \
2035  RKH_TRC_NTICK(nTicks_); \
2036  RKH_TRC_NTICK(period_); \
2037  RKH_TRC_END_NOCRIT()
2038 
2051  #define RKH_TR_TMR_STOP(timer_, nTicks_, period_) \
2052  RKH_TRC_BEGIN_WOAOSIG_NOCRIT(RKH_TE_TMR_STOP) \
2053  RKH_TRC_SYM(timer_); \
2054  RKH_TRC_NTICK(nTicks_); \
2055  RKH_TRC_NTICK(period_); \
2056  RKH_TRC_END_NOCRIT()
2057 
2070  #define RKH_TR_TMR_TOUT(timer_, signal_, actObj_) \
2071  RKH_TRC_BEGIN_NOCRIT(RKH_TE_TMR_TOUT, \
2072  RKH_SMA_ACCESS_CONST(actObj_, prio), \
2073  signal_) \
2074  RKH_TRC_SYM(timer_); \
2075  RKH_TRC_SIG(signal_); \
2076  RKH_TRC_SYM(actObj_); \
2077  RKH_TRC_END_NOCRIT()
2078 
2089  #define RKH_TR_TMR_REM(timer_) \
2090  RKH_TRC_BEGIN_WOAOSIG_NOCRIT(RKH_TE_TMR_REM) \
2091  RKH_TRC_SYM(timer_); \
2092  RKH_TRC_END_NOCRIT()
2093 
2096  #else
2097  #define RKH_TR_TMR_INIT(timer_, signal_) (void)0
2098  #define RKH_TR_TMR_START(timer_, actObj_, nTicks_, period_) (void)0
2099  #define RKH_TR_TMR_STOP(timer_, nTicks_, period_) (void)0
2100  #define RKH_TR_TMR_TOUT(timer_, signal_, actObj_) (void)0
2101  #define RKH_TR_TMR_REM(timer_) (void)0
2102  #endif
2103 
2104  /* --- Framework (RKH) ------------------------------------------------- */
2105  #if RKH_CFG_TRC_ALL_EN == RKH_ENABLED || \
2106  RKH_CFG_TRC_FWK_EN == RKH_ENABLED
2107 
2122  #define RKH_TR_FWK_EN() \
2123  RKH_TRC_BEGIN_WOAOSIG(RKH_TE_FWK_EN) \
2124  RKH_TRC_END()
2125 
2134  #define RKH_TR_FWK_EX() \
2135  RKH_TRC_BEGIN_WOAOSIG(RKH_TE_FWK_EX) \
2136  RKH_TRC_END()
2137 
2150  #define RKH_TR_FWK_EPREG(evtPool_, storageSize_, evtSize_) \
2151  RKH_TRC_BEGIN_WOAOSIG(RKH_TE_FWK_EPREG) \
2152  RKH_TRC_UI8(evtPool_); \
2153  RKH_TRC_UI32(storageSize_); \
2154  RKH_TRC_ES(evtSize_); \
2155  RKH_TRC_END()
2156 
2170  #define RKH_TR_FWK_AE(evtSize_, evt_, poolID_, refCnt_) \
2171  RKH_TRC_BEGIN_WOAOSIG(RKH_TE_FWK_AE) \
2172  RKH_TRC_ES(evtSize_); \
2173  RKH_TRC_SIG(evt_->e); \
2174  RKH_TRC_UI8(poolID_); \
2175  RKH_TRC_UI8(refCnt_); \
2176  RKH_TRC_END()
2177 
2190  #define RKH_TR_FWK_GC(evt_, poolID_, refCnt_) \
2191  RKH_TRC_BEGIN_WOAOSIG_NOCRIT(RKH_TE_FWK_GC) \
2192  RKH_TRC_SIG(evt_->e); \
2193  RKH_TRC_UI8(poolID_); \
2194  RKH_TRC_UI8(refCnt_); \
2195  RKH_TRC_END_NOCRIT()
2196 
2209  #define RKH_TR_FWK_GCR(evt_, poolID_, refCnt_) \
2210  RKH_TRC_BEGIN_WOAOSIG_NOCRIT(RKH_TE_FWK_GCR) \
2211  RKH_TRC_SIG(evt_->e); \
2212  RKH_TRC_UI8(poolID_); \
2213  RKH_TRC_UI8(refCnt_); \
2214  RKH_TRC_END_NOCRIT()
2215 
2227  #define RKH_TR_FWK_DEFER(queue_, evt_) \
2228  RKH_TRC_BEGIN_WOAOSIG_NOCRIT(RKH_TE_FWK_DEFER) \
2229  RKH_TRC_SYM(queue_); \
2230  RKH_TRC_SIG(evt_->e); \
2231  RKH_TRC_END_NOCRIT()
2232 
2244  #define RKH_TR_FWK_RCALL(actObj_, evt_) \
2245  RKH_TRC_BEGIN_WOAOSIG_NOCRIT(RKH_TE_FWK_RCALL) \
2246  RKH_TRC_SYM(actObj_); \
2247  RKH_TRC_SIG(evt_->e); \
2248  RKH_TRC_END_NOCRIT()
2249 
2250  /* --- Symbol entry table for objects ------------------------------ */
2251 
2275  #define RKH_TR_FWK_OBJ(obj_) \
2276  do \
2277  { \
2278  static RKHROM char __o_n[] = # obj_; \
2279  rkh_trc_obj(RKH_TE_FWK_OBJ, (rui8_t *)obj_, \
2280  __o_n); \
2281  } \
2282  while (0)
2283 
2284  /* --- Symbol entry table for objects with name -------------------- */
2285 
2312  #define RKH_TR_FWK_OBJ_NAME(obj_, name_) \
2313  do \
2314  { \
2315  rkh_trc_obj(RKH_TE_FWK_OBJ, (rui8_t *)obj_, name_); \
2316  } \
2317  while (0)
2318 
2319  /* --- Symbol entry table for event signals ------------------------ */
2320 
2354  #define RKH_TR_FWK_SIG(stateObj_) \
2355  do \
2356  { \
2357  static RKHROM char __s_n[] = # stateObj_; \
2358  rkh_trc_sig(stateObj_, __s_n); \
2359  } \
2360  while (0)
2361 
2362  /* --- Symbol entry table for functions ---------------------------- */
2363 
2391  #define RKH_TR_FWK_FUN(function_) \
2392  do \
2393  { \
2394  static RKHROM char __f_n[] = #function_; \
2395  rkh_trc_obj(RKH_TE_FWK_FUN, (rui8_t *)function_, \
2396  __f_n); \
2397  } \
2398  while (0)
2399 
2421  #define RKH_TR_FWK_EXE_FUN(function_) \
2422  RKH_TRC_BEGIN_WOFIL(RKH_TE_FWK_EXE_FUN) \
2423  RKH_TRC_FUN(function_); \
2424  RKH_TRC_END_WOFIL()
2425 
2452  #define RKH_TR_FWK_SYNC_EVT(function_, senderObj_, receiverObj_) \
2453  RKH_TRC_BEGIN_WOFIL(RKH_TE_FWK_SYNC_EVT) \
2454  RKH_TRC_FUN(function_); \
2455  RKH_TRC_SNDR(senderObj_); \
2456  RKH_TRC_SNDR(receiverObj_); \
2457  RKH_TRC_END_WOFIL()
2458 
2459  /* --- Symbol entry table for user user-defined trace events ------- */
2460 
2496  #define RKH_TR_FWK_TUSR(__e) \
2497  do \
2498  { \
2499  static RKHROM char __e_n[] = # __e; \
2500  RKH_TRC_BEGIN_WOFIL(RKH_TE_FWK_TUSR) \
2501  RKH_TRC_TE_ID(EXTE(__e, RKH_TG_USR)); \
2502  RKH_TRC_STR(__e_n); \
2503  RKH_TRC_END_WOFIL() \
2504  RKH_TRC_FLUSH(); \
2505  } \
2506  while (0)
2507 
2508  /* --- Trace configuration ----------------------------------------- */
2509 
2558  #define RKH_TR_FWK_TCFG(timeStamp_) \
2559  RKH_TRC_BEGIN_DFT(RKH_TE_FWK_TCFG) \
2560  RKH_TRC_UI16((rui16_t)RKH_VERSION_CODE); \
2561  RKH_TRC_UI32( \
2562  (rui32_t)( \
2563  ((rui32_t)RKH_CFG_SMA_TRC_SNDR_EN) | \
2564  ((rui32_t)RKH_CFG_TRC_RTFIL_EN << 1) | \
2565  ((rui32_t)RKH_CFG_TRC_USER_TRACE_EN << 2) | \
2566  ((rui32_t)RKH_CFG_TRC_ALL_EN << 3) | \
2567  ((rui32_t)RKH_CFG_TRC_MP_EN << 4) | \
2568  ((rui32_t)RKH_CFG_TRC_RQ_EN << 5) | \
2569  ((rui32_t)RKH_CFG_TRC_SMA_EN << 6) | \
2570  ((rui32_t)RKH_CFG_TRC_TMR_EN << 7) | \
2571  ((rui32_t)RKH_CFG_TRC_SM_EN << 8) | \
2572  ((rui32_t)RKH_CFG_TRC_FWK_EN << 9) | \
2573  ((rui32_t)RKH_CFG_TRC_ASSERT_EN << 10) | \
2574  ((rui32_t)RKH_CFG_RQ_GET_LWMARK_EN << 11) | \
2575  ((rui32_t)RKH_CFG_MP_GET_LWM_EN << 12) | \
2576  ((rui32_t)RKH_CFG_TRC_RTFIL_SMA_EN << 13) | \
2577  ((rui32_t)RKH_CFG_TRC_RTFIL_SIGNAL_EN << 14) | \
2578  ((rui32_t)RKH_CFG_TRC_NSEQ_EN << 15) | \
2579  ((rui32_t)RKH_CFG_TRC_TSTAMP_EN << 16) | \
2580  ((rui32_t)RKH_CFG_TRC_CHK_EN << 17))); \
2581  RKH_TRC_UI8( \
2582  (rui8_t)((RKH_CFG_FWK_SIZEOF_EVT / 8 << 4) | \
2583  RKH_CFGPORT_TRC_SIZEOF_TSTAMP / 8)); \
2584  RKH_TRC_UI8( \
2585  (rui8_t)((RKH_CFGPORT_TRC_SIZEOF_PTR / 8 << 4) | \
2586  RKH_CFG_TMR_SIZEOF_NTIMER / 8)); \
2587  RKH_TRC_UI8( \
2588  (rui8_t)((RKH_CFG_MP_SIZEOF_NBLOCK / 8 << 4) | \
2589  RKH_CFG_RQ_SIZEOF_NELEM / 8)); \
2590  RKH_TRC_UI8( \
2591  (rui8_t)(RKH_CFG_FWK_SIZEOF_EVT_SIZE / 8)); \
2592  RKH_TRC_UI8( \
2593  (rui8_t)((RKH_CFG_MP_SIZEOF_BSIZE / 8 << 4) | \
2594  RKH_CFG_FWK_MAX_EVT_POOL)); \
2595  RKH_TRC_UI16( \
2596  (rui16_t)(timeStamp_)); \
2597  RKH_TRC_END_DFT() \
2598  RKH_TRC_FLUSH()
2599 
2600  /* --- Assertion --------------------------------------------------- */
2601 
2613  #if RKH_CFG_TRC_ASSERT_EN == RKH_ENABLED
2614  #define RKH_TR_FWK_ASSERT(mod_, ln_) \
2615  RKH_TRC_BEGIN_WOAOSIG_NOCRIT(RKH_TE_FWK_ASSERT) \
2616  RKH_TRC_STR((RKHROM char *)mod_); \
2617  RKH_TRC_UI16((rui16_t)ln_); \
2618  RKH_TRC_END_NOCRIT() \
2619  RKH_TRC_FLUSH()
2620  #else
2621  #define RKH_TR_FWK_ASSERT(mod_, ln_) (void)0
2622  #endif
2623 
2624  /* --- Symbol entry table for active objects ----------------------- */
2625 
2653  #define RKH_TR_FWK_AO(actObj_) \
2654  do \
2655  { \
2656  rkh_trc_ao((struct RKH_SMA_T *)actObj_); \
2657  } \
2658  while (0)
2659 
2660  /* --- Symbol entry table for state objects ------------------------ */
2661 
2689  #define RKH_TR_FWK_STATE(actObj_, stateObj_) \
2690  do \
2691  { \
2692  rkh_trc_state((struct RKH_SMA_T *)actObj_, \
2693  (rui8_t *)stateObj_); \
2694  } \
2695  while (0)
2696 
2697  /* --- Symbol entry table for pseudostate objects ------------------ */
2698 
2727  #define RKH_TR_FWK_PSTATE(actObj_, pseudoStObj_) \
2728  do \
2729  { \
2730  rkh_trc_state((struct RKH_SMA_T *)actObj_, \
2731  (rui8_t *)pseudoStObj_); \
2732  } \
2733  while (0)
2734 
2735  /* --- Symbol entry table for timer objects ------------------------ */
2736 
2758  #define RKH_TR_FWK_TIMER(timerObj_) \
2759  do \
2760  { \
2761  static RKHROM char __to_n[] = # timerObj_; \
2762  rkh_trc_obj(RKH_TE_FWK_TIMER, (rui8_t *)timerObj_, \
2763  __to_n); \
2764  } \
2765  while (0)
2766 
2767  /* --- Symbol entry table for event pool objects ------------------- */
2768 
2799  #define RKH_TR_FWK_EPOOL(evtPoolObj_) \
2800  do \
2801  { \
2802  static RKHROM char __epo_n[] = #evtPoolObj_; \
2803  rkh_trc_obj(RKH_TE_FWK_EPOOL, (rui8_t *)evtPoolObj_, \
2804  __epo_n); \
2805  } \
2806  while (0)
2807 
2808  /* --- Symbol entry table for queue objects ------------------------ */
2809 
2836  #define RKH_TR_FWK_QUEUE(queueObj_) \
2837  do \
2838  { \
2839  static RKHROM char __qo_n[] = #queueObj_; \
2840  rkh_trc_obj(RKH_TE_FWK_QUEUE, (rui8_t *)queueObj_, \
2841  __qo_n); \
2842  } \
2843  while (0)
2844 
2847  #else
2848  #define RKH_TR_FWK_EN() (void)0
2849  #define RKH_TR_FWK_EX() (void)0
2850  #define RKH_TR_FWK_EPREG(evtPool_, storageSize_, evtSize_) (void)0
2851  #define RKH_TR_FWK_AE(evtSize_, evt_, poolID_, refCnt_) (void)0
2852  #define RKH_TR_FWK_GC(evt_, poolID_, refCnt_) (void)0
2853  #define RKH_TR_FWK_GCR(evt_, poolID_, refCnt_) (void)0
2854  #define RKH_TR_FWK_DEFER(queue_, evt_) (void)0
2855  #define RKH_TR_FWK_RCALL(actObj_, evt_) (void)0
2856  #define RKH_TR_FWK_OBJ(obj_) (void)0
2857  #define RKH_TR_FWK_OBJ_NAME(obj_, name_) (void)0
2858  #define RKH_TR_FWK_SIG(stateObj_) (void)0
2859  #define RKH_TR_FWK_FUN(stateObj_) (void)0
2860  #define RKH_TR_FWK_EXE_FUN(function_) (void)0
2861  #define RKH_TR_FWK_SYNC_EVT(function_, senderObj_, receiverObj_) \
2862  (void)0
2863  #define RKH_TR_FWK_TUSR(__e) (void)0
2864  #define RKH_TR_FWK_TCFG(timeStamp_) (void)0
2865  #define RKH_TR_FWK_ASSERT(mod_, ln_) (void)0
2866  #define RKH_TR_FWK_AO(actObj_) (void)0
2867  #define RKH_TR_FWK_STATE(actObj_, stateObj_) (void)0
2868  #define RKH_TR_FWK_PSTATE(actObj_, pseudoStObj_) (void)0
2869  #define RKH_TR_FWK_TIMER(timerObj_) (void)0
2870  #define RKH_TR_FWK_EPOOL(evtPoolObj_) (void)0
2871  #define RKH_TR_FWK_QUEUE(queueObj_) (void)0
2872  #endif
2873 #else
2874  /* --- Memory Pool (MP) ------------------------------------------------ */
2875  #define RKH_TR_MP_INIT(mp, nb, bs) (void)0
2876  #define RKH_TR_MP_GET(mp, nfree, nmin) (void)0
2877  #define RKH_TR_MP_PUT(mp, nfree) (void)0
2878 
2879  /* --- Queue (RQ) ------------------------------------------------------ */
2880  #define RKH_TR_RQ_INIT(q, ao, nelem) (void)0
2881  #define RKH_TR_RQ_GET(q, nelem) (void)0
2882  #define RKH_TR_RQ_FIFO(q, nelem, nmin) (void)0
2883  #define RKH_TR_RQ_LIFO(q, nelem, nmin) (void)0
2884  #define RKH_TR_RQ_FULL(q) (void)0
2885  #define RKH_TR_RQ_DPT(q) (void)0
2886  #define RKH_TR_RQ_GET_LAST(q) (void)0
2887 
2888  /* --- State Machine Application (SMA) --------------------------------- */
2889  #define RKH_TR_SMA_ACT(ao, p) (void)0
2890  #define RKH_TR_SMA_TERM(ao, p) (void)0
2891  #define RKH_TR_SMA_GET(ao, ev, pid, rc) (void)0
2892  #define RKH_TR_SMA_FIFO(ao, ev, snr, pid, rc) (void)0
2893  #define RKH_TR_SMA_LIFO(ao, ev, snr, pid, rc) (void)0
2894  #define RKH_TR_SMA_REG(ao, prio) (void)0
2895  #define RKH_TR_SMA_UNREG(ao, prio) (void)0
2896 
2897  /* --- State machine (SM) ---------------------------------------------- */
2898  #define RKH_TR_SM_INIT(ao, ist) (void)0
2899  #define RKH_TR_SM_CLRH(ao, h) (void)0
2900  #define RKH_TR_SMA_DCH(ao, ev, st) (void)0
2901  #define RKH_TR_SM_TRN(ao, sst, tst) (void)0
2902  #define RKH_TR_SM_STATE(ao, st) (void)0
2903  #define RKH_TR_SM_ENSTATE(ao, st) (void)0
2904  #define RKH_TR_SM_EXSTATE(ao, st) (void)0
2905  #define RKH_TR_SM_NENEX(ao, nen, nex) (void)0
2906  #define RKH_TR_SM_NTRNACT(ao, nta, nts) (void)0
2907  #define RKH_TR_SM_TS_STATE(ao, st) (void)0
2908  #define RKH_TR_SM_EVT_PROC(ao) (void)0
2909  #define RKH_TR_SM_EVT_NFOUND(ao, ev) (void)0
2910  #define RKH_TR_SM_GRD_FALSE(ao) (void)0
2911  #define RKH_TR_SM_CND_NFOUND(ao) (void)0
2912  #define RKH_TR_SM_UNKN_STATE(ao) (void)0
2913  #define RKH_TR_SM_EX_HLEVEL(ao) (void)0
2914  #define RKH_TR_SM_EX_TSEG(ao) (void)0
2915  #define RKH_TR_SM_EXE_ACT(act_t, ao, st, act) (void)0
2916 
2917  /* --- Timer (TIM) ----------------------------------------------------- */
2918  #define RKH_TR_TMR_INIT(t, sig) (void)0
2919  #define RKH_TR_TMR_START(t, ao, nt, per) (void)0
2920  #define RKH_TR_TMR_STOP(t, nt, per) (void)0
2921  #define RKH_TR_TMR_TOUT(t, sig, ao) (void)0
2922  #define RKH_TR_TMR_REM(t) (void)0
2923 
2924  /* --- Framework (RKH) ------------------------------------------------- */
2925  #define RKH_TR_FWK_EN() (void)0
2926  #define RKH_TR_FWK_EX() (void)0
2927  #define RKH_TR_FWK_EPREG(ep, ss, es) (void)0
2928  #define RKH_TR_FWK_AE(es, ev, pid, rc) (void)0
2929  #define RKH_TR_FWK_GC(ev, pid, rc) (void)0
2930  #define RKH_TR_FWK_GCR(ev, pid, rc) (void)0
2931  #define RKH_TR_FWK_DEFER(q, ev) (void)0
2932  #define RKH_TR_FWK_RCALL(ao, ev) (void)0
2933  #define RKH_TR_FWK_OBJ(__o) (void)0
2934  #define RKH_TR_FWK_OBJ_NAME(__o, __n) (void)0
2935  #define RKH_TR_FWK_SIG(__s) (void)0
2936  #define RKH_TR_FWK_FUN(__f) (void)0
2937  #define RKH_TR_FWK_EXE_FUN(__f) (void)0
2938  #define RKH_TR_FWK_SYNC_EVT(fn, snr, rcr) (void)0
2939  #define RKH_TR_FWK_TUSR(__e) (void)0
2940  #define RKH_TR_FWK_TCFG(ts_hz) (void)0
2941  #define RKH_TR_FWK_ASSERT(mod_, ln_) (void)0
2942  #define RKH_TR_FWK_AO(__ao) (void)0
2943  #define RKH_TR_FWK_STATE(__ao, __so) (void)0
2944  #define RKH_TR_FWK_PSTATE(__ao, __pso) (void)0
2945  #define RKH_TR_FWK_TIMER(__to) (void)0
2946  #define RKH_TR_FWK_EPOOL(__epo) (void)0
2947  #define RKH_TR_FWK_QUEUE(__qo) (void)0
2948 #endif
2949 
2958 {
2971 };
2972 
2973 /* ------------------------------- Data types ------------------------------ */
2974 
2979 #if RKH_TRC_MAX_SMA > RKH_TRC_MAX_SIGNALS
2980  #if (RKH_TRC_MAX_SMA * 8) <= RKH_BIT(8)
2981  typedef rui8_t RKH_TRC_FSLOT;
2982  #elif (RKH_TRC_MAX_SMA * 8) <= RKH_BIT(16)
2983  typedef rui16_t RKH_TRC_FSLOT;
2984  #elif (RKH_TRC_MAX_SMA * 8) <= RKH_BIT(32)
2985  typedef rui32_t RKH_TRC_FSLOT;
2986  #else
2987  typedef rui8_t RKH_TRC_FSLOT;
2988  #endif
2989 #else
2990  #if (RKH_TRC_MAX_SIGNALS * 8) <= RKH_BIT(8)
2991  typedef rui8_t RKH_TRC_FSLOT;
2992  #elif (RKH_TRC_MAX_SIGNALS * 8) <= RKH_BIT(16)
2993  typedef rui16_t RKH_TRC_FSLOT;
2994  #elif (RKH_TRC_MAX_SIGNALS * 8) <= RKH_BIT(32)
2995  typedef rui32_t RKH_TRC_FSLOT;
2996  #else
2997  typedef rui8_t RKH_TRC_FSLOT;
2998  #endif
2999 #endif
3000 
3005 typedef struct RKH_TRC_FIL_T
3006 {
3007  RKH_TRC_FSLOT size;
3008  rui8_t *const tbl;
3009 } RKH_TRC_FIL_T;
3010 
3011 #if RKH_CFG_TRC_SIZEOF_STREAM < 255u
3012  typedef rui8_t TRCQTY_T;
3013 #else
3014  typedef rui16_t TRCQTY_T;
3015 #endif
3016 
3017 typedef enum
3018 {
3019  FILTER_ON, FILTER_OFF
3020 } RKH_TRC_FOPT;
3021 
3022 typedef enum RKH_FIL_T
3023 {
3024  RKH_FIL_TRCE, RKH_FIL_SIG, RKH_FIL_SMA
3025 } RKH_FIL_T;
3026 
3059 #if RKH_CFG_TRC_SIZEOF_TE_ID == 8
3060  typedef rui8_t RKH_TE_ID_T;
3061 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 16
3062  typedef rui16_t RKH_TE_ID_T;
3063 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 32
3064  typedef rui32_t RKH_TE_ID_T;
3065 #else
3066  typedef rui8_t RKH_TE_ID_T;
3067 #endif
3068 
3073 typedef rui8_t RKH_TG_T;
3074 
3079 typedef enum rkh_trc_groups
3080 {
3086 
3092 
3098 
3104 
3110 
3116 
3122 
3128 
3129  RKH_TG_NGROUP
3130 } RKH_TRC_GROUPS;
3131 
3316 typedef enum rkh_trc_events
3317 {
3318  /* --- Memory Pool events (MP group) ----------------------------------- */
3322  RKH_MP_END = RKH_TE_MP_PUT,
3323 
3324  /* --- Queue events (RQ group) ----------------------------------------- */
3332  RKH_RQ_END = RKH_TE_RQ_GET_LAST,
3333 
3334  /* --- State Machine Application events (SMA group) -------------------- */
3343  RKH_SMA_END = RKH_TE_SMA_DCH,
3344 
3345  /* --- State machine events (SM group) --------------------------------- */
3363  RKH_SM_END = RKH_TE_SM_EXE_ACT,
3364 
3365  /* --- Timer events (TIM group) ---------------------------------------- */
3371  RKH_TMR_END = RKH_TE_TMR_REM,
3372 
3373  /* --- Framework and misc. events (FWK group) -------------------------- */
3396  RKH_FWK_END = RKH_TE_FWK_QUEUE,
3397 
3398  /* --- User events (USR group) ----------------------------------------- */
3399  RKH_TE_USER = RKH_USR_START,
3400 
3401  /* --- Unit test harness events (UT group) ----------------------------- */
3402  RKH_TE_UT_INIT = RKH_UT_START,
3403  RKH_TE_UT_CLEANUP,
3404  RKH_TE_UT_VERIFY,
3405  RKH_TE_UT_IGNORE_GROUP,
3406  RKH_TE_UT_EXPECT,
3407  RKH_TE_UT_EXPECT_ANYARGS,
3408  RKH_TE_UT_IGNORE,
3409  RKH_TE_UT_IGNORE_ARG,
3410  RKH_TE_UT_SUCCESS,
3411  RKH_TE_UT_FAIL,
3412  RKH_UT_END = RKH_TE_UT_IGNORE_ARG,
3413 
3414  RKH_TE_NEVENT = RKH_UT_END + 1 /* The last trace event */
3415 } RKH_TRC_EVENTS;
3416 
3422 {
3430 
3438 #if RKH_CFG_TRC_TSTAMP_EN == RKH_ENABLED
3439  #if RKH_CFGPORT_TRC_SIZEOF_TSTAMP == 8
3440  typedef rui8_t RKH_TS_T;
3441  #elif RKH_CFGPORT_TRC_SIZEOF_TSTAMP == 16
3442  typedef rui16_t RKH_TS_T;
3443  #elif RKH_CFGPORT_TRC_SIZEOF_TSTAMP == 32
3444  typedef rui32_t RKH_TS_T;
3445  #else
3446  typedef rui16_t RKH_TS_T;
3447  #endif
3448 #else
3449  typedef rui16_t RKH_TS_T;
3450 #endif
3451 
3452 #if RKH_CFG_TRC_SIZEOF_TE_ID == 8
3453 typedef rui8_t RKH_GM_OFFSET_T;
3454 typedef rui8_t RKH_GM_RANGE_T;
3455 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 16
3456 typedef rui16_t RKH_GM_OFFSET_T;
3457 typedef rui8_t RKH_GM_RANGE_T;
3458 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 32
3459 typedef rui32_t RKH_GM_OFFSET_T;
3460 typedef rui32_t RKH_GM_RANGE_T;
3461 #else
3462 typedef rui8_t RKH_GM_OFFSET_T;
3463 typedef rui8_t RKH_GM_RANGE_T;
3464 #endif
3465 
3466 typedef struct
3467 {
3468  RKH_GM_OFFSET_T offset;
3469  RKH_GM_RANGE_T range;
3470 } RKH_GMTBL_T;
3471 
3472 typedef struct RKH_FilterTbl
3473 {
3474  const RKH_TRC_FIL_T *signal;
3475  const RKH_TRC_FIL_T *ao;
3476  rui8_t *event;
3477  rui8_t *group;
3478  const RKH_GMTBL_T *grpFilMap;
3479 } RKH_FilterTbl;
3480 
3481 /* -------------------------- External variables --------------------------- */
3482 extern const RKH_TRC_FIL_T fsig;
3483 extern const RKH_TRC_FIL_T fsma;
3484 
3485 /* -------------------------- Function prototypes -------------------------- */
3493 void rkh_trc_init(void);
3494 
3509 rui8_t *rkh_trc_get(void);
3510 
3538 rui8_t *rkh_trc_get_block(TRCQTY_T *nget);
3539 
3551 void rkh_trc_put(rui8_t b);
3552 
3594 void rkh_trc_filter_group_(rui8_t ctrl, RKH_TG_T grp, rui8_t mode);
3595 
3638 void rkh_trc_filter_event_(rui8_t ctrl, RKH_TE_ID_T evt);
3639 
3655 rbool_t rkh_trc_isoff_(RKH_TE_ID_T e);
3656 
3672 void rkh_trc_symFil(const RKH_TRC_FIL_T *filter,
3673  RKH_TRC_FSLOT slot, rui8_t mode);
3674 
3690 rbool_t rkh_trc_symFil_isoff(const RKH_TRC_FIL_T *filter,
3691  RKH_TRC_FSLOT slot);
3692 
3733 void rkh_trc_begin(RKH_TE_ID_T eid);
3734 
3746 void rkh_trc_end(void);
3747 
3756 void rkh_trc_clear_chk(void);
3757 
3765 void rkh_trc_u8(rui8_t d);
3766 
3774 void rkh_trc_u16(rui16_t d);
3775 
3783 void rkh_trc_u32(rui32_t d);
3784 
3792 void rkh_trc_str(const char *s);
3793 
3807 void rkh_trc_obj(RKH_TE_ID_T tre, rui8_t *obj, const char *obj_name);
3808 
3820 void rkh_trc_sig(RKH_SIG_T sig, const char *sig_name);
3821 
3832 void rkh_trc_ao(struct RKH_SMA_T *ao);
3833 
3845 void rkh_trc_state(struct RKH_SMA_T *ao, rui8_t *state);
3846 
3855 void rkh_trc_fmt_u8(rui8_t fmt, rui8_t d);
3856 
3865 void rkh_trc_fmt_u16(rui8_t fmt, rui16_t d);
3866 
3875 void rkh_trc_fmt_u32(rui8_t fmt, rui32_t d);
3876 
3884 void rkh_trc_fmt_str(const char *s);
3885 
3893 void rkh_trc_fmt_mem(rui8_t const *mem, rui8_t size);
3894 
3901 void rkh_trc_filter_get(RKH_FilterTbl *outFilterTbl);
3902 
3903 /* -------------------- External C language linkage end -------------------- */
3904 
3905 #ifdef __cplusplus
3906 }
3907 #endif
3908 
3909 /* ------------------------------ Module end ------------------------------- */
3910 
3911 #endif
3912 
3913 /* ------------------------------ End of file ------------------------------ */
The function was executed.
Definition: rkhtrc.h:3385
Removes the SMA as known as active object from the priority table, and thus from the framework...
Definition: rkhtrc.h:3341
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.
Timer expired.
Definition: rkhtrc.h:3369
rui16_t RKH_TS_T
Defines the size of trace timestamp.
Definition: rkhtrc.h:3446
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.
Executes a behavior (action) of state machine, it could be an entry, exit, effect, init, preprocessor or guard.
Definition: rkhtrc.h:3427
Inits a previously created state machine calling its initializing action.
Definition: rkhtrc.h:3346
Entry symbol table for event signal.
Definition: rkhtrc.h:3383
#define RKH_TMR_START
Trace event offset.
Definition: rkhtrc.h:407
void rkh_trc_u8(rui8_t d)
Store a 8-bit data into the current trace event buffer without format information.
Start a timer.
Definition: rkhtrc.h:3367
#define RKH_UT_START
Trace event offset.
Definition: rkhtrc.h:410
Recall a deferred event from a given event queue.
Definition: rkhtrc.h:3381
Registers a state machine application (SMA) as known as active object into the framework, which implies to store a pointer to the SMA in the priority table.
Definition: rkhtrc.h:3340
Puts an element on a queue in a LIFO manner. The element is queued by reference, not by copy...
Definition: rkhtrc.h:3328
Defer an event to a given separate event queue.
Definition: rkhtrc.h:3380
User group (USR)
Definition: rkhtrc.h:3121
Send trace configuration to Trazer.
Definition: rkhtrc.h:3388
The transition exceeded the allowed hierarchical level.
Definition: rkhtrc.h:3360
Initializes and activates a previously created state machine application (SMA) as known as active obj...
Definition: rkhtrc.h:3335
Describes the SMA (active object in UML).
Definition: rkhitl.h:2930
Get an event from the active object's queue.
Definition: rkhtrc.h:3337
Get a memory block from one of the previously allocated memory pool.
Definition: rkhtrc.h:3320
Executes a behavior (action) of state machine, it could be an entry, exit, effect, init, preprocessor or guard.
Definition: rkhtrc.h:3426
RKH_TRC_GROUPS
RKH group of trace events.
Definition: rkhtrc.h:3079
Executes a behavior (action) of state machine, it could be an entry, exit, effect, init, preprocessor or guard.
Definition: rkhtrc.h:3428
The arrived event was't founded in the transition table.
Definition: rkhtrc.h:3356
Unit test harness group (UT)
Definition: rkhtrc.h:3127
rui8_t * rkh_trc_get_block(TRCQTY_T *nget)
Retrieves a pointer to a contiguous block of data from the trace stream.
#define RKH_USR_START
Trace event offset.
Definition: rkhtrc.h:409
Represents the filter of signal and active object.
Definition: rkhtrc.h:3005
Executes a behavior (action) of state machine, it could be an entry, exit, effect, init, preprocessor or guard.
Definition: rkhtrc.h:3423
rui8_t RKH_SIG_T
Definition: rkhevt.h:92
#define RKH_SMA_START
Trace event offset.
Definition: rkhtrc.h:405
Entry symbol table for pseudostate object.
Definition: rkhtrc.h:3392
Event data type and other related macros.This header file must be included in all modules(*...
The transition was cancelled by guard function.
Definition: rkhtrc.h:3357
Entered state.
Definition: rkhtrc.h:3350
Executes a behavior (action) of state machine, it could be an entry, exit, effect, init, preprocessor or guard.
Definition: rkhtrc.h:3362
Puts an element on a queue in a FIFO manner. The element is queued by reference, not by copy...
Definition: rkhtrc.h:3327
void rkh_trc_fmt_str(const char *s)
Store a string terminated in '\0' into the current trace event buffer with format information...
The branch function returned a value not founded in the branch table.
Definition: rkhtrc.h:3358
RKH platform - dependent interface.
State Machine group (SM)
Definition: rkhtrc.h:3103
void rkh_trc_fmt_u16(rui8_t fmt, rui16_t d)
Store a 16-bit data into the current trace event buffer with format information.
Initializes the RKH framework.
Definition: rkhtrc.h:3374
void rkh_trc_state(struct RKH_SMA_T *ao, rui8_t *state)
Output state symbol record.
Entry symbol table for event pool object.
Definition: rkhtrc.h:3394
RKH user configurations.
Removes timer from the active timer list.
Definition: rkhtrc.h:3370
Get the last element from the queue.
Definition: rkhtrc.h:3331
Framework RKH group (FWK)
Definition: rkhtrc.h:3115
Destination state or pseudostate of a transition segment.
Definition: rkhtrc.h:3354
Registers a new event pool into the event pool list.
Definition: rkhtrc.h:3376
RKH_SUBTE_SM_EXE_ACT
Sub-event of RKH_TE_SM_EXE_ACT event.
Definition: rkhtrc.h:3421
When the application is done with the memory block, it must be returned to the appropiate memory pool...
Definition: rkhtrc.h:3321
The arrived event was succesfully processed and HSM resides in an allowed state.
Definition: rkhtrc.h:3355
Stops a running timer.
Definition: rkhtrc.h:3368
#define RKH_MP_START
Trace event offset.
Definition: rkhtrc.h:403
rui8_t RKH_TE_ID_T
Describes a trace event identification (ID).
Definition: rkhtrc.h:3060
Memory Pool group (MP)
Definition: rkhtrc.h:3085
Assertion expression was evaluated to false.
Definition: rkhtrc.h:3389
void rkh_trc_put(rui8_t b)
Put a data byte into the trace stream.
void rkh_trc_sig(RKH_SIG_T sig, const char *sig_name)
Output signal symbol record.
Executes a behavior (action) of state machine, it could be an entry, exit, effect, init, preprocessor or guard.
Definition: rkhtrc.h:3425
Source and target state of the transition. The target could be either basic state, composite state or pseudostate.
Definition: rkhtrc.h:3348
rui8_t RKH_TRC_FSLOT
This data type defines the size of filter table for AO and signals.
Definition: rkhtrc.h:2997
void rkh_trc_u16(rui16_t d)
Store a 16-bit data into the current trace event buffer without format information.
void rkh_trc_ao(struct RKH_SMA_T *ao)
Output active object (AO) symbol record.
void rkh_trc_fmt_u32(rui8_t fmt, rui32_t d)
Store a 32-bit data into the current trace event buffer with format information.
The transition exceeded the allowed number of segments within a compound transtion.
Definition: rkhtrc.h:3361
void rkh_trc_fmt_u8(rui8_t fmt, rui8_t d)
Store a 8-bit data into the current trace event buffer with format information.
#define RKH_FWK_START
Trace event offset.
Definition: rkhtrc.h:408
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.
#define RKH_RQ_START
Trace event offset.
Definition: rkhtrc.h:404
Entry symbol table for active object.
Definition: rkhtrc.h:3390
Terminate a state machine application (SMA) as known as active object.
Definition: rkhtrc.h:3336
void rkh_trc_clear_chk(void)
Clear to zero the trace record checksum.
State Machine Application group (SMA)
Definition: rkhtrc.h:3097
Queue is full.
Definition: rkhtrc.h:3329
void rkh_trc_fmt_mem(rui8_t const *mem, rui8_t size)
Output memory block of up to 255-bytes with format information.
Entry symbol table for timer object.
Definition: rkhtrc.h:3393
void rkh_trc_str(const char *s)
Store a string terminated in '\0' into the current trace event buffer without format information...
Timer group (TIM)
Definition: rkhtrc.h:3109
void rkh_trc_filter_get(RKH_FilterTbl *outFilterTbl)
Get a memory reference to every trace filter table.
void rkh_trc_u32(rui32_t d)
Store a 32-bit data into the current trace event buffer without format information.
Entry symbol table for function object.
Definition: rkhtrc.h:3384
RKH_TRC_EVENTS
RKH trace events.
Definition: rkhtrc.h:3316
Executes a behavior (action) of state machine, it could be an entry, exit, effect, init, preprocessor or guard.
Definition: rkhtrc.h:3424
Send an event to a state machine application (SMA) as known as active object through a queue using th...
Definition: rkhtrc.h:3339
Reference Queue group (RQ)
Definition: rkhtrc.h:3091
Exited state.
Definition: rkhtrc.h:3351
Initializes the previously allocated queue data structure RKH_RQ_T.
Definition: rkhtrc.h:3325
RKH_TRC_FMT
Enumerates data formats recognized by Trazer.
Definition: rkhtrc.h:2957
void rkh_trc_begin(RKH_TE_ID_T eid)
Store the trace record header in the stream.
Entry symbol table for state object.
Definition: rkhtrc.h:3391
Depletes a queue. Empties the contents of the queue and eliminates all stored elements.
Definition: rkhtrc.h:3330
rbool_t rkh_trc_symFil_isoff(const RKH_TRC_FIL_T *filter, RKH_TRC_FSLOT slot)
Test the active objecto or signal filter condition.
Number of entry and exit states in transition.
Definition: rkhtrc.h:3352
rbool_t rkh_trc_isoff_(RKH_TE_ID_T e)
Test the group and event filter condition.
Initializes the previously allocated timer structure RKH_TMR_T.
Definition: rkhtrc.h:3366
#define RKH_SM_START
Trace event offset.
Definition: rkhtrc.h:406
Effective recycling event.
Definition: rkhtrc.h:3379
Erase the history of a state. It can be a shallow or deep history.
Definition: rkhtrc.h:3347
Executes a state machine in a run-to-completation (RTC) model.
Definition: rkhtrc.h:3342
The function was synchronously executed. It is not explicitely used by the RKH, instead it's frequent...
Definition: rkhtrc.h:3386
void rkh_trc_init(void)
Initializes the RKH's trace record service.
rui8_t *const tbl
Definition: rkhtrc.h:3008
rui8_t * rkh_trc_get(void)
Retrieves a pointer to oldest stored byte in the trace stream. Frequently, this function is used by t...
Number of executed actions and segments of the transition.
Definition: rkhtrc.h:3353
void rkh_trc_obj(RKH_TE_ID_T tre, rui8_t *obj, const char *obj_name)
Output object symbol record.
Attempt to recycle an event.
Definition: rkhtrc.h:3378
Allocates an event from the previously created event pool.
Definition: rkhtrc.h:3377
Get and remove an element from a queue.
Definition: rkhtrc.h:3326
Legal, stable and final state of transition.
Definition: rkhtrc.h:3349
Exit the RKH framework.
Definition: rkhtrc.h:3375
void rkh_trc_end(void)
Terminate the recorded trace event.
Send an event to a state machine application (SMA) as known as active object through a queue using th...
Definition: rkhtrc.h:3338
Unknown state.
Definition: rkhtrc.h:3359
Defines the data types that uses RKH.
Entry symbol table for user-defined trace events.
Definition: rkhtrc.h:3387
Entry symbol table for queue object.
Definition: rkhtrc.h:3395