MIP_SDK  v3.0.0-187-g93c7302
MicroStrain Communications Library for embedded systems
Classes | Namespaces | Macros | Functions
mip_meta_utils.hpp File Reference
#include "mip_structures.hpp"

Go to the source code of this file.

Classes

struct  mip::metadata::utils::ParamType< T, class >
 
struct  mip::metadata::utils::ParamType< char, void >
 
struct  mip::metadata::utils::ParamType< bool, void >
 
struct  mip::metadata::utils::ParamType< uint8_t, void >
 
struct  mip::metadata::utils::ParamType< int8_t, void >
 
struct  mip::metadata::utils::ParamType< uint16_t, void >
 
struct  mip::metadata::utils::ParamType< int16_t, void >
 
struct  mip::metadata::utils::ParamType< uint32_t, void >
 
struct  mip::metadata::utils::ParamType< int32_t, void >
 
struct  mip::metadata::utils::ParamType< uint64_t, void >
 
struct  mip::metadata::utils::ParamType< int64_t, void >
 
struct  mip::metadata::utils::ParamType< float, void >
 
struct  mip::metadata::utils::ParamType< double, void >
 
struct  mip::metadata::utils::ParamType< Bitfield< T >, void >
 
struct  mip::metadata::utils::ParamType< T, typename std::enable_if< std::is_enum< T >::value, T >::type >
 
struct  mip::metadata::utils::ParamType< T, typename EnableForFieldTypes< T >::type >
 
struct  mip::metadata::utils::ParamType< T, typename std::enable_if< std::is_union< T >::value, T >::type >
 
struct  mip::metadata::utils::ParamEnum< Kind >
 
struct  mip::metadata::utils::ParamEnum< Type::CHAR >
 
struct  mip::metadata::utils::ParamEnum< Type::BOOL >
 
struct  mip::metadata::utils::ParamEnum< Type::U8 >
 
struct  mip::metadata::utils::ParamEnum< Type::S8 >
 
struct  mip::metadata::utils::ParamEnum< Type::U16 >
 
struct  mip::metadata::utils::ParamEnum< Type::S16 >
 
struct  mip::metadata::utils::ParamEnum< Type::U32 >
 
struct  mip::metadata::utils::ParamEnum< Type::S32 >
 
struct  mip::metadata::utils::ParamEnum< Type::U64 >
 
struct  mip::metadata::utils::ParamEnum< Type::S64 >
 
struct  mip::metadata::utils::ParamEnum< Type::FLOAT >
 
struct  mip::metadata::utils::ParamEnum< Type::DOUBLE >
 

Namespaces

 mip
 A collection of C++ classes and functions covering the full mip api.
 
 
 

Macros

#define GET_MIP_METADATA_PARAM_INFO(MipType, MemberField)   mip::metadata::utils::getParameterInfoFromStructMemberOffset(offsetof(MipType, MemberField), mip::metadata::MetadataFor<MipType>().value)
 Get a pointer to a parameter given the offset of the member in the class/struct. More...
 

Functions

template<class Field , class T , auto Ptr>
void * mip::metadata::utils::access (void *p)
 
Type mip::metadata::utils::serializedType (const TypeInfo &type)
 Determines the type used for serialization purposes. More...
 
constexpr size_t mip::metadata::utils::serializedSizeForBasicType (Type type, const void *info=nullptr)
 Gets the size of a basic type (including bitfields and enums if class_ is not NULL). More...
 
constexpr size_t mip::metadata::utils::serializedSizeForBasicType (const TypeInfo &type)
 
constexpr const char * mip::metadata::utils::nameForBasicType (Type type)
 
constexpr const char * mip::metadata::utils::nameOfType (const TypeInfo &type)
 
constexpr size_t mip::metadata::utils::sizeForBasicType (const Type type, const void *info=nullptr)
 Gets the size of a basic type (including bitfields and enums if info is not NULL). More...
 
constexpr size_t mip::metadata::utils::sizeForBasicType (const TypeInfo &type)
 
constexpr size_t mip::metadata::utils::alignmentForBasicType (const Type type, const void *info=nullptr)
 Gets the size of a basic type (including bitfields and enums if info is not NULL). More...
 
constexpr size_t mip::metadata::utils::alignmentForBasicType (const TypeInfo &type)
 
const ParameterInfo * mip::metadata::utils::getParameterInfoFromStructMemberOffset (const size_t offset, const FieldInfo &field_info)
 Get a pointer to a parameter given the offset of the member in the class/struct. More...
 

Macro Definition Documentation

◆ GET_MIP_METADATA_PARAM_INFO

#define GET_MIP_METADATA_PARAM_INFO (   MipType,
  MemberField 
)    mip::metadata::utils::getParameterInfoFromStructMemberOffset(offsetof(MipType, MemberField), mip::metadata::MetadataFor<MipType>().value)

Get a pointer to a parameter given the offset of the member in the class/struct.

Warning
This does not work for nested types, I.E. ClassType.member1.member2
Parameters
MipTypeMIP struct/class
MemberFieldThe member field within the MIP struct/class
See also
mip::metadata::utils::getParameterInfoFromStructMemberOffset
Returns
A pointer to the parameter info if found, otherwise nullptr