distortos  v0.5.0
object-oriented C++ RTOS for microcontrollers
distortos::internal::SemaphoreTryWaitForFunctor Class Reference

SemaphoreTryWaitForFunctor class is a SemaphoreFunctor which calls Semaphore::tryWaitFor() with bound duration. More...

#include <SemaphoreTryWaitForFunctor.hpp>

Inheritance diagram for distortos::internal::SemaphoreTryWaitForFunctor:
[legend]
Collaboration diagram for distortos::internal::SemaphoreTryWaitForFunctor:
[legend]

Public Member Functions

constexpr SemaphoreTryWaitForFunctor (const TickClock::duration duration)
 SemaphoreTryWaitForFunctor's constructor. More...
 
int operator() (Semaphore &semaphore) const override
 Calls Semaphore::tryWaitFor() with bound duration. More...
 

Private Attributes

const TickClock::duration duration_
 bound duration for Semaphore::tryWaitFor() call More...
 

Detailed Description

SemaphoreTryWaitForFunctor class is a SemaphoreFunctor which calls Semaphore::tryWaitFor() with bound duration.

Constructor & Destructor Documentation

◆ SemaphoreTryWaitForFunctor()

constexpr distortos::internal::SemaphoreTryWaitForFunctor::SemaphoreTryWaitForFunctor ( const TickClock::duration  duration)
inlineexplicit

SemaphoreTryWaitForFunctor's constructor.

Parameters
[in]durationis the bound duration for Semaphore::tryWaitFor() call
Here is the call graph for this function:

Member Function Documentation

◆ operator()()

int distortos::internal::SemaphoreTryWaitForFunctor::operator() ( Semaphore semaphore) const
override

Calls Semaphore::tryWaitFor() with bound duration.

Parameters
[in]semaphoreis a reference to Semaphore object for which Semaphore::tryWaitFor() will be called
Returns
value returned by Semaphore::tryWaitFor()
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ duration_

const TickClock::duration distortos::internal::SemaphoreTryWaitForFunctor::duration_
private

bound duration for Semaphore::tryWaitFor() call


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