MIP_SDK  v3.0.0-192-g8bd7933
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_NESTED_PARAM_INFO(MemberParameter, NestedMemberField)
 Get a pointer to a parameter given the member of a nested class/struct. More...
 
#define GET_MIP_METADATA_PARAM_INFO(MipType, MemberField)
 Get a pointer to a parameter given the member of a 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 void mip::metadata::utils::getOffsetForAlignment (const TypeInfo &type, size_t &current_offset)
 
constexpr size_t mip::metadata::utils::sizeForBasicType (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::alignmentForBasicType (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...
 
const ParameterInfo * mip::metadata::utils::getParameterInfoFromStructMemberOffset (const size_t offset, const StructInfo &field_info)
 Get a pointer to a parameter given the offset of the member in the class/struct. More...
 
const ParameterInfo * mip::metadata::utils::getNestedParameterInfoFromStructMemberOffset (const size_t base_offset, const size_t nested_offset, const StructInfo &field_info)
 Get a pointer to a parameter given the offset of the member in the class/struct. More...
 
const ParameterInfo * mip::metadata::utils::getParameterInfoForMember (const StructInfo &struct_info, const char *param_name, const size_t dummy=0)
 Get a pointer to a parameter given the member of a MIP type. More...
 

Macro Definition Documentation

◆ GET_MIP_METADATA_NESTED_PARAM_INFO

#define GET_MIP_METADATA_NESTED_PARAM_INFO (   MemberParameter,
  NestedMemberField 
)
Value:
mip::metadata::utils::getParameterInfoForMember(mip::metadata::MetadataFor<decltype(MemberParameter)>::value, #NestedMemberField, \
offsetof(decltype(MemberParameter), NestedMemberField))

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

Parameters
MemberParameterMember parameter to get the type of which has metadata
NestedMemberFieldThe member field within the nested parameter type
See also
mip::metadata::utils::getParameterInfoForMember
Returns
A pointer to the parameter info if found, otherwise nullptr

◆ GET_MIP_METADATA_PARAM_INFO

#define GET_MIP_METADATA_PARAM_INFO (   MipType,
  MemberField 
)
Value:

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

Parameters
MipTypeMIP type that has metadata
MemberFieldThe member field within the MIP type
See also
mip::metadata::utils::getParameterInfoForMember
Returns
A pointer to the parameter info if found, otherwise nullptr
mip::metadata::utils::getParameterInfoForMember
const ParameterInfo * getParameterInfoForMember(const StructInfo &struct_info, const char *param_name, const size_t dummy=0)
Get a pointer to a parameter given the member of a MIP type.
Definition: mip_meta_utils.hpp:534
mip::metadata::MetadataFor
Definition: mip_metadata.hpp:15