RKH
unitrazer.h File Reference

Interface of unit test with Trazer application. More...

#include "unity.h"
#include "rkh.h"
Include dependency graph for unitrazer.h:

Go to the source code of this file.

Macros

#define sm_init()   unitrazer_start()
 Establish the preconditions to the tests.
 
#define sm_cleanup()   unitrazer_cleanup()
 Return the system under test to its initial state after the test.
 
#define sm_verify()   unitrazer_verify()
 Makes sure there are no unused expectations, if there are, this function causes the test to fail.
 

Functions

void unitrazer_start (void)
 Establish the preconditions to the tests.
 
void unitrazer_cleanup (void)
 Return the system under test to its initial state after the test.
 
void unitrazer_verify (void)
 Makes sure there are no unused expectations, if there are, this function causes the test to fail.
 
void unitrazer_expect_wSymArg (UNITY_LINE_TYPE cmockLine, RKH_TE_ID_T trcEvt, rui8_t nArgs,...)
 Identifies the trace event to expect with one or more arguments. More...
 
void unitrazer_expect_wNumArg (UNITY_LINE_TYPE cmockLine, RKH_TE_ID_T trcEvt, rui8_t nArgs,...)
 Identifies the trace event to expect with one or more arguments. More...
 
void unitrazer_expect_wSig (UNITY_LINE_TYPE cmockLine, RKH_TE_ID_T trcEvt, RKH_SIG_T signal)
 Identifies the trace event to expect and one signal argument. More...
 
void unitrazer_expect_noArgs (UNITY_LINE_TYPE cmockLine, RKH_TE_ID_T trcEvt)
 Identifies the trace event to expect without arguments. More...
 
void unitrazer_expectAnyArgs (UNITY_LINE_TYPE cmockLine, rui8_t trcEvt)
 Expect a specific trace event regardless its arguments. More...
 
void unitrazer_sm_exeAct_expect (UNITY_LINE_TYPE cmockLine, rui8_t actType, RKH_ST_T *state, void *action)
 Expect for RKH_TE_SM_EXE_ACT trace event. More...
 
void unitrazer_sm_dch_expect (UNITY_LINE_TYPE cmockLine, RKH_SIG_T signal, RKH_ST_T *state)
 Expect for RKH_TE_SM_DCH trace event. More...
 
void unitrazer_ignore (UNITY_LINE_TYPE cmockLine, rui8_t trcEvt)
 Ignore a specific trace event. More...
 
void unitrazer_ignoreArg (UNITY_LINE_TYPE cmockLine, rui8_t trcEvt, rui8_t noArg)
 Adds the ability to specify specifc arguments to ignore for a produced trace event, instead of ignoring all the arguments or the entire generated trace event, as the unitrazer_ignore() function supports. More...
 
void unitrazer_ignoreGroup (UNITY_LINE_TYPE cmockLine, RKH_TG_T group)
 Force to ignore every produced trace event from a specifc trace group. More...
 

Detailed Description

Interface of unit test with Trazer application.

Definition in file unitrazer.h.

Function Documentation

◆ unitrazer_expect_wSymArg()

void unitrazer_expect_wSymArg ( UNITY_LINE_TYPE  cmockLine,
RKH_TE_ID_T  trcEvt,
rui8_t  nArgs,
  ... 
)

Identifies the trace event to expect with one or more arguments.

Parameters
[in]cmockLineline number from which this function is called
[in]trcEvttrace event to expect
[in]nArgsnumber of trace event arguments
[in]...list of arguments
Note
This function is internal to RKH and the user application should not call it. Instead, use the corresponding macro for the trace event to expect.

◆ unitrazer_expect_wNumArg()

void unitrazer_expect_wNumArg ( UNITY_LINE_TYPE  cmockLine,
RKH_TE_ID_T  trcEvt,
rui8_t  nArgs,
  ... 
)

Identifies the trace event to expect with one or more arguments.

Parameters
[in]cmockLineline number from which this function is called
[in]trcEvttrace event to expect
[in]nArgsnumber of trace event arguments
[in]...list of arguments
Note
This function is internal to RKH and the user application should not call it. Instead, use the corresponding macro for the trace event to expect.

◆ unitrazer_expect_wSig()

void unitrazer_expect_wSig ( UNITY_LINE_TYPE  cmockLine,
RKH_TE_ID_T  trcEvt,
RKH_SIG_T  signal 
)

Identifies the trace event to expect and one signal argument.

Parameters
[in]cmockLineline number from which this function is called
[in]trcEvttrace event to expect
[in]signalargument of trace event with signal
Note
This function is internal to RKH and the user application should not call it. Instead, use the corresponding macro for the trace event to expect.

◆ unitrazer_expect_noArgs()

void unitrazer_expect_noArgs ( UNITY_LINE_TYPE  cmockLine,
RKH_TE_ID_T  trcEvt 
)

Identifies the trace event to expect without arguments.

Parameters
[in]cmockLineline number from which this function is called
[in]trcEvttrace event to expect
Note
This function is internal to RKH and the user application should not call it. Instead, use the corresponding macro for the trace event to expect.

◆ unitrazer_expectAnyArgs()

void unitrazer_expectAnyArgs ( UNITY_LINE_TYPE  cmockLine,
rui8_t  trcEvt 
)

Expect a specific trace event regardless its arguments.

Parameters
[in]cmockLineline number from which this function is called
[in]trcEvtproduced trace event to expect but it ignores its arguments
Note
This function is internal to RKH and the user application should not call it. Instead, use the corresponding macro for the trace event to expect.

◆ unitrazer_sm_exeAct_expect()

void unitrazer_sm_exeAct_expect ( UNITY_LINE_TYPE  cmockLine,
rui8_t  actType,
RKH_ST_T state,
void *  action 
)

Expect for RKH_TE_SM_EXE_ACT trace event.

Parameters
[in]cmockLineline number from which this function is called
[in]actTypeaction type according to RKH_SUBTE_SM_EXE_ACT enum
[in]stateaction execution context
[in]actionexecuted action
Note
This function is internal to RKH and the user application should not call it. Instead, use the corresponding macro for the trace event to expect.

◆ unitrazer_sm_dch_expect()

void unitrazer_sm_dch_expect ( UNITY_LINE_TYPE  cmockLine,
RKH_SIG_T  signal,
RKH_ST_T state 
)

Expect for RKH_TE_SM_DCH trace event.

Parameters
[in]cmockLineline number from which this function is called
[in]signalargument of trace event with signal
[in]stateaction execution context
Note
This function is internal to RKH and the user application should not call it. Instead, use the corresponding macro for the trace event to expect.

◆ unitrazer_ignore()

void unitrazer_ignore ( UNITY_LINE_TYPE  cmockLine,
rui8_t  trcEvt 
)

Ignore a specific trace event.

Parameters
[in]cmockLineline number from which this function is called
[in]trcEvtproduced trace event to ignore
Note
This function is internal to RKH and the user application should not call it. Instead, use the corresponding macro for the trace event to ignore.

◆ unitrazer_ignoreArg()

void unitrazer_ignoreArg ( UNITY_LINE_TYPE  cmockLine,
rui8_t  trcEvt,
rui8_t  noArg 
)

Adds the ability to specify specifc arguments to ignore for a produced trace event, instead of ignoring all the arguments or the entire generated trace event, as the unitrazer_ignore() function supports.

Parameters
[in]cmockLineline number from which this function is called
[in]trcEvtproduced trace event to expect
[in]noArgnumber of argument to ignore. See UT_ARGNO_<x> macro.
Note
This function is internal to RKH and the user application should not call it. Instead, use the corresponding macro for the trace event to ignore.

◆ unitrazer_ignoreGroup()

void unitrazer_ignoreGroup ( UNITY_LINE_TYPE  cmockLine,
RKH_TG_T  group 
)

Force to ignore every produced trace event from a specifc trace group.

Parameters
[in]cmockLineline number from which this function is called
[in]groupgroup to ignore
Note
This function is internal to RKH and the user application should not call it. Instead, use the corresponding macro for the trace event group to ignore.