mn_binaryqueue.hpp
Go to the documentation of this file.
1 /*
2 *This file is part of the Mini Thread Library (https://github.com/RoseLeBlood/MiniThread ).
3 *Copyright (c) 2020 Amber-Sophia Schroeck
4 *
5 *The Mini Thread Library is free software; you can redistribute it and/or modify
6 *it under the terms of the GNU Lesser General Public License as published by
7 *the Free Software Foundation, version 3, or (at your option) any later version.
8 
9 *The Mini Thread Library is distributed in the hope that it will be useful, but
10 *WITHOUT ANY WARRANTY; without even the implied warranty of
11 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 *General Public License for more details.
13 *
14 *You should have received a copy of the GNU Lesser General Public
15 *License along with the Mini Thread Library; if not, see
16 *<https://www.gnu.org/licenses/>.
17 */
18 #ifndef MINLIB_ESP32_BINQUEUE_
19 #define MINLIB_ESP32_BINQUEUE_
20 
21 #include "mn_queue.hpp"
22 
23 namespace mn {
24  namespace queue {
32  class basic_binaryqueue : public basic_queue {
33  public:
39  explicit basic_binaryqueue(unsigned int itemSize)
40  : basic_queue(1, itemSize) { }
50  virtual int enqueue(void *item, unsigned int timeout = -1);
51  };
52 
54  }
55 }
56 
57 #endif
Binary queue with overwrite. This queue can only hold one item. If sucessive Enqueue operations are c...
Definition: mn_binaryqueue.hpp:32
basic_binaryqueue(unsigned int itemSize)
Construct a new basic binaryqueue object.
Definition: mn_binaryqueue.hpp:39
virtual int enqueue(void *item, unsigned int timeout=-1)
Definition: mn_binaryqueue.cpp:34
Queue class wrapper for FreeRTOS queues.
Definition: queue/mn_queue.hpp:31
basic_queue< T, TMAXITEMS, TITEMSIZE > queue
Definition: container/mn_queue.hpp:239
Definition: mn_allocator_typetraits.hpp:25