SuperTinyKernel™ RTOS 1.06.x
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.

Protected Member Functions

 ~ITraceable ()=default
 Destructor.

Detailed Description

Traceable object.

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

Definition at line 392 of file stk_common.h.

Constructor & Destructor Documentation

◆ ~ITraceable()

stk::ITraceable::~ITraceable ( )
protecteddefault

Destructor.

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 416 of file stk_common.h.

417 {
418 #if STK_SYNC_DEBUG_NAMES
419 return m_trace_name;
420 #else
421 return nullptr;
422 #endif
423 }

◆ 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 404 of file stk_common.h.

405 {
406 #if STK_SYNC_DEBUG_NAMES
407 m_trace_name = name;
408 #else
409 STK_UNUSED(name);
410 #endif
411 }
#define STK_UNUSED(X)
Explicitly marks a variable as unused to suppress compiler warnings.
Definition stk_defs.h:608

References STK_UNUSED.

Referenced by stk::memory::BlockMemoryPool::BlockMemoryPool(), and stk::memory::BlockMemoryPool::BlockMemoryPool().

Here is the caller graph for this function:

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