This commit is contained in:
lnk
2025-10-28 20:59:05 +08:00
parent f69a6d2105
commit 06a2f3a75b
4 changed files with 926 additions and 144 deletions

View File

@@ -785,6 +785,8 @@ void process_received_message(string mac, string id,const char* data, size_t len
//send_file_list(id,FileList);//lnk20250813
filemenu_cache_put(id,FileList);
on_device_response_minimal(static_cast<int>(ResponseCode::OK), id, 0, static_cast<int>(DeviceState::READING_FILEMENU));
// 处理完成后重置状态
ClientManager::instance().change_device_state(id, DeviceState::IDLE);
}
@@ -873,7 +875,7 @@ void process_received_message(string mac, string id,const char* data, size_t len
//使用接口上送文件lnk20250826
std::string filename;
SendFileWeb(WEB_FILEUPLOAD, file_path, file_path, filename);//如果是补招文件的下载,下载后也是直接上传,上传成功后更新补招状态即可
SendFileWebAuto(id, file_path, file_path, filename);//如果是补招文件的下载,下载后也是直接上传,上传成功后更新补招状态即可
std::cout << "File upload: " << filename << std::endl;
//通知文件上传
@@ -2078,9 +2080,9 @@ void process_received_message(string mac, string id,const char* data, size_t len
<< ", 特征幅值: " << record.fMagntitude << " pu"
<< ", 时间戳: " << record.triggerTimeMs << "ms" << std::endl;
//记录补招上来的暂态事件
append_qvvr_event(id,event.head.name,
record.nType,record.fPersisstime,record.fMagntitude,record.triggerTimeMs,record.phase);
//记录补招上来的暂态事件,如果需要前置自行下载波形才需要这个接口
/*append_qvvr_event(id,event.head.name,
record.nType,record.fPersisstime,record.fMagntitude,record.triggerTimeMs,record.phase);*/
//直接发走暂态事件
transfer_json_qvvr_data(id,event.head.name,
record.fMagntitude,record.fPersisstime,record.triggerTimeMs,record.nType,record.phase,"");
@@ -2145,7 +2147,7 @@ void process_received_message(string mac, string id,const char* data, size_t len
else {
//其余错误码代表异常情况
//lnk20251023
on_device_response_minimal(static_cast<int>(ResponseCode::BAD_REQUEST), id, 0, static_cast<int>(DeviceState::CUSTOM_ACTION));
on_device_response_minimal(static_cast<int>(ResponseCode::BAD_REQUEST), id, 0, static_cast<int>(DeviceState::READING_EVENTLOG));
}
// 装置否定
// 补招装置日志失败,调整为空闲状态,处理下一项工作。