flux sdk  v01.02.02-3-g292b3a7
Embedded C++ SDK
Loading...
Searching...
No Matches
flxCoreTypes.h File Reference
#include <functional>
#include <map>
#include <string.h>
#include <string>
#include <type_traits>
#include <vector>
#include "flxCoreLog.h"
#include "flxUtils.h"
#include "Arduino.h"

Classes

class  flxDescriptor
 Represents a descriptor object with name, description, and title. More...
 
union  flxDataAllType_t
 A union that can hold any of the basic data types used in the framework. More...
 
class  flxDataVariable
 A class that can hold any of the basic data types used in the framework. It supports the getting and setting of values based on type. Additionally it can check quality (based on type and value) and convert the value to a string. More...
 
class  flxDataArray
 This class is used as a base class for the templated array classes. More...
 
class  flxDataArrayType< T >
 A templated class to define an array class of a specific type. More...
 
class  flxDataArrayString
 A string array class. More...
 
struct  flxPersist
 Defines a basic persistance interface for the framework. More...
 
class  flxDataOut
 Defines the interface for getting data from an object. More...
 
class  _flxDataOut< T >
 A template DataOut class that returns values of the templated type. More...
 
class  _flxDataOutString
 
class  flxDataLimitDesc
 
class  flxDataLimit
 
class  flxDataLimitType< T >
 
class  flxDataLimitRange< T >
 
class  flxDataLimitSetType< T >
 
class  flxDataIn
 
class  _flxDataIn< T >
 
class  _flxDataInString
 

Macros

#define kflxTypeIDNone   0
 

Typedefs

using flxDataArrayBool = flxDataArrayType< bool >
 A boolean array class. More...
 
using flxDataArrayInt8 = flxDataArrayType< int8_t >
 An int8_t array class. More...
 
using flxDataArrayInt16 = flxDataArrayType< int16_t >
 An int16_t array class. More...
 
using flxDataArrayInt32 = flxDataArrayType< int32_t >
 An int32_t array class. More...
 
using flxDataArrayUInt8 = flxDataArrayType< uint8_t >
 A uint8_t array class. More...
 
using flxDataArrayUInt16 = flxDataArrayType< uint16_t >
 A uint16_t array class. More...
 
using flxDataArrayUInt32 = flxDataArrayType< uint32_t >
 A uint32_t array class. More...
 
using flxDataArrayFloat = flxDataArrayType< float >
 A float array class. More...
 
using flxDataArrayDouble = flxDataArrayType< double >
 A double array class. More...
 
using flxDataLimitList = std::vector< flxDataLimitDesc >
 
using flxDataLimitRangeInt8 = flxDataLimitRange< int8_t >
 
using flxDataLimitRangeInt16 = flxDataLimitRange< int16_t >
 
using flxDataLimitRangeInt32 = flxDataLimitRange< int32_t >
 
using flxDataLimitRangeUInt8 = flxDataLimitRange< uint8_t >
 
using flxDataLimitRangeUInt16 = flxDataLimitRange< uint16_t >
 
using flxDataLimitRangeUInt32 = flxDataLimitRange< uint32_t >
 
using flxDataLimitRangeFloat = flxDataLimitRange< float >
 
using flxDataLimitRangeDouble = flxDataLimitRange< double >
 
using flxDataLimitSetInt8 = flxDataLimitSetType< int8_t >
 
using flxDataLimitSetInt16 = flxDataLimitSetType< int16_t >
 
using flxDataLimitSetInt32 = flxDataLimitSetType< int32_t >
 
using flxDataLimitSetUInt8 = flxDataLimitSetType< uint8_t >
 
using flxDataLimitSetUInt16 = flxDataLimitSetType< uint16_t >
 
using flxDataLimitSetUInt32 = flxDataLimitSetType< uint32_t >
 
using flxDataLimitSetFloat = flxDataLimitSetType< float >
 
using flxDataLimitSetDouble = flxDataLimitSetType< double >
 
using flxDataLimitSetString = flxDataLimitSetType< std::string >
 
typedef uint32_t flxTypeID
 

Enumerations

enum  flxDataType_t : std::uint8_t {
  flxTypeNone = 0x00 , flxTypeBool = 0x0A , flxTypeInt8 = 0x11 , flxTypeUInt8 = 0x01 ,
  flxTypeInt16 = 0x12 , flxTypeUInt16 = 0x02 , flxTypeInt32 = 0x14 , flxTypeUInt32 = 0x04 ,
  flxTypeFloat = 0x24 , flxTypeDouble = 0x28 , flxTypeString = 0x21
}
 Enumeration of data types - used throughout the framework. More...
 
enum  flxDataLimit_t { flxDataLimitTypeNone = 0 , flxDataLimitTypeRange , flxDataLimitTypeSet }
 

Functions

template<typename T , typename std::enable_if< std::is_integral< T >::value, void * >::type = nullptr>
constexpr flxDataType_t flxGetTypeOf ()
 
template<typename T >
constexpr flxDataType_t flxGetTypeOf (const T &)
 
const char * flxGetTypeName (flxDataType_t type)
 Return the name of the data type as a constant string. More...
 
template<typename T >
flxTypeID flxGetClassTypeID ()
 

Variables

const flxDataType_t flxDataTypeArray []
 

Macro Definition Documentation

◆ kflxTypeIDNone

#define kflxTypeIDNone   0

Typedef Documentation

◆ flxDataArrayBool

A boolean array class.

◆ flxDataArrayDouble

A double array class.

◆ flxDataArrayFloat

A float array class.

◆ flxDataArrayInt16

An int16_t array class.

◆ flxDataArrayInt32

An int32_t array class.

◆ flxDataArrayInt8

An int8_t array class.

◆ flxDataArrayUInt16

A uint16_t array class.

◆ flxDataArrayUInt32

A uint32_t array class.

◆ flxDataArrayUInt8

A uint8_t array class.

◆ flxDataLimitList

using flxDataLimitList = std::vector<flxDataLimitDesc>

◆ flxDataLimitRangeDouble

◆ flxDataLimitRangeFloat

◆ flxDataLimitRangeInt16

◆ flxDataLimitRangeInt32

◆ flxDataLimitRangeInt8

◆ flxDataLimitRangeUInt16

◆ flxDataLimitRangeUInt32

◆ flxDataLimitRangeUInt8

◆ flxDataLimitSetDouble

◆ flxDataLimitSetFloat

◆ flxDataLimitSetInt16

◆ flxDataLimitSetInt32

◆ flxDataLimitSetInt8

◆ flxDataLimitSetString

◆ flxDataLimitSetUInt16

◆ flxDataLimitSetUInt32

◆ flxDataLimitSetUInt8

◆ flxTypeID

typedef uint32_t flxTypeID

Enumeration Type Documentation

◆ flxDataLimit_t

Enumerator
flxDataLimitTypeNone 
flxDataLimitTypeRange 
flxDataLimitTypeSet 

◆ flxDataType_t

enum flxDataType_t : std::uint8_t

Enumeration of data types - used throughout the framework.

Note
: The number used for the datatype codes is based on the sizeof() value and other attributes determined at compile time.

This is something picked up from the NVS system of esp32 - solid hack.

Enumerator
flxTypeNone 
flxTypeBool 
flxTypeInt8 
flxTypeUInt8 
flxTypeInt16 
flxTypeUInt16 
flxTypeInt32 
flxTypeUInt32 
flxTypeFloat 
flxTypeDouble 
flxTypeString 

Function Documentation

◆ flxGetClassTypeID()

template<typename T >
flxTypeID flxGetClassTypeID ( )

◆ flxGetTypeName()

const char * flxGetTypeName ( flxDataType_t  type)

Return the name of the data type as a constant string.

Parameters
typeThe datatype to get the name of.
Returns
const char*

◆ flxGetTypeOf() [1/2]

template<typename T , typename std::enable_if< std::is_integral< T >::value, void * >::type = nullptr>
constexpr flxDataType_t flxGetTypeOf ( )
constexpr

◆ flxGetTypeOf() [2/2]

template<typename T >
constexpr flxDataType_t flxGetTypeOf ( const T &  )
constexpr

Variable Documentation

◆ flxDataTypeArray

const flxDataType_t flxDataTypeArray[]
Initial value:
@ flxTypeString
Definition: flxCoreTypes.h:281
@ flxTypeUInt16
Definition: flxCoreTypes.h:276
@ flxTypeUInt32
Definition: flxCoreTypes.h:278
@ flxTypeInt16
Definition: flxCoreTypes.h:275
@ flxTypeDouble
Definition: flxCoreTypes.h:280
@ flxTypeInt8
Definition: flxCoreTypes.h:273
@ flxTypeFloat
Definition: flxCoreTypes.h:279
@ flxTypeNone
Definition: flxCoreTypes.h:271
@ flxTypeBool
Definition: flxCoreTypes.h:272
@ flxTypeInt32
Definition: flxCoreTypes.h:277
@ flxTypeUInt8
Definition: flxCoreTypes.h:274