µOS++ IIIe Reference 7.0.0
The third edition of µOS++, a POSIX inspired open source framework, written in C++
Loading...
Searching...
No Matches
os::rtos::internal::object_named Class Reference

Base class for named objects. More...

#include <cmsis-plus/rtos/os.h>

+ Inheritance diagram for os::rtos::internal::object_named:

Public Member Functions

Constructors & Destructor
 object_named ()
 Construct a named object instance.
 
 object_named (const char *name)
 Construct a named object instance.
 
 ~object_named ()=default
 Destruct the named object instance.
 
Public Member Functions
const char * name (void) const
 Get object name.
 

Detailed Description

Base class for named objects.

This class serves as a base class for all objects that have a name (most of the RTOS classes do have a name).

Attributes use a separate constexpr object.

Definition at line 350 of file os-decls.h.

Constructor & Destructor Documentation

◆ object_named() [1/2]

os::rtos::internal::object_named::object_named ( )

Construct a named object instance.

Definition at line 606 of file os-core.cpp.

◆ object_named() [2/2]

os::rtos::internal::object_named::object_named ( const char *  name)

Construct a named object instance.

Parameters
[in]nameNull terminated name. If nullptr, "-" is assigned.

Prefer the given name, otherwise default to '-'.

To save space, instead of copying the null terminated string locally, the pointer to the string is copied, so the caller must ensure that the pointer life cycle is at least as long as the object life cycle. A constant string (stored in flash) is preferred.

Definition at line 621 of file os-core.cpp.

◆ ~object_named()

os::rtos::internal::object_named::~object_named ( )
default

Destruct the named object instance.

Member Function Documentation

◆ name()

const char * os::rtos::internal::object_named::name ( void  ) const
inline

Get object name.

Parameters
None.
Returns
A null terminated string.

All objects return a non-null string; anonymous objects return "-".

Note
Can be invoked from Interrupt Service Routines.

Definition at line 759 of file os-decls.h.


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