zpp
Zephyr C++20 Framework
zpp::poll_signal_ref Class Reference

class wrapping a k_poll_signal More...

#include <poll_signal.hpp>

Inheritance diagram for zpp::poll_signal_ref:
[legend]
Collaboration diagram for zpp::poll_signal_ref:
[legend]

Public Member Functions

 poll_signal_ref (native_pointer s) noexcept
 create a wrapper around a k_poll_signal More...
 
template<typename T_PollSignal >
 poll_signal_ref (T_PollSignal &s) noexcept
 create a wrapper around a k_poll_signal More...
 
poll_signal_refoperator= (native_pointer s) noexcept
 create a wrapper around a k_poll_signal More...
 
template<typename T_PollSignal >
poll_signal_refoperator= (T_PollSignal &s) noexcept
 create a wrapper around a k_poll_signal More...
 
auto native_handle () noexcept -> native_pointer
 get the native k_poll_signal handle More...
 
auto native_handle () const noexcept -> native_const_pointer
 get the native k_poll_signal handle More...
 
 poll_signal_ref ()=delete
 
- Public Member Functions inherited from zpp::poll_signal_base< poll_signal_ref >
 poll_signal_base (const poll_signal_base &)=delete
 
 poll_signal_base (poll_signal_base &&)=delete
 
std::optional< int > check () noexcept
 check if the signal was signaled More...
 
bool raise (int result) noexcept
 signal the signal More...
 
void reset () noexcept
 reset the state to non-signalled More...
 
auto native_handle () noexcept -> native_pointer
 get the native k_poll_signal handle More...
 
auto native_handle () const noexcept -> native_const_pointer
 get the native k_poll_signal handle More...
 
poll_signal_baseoperator= (const poll_signal_base &)=delete
 
poll_signal_baseoperator= (poll_signal_base &&)=delete
 

Additional Inherited Members

- Public Types inherited from zpp::poll_signal_base< poll_signal_ref >
using native_type = struct k_poll_signal
 
using native_pointer = native_type *
 
using native_const_pointer = native_type const *
 
- Protected Member Functions inherited from zpp::poll_signal_base< poll_signal_ref >
 poll_signal_base () noexcept
 default contructor only to be used by derived classes More...
 

Detailed Description

class wrapping a k_poll_signal

Definition at line 155 of file poll_signal.hpp.

Constructor & Destructor Documentation

◆ poll_signal_ref() [1/3]

zpp::poll_signal_ref::poll_signal_ref ( native_pointer  s)
inlinenoexcept

create a wrapper around a k_poll_signal

Parameters
sthe signal to wrap

Definition at line 164 of file poll_signal.hpp.

165  : m_signal_ptr(s)
166  {
167  __ASSERT_NO_MSG(m_signal_ptr != nullptr);
168  }

◆ poll_signal_ref() [2/3]

template<typename T_PollSignal >
zpp::poll_signal_ref::poll_signal_ref ( T_PollSignal &  s)
inlinenoexcept

create a wrapper around a k_poll_signal

Parameters
sthe signal to wrap

Definition at line 176 of file poll_signal.hpp.

177  : m_signal_ptr(s.native_handle())
178  {
179  __ASSERT_NO_MSG(m_signal_ptr != nullptr);
180  }

◆ poll_signal_ref() [3/3]

zpp::poll_signal_ref::poll_signal_ref ( )
delete

Member Function Documentation

◆ native_handle() [1/2]

auto zpp::poll_signal_ref::native_handle ( ) const -> native_const_pointer
inlinenoexcept

get the native k_poll_signal handle

Returns
pointer to a k_poll_signal

Definition at line 222 of file poll_signal.hpp.

223  {
224  return m_signal_ptr;
225  }

◆ native_handle() [2/2]

auto zpp::poll_signal_ref::native_handle ( ) -> native_pointer
inlinenoexcept

get the native k_poll_signal handle

Returns
pointer to a k_poll_signal

Definition at line 212 of file poll_signal.hpp.

213  {
214  return m_signal_ptr;
215  }

◆ operator=() [1/2]

poll_signal_ref& zpp::poll_signal_ref::operator= ( native_pointer  s)
inlinenoexcept

create a wrapper around a k_poll_signal

Parameters
sthe signal to wrap

Definition at line 187 of file poll_signal.hpp.

188  {
189  m_signal_ptr = s;
190  __ASSERT_NO_MSG(m_signal_ptr != nullptr);
191  return *this;
192  }

◆ operator=() [2/2]

template<typename T_PollSignal >
poll_signal_ref& zpp::poll_signal_ref::operator= ( T_PollSignal &  s)
inlinenoexcept

create a wrapper around a k_poll_signal

Parameters
sthe signal to wrap

Definition at line 200 of file poll_signal.hpp.

201  {
202  m_signal_ptr = s.native_handle();
203  __ASSERT_NO_MSG(m_signal_ptr != nullptr);
204  return *this;
205  }

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