fix rt data and mult front
This commit is contained in:
@@ -1769,28 +1769,29 @@ int transfer_json_block_data(char v_wiring_type[], json_block_data *data) //json
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
////lnk2024-8-15 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><><EFBFBD>ͽ<EFBFBD><CDBD><EFBFBD>
|
||||
if (strcmp(v_wiring_type, "01") == 0) //lnk2024-8-15 <20><><EFBFBD>ͽ<EFBFBD><CDBD><EFBFBD>
|
||||
if (strcmp(v_wiring_type, "1") == 0) //lnk2024-8-15 <20><><EFBFBD>ͽ<EFBFBD><CDBD><EFBFBD>
|
||||
{
|
||||
cout << "report v_wiring_type is" << v_wiring_type << endl;
|
||||
cout << "1 report v_wiring_type is" << v_wiring_type << endl;
|
||||
if (xmlinfo_list.contains(data->dev_type)) {
|
||||
cout << "transfer_json_block_data contain data->dev_type" << endl;
|
||||
ctopic_list = xmlinfo_list[data->dev_type]->topicList;
|
||||
}
|
||||
else {
|
||||
cout << "transfer_json_block_data not contain data->dev_type" << endl;
|
||||
cout << "transfer_json_block_data not contain data->dev_type:" << data->dev_type.toStdString() << " !!!!"<< endl;
|
||||
ctopic_list = topicList;
|
||||
}
|
||||
}
|
||||
else //lnk2024-8-15 <20><><EFBFBD>ͽ<EFBFBD><CDBD><EFBFBD>
|
||||
{
|
||||
cout << "report v_wiring_type is" << v_wiring_type << endl;
|
||||
cout << "2 report v_wiring_type is" << v_wiring_type << endl;
|
||||
if (xmlinfo_list2.contains(data->dev_type)) {
|
||||
cout << "transfer_json_block_data contain data->dev_type" << endl;
|
||||
ctopic_list = xmlinfo_list2[data->dev_type]->topicList;
|
||||
}
|
||||
else {
|
||||
cout << "transfer_json_block_data not contain data->dev_type" << endl;
|
||||
cout << "transfer_json_block_data not contain data->dev_type:" << data->dev_type.toStdString() << " !!!!"<< endl;
|
||||
ctopic_list = topicList;
|
||||
}
|
||||
}
|
||||
@@ -3733,6 +3734,13 @@ void Set_xml_databaseinfo(char* MODEL_ID, char* TMNL_TYPE, char* FILE_PATH, char
|
||||
else {
|
||||
|
||||
}*/
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if (xmlinfo_list.contains(type)) {
|
||||
std::cout << "xmlinfo_list.contains" << type.toStdString() <<std::endl;
|
||||
}
|
||||
else{
|
||||
std::cout << "??????????????????xmlinfo_list not contains" << type.toStdString() <<std::endl;
|
||||
}
|
||||
}
|
||||
//zw<7A><EFBFBD> 2023-9-4 <20><>ȡװ<C8A1><D7B0><EFBFBD><EFBFBD><EFBFBD>Ͷ<EFBFBD>Ӧ<EFBFBD><D3A6>xml<6D>ļ<EFBFBD>
|
||||
void Set_xml_nodeinfo()
|
||||
|
||||
@@ -730,7 +730,14 @@ std::string extractDataJson(const char* inputJson) {
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> messageBody <20>е<EFBFBD> JSON <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
cJSON* messageBody = cJSON_Parse(messageJson->valuestring); // <20><><EFBFBD><EFBFBD> messageBody <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
const char* messageBodyStr = messageJson->valuestring;
|
||||
if (messageBodyStr == nullptr || strlen(messageBodyStr) == 0) {
|
||||
std::cerr << "Failed to parse 'messageBody' JSON or it's empty." << std::endl;
|
||||
cJSON_Delete(root);
|
||||
return false;
|
||||
}
|
||||
|
||||
cJSON* messageBody = cJSON_Parse(messageBodyStr); // <20><><EFBFBD><EFBFBD> messageBody <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
if (messageBody == NULL) {
|
||||
std::cerr << "Failed to parse 'messageBody' JSON." << std::endl;
|
||||
cJSON_Delete(root);
|
||||
@@ -793,7 +800,14 @@ bool parseJsonMessageRT(const std::string& body, std::string& devSeries, std::st
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> messageBody <20>е<EFBFBD> JSON <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
cJSON* messageBody = cJSON_Parse(messageJson->valuestring); // <20><><EFBFBD><EFBFBD> messageBody <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
const char* messageBodyStr = messageJson->valuestring;
|
||||
if (messageBodyStr == nullptr || strlen(messageBodyStr) == 0) {
|
||||
std::cerr << "Failed to parse 'messageBody' JSON or it's empty." << std::endl;
|
||||
cJSON_Delete(root);
|
||||
return false;
|
||||
}
|
||||
|
||||
cJSON* messageBody = cJSON_Parse(messageBodyStr); // <20><><EFBFBD><EFBFBD> messageBody <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
if (messageBody == NULL) {
|
||||
std::cerr << "Failed to parse 'messageBody' JSON." << std::endl;
|
||||
cJSON_Delete(root);
|
||||
@@ -1030,7 +1044,14 @@ void parse_set(const std::string& json_str) {
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> messageBody <20>е<EFBFBD> JSON <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
cJSON* messageBody = cJSON_Parse(messageJson->valuestring); // <20><><EFBFBD><EFBFBD> messageBody <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
const char* messageBodyStr = messageJson->valuestring;
|
||||
if (messageBodyStr == nullptr || strlen(messageBodyStr) == 0) {
|
||||
std::cerr << "Failed to parse 'messageBody' JSON or it's empty." << std::endl;
|
||||
cJSON_Delete(root);
|
||||
return;
|
||||
}
|
||||
|
||||
cJSON* messageBody = cJSON_Parse(messageBodyStr); // <20><><EFBFBD><EFBFBD> messageBody <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
if (messageBody == NULL) {
|
||||
std::cerr << "Failed to parse 'messageBody' JSON." << std::endl;
|
||||
cJSON_Delete(root);
|
||||
@@ -1053,9 +1074,9 @@ void parse_set(const std::string& json_str) {
|
||||
}
|
||||
|
||||
//<2F>ж<EFBFBD><D0B6>Dz<EFBFBD><C7B2><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD>̺ţ<CCBA>
|
||||
//int index_value = index->valueint;
|
||||
string index_value_str = index->valuestring;
|
||||
int index_value = StringToInt(index_value_str);
|
||||
int index_value = index->valueint;
|
||||
//string index_value_str = index->valuestring;
|
||||
//int index_value = StringToInt(index_value_str);
|
||||
|
||||
//<2F><><EFBFBD>̺<EFBFBD>Ϊ0<CEAA>Ľ<EFBFBD><C4BD>̴<EFBFBD><CCB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>п<EFBFBD><D0BF><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||
if (index_value != g_front_seg_index && g_front_seg_index !=0) {
|
||||
@@ -1355,7 +1376,14 @@ void parse_control(const std::string& json_str, const std::string& output_dir) {
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> messageBody <20>е<EFBFBD> JSON <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
cJSON* messageBody = cJSON_Parse(messageJson->valuestring); // <20><><EFBFBD><EFBFBD> messageBody <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
const char* messageBodyStr = messageJson->valuestring;
|
||||
if (messageBodyStr == nullptr || strlen(messageBodyStr) == 0) {
|
||||
std::cerr << "Failed to parse 'messageBody' JSON or it's empty." << std::endl;
|
||||
cJSON_Delete(root);
|
||||
return;
|
||||
}
|
||||
|
||||
cJSON* messageBody = cJSON_Parse(messageBodyStr); // <20><><EFBFBD><EFBFBD> messageBody <20>ַ<EFBFBD><D6B7><EFBFBD>
|
||||
if (messageBody == NULL) {
|
||||
std::cerr << "Failed to parse 'messageBody' JSON." << std::endl;
|
||||
cJSON_Delete(root);
|
||||
@@ -1378,9 +1406,10 @@ void parse_control(const std::string& json_str, const std::string& output_dir) {
|
||||
}
|
||||
|
||||
//<2F>ж<EFBFBD><D0B6>Dz<EFBFBD><C7B2><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD>̺ţ<CCBA>
|
||||
//int index_value = index->valueint;
|
||||
string index_value_str = index->valuestring;
|
||||
int index_value = StringToInt(index_value_str);
|
||||
int index_value = index->valueint;
|
||||
//string index_value_str = index->valuestring;
|
||||
//int index_value = StringToInt(index_value_str);
|
||||
|
||||
|
||||
//<2F><><EFBFBD>̺<EFBFBD>Ϊ0<CEAA>Ľ<EFBFBD><C4BD>̴<EFBFBD><CCB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̨<EFBFBD>˸<EFBFBD><CBB8><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||
if (index_value != g_front_seg_index && g_front_seg_index !=0) {
|
||||
|
||||
Reference in New Issue
Block a user