diff --git a/.gitignore b/.gitignore index 0faad47..82c06ca 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ build/ #log log/ logs/ +Packages/ diff --git a/Release/Models/XNGroundHandling_V2.0.143.1.mcfg b/Release/Models/XNGroundHandling_V2.0.143.1.mcfg new file mode 100644 index 0000000..99fb1a1 --- /dev/null +++ b/Release/Models/XNGroundHandling_V2.0.143.1.mcfg @@ -0,0 +1,13 @@ + + + XNGroundHandling + ATA04地面操纵模型 + Jin + 1.0.0 + 2025-02-19 16:22:17 + 2025-02-19 16:22:19 + 0-0 + 99 + ATA04_SACSCGroundHandling_2.0.143.1H_20250506/libSACSCGroundHandling.so.2.0.143.1H + + diff --git a/Release/Models/libXNAerodynamics.so.1.0.0.0 b/Release/Models/libXNAerodynamics.so.1.0.0.0 index 6fd7fb0..cf44956 100644 Binary files a/Release/Models/libXNAerodynamics.so.1.0.0.0 and b/Release/Models/libXNAerodynamics.so.1.0.0.0 differ diff --git a/Release/Models/libXNGroundHandling.so.1.0.0.0 b/Release/Models/libXNGroundHandling.so.1.0.0.0 index 3cf8e1d..5d62bba 100644 Binary files a/Release/Models/libXNGroundHandling.so.1.0.0.0 and b/Release/Models/libXNGroundHandling.so.1.0.0.0 differ diff --git a/Release/Models/libXNGroundHandling.so.2.0.143.1 b/Release/Models/libXNGroundHandling.so.2.0.143.1 new file mode 100644 index 0000000..4a11400 Binary files /dev/null and b/Release/Models/libXNGroundHandling.so.2.0.143.1 differ diff --git a/Release/Models/libXNWeightBalance.so.1.0.0.0 b/Release/Models/libXNWeightBalance.so.1.0.0.0 index 21b7865..ffacb34 100644 Binary files a/Release/Models/libXNWeightBalance.so.1.0.0.0 and b/Release/Models/libXNWeightBalance.so.1.0.0.0 differ diff --git a/Release/database/XNSim.db b/Release/database/XNSim.db index 17cf1d6..6e5bd2c 100644 Binary files a/Release/database/XNSim.db and b/Release/database/XNSim.db differ diff --git a/XNCore/XNModelManager.cpp b/XNCore/XNModelManager.cpp index 6c1401e..93be25d 100755 --- a/XNCore/XNModelManager.cpp +++ b/XNCore/XNModelManager.cpp @@ -78,12 +78,13 @@ void XNModelManager::LoadModel(const std::string &modelPath, const std::string & model->SetFramework(GetFramework()); model->SetInitializeType(initialType); model->SetThreadID(threadID); - std::filesystem::path parentPath = std::filesystem::path(modelPath).parent_path(); - model->SetLibPath(parentPath.string()); + std::string workPath = GetFramework()->GetWorkPath() + "/Packages/"; + model->SetLibPath(workPath); if (initialType == 0) { // 使用std::filesystem处理路径 std::filesystem::path configPath = - parentPath / (className + "_V" + modelVersion + ".mcfg"); + std::filesystem::path(modelPath).parent_path() + / (className + "_V" + modelVersion + ".mcfg"); model->SetXmlPath(configPath.string()); } else if (initialType == 1) { model->SetXmlPath(planeName + "," + className + "," + modelVersion); diff --git a/XNCore/XNModelObject.cpp b/XNCore/XNModelObject.cpp index c744f86..65f4a41 100755 --- a/XNCore/XNModelObject.cpp +++ b/XNCore/XNModelObject.cpp @@ -390,19 +390,16 @@ void XNModelObject::ParseConfig() std::string mathlib = XNSim::getStringFromSqlite3(stmt, 13); if (mathlib.length() > 0) { // 使用标准C++文件路径处理 - std::filesystem::path xmlPath(GetXmlPath()); - d->_sLibPath = xmlPath.parent_path().string() + "/" + mathlib; - + //std::filesystem::path xmlPath(GetXmlPath()); + //d->_sLibPath = xmlPath.parent_path().string() + "/" + mathlib; + std::string libPath = d->_sLibPath + "/" + mathlib; // 使用标准C++动态库加载 - d->_dynamicLib = dlopen(d->_sLibPath.c_str(), RTLD_LAZY); + d->_dynamicLib = dlopen(libPath.c_str(), RTLD_LAZY); if (d->_dynamicLib) { // 动态库加载成功 - LOG_INFO("0x2163 Model %1 loaded algorithm dynamic library %2 successfully!", - GetObjectName(), d->_sLibPath); + LOG_INFO("0x2163 模型 %1 加载数据包模型动态库 %2 成功!", GetObjectName(), libPath); } else { - LOG_WARNING( - "0x2160 Model %1 failed to find algorithm dynamic library %2, will not call " - "algorithm!", - GetObjectName(), d->_sLibPath); + LOG_WARNING("0x2160 模型 %1 未找到数据包模型动态库 %2, 将不调用数据包模型!", + GetObjectName(), libPath); d->_dynamicLib = nullptr; } } diff --git a/XNModels/XNGroundHandling/CMakeLists.txt b/XNModels/XNGroundHandling/CMakeLists.txt index bb5cc98..f40abf1 100755 --- a/XNModels/XNGroundHandling/CMakeLists.txt +++ b/XNModels/XNGroundHandling/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16) project(XNGroundHandling LANGUAGES CXX) -set(MODEL_VERSION "1.0.0.0") +set(MODEL_VERSION "2.0.143.1") set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/XNModels/XNWeightBalance/XNWeightBalance.cpp b/XNModels/XNWeightBalance/XNWeightBalance.cpp index 36ccbd7..26182b2 100755 --- a/XNModels/XNWeightBalance/XNWeightBalance.cpp +++ b/XNModels/XNWeightBalance/XNWeightBalance.cpp @@ -49,6 +49,10 @@ void XNWeightBalance::PrepareForExecute() { T_D(); XNModelObject::PrepareForExecute(); + InitializeData(); + d->_inputInterface.Initialize(GetFramework(), GetUniqueId(), 1); + d->_outputInterface.Initialize(GetFramework(), GetUniqueId(), 2); + d->_heartbeatInterface.Initialize(GetFramework(), GetUniqueId(), 2); } void XNWeightBalance::StepUpdate()