RKH
Loading...
Searching...
No Matches
rkhtrc_record.h File Reference

Defines the trace records. More...

#include "rkhtrc_stream.h"
Include dependency graph for rkhtrc_record.h:

Go to the source code of this file.

Functions

void rkh_trc_init (void)
 Initializes the RKH's trace record service.
 
void rkh_trc_begin (RKH_TE_ID_T eid)
 Store the trace record header in the stream.
 
void rkh_trc_end (void)
 Terminate the recorded trace event.
 
void rkh_trc_clear_chk (void)
 Clear to zero the trace record checksum.
 
void rkh_trc_u8 (rui8_t d)
 Store a 8-bit data into the current trace event buffer without format information.
 
void rkh_trc_u16 (rui16_t d)
 Store a 16-bit data into the current trace event buffer without format information.
 
void rkh_trc_u32 (rui32_t d)
 Store a 32-bit data into the current trace event buffer without format information.
 
void rkh_trc_str (const char *s)
 Store a string terminated in '\0' into the current trace event buffer without format information.
 
void rkh_trc_obj (RKH_TE_ID_T tre, rui8_t *obj, const char *obj_name)
 Output object symbol record.
 
void rkh_trc_sig (RKH_SIG_T sig, const char *sig_name)
 Output signal symbol record.
 
void rkh_trc_ao (void *ao)
 Output active object (AO) symbol record.
 
void rkh_trc_state (void *ao, rui8_t *state)
 Output state symbol record.
 
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.
 
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.
 
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.
 
void rkh_trc_fmt_str (const char *s)
 Store a string terminated in '\0' into the current trace event buffer with format information.
 
void rkh_trc_fmt_mem (rui8_t const *mem, rui8_t size)
 Output memory block of up to 255-bytes with format information.
 

Detailed Description

Defines the trace records.

Definition in file rkhtrc_record.h.

Function Documentation

◆ rkh_trc_init()

void rkh_trc_init ( void  )

Initializes the RKH's trace record service.

Note
rkh_trc_init() is NOT protected with a critical section.

◆ rkh_trc_begin()

void rkh_trc_begin ( RKH_TE_ID_T  eid)

Store the trace record header in the stream.

  • Trace event ID [n-bytes]. The number of bytes that it uses is specified by the size of RKH_TE_ID_T data type.
  • Sequence number [1-byte]. If the RKH_CFG_TRC_NSEQ_EN is set to 1 then RKH will add to the trace record an incremental number (1-byte), used like a sequence number.
  • Timestamp [1, 2 or 4 bytes]. If the RKH_CFG_TRC_TSTAMP_EN is set to 1 then RKH will add to the trace record a timestamp field. It's configurable by means of RKH_CFGPORT_TRC_SIZEOF_TSTAMP.
Parameters
[in]eidtrace event ID. The available events are enumerated in RKH_TE_<group>_<event> definitions.
Note
This function should be called indirectly through the macro RKH_TRC_BEGIN.

◆ rkh_trc_end()

void rkh_trc_end ( void  )

Terminate the recorded trace event.

This function inserts a the flag byte, which delimits the frame. The flag is the 0x7E.

Note
This function should be called indirectly through the macro RKH_TRC_END.

◆ rkh_trc_clear_chk()

void rkh_trc_clear_chk ( void  )

Clear to zero the trace record checksum.

Note
This function should be called indirectly through the macro RKH_TRC_BEGIN_DFT().

◆ rkh_trc_u8()

void rkh_trc_u8 ( rui8_t  d)

Store a 8-bit data into the current trace event buffer without format information.

Parameters
[in]ddata

◆ rkh_trc_u16()

void rkh_trc_u16 ( rui16_t  d)

Store a 16-bit data into the current trace event buffer without format information.

Parameters
[in]ddata

◆ rkh_trc_u32()

void rkh_trc_u32 ( rui32_t  d)

Store a 32-bit data into the current trace event buffer without format information.

Parameters
[in]ddata

◆ rkh_trc_str()

void rkh_trc_str ( const char *  s)

Store a string terminated in '\0' into the current trace event buffer without format information.

Parameters
[in]spointer to string treminated in '\0'

◆ rkh_trc_obj()

void rkh_trc_obj ( RKH_TE_ID_T  tre,
rui8_t *  obj,
const char *  obj_name 
)

Output object symbol record.

Parameters
[in]tretrace event ID. The available events are enumerated in RKH_TE_<group>_<event> definitions.
[in]objaddress of the object in memory.
[in]obj_namestring terminated in '\0'.
Note
This function is internal to RKH and the user application should not call it.

◆ rkh_trc_sig()

void rkh_trc_sig ( RKH_SIG_T  sig,
const char *  sig_name 
)

Output signal symbol record.

Parameters
[in]sigsignal number.
[in]sig_namestring terminated in '\0'.
Note
This function is internal to RKH and the user application should not call it.

◆ rkh_trc_ao()

void rkh_trc_ao ( void *  ao)

Output active object (AO) symbol record.

Parameters
[in]aoaddress of active object symbol.
Note
This function is internal to RKH and the user application should not call it.

◆ rkh_trc_state()

void rkh_trc_state ( void *  ao,
rui8_t *  state 
)

Output state symbol record.

Parameters
[in]aoaddress of active object symbol.
[in]stateaddress of state symbol.
Note
This function is internal to RKH and the user application should not call it.

◆ rkh_trc_fmt_u8()

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.

Parameters
[in]fmtformat information
[in]ddata

◆ rkh_trc_fmt_u16()

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.

Parameters
[in]fmtformat information
[in]ddata

◆ rkh_trc_fmt_u32()

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.

Parameters
[in]fmtformat information
[in]ddata

◆ rkh_trc_fmt_str()

void rkh_trc_fmt_str ( const char *  s)

Store a string terminated in '\0' into the current trace event buffer with format information.

Parameters
[in]spointer to string terminated in '\0'

◆ rkh_trc_fmt_mem()

void rkh_trc_fmt_mem ( rui8_t const *  mem,
rui8_t  size 
)

Output memory block of up to 255-bytes with format information.

Parameters
[in]mempointer to memory block.
[in]sizesize of memory block.