45 if (0 == strlen(pStr))
56 strcat(pStr, pDataTagStr);
58 strcat(pStr, pDataValue);
80 uint8_t *pData = pRecvData;
82 bool isReceivedStream =
false;
84 while (!isReceivedStream)
102 isReceivedStream =
true;
111 isReceivedStream =
true;
119 uint8_t *pData = pRecvData;
120 bool isReceivedStream =
false;
133 isReceivedStream =
true;
138 *(pData + *buffIndex) = data;
144 isReceivedStream =
true;
147 if (isReceivedStream ==
true)
166 memcpy(pMsg, pBuffer, size);
enum _json_format_ json_format_t
This structure holds information to receive a packet of data to the host.
typedef int32_t(DATA_FORMAT_Append_t))(void *pData
The interface function to append the data on the formated stream.
The format_json.h file describes the structures and definitions for the data-format standard JSON...
int32_t JSON_Get_Stream_NonBlockingCall(void *pRecvData, uint8_t data, uint8_t *state, uint8_t *buffIndex)
This function is a helper function to get json stream where the data length is unknown.
#define DATA_FORMAT_JSON_OK
uint8_t data[FXLS8962_DATA_SIZE]
int32_t JSON_Serialize(char *pStr, char *pDataTagStr, char *pDataValue, json_format_t type, bool end)
The function to serialize the data,.
size_t JSON_Process_Tx_Msg(const uint8_t *pBuffer, uint8_t *pMsg, size_t size)
const char * gpJsonFooter
comm_interface_t * pCommInterface
enum _json_packet_state_ json_packet_state_t
int32_t JSON_Deserialize(void *pInData, void *pDataTag, char *pDataValue, json_format_t type)
The function to deserialize the data,.
bool JSON_Process_Rx_Byte(uint8_t c, host_rx_packet_t *pHostRxPkt)
Function to handle incomming JSON encoded bytes form the Host over UART.
const char * gpJsonHeader
void JSON_BlockDataRead_BlockingCall(host_interface_handle_t *pHandle, void *pRecvData)
The function provides block data read for the JSON stream, This is for Blocking receive call...