Defines the trace records.
More...
Go to the source code of this file.
|
| 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.
|
| |
Defines the trace records.
Definition in file rkhtrc_record.h.
◆ 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()
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] | eid | trace 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
-
◆ 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
-
◆ 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
-
◆ 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] | s | pointer 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] | tre | trace event ID. The available events are enumerated in RKH_TE_<group>_<event> definitions. |
| [in] | obj | address of the object in memory. |
| [in] | obj_name | string 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] | sig | signal number. |
| [in] | sig_name | string 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] | ao | address 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] | ao | address of active object symbol. |
| [in] | state | address 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] | fmt | format information |
| [in] | d | data |
◆ 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] | fmt | format information |
| [in] | d | data |
◆ 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] | fmt | format information |
| [in] | d | data |
◆ 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] | s | pointer 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] | mem | pointer to memory block. |
| [in] | size | size of memory block. |