diff --git a/LFtid1056.rar b/LFtid1056.rar index 966afb3..f015249 100644 Binary files a/LFtid1056.rar and b/LFtid1056.rar differ diff --git a/LFtid1056/cloudfront/code/rocketmq.cpp b/LFtid1056/cloudfront/code/rocketmq.cpp index 8ddba0d..6501361 100644 --- a/LFtid1056/cloudfront/code/rocketmq.cpp +++ b/LFtid1056/cloudfront/code/rocketmq.cpp @@ -2849,6 +2849,10 @@ static int get_cloud_type_by_state(int type) case DeviceState::SET_RIGHTTIME_2: return 1113; // 主动对时 case DeviceState::SET_CTRL: return 1114; // 控制/重启 case DeviceState::SET_PREUPGRADE: return 1115; // 升级预校验 + case DeviceState::SEND_FILE: return 1116; // 文件上送 + case DeviceState::DEL_FILE: return 1117; // 文件删除 + case DeviceState::SEND_MENU: return 1118; // 目录创建 + case DeviceState::DEL_MENU: return 1119; // 目录删除 default: return type; // 其他未映射的,保持原值,避免影响现有逻辑 diff --git a/LFtid1056/dealMsg.cpp b/LFtid1056/dealMsg.cpp index d9f4eed..3396b24 100644 --- a/LFtid1056/dealMsg.cpp +++ b/LFtid1056/dealMsg.cpp @@ -847,8 +847,8 @@ void process_received_message(string mac, string id,const char* data, size_t len << ", Error: " << strerror(errno) << std::endl; // 文件保存失败,通知云端 - /*on_device_response_minimal(static_cast(ResponseCode::BAD_REQUEST), - id, 0, static_cast(DeviceState::READING_EVENTFILE));*/ + //on_device_response_minimal(static_cast(ResponseCode::BAD_REQUEST), + // id, 0, static_cast(DeviceState::READING_EVENTFILE)); } //当前文件下载完毕,调整为空闲处理下一项工作(如果这里后续有新文件等待下载,一般已经存入等待队列等候处理了,调成空闲状态后直接就会开始新文件的下载工作) @@ -988,7 +988,7 @@ void process_received_message(string mac, string id,const char* data, size_t len // 当前帧被拒收,文件上送失败 std::cout << "*** send file 0x41 fail ***! " << mac << std::endl; - on_device_response_minimal(static_cast(ResponseCode::REJECTED_BUSY), id, 0, static_cast(DeviceState::SEND_FILE)); + on_device_response_minimal(static_cast(ResponseCode::FORBIDDEN), id, 0, static_cast(DeviceState::SEND_FILE)); ClientManager::instance().change_device_state(id, DeviceState::IDLE); } @@ -1016,7 +1016,7 @@ void process_received_message(string mac, string id,const char* data, size_t len // 当前帧被拒收,文件删除失败 std::cout << "*** del file 0x41 fail ***! " << mac << std::endl; - on_device_response_minimal(static_cast(ResponseCode::REJECTED_BUSY), id, 0, static_cast(DeviceState::DEL_FILE)); + on_device_response_minimal(static_cast(ResponseCode::FORBIDDEN), id, 0, static_cast(DeviceState::DEL_FILE)); ClientManager::instance().change_device_state(id, DeviceState::IDLE); } @@ -1044,7 +1044,7 @@ void process_received_message(string mac, string id,const char* data, size_t len // 当前帧被拒收,创建目录失败 std::cout << "*** send menu 0x41 fail ***! " << mac << std::endl; - on_device_response_minimal(static_cast(ResponseCode::REJECTED_BUSY), id, 0, static_cast(DeviceState::SEND_MENU)); + on_device_response_minimal(static_cast(ResponseCode::FORBIDDEN), id, 0, static_cast(DeviceState::SEND_MENU)); ClientManager::instance().change_device_state(id, DeviceState::IDLE); } @@ -1072,7 +1072,7 @@ void process_received_message(string mac, string id,const char* data, size_t len // 当前帧被拒收,删除目录失败 std::cout << "*** del menu 0x41 fail ***! " << mac << std::endl; - on_device_response_minimal(static_cast(ResponseCode::REJECTED_BUSY), id, 0, static_cast(DeviceState::DEL_MENU)); + on_device_response_minimal(static_cast(ResponseCode::FORBIDDEN), id, 0, static_cast(DeviceState::DEL_MENU)); ClientManager::instance().change_device_state(id, DeviceState::IDLE); }