mn_convar_task.hpp
Go to the documentation of this file.
1 
19 #ifndef MINLIB_ESP32_CON_THREAD_
20 #define MINLIB_ESP32_CON_THREAD_
21 
22 #include "mn_config.hpp"
23 
29 #if MN_THREAD_CONFIG_CONDITION_VARIABLE_SUPPORT == MN_THREAD_CONFIG_YES
30 
31 
32 #include "mn_task.hpp"
33 #include "mn_convar.hpp"
34 
35 namespace mn {
36  namespace ext {
50  public:
59  basic_convar_task(std::string strName, basic_task::priority uiPriority,
60  unsigned short usStackDepth = MN_THREAD_CONFIG_MINIMAL_STACK_SIZE);
61 
65  virtual void signal();
66 
80  virtual int wait(convar_t& cv, mutex_t& cvl, TickType_t timeOut = portMAX_DELAY);
81  protected:
85  virtual void on_signal() { }
86  private:
93  };
94 
96 
97  }
98 }
99 #endif
100 
101 #endif
Definition: mn_binary_semaphore.hpp:29
Definition: mn_mutex.hpp:37
Wrapper class around FreeRTOS's implementation of a task.
Definition: mn_task.hpp:88
priority
Task priority.
Definition: mn_task.hpp:93
Definition: mn_convar.hpp:55
Definition: mn_convar_task.hpp:42
virtual void signal()
Definition: mn_convar_task.cpp:45
virtual int wait(convar_t &cv, mutex_t &cvl, TickType_t timeOut=portMAX_DELAY)
Definition: mn_convar_task.cpp:57
basic_convar_task()
Definition: mn_convar_task.cpp:27
virtual void on_signal()
Definition: mn_convar_task.hpp:85
binary_semaphore_t m_waitSem
Definition: mn_convar_task.hpp:92
#define portMAX_DELAY
Definition: mn_autolock.hpp:34
#define MN_THREAD_CONFIG_MINIMAL_STACK_SIZE
Definition: mn_config.hpp:219
Definition: mn_allocator_typetraits.hpp:25