| zpp
    Zephyr C++20 Framework | 
| Namespaces | |
| internal | |
| this_thread | |
| provide functions that access the current thread of execution. | |
| Classes | |
| class | atomic_bitset | 
| class wrapping an atomic_var_t array  More... | |
| class | atomic_var | 
| class wrapping an atomic_var_t  More... | |
| class | uptime_clock | 
| Clock measuring elapsed time since the system booted.  More... | |
| class | cycle_clock | 
| Clock representing the system’s hardware clock.  More... | |
| class | condition_variable_base | 
| A condition variable CRTP base class.  More... | |
| class | condition_variable | 
| A condition variable class.  More... | |
| class | condition_variable_ref | 
| A class using a reference to another native condition variable or zpp::condition_variable.  More... | |
| class | fifo_base | 
| Fifo CRTP base class.  More... | |
| class | fifo | 
| fifo that manages a k_fifo object  More... | |
| class | fifo_ref | 
| fifo that references a k_fifo object  More... | |
| class | futex_base | 
| A CRTP futex base class.  More... | |
| class | futex | 
| A futex class.  More... | |
| class | futex_ref | 
| A futex class referencing another futex object.  More... | |
| class | base_heap | 
| Heap memory allocater CRTP base class.  More... | |
| class | heap | 
| heap class  More... | |
| class | heap_ref | 
| heap reference class  More... | |
| class | lock_guard | 
| lock_guard using zpp::mutex as a lock.  More... | |
| class | mem_slab_base | 
| Allocator that uses k_mem_slab for memory.  More... | |
| class | mem_slab | 
| A memory slab class.  More... | |
| class | mem_slab_ref | 
| A mem_slab class referencing another mem slab object.  More... | |
| class | mutex_base | 
| A recursive mutex CRTP base class.  More... | |
| class | mutex | 
| A recursive mutex class.  More... | |
| class | mutex_ref | 
| A recursive mutex class borrowing the native mutex.  More... | |
| class | poll_event | 
| wrapper class around a k_poll_event  More... | |
| class | poll_event_set | 
| A set of poll events.  More... | |
| class | poll_signal_base | 
| CRTP base class for poll_signals.  More... | |
| class | poll_signal | 
| class owning a k_poll_signal  More... | |
| class | poll_signal_ref | 
| class wrapping a k_poll_signal  More... | |
| class | error_result | 
| helper class for error result  More... | |
| class | result | 
| result class  More... | |
| class | result< void, T_Error > | 
| result class  More... | |
| class | sched_lock_guard | 
| Guard to automatically lock/unlock scheduler.  More... | |
| class | sem_base | 
| Counting semaphore base class.  More... | |
| class | sem | 
| A counting semaphore class.  More... | |
| class | sem_ref | 
| A counting semaphore class borrowing the native sem.  More... | |
| class | sys_mutex_base | 
| A userspace mutex class.  More... | |
| class | sys_mutex | 
| A recursive mutex class.  More... | |
| class | sys_mutex_ref | 
| A recursive mutex class borrowing the native mutex.  More... | |
| class | thread | 
| The class thread repecents a single Zephyr thread.  More... | |
| struct | thread_start_delay | 
| class | thread_attr | 
| Thread creation attributes.  More... | |
| class | thread_data | 
| thread_data holds the stack and thread control block memory  More... | |
| class | thread_id | 
| Thead ID.  More... | |
| class | thread_prio | 
| Thread priority.  More... | |
| class | thread_stack | 
| thread_stack holds the stack and thread control block memory  More... | |
| class | timer_base | 
| base class for the timer class  More... | |
| class | timer | 
| timer class with expire and stop callbacks  More... | |
| class | basic_timer | 
| timer class with only an expire callback  More... | |
| class | sync_timer | 
| timer class with no callbacks used for syncing only  More... | |
| class | unique_lock | 
| zpp::unique_lock using zpp::mutex as a lock.  More... | |
| Enumerations | |
| enum class | error_code { k_perm = EPERM , k_noent = ENOENT , k_srch = ESRCH , k_intr = EINTR , k_io = EIO , k_nxio = ENXIO , k_2big = E2BIG , k_noexec = ENOEXEC , k_badf = EBADF , k_child = ECHILD , k_again = EAGAIN , k_nomem = ENOMEM , k_acces = EACCES , k_fault = EFAULT , k_notblk = ENOTBLK , k_busy = EBUSY , k_exits = EEXIST , k_xdev = EXDEV , k_nodev = ENODEV , k_notdir = ENOTDIR , k_isdir = EISDIR , k_inval = EINVAL , k_nfile = ENFILE , k_mfile = EMFILE , k_notty = ENOTTY , k_txtbsy = ETXTBSY , k_fbig = EFBIG , k_nospc = ENOSPC , k_spipe = ESPIPE , k_rofs = EROFS , k_mlink = EMLINK , k_pipe = EPIPE , k_dom = EDOM , k_range = ERANGE , k_nomsg = ENOMSG , k_deadlk = EDEADLK , k_nolck = ENOLCK , k_nostr = ENOSTR , k_nodata = ENODATA , k_time = ETIME , k_nosr = ENOSR , k_proto = EPROTO , k_badmsg = EBADMSG , k_nosys = ENOSYS , k_notempty = ENOTEMPTY , k_nametoolong = ENAMETOOLONG , k_loop = ELOOP , k_opnotsupp = EOPNOTSUPP , k_pfnosupport = EPFNOSUPPORT , k_connreset = ECONNRESET , k_nobufs = ENOBUFS , k_afnosupport = EAFNOSUPPORT , k_prototype = EPROTOTYPE , k_notsock = ENOTSOCK , k_noprotoopt = ENOPROTOOPT , k_shutdown = ESHUTDOWN , k_connrefused = ECONNREFUSED , k_addrinuse = EADDRINUSE , k_connaborted = ECONNABORTED , k_netunreach = ENETUNREACH , k_netdown = ENETDOWN , k_timeout = ETIMEDOUT , k_hostdown = EHOSTDOWN , k_hostunreach = EHOSTUNREACH , k_inprogress = EINPROGRESS , k_already = EALREADY , k_destaddrreq = EDESTADDRREQ , k_msgsize = EMSGSIZE , k_protonosupport = EPROTONOSUPPORT , k_socktnosupport = ESOCKTNOSUPPORT , k_addrnotavail = EADDRNOTAVAIL , k_netreset = ENETRESET , k_isconn = EISCONN , k_notconn = ENOTCONN , k_toomanyrefs = ETOOMANYREFS , k_notsup = ENOTSUP , k_ilseq = EILSEQ , k_overflow = EOVERFLOW , k_canceled = ECANCELED , k_wouldblock = EWOULDBLOCK } | 
| enum with zephyr error codes  More... | |
| enum class | thread_suspend { yes , no } | 
| enum class | thread_essential { yes , no } | 
| enum class | thread_user { yes , no } | 
| enum class | thread_inherit_perms { yes , no } | 
| enum class | thread_fp_regs { yes , no } | 
| enum class | thread_sse_regs { yes , no } | 
| Functions | |
| template<class T_Rep , class T_Period > | |
| constexpr k_ticks_t | to_tick (const std::chrono::duration< T_Rep, T_Period > &d) noexcept | 
| convert a duration to tick  More... | |
| template<class T_Rep , class T_Period > | |
| constexpr k_timeout_t | to_timeout (const std::chrono::duration< T_Rep, T_Period > &d) noexcept | 
| convert a duration to tick  More... | |
| constexpr error_code | to_error_code (int v) noexcept | 
| template<class ... T_Args> | |
| void | print (const char *fmt, T_Args &&... args) noexcept | 
| simple typesafe print function  More... | |
| template<class... T_Args> | |
| poll_event_set (T_Args &&... t) noexcept -> poll_event_set< sizeof...(T_Args)> | |
| try poll events waiting for e certain time  More... | |
| template<typename T_Ok , typename T_Error > | |
| constexpr bool | operator== (const result< T_Ok, T_Error > &lhs, bool rhs) noexcept | 
| compare result with bool  More... | |
| template<typename T_Ok , typename T_Error > | |
| constexpr bool | operator== (bool lhs, const result< T_Ok, T_Error > &rhs) noexcept | 
| compare result with bool  More... | |
| template<typename T_Ok , typename T_Error > | |
| constexpr bool | operator!= (const result< T_Ok, T_Error > &lhs, bool rhs) noexcept | 
| compare result with bool  More... | |
| template<typename T_Ok , typename T_Error > | |
| constexpr bool | operator!= (bool lhs, const result< T_Ok, T_Error > &rhs) noexcept | 
| compare result with bool  More... | |
| void | sched_lock () noexcept | 
| Lock the scheduler.  More... | |
| void | sched_unlock () noexcept | 
| Unlock the scheduler.  More... | |
| template<class T > | |
| std::decay< T >::type | decay_copy (T &&v) noexcept | 
| constexpr bool | operator== (const thread_id &lhs, const thread_id &rhs) noexcept | 
| Compare if two ID are equal.  More... | |
| constexpr bool | operator!= (const thread_id &lhs, const thread_id &rhs) noexcept | 
| Compare if two ID are not equal.  More... | |
| void | print_arg (thread_id id) noexcept | 
| Helper to output the ID with zpp::print("{}", id)  More... | |
| constexpr bool | operator== (const thread_prio &lhs, const thread_prio &rhs) noexcept | 
| Compare if two priorities are equal.  More... | |
| constexpr bool | operator!= (const thread_prio &lhs, const thread_prio &rhs) noexcept | 
| Compare if two priorities are not equal.  More... | |
| constexpr thread_prio | operator- (thread_prio lhs, int rhs) noexcept | 
| Reduce priority by rhs.  More... | |
| constexpr thread_prio | operator+ (thread_prio lhs, int rhs) noexcept | 
| Increase priority by rhs.  More... | |
| void | print_arg (thread_prio prio) noexcept | 
| Helper to output the priority with zpp::print("{}", prio)  More... | |
| auto | make_timer () noexcept | 
| create sync_timer object  More... | |
| template<class T_ExpireCallback > | |
| auto | make_timer (T_ExpireCallback &&ecb) noexcept | 
| create basic_timer object  More... | |
| template<class T_ExpireCallback , class T_StopCallback > | |
| auto | make_timer (T_ExpireCallback &&ecb, T_StopCallback &&scb) noexcept | 
| create timer object  More... | |
| template<class T_LHS , class T_RHS > | |
| constexpr bool | operator== (const T_LHS &lhs, const T_RHS &rhs) noexcept | 
| check if the instances refere to the same native zephyr object handle.  More... | |
| template<class T_LHS , class T_RHS > | |
| constexpr bool | operator!= (const T_LHS &lhs, const T_RHS &rhs) noexcept | 
| check if the arguments refere to different native zephyr object handles.  More... | |
| consteval uint32_t | power_of_two (uint32_t power) noexcept | 
| calculate a power of 2  More... | |
| consteval bool | is_power_of_two (uint32_t value) noexcept | 
| check if a value is a power of two  More... | |
| consteval bool | is_multiple_of (uint32_t value, uint32_t base) | 
| Check if a value is a multiple of another value.  More... | |
Copyright (c) 2021 Erwin Rol erwin@erwinrol.com
SPDX-License-Identifier: Apache-2.0
Copyright (c) 2019 Erwin Rol erwin@erwinrol.com
SPDX-License-Identifier: Apache-2.0
| 
 | strong | 
enum with zephyr error codes
Definition at line 19 of file error_code.hpp.
| 
 | strong | 
| Enumerator | |
|---|---|
| yes | |
| no | |
Definition at line 21 of file thread_attr.hpp.
| 
 | strong | 
| 
 | strong | 
| 
 | strong | 
| 
 | strong | 
| 
 | strong | 
| 
 | noexcept | 
Definition at line 139 of file thread.hpp.
Referenced by zpp::thread::thread().
| consteval bool zpp::is_multiple_of | ( | uint32_t | value, | 
| uint32_t | base | ||
| ) | 
Check if a value is a multiple of another value.
| value | the value to check | 
| base | the base the value should be a multiple of | 
| 
 | noexcept | 
check if a value is a power of two
| value | the value to check | 
Definition at line 97 of file utils.hpp.
References power_of_two().
| 
 | inlinenoexcept | 
create sync_timer object
Definition at line 233 of file timer.hpp.
Referenced by ZTEST().
| 
 | inlinenoexcept | 
| 
 | inlinenoexcept | 
| 
 | constexprnoexcept | 
compare result with bool
| lhs | the bool value | 
| rhs | the result value | 
Definition at line 694 of file result.hpp.
| 
 | constexprnoexcept | 
compare result with bool
| lhs | the result value | 
| rhs | the bool value | 
Definition at line 681 of file result.hpp.
| 
 | constexprnoexcept | 
Compare if two ID are not equal.
| lhs | Left hand side for comparison | 
| rhs | Right hand side for comparison | 
Definition at line 98 of file thread_id.hpp.
| 
 | constexprnoexcept | 
Compare if two priorities are not equal.
| lhs | Left hand side for comparison | 
| rhs | Right hand side for comparison | 
Definition at line 219 of file thread_prio.hpp.
| 
 | constexprnoexcept | 
Increase priority by rhs.
| lhs | Left hand side for the operation | 
| rhs | Right hand side for the operation | 
Definition at line 247 of file thread_prio.hpp.
| 
 | constexprnoexcept | 
Reduce priority by rhs.
| lhs | Left hand side for the operation | 
| rhs | Right hand side for the operation | 
Definition at line 233 of file thread_prio.hpp.
| 
 | constexprnoexcept | 
compare result with bool
| lhs | the bool value | 
| rhs | the result value | 
Definition at line 668 of file result.hpp.
| 
 | constexprnoexcept | 
compare result with bool
| lhs | the result value | 
| rhs | the bool value | 
Definition at line 655 of file result.hpp.
| 
 | constexprnoexcept | 
Compare if two ID are equal.
| lhs | Left hand side for comparison | 
| rhs | Right hand side for comparison | 
Definition at line 84 of file thread_id.hpp.
| 
 | constexprnoexcept | 
Compare if two priorities are equal.
| lhs | Left hand side for comparison | 
| rhs | Right hand side for comparison | 
Definition at line 205 of file thread_prio.hpp.
| 
 | noexcept | 
try poll events waiting for e certain time
| timeout | the time to wait | 
| 
 | noexcept | 
calculate a power of 2
| power | the power of 2 to calculate | 
Definition at line 79 of file utils.hpp.
Referenced by is_power_of_two().
| 
 | inlinenoexcept | 
simple typesafe print function
print uses the same format string syntax as the fmt C++ lib, just that the feature set is very limited. It only supports {} without any options, for example print("Nr: {}", 1);
| fmt | The format string using {} as place holder | 
| args | The needed arguments to print | 
Definition at line 157 of file fmt.hpp.
References zpp::internal::print_helper().
| 
 | inlinenoexcept | 
Helper to output the ID with zpp::print("{}", id)
| id | The ID to print | 
Definition at line 109 of file thread_id.hpp.
| 
 | inlinenoexcept | 
Helper to output the priority with zpp::print("{}", prio)
| prio | The priority to print | 
Definition at line 257 of file thread_prio.hpp.
| 
 | inlinenoexcept | 
Lock the scheduler.
Definition at line 18 of file sched.hpp.
Referenced by zpp::sched_lock_guard::sched_lock_guard().
| 
 | inlinenoexcept | 
Unlock the scheduler.
Definition at line 26 of file sched.hpp.
Referenced by zpp::sched_lock_guard::~sched_lock_guard().
| 
 | constexprnoexcept | 
Definition at line 102 of file error_code.hpp.
Referenced by zpp::thread::join(), zpp::mutex_base< T_Mutex >::lock(), zpp::condition_variable_base< T_ConditionVariable >::notify_all(), zpp::condition_variable_base< T_ConditionVariable >::notify_one(), zpp::thread::set_name(), zpp::mutex_base< T_Mutex >::try_lock(), zpp::mutex_base< T_Mutex >::try_lock_for(), zpp::condition_variable_base< T_ConditionVariable >::try_wait_for(), zpp::mutex_base< T_Mutex >::unlock(), and zpp::condition_variable_base< T_ConditionVariable >::wait().
| 
 | constexprnoexcept | 
convert a duration to tick
| d | the std::chrono::duration to convert | 
Definition at line 72 of file clock.hpp.
Referenced by zpp::thread_attr::set(), and to_timeout().
| 
 | constexprnoexcept | 
convert a duration to tick
| d | the std::chrono::duration to convert | 
Definition at line 88 of file clock.hpp.
References to_tick().
Referenced by zpp::this_thread::sleep_for(), zpp::this_thread::sleep_until(), zpp::timer_base::start(), zpp::mem_slab_base< T_MemSlab >::try_allocate_for(), zpp::base_heap< T_Heap >::try_allocate_for(), zpp::mutex_base< T_Mutex >::try_lock_for(), zpp::sys_mutex_base< T_Mutex >::try_lock_for(), zpp::poll_event_set< T_Size >::try_poll_for(), zpp::sem_base< T_Sem >::try_take_for(), zpp::futex_base< T_Futex >::try_wait_for(), and zpp::condition_variable_base< T_ConditionVariable >::try_wait_for().