put FIFO in namespace, fixed doc

This commit is contained in:
Robin Müller 2020-07-06 13:38:11 +02:00
parent 991385de65
commit b699c8b2b3
4 changed files with 19 additions and 5 deletions

View File

@ -4,6 +4,8 @@
#include <framework/container/FIFOBase.h> #include <framework/container/FIFOBase.h>
#include <vector> #include <vector>
namespace fifo {
/** /**
* @brief Simple First-In-First-Out data structure. The maximum size * @brief Simple First-In-First-Out data structure. The maximum size
* can be set in the constructor. THe public interface of * can be set in the constructor. THe public interface of
@ -23,4 +25,6 @@ private:
std::vector<T> values; std::vector<T> values;
}; };
}
#endif /* FRAMEWORK_CONTAINER_FIFO_H_ */ #endif /* FRAMEWORK_CONTAINER_FIFO_H_ */

View File

@ -4,6 +4,8 @@
#include <framework/returnvalues/HasReturnvaluesIF.h> #include <framework/returnvalues/HasReturnvaluesIF.h>
#include <cstddef> #include <cstddef>
namespace fsfw {
template <typename T> template <typename T>
class FIFOBase { class FIFOBase {
public: public:
@ -11,8 +13,8 @@ public:
static const ReturnValue_t FULL = MAKE_RETURN_CODE(1); static const ReturnValue_t FULL = MAKE_RETURN_CODE(1);
static const ReturnValue_t EMPTY = MAKE_RETURN_CODE(2); static const ReturnValue_t EMPTY = MAKE_RETURN_CODE(2);
/** Default ctor, takes pointer to first entry of underlying container
/** Default ctor, no input arguments required. */ * and maximum capacity */
FIFOBase(T* values, const size_t maxCapacity); FIFOBase(T* values, const size_t maxCapacity);
/** /**
@ -56,4 +58,6 @@ private:
#include <framework/container/FIFOBase.tpp> #include <framework/container/FIFOBase.tpp>
}
#endif /* FRAMEWORK_CONTAINER_FIFOBASE_H_ */ #endif /* FRAMEWORK_CONTAINER_FIFOBASE_H_ */

View File

@ -5,10 +5,14 @@
#include <framework/container/FIFOBase.h> #include <framework/container/FIFOBase.h>
#include <array> #include <array>
namespace fsfw {
/** /**
* @brief Simple First-In-First-Out data structure with size fixed at * @brief Simple First-In-First-Out data structure with size fixed at
* compile time. The public interface of FIFOBase exposes * compile time
* the user interface for the FIFO. * @details
* Performs no dynamic memory allocation.
* The public interface of FIFOBase exposes the user interface for the FIFO.
* @tparam T Entry Type * @tparam T Entry Type
* @tparam capacity Maximum capacity * @tparam capacity Maximum capacity
*/ */
@ -21,4 +25,6 @@ private:
std::array<T, capacity> values; std::array<T, capacity> values;
}; };
}
#endif /* FRAMEWORK_CONTAINERS_STATICFIFO_H_ */ #endif /* FRAMEWORK_CONTAINERS_STATICFIFO_H_ */

View File

@ -179,7 +179,7 @@ protected:
uint32_t state; uint32_t state;
Command_t command; Command_t command;
object_id_t objectId; object_id_t objectId;
StaticFIFO<store_address_t, 3> fifo; fsfw::StaticFIFO<store_address_t, 3> fifo;
}; };
const uint16_t apid; const uint16_t apid;