13 #ifndef __ISDATAMAPPINGS_H_ 14 #define __ISDATAMAPPINGS_H_ 35 #if !PLATFOM_IS_EMBEDDED 48 bool operator() (
const unsigned char& c1,
const unsigned char& c2)
const 71 bool operator() (
const std::string& s1,
const std::string& s2)
const 79 const char* ptr1 = s1.c_str();
80 const char* ptr2 = s2.c_str();
81 size_t size1 = s1.size();
82 size_t size2 = s2.size();
83 int sizeDiff = (int)size1 - (
int)size2;
87 size_t minSize = size2 + (sizeDiff & (sizeDiff >> (
sizeof(int) *
CHAR_BIT - 1)));
89 for (
size_t i = 0; i < minSize; i++)
98 return (s1.size() < s2.size());
151 static const char* GetDataSetName(uint32_t dataId);
164 static uint32_t GetSize(uint32_t dataId);
177 static bool StringToData(
const char* stringBuffer,
int stringLength,
const p_data_hdr_t* hdr, uint8_t* dataBuffer,
const data_info_t& info,
int radix = 10,
bool json =
false);
196 static double GetTimestamp(
const p_data_hdr_t* hdr,
const uint8_t* buf);
206 static bool CanGetFieldData(
const data_info_t& info,
const p_data_hdr_t* hdr,
const uint8_t* buf,
const uint8_t*& ptr);
215 #if PLATFORM_IS_EMBEDDED 228 #endif // __ISDATAMAPPINGS_H_
static cISDataMappings s_map
char data_mapping_string_t[IS_DATA_MAPPING_MAX_STRING_LENGTH]
const unsigned char g_asciiToLowerMap[256]
#define IS_DATA_MAPPING_MAX_STRING_LENGTH
map< string, data_info_t, sCaseInsensitiveCompare > map_name_to_info_t
uint32_t GetDataTypeSize(eDataType dataType)