StateOS
Loading...
Searching...
No Matches
stateos::MemoryPoolTT< limit_, C > Struct Template Reference

create and initialize a memory pool object More...

#include <osmemorypool.h>

Inheritance diagram for stateos::MemoryPoolTT< limit_, C >:
stateos::MemoryPoolT< limit_, sizeof(C)>

Public Types

using Ptr = std::unique_ptr<MemoryPoolTT<limit_, C>>
 result type of Create()

Public Member Functions

 MemoryPoolTT ()
 constructor, see the constructor parameters of the class
int take (C **_data)
 mem_take()
int tryWait (C **_data)
 mem_tryWait()
int takeISR (C **_data)
 mem_takeISR()
template<typename T>
int waitFor (C **_data, const T &_delay)
 mem_waitFor()
template<typename T>
int waitUntil (C **_data, const T &_time)
 mem_waitUntil()
int wait (C **_data)
 mem_wait()

Static Public Member Functions

static Ptr Create ()
 create dynamic object with manageable resources

Detailed Description

template<unsigned limit_, class C>
struct stateos::MemoryPoolTT< limit_, C >

create and initialize a memory pool object

Constructor parameters
  • limit: size of a buffer (max number of objects)
  • C: class of a memory object

Member Function Documentation

◆ Create()

template<unsigned limit_, class C>
Ptr stateos::MemoryPoolTT< limit_, C >::Create ( )
inlinestatic

create dynamic object with manageable resources

Parameters
  • limit: size of a buffer (max number of objects)
  • C: class of a memory object
Returns
std::unique_pointer / pointer to MemoryPoolTT<> object
Note
use only in thread mode

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