merged new changes
This commit is contained in:
parent
2158208a2f
commit
bb5de8f110
@ -4,10 +4,15 @@
|
||||
#include <framework/container/FIFOBase.h>
|
||||
#include <vector>
|
||||
|
||||
namespace fsfw {
|
||||
|
||||
/**
|
||||
* @brief Simple First-In-First-Out data structure. The maximum size
|
||||
* can be set in the constructor. THe public interface of
|
||||
* FIFOBase exposes the user interface for the FIFO.
|
||||
* can be set in the constructor.
|
||||
* @details
|
||||
* The maximum capacity can be determined at run-time, so this container
|
||||
* performs dynamic memory allocation!
|
||||
* The public interface of FIFOBase exposes the user interface for the FIFO.
|
||||
* @tparam T Entry Type
|
||||
* @tparam capacity Maximum capacity
|
||||
*/
|
||||
@ -23,4 +28,6 @@ private:
|
||||
std::vector<T> values;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* FRAMEWORK_CONTAINER_FIFO_H_ */
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include <framework/returnvalues/HasReturnvaluesIF.h>
|
||||
#include <cstddef>
|
||||
|
||||
namespace fsfw {
|
||||
|
||||
template <typename T>
|
||||
class FIFOBase {
|
||||
public:
|
||||
@ -11,8 +13,8 @@ public:
|
||||
static const ReturnValue_t FULL = MAKE_RETURN_CODE(1);
|
||||
static const ReturnValue_t EMPTY = MAKE_RETURN_CODE(2);
|
||||
|
||||
|
||||
/** Default ctor, no input arguments required. */
|
||||
/** Default ctor, takes pointer to first entry of underlying container
|
||||
* and maximum capacity */
|
||||
FIFOBase(T* values, const size_t maxCapacity);
|
||||
|
||||
/**
|
||||
@ -56,4 +58,6 @@ private:
|
||||
|
||||
#include <framework/container/FIFOBase.tpp>
|
||||
|
||||
}
|
||||
|
||||
#endif /* FRAMEWORK_CONTAINER_FIFOBASE_H_ */
|
||||
|
@ -3,11 +3,16 @@
|
||||
|
||||
#include <framework/returnvalues/HasReturnvaluesIF.h>
|
||||
#include <framework/container/FIFOBase.h>
|
||||
#include <array>
|
||||
|
||||
namespace fsfw {
|
||||
|
||||
/**
|
||||
* @brief Simple First-In-First-Out data structure with size fixed at
|
||||
* compile time. The public interface of FIFOBase exposes
|
||||
* the user interface for the FIFO.
|
||||
* compile time
|
||||
* @details
|
||||
* Performs no dynamic memory allocation.
|
||||
* The public interface of FIFOBase exposes the user interface for the FIFO.
|
||||
* @tparam T Entry Type
|
||||
* @tparam capacity Maximum capacity
|
||||
*/
|
||||
@ -20,4 +25,6 @@ private:
|
||||
std::array<T, capacity> values;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* FRAMEWORK_CONTAINERS_STATICFIFO_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user