添加日志

This commit is contained in:
lnk
2026-06-25 09:59:47 +08:00
parent 7b60de7c76
commit 7fbc24a384

View File

@@ -464,6 +464,9 @@ void process_received_message(string mac, string id,const char* data, size_t len
); );
std::cout << "Added download request for: " << filename << std::endl; std::cout << "Added download request for: " << filename << std::endl;
DIY_INFOLOG_CODE(id, 1, static_cast<int>(LogCode::LOG_CODE_DEV_ALARM),
"添加装置暂态波形文件下载请求: %s",
filename.c_str());
} }
//最后报文收发处理逻辑(如果当前装置空闲则尝试执行后续动作)(如果当前装置存在其他状态则直接退出,不要干扰装置后续执行) //最后报文收发处理逻辑(如果当前装置空闲则尝试执行后续动作)(如果当前装置存在其他状态则直接退出,不要干扰装置后续执行)
@@ -862,6 +865,9 @@ void process_received_message(string mac, string id,const char* data, size_t len
} }
else { else {
// 装置答非所问异常 // 装置答非所问异常
DIY_INFOLOG_CODE(id, 1, static_cast<int>(LogCode::LOG_CODE_DEV_ALARM),
"装置答非所问异常,接收波形文件数据错误,错误码:%d",
static_cast<int>(udata[8]));
//on_device_response_minimal(static_cast<int>(ResponseCode::INTERNAL_ERROR), id, 0, static_cast<int>(DeviceState::READING_EVENTFILE)); //on_device_response_minimal(static_cast<int>(ResponseCode::INTERNAL_ERROR), id, 0, static_cast<int>(DeviceState::READING_EVENTFILE));
// 接收波形文件数据错误,调整为空闲状态,处理下一项工作。 // 接收波形文件数据错误,调整为空闲状态,处理下一项工作。
ClientManager::instance().change_device_state(id, DeviceState::IDLE); ClientManager::instance().change_device_state(id, DeviceState::IDLE);