Merge pull request 'type update' (#304) from KSat/fsfw:mueller/type into development
Reviewed-on: fsfw/fsfw#304
This commit is contained in:
commit
4e6aa3128b
@ -1,4 +1,3 @@
|
||||
#include "../serialize/SerializeAdapter.h"
|
||||
#include "Type.h"
|
||||
#include "../serialize/SerializeAdapter.h"
|
||||
|
||||
|
@ -1,9 +1,13 @@
|
||||
#ifndef TYPE_H_
|
||||
#define TYPE_H_
|
||||
#ifndef FSFW_GLOBALFUNCTIONS_TYPE_H_
|
||||
#define FSFW_GLOBALFUNCTIONS_TYPE_H_
|
||||
|
||||
#include "../returnvalues/HasReturnvaluesIF.h"
|
||||
#include "../serialize/SerializeIF.h"
|
||||
#include <type_traits>
|
||||
|
||||
/**
|
||||
* @brief Type definition for CCSDS or ECSS.
|
||||
*/
|
||||
class Type: public SerializeIF {
|
||||
public:
|
||||
enum ActualType_t {
|
||||
@ -53,6 +57,11 @@ private:
|
||||
|
||||
template<typename T>
|
||||
struct PodTypeConversion {
|
||||
static_assert(not std::is_same<T, bool>::value,
|
||||
"Do not use boolean for the PoolEntry type, use uint8_t "
|
||||
"instead! The ECSS standard defines a boolean as a one bit "
|
||||
"field. Therefore it is preferred to store a boolean as an "
|
||||
"uint8_t");
|
||||
static const Type::ActualType_t type = Type::UNKNOWN_TYPE;
|
||||
};
|
||||
template<>
|
||||
@ -88,4 +97,4 @@ struct PodTypeConversion<double> {
|
||||
static const Type::ActualType_t type = Type::DOUBLE;
|
||||
};
|
||||
|
||||
#endif /* TYPE_H_ */
|
||||
#endif /* FSFW_GLOBALFUNCTIONS_TYPE_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user