SuperTinyKernel™ RTOS 1.05.3
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
Loading...
Searching...
No Matches
stk::ITraceable Class Reference

Traceable object. More...

#include <stk_common.h>

Inheritance diagram for stk::ITraceable:

Public Member Functions

void SetTraceName (const char *name)
 Set name.
const char * GetTraceName () const
 Get name.

Detailed Description

Traceable object.

Note
Used for debugging and tracing by tools like SEGGER SystemView. See STK_SYNC_DEBUG_NAMES.

Definition at line 254 of file stk_common.h.

Member Function Documentation

◆ GetTraceName()

const char * stk::ITraceable::GetTraceName ( ) const
inline

Get name.

Returns
Name string, or NULL if not set or if STK_SYNC_DEBUG_NAMES is 0.

Definition at line 278 of file stk_common.h.

279 {
280 #if STK_SYNC_DEBUG_NAMES
281 return m_trace_name;
282 #else
283 return nullptr;
284 #endif
285 }

◆ SetTraceName()

void stk::ITraceable::SetTraceName ( const char * name)
inline

Set name.

Parameters
[in]nameNull-terminated string or NULL.
Note
If STK_SYNC_DEBUG_NAMES is 0 then calling this function has no effect.

Definition at line 266 of file stk_common.h.

267 {
268 #if STK_SYNC_DEBUG_NAMES
269 m_trace_name = name;
270 #else
271 (void)name;
272 #endif
273 }

The documentation for this class was generated from the following file: