#include <ISDataMappings.h>
|
static bool | CanGetFieldData (const data_info_t &info, const p_data_hdr_t *hdr, const uint8_t *buf, const uint8_t *&ptr) |
|
static bool | DataToString (const data_info_t &info, const p_data_hdr_t *hdr, const uint8_t *dataBuffer, data_mapping_string_t stringBuffer, bool json=false) |
|
static const char * | GetDataSetName (uint32_t dataId) |
|
static const map_name_to_info_t * | GetMapInfo (uint32_t dataId) |
|
static uint32_t | GetSize (uint32_t dataId) |
|
static double | GetTimestamp (const p_data_hdr_t *hdr, const uint8_t *buf) |
|
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) |
|
Definition at line 138 of file ISDataMappings.h.
◆ ~cISDataMappings()
cISDataMappings::~cISDataMappings |
( |
| ) |
|
|
virtual |
◆ cISDataMappings()
cISDataMappings::cISDataMappings |
( |
| ) |
|
|
private |
◆ CanGetFieldData()
bool cISDataMappings::CanGetFieldData |
( |
const data_info_t & |
info, |
|
|
const p_data_hdr_t * |
hdr, |
|
|
const uint8_t * |
buf, |
|
|
const uint8_t *& |
ptr |
|
) |
| |
|
static |
Check whether field data can be retrieved given a data packet
- Parameters
-
info | metadata for the field to get |
hdr | packet header |
buf | packet buffer |
ptr | receives the offset to get data at if the return value is true |
- Returns
- true if the data can be retrieved, false otherwise
Definition at line 2262 of file ISDataMappings.cpp.
◆ DataToString()
Convert data to a string
- Parameters
-
info | metadata about the field to convert |
hdr | packet header, NULL means dataBuffer is the entire data structure |
dataBuffer | packet buffer |
stringBuffer | the buffer to hold the converted string |
json | true if json, false if csv |
- Returns
- true if success, false if error
Definition at line 2071 of file ISDataMappings.cpp.
◆ GetDataSetName()
const char * cISDataMappings::GetDataSetName |
( |
uint32_t |
dataId | ) |
|
|
static |
Get a data set name from an id
- Parameters
-
dataId | the data id to get a data set name from |
- Returns
- data set name or NULL if not found
Definition at line 1801 of file ISDataMappings.cpp.
◆ GetMapInfo()
Get the info for a data id
- Returns
- the info for the data id, or NULL if none found
Definition at line 1913 of file ISDataMappings.cpp.
◆ GetSize()
uint32_t cISDataMappings::GetSize |
( |
uint32_t |
dataId | ) |
|
|
static |
Get the size of a given data id
- Parameters
-
- Returns
- the data id size or 0 if not found or unknown
Definition at line 1943 of file ISDataMappings.cpp.
◆ GetTimestamp()
double cISDataMappings::GetTimestamp |
( |
const p_data_hdr_t * |
hdr, |
|
|
const uint8_t * |
buf |
|
) |
| |
|
static |
Get a timestamp from data if available
- Parameters
-
hdr | data header |
buf | data buffer |
- Returns
- timestamp, or 0.0 if no timestamp available
Definition at line 2202 of file ISDataMappings.cpp.
◆ StringToData()
bool cISDataMappings::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 |
|
) |
| |
|
static |
Convert a string to a data field
- Parameters
-
stringBuffer | the null terminated string to convert, must not be NULL |
stringLength | the number of chars in stringBuffer |
hdr | packet header, NULL means dataBuffer is the entire data structure |
dataBuffer | packet buffer |
info | metadata about the field to convert |
radix | (base 10, base 16, etc.) to use if the field is a number field, ignored otherwise |
json | true if json, false if csv |
- Returns
- true if success, false if error
Definition at line 1968 of file ISDataMappings.cpp.
◆ m_lookupInfo
◆ m_lookupSize
uint32_t cISDataMappings::m_lookupSize[DID_COUNT] |
|
private |
◆ m_timestampFields
◆ s_map
The documentation for this class was generated from the following files: