Browse Source

隔开网关备份

xhj 3 days ago
parent
commit
a28afcc80e

+ 0 - 1247
.cmake/api/v1/reply/cache-v2-6518418f9a2e812db9fa.json

@@ -1,1247 +0,0 @@
-{
-	"entries" : 
-	[
-		{
-			"name" : "CMAKE_ADDR2LINE",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Path to a program."
-				}
-			],
-			"type" : "FILEPATH",
-			"value" : "E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/bin/aarch64-linux-gnu-addr2line.exe"
-		},
-		{
-			"name" : "CMAKE_AR",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Path to a program."
-				}
-			],
-			"type" : "FILEPATH",
-			"value" : "E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/bin/aarch64-linux-gnu-ar.exe"
-		},
-		{
-			"name" : "CMAKE_BUILD_TYPE",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ..."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_CACHEFILE_DIR",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "This is the directory where this CMakeCache.txt was created"
-				}
-			],
-			"type" : "INTERNAL",
-			"value" : "e:/embedded-gateway"
-		},
-		{
-			"name" : "CMAKE_CACHE_MAJOR_VERSION",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Major version of cmake used to create the current loaded cache"
-				}
-			],
-			"type" : "INTERNAL",
-			"value" : "3"
-		},
-		{
-			"name" : "CMAKE_CACHE_MINOR_VERSION",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Minor version of cmake used to create the current loaded cache"
-				}
-			],
-			"type" : "INTERNAL",
-			"value" : "30"
-		},
-		{
-			"name" : "CMAKE_CACHE_PATCH_VERSION",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Patch version of cmake used to create the current loaded cache"
-				}
-			],
-			"type" : "INTERNAL",
-			"value" : "5"
-		},
-		{
-			"name" : "CMAKE_COLOR_DIAGNOSTICS",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Enable colored diagnostics throughout."
-				}
-			],
-			"type" : "BOOL",
-			"value" : "ON"
-		},
-		{
-			"name" : "CMAKE_COMMAND",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Path to CMake executable."
-				}
-			],
-			"type" : "INTERNAL",
-			"value" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/bin/cmake.exe"
-		},
-		{
-			"name" : "CMAKE_CPACK_COMMAND",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Path to cpack program executable."
-				}
-			],
-			"type" : "INTERNAL",
-			"value" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/bin/cpack.exe"
-		},
-		{
-			"name" : "CMAKE_CTEST_COMMAND",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Path to ctest program executable."
-				}
-			],
-			"type" : "INTERNAL",
-			"value" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/bin/ctest.exe"
-		},
-		{
-			"name" : "CMAKE_CXX_COMPILER_AR",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler"
-				}
-			],
-			"type" : "FILEPATH",
-			"value" : "E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc-ar.exe"
-		},
-		{
-			"name" : "CMAKE_CXX_COMPILER_RANLIB",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler"
-				}
-			],
-			"type" : "FILEPATH",
-			"value" : "E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc-ranlib.exe"
-		},
-		{
-			"name" : "CMAKE_CXX_FLAGS",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the CXX compiler during all build types."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_CXX_FLAGS_DEBUG",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the CXX compiler during DEBUG builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : "-g"
-		},
-		{
-			"name" : "CMAKE_CXX_FLAGS_MINSIZEREL",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the CXX compiler during MINSIZEREL builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : "-Os -DNDEBUG"
-		},
-		{
-			"name" : "CMAKE_CXX_FLAGS_RELEASE",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the CXX compiler during RELEASE builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : "-O3 -DNDEBUG"
-		},
-		{
-			"name" : "CMAKE_CXX_FLAGS_RELWITHDEBINFO",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the CXX compiler during RELWITHDEBINFO builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : "-O2 -g -DNDEBUG"
-		},
-		{
-			"name" : "CMAKE_C_COMPILER_AR",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler"
-				}
-			],
-			"type" : "FILEPATH",
-			"value" : "E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc-ar.exe"
-		},
-		{
-			"name" : "CMAKE_C_COMPILER_RANLIB",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler"
-				}
-			],
-			"type" : "FILEPATH",
-			"value" : "E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc-ranlib.exe"
-		},
-		{
-			"name" : "CMAKE_C_FLAGS",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the C compiler during all build types."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_C_FLAGS_DEBUG",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the C compiler during DEBUG builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : "-g"
-		},
-		{
-			"name" : "CMAKE_C_FLAGS_MINSIZEREL",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the C compiler during MINSIZEREL builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : "-Os -DNDEBUG"
-		},
-		{
-			"name" : "CMAKE_C_FLAGS_RELEASE",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the C compiler during RELEASE builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : "-O3 -DNDEBUG"
-		},
-		{
-			"name" : "CMAKE_C_FLAGS_RELWITHDEBINFO",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the C compiler during RELWITHDEBINFO builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : "-O2 -g -DNDEBUG"
-		},
-		{
-			"name" : "CMAKE_DLLTOOL",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Path to a program."
-				}
-			],
-			"type" : "FILEPATH",
-			"value" : "D:/xhj/CLion 2024.3/bin/mingw/bin/dlltool.exe"
-		},
-		{
-			"name" : "CMAKE_EXECUTABLE_FORMAT",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Executable file format"
-				}
-			],
-			"type" : "INTERNAL",
-			"value" : "ELF"
-		},
-		{
-			"name" : "CMAKE_EXE_LINKER_FLAGS",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the linker during all build types."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_EXE_LINKER_FLAGS_DEBUG",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the linker during DEBUG builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_EXE_LINKER_FLAGS_MINSIZEREL",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the linker during MINSIZEREL builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_EXE_LINKER_FLAGS_RELEASE",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the linker during RELEASE builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the linker during RELWITHDEBINFO builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_EXTRA_GENERATOR",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Name of external makefile project generator."
-				}
-			],
-			"type" : "INTERNAL",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_FIND_PACKAGE_REDIRECTS_DIR",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Value Computed by CMake."
-				}
-			],
-			"type" : "STATIC",
-			"value" : "E:/embedded-gateway/CMakeFiles/pkgRedirects"
-		},
-		{
-			"name" : "CMAKE_GENERATOR",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Name of generator."
-				}
-			],
-			"type" : "INTERNAL",
-			"value" : "Ninja"
-		},
-		{
-			"name" : "CMAKE_GENERATOR_INSTANCE",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Generator instance identifier."
-				}
-			],
-			"type" : "INTERNAL",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_GENERATOR_PLATFORM",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Name of generator platform."
-				}
-			],
-			"type" : "INTERNAL",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_GENERATOR_TOOLSET",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Name of generator toolset."
-				}
-			],
-			"type" : "INTERNAL",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_HOME_DIRECTORY",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Source directory with the top level CMakeLists.txt file for this project"
-				}
-			],
-			"type" : "INTERNAL",
-			"value" : "E:/embedded-gateway"
-		},
-		{
-			"name" : "CMAKE_INSTALL_PREFIX",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Install path prefix, prepended onto install directories."
-				}
-			],
-			"type" : "PATH",
-			"value" : "C:/Program Files (x86)/embedded-gateway"
-		},
-		{
-			"name" : "CMAKE_INSTALL_SO_NO_EXE",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Install .so files without execute permission."
-				}
-			],
-			"type" : "INTERNAL",
-			"value" : "0"
-		},
-		{
-			"name" : "CMAKE_LINKER",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Path to a program."
-				}
-			],
-			"type" : "FILEPATH",
-			"value" : "E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/bin/aarch64-linux-gnu-ld.exe"
-		},
-		{
-			"name" : "CMAKE_MAKE_PROGRAM",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "make program"
-				}
-			],
-			"type" : "FILEPATH",
-			"value" : "D:/xhj/CLion 2024.3/bin/ninja/win/x64/ninja.exe"
-		},
-		{
-			"name" : "CMAKE_MODULE_LINKER_FLAGS",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the linker during the creation of modules during all build types."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_MODULE_LINKER_FLAGS_DEBUG",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the linker during the creation of modules during DEBUG builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the linker during the creation of modules during MINSIZEREL builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_MODULE_LINKER_FLAGS_RELEASE",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the linker during the creation of modules during RELEASE builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the linker during the creation of modules during RELWITHDEBINFO builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_NM",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Path to a program."
-				}
-			],
-			"type" : "FILEPATH",
-			"value" : "E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/bin/aarch64-linux-gnu-nm.exe"
-		},
-		{
-			"name" : "CMAKE_NUMBER_OF_MAKEFILES",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "number of local generators"
-				}
-			],
-			"type" : "INTERNAL",
-			"value" : "4"
-		},
-		{
-			"name" : "CMAKE_OBJCOPY",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Path to a program."
-				}
-			],
-			"type" : "FILEPATH",
-			"value" : "E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/bin/aarch64-linux-gnu-objcopy.exe"
-		},
-		{
-			"name" : "CMAKE_OBJDUMP",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Path to a program."
-				}
-			],
-			"type" : "FILEPATH",
-			"value" : "E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/bin/aarch64-linux-gnu-objdump.exe"
-		},
-		{
-			"name" : "CMAKE_PLATFORM_INFO_INITIALIZED",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Platform information initialized"
-				}
-			],
-			"type" : "INTERNAL",
-			"value" : "1"
-		},
-		{
-			"name" : "CMAKE_PROJECT_DESCRIPTION",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Value Computed by CMake"
-				}
-			],
-			"type" : "STATIC",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_PROJECT_HOMEPAGE_URL",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Value Computed by CMake"
-				}
-			],
-			"type" : "STATIC",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_PROJECT_NAME",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Value Computed by CMake"
-				}
-			],
-			"type" : "STATIC",
-			"value" : "embedded-gateway"
-		},
-		{
-			"name" : "CMAKE_RANLIB",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Path to a program."
-				}
-			],
-			"type" : "FILEPATH",
-			"value" : "E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/bin/aarch64-linux-gnu-ranlib.exe"
-		},
-		{
-			"name" : "CMAKE_READELF",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Path to a program."
-				}
-			],
-			"type" : "FILEPATH",
-			"value" : "E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/bin/aarch64-linux-gnu-readelf.exe"
-		},
-		{
-			"name" : "CMAKE_ROOT",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Path to CMake installation."
-				}
-			],
-			"type" : "INTERNAL",
-			"value" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30"
-		},
-		{
-			"name" : "CMAKE_SHARED_LINKER_FLAGS",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the linker during the creation of shared libraries during all build types."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_SHARED_LINKER_FLAGS_DEBUG",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the linker during the creation of shared libraries during DEBUG builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the linker during the creation of shared libraries during MINSIZEREL builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_SHARED_LINKER_FLAGS_RELEASE",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the linker during the creation of shared libraries during RELEASE builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the linker during the creation of shared libraries during RELWITHDEBINFO builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_SKIP_INSTALL_RPATH",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "If set, runtime paths are not added when installing shared libraries, but are added when building."
-				}
-			],
-			"type" : "BOOL",
-			"value" : "NO"
-		},
-		{
-			"name" : "CMAKE_SKIP_RPATH",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "If set, runtime paths are not added when using shared libraries."
-				}
-			],
-			"type" : "BOOL",
-			"value" : "NO"
-		},
-		{
-			"name" : "CMAKE_STATIC_LINKER_FLAGS",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the linker during the creation of static libraries during all build types."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_STATIC_LINKER_FLAGS_DEBUG",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the linker during the creation of static libraries during DEBUG builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the linker during the creation of static libraries during MINSIZEREL builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_STATIC_LINKER_FLAGS_RELEASE",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the linker during the creation of static libraries during RELEASE builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Flags used by the linker during the creation of static libraries during RELWITHDEBINFO builds."
-				}
-			],
-			"type" : "STRING",
-			"value" : ""
-		},
-		{
-			"name" : "CMAKE_STRIP",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Path to a program."
-				}
-			],
-			"type" : "FILEPATH",
-			"value" : "E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/bin/aarch64-linux-gnu-strip.exe"
-		},
-		{
-			"name" : "CMAKE_TAPI",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "Path to a program."
-				}
-			],
-			"type" : "FILEPATH",
-			"value" : "CMAKE_TAPI-NOTFOUND"
-		},
-		{
-			"name" : "CMAKE_VERBOSE_MAKEFILE",
-			"properties" : 
-			[
-				{
-					"name" : "ADVANCED",
-					"value" : "1"
-				},
-				{
-					"name" : "HELPSTRING",
-					"value" : "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make.  This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo."
-				}
-			],
-			"type" : "BOOL",
-			"value" : "FALSE"
-		},
-		{
-			"name" : "_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "linker supports push/pop state"
-				}
-			],
-			"type" : "INTERNAL",
-			"value" : "TRUE"
-		},
-		{
-			"name" : "embedded-gateway_BINARY_DIR",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Value Computed by CMake"
-				}
-			],
-			"type" : "STATIC",
-			"value" : "E:/embedded-gateway"
-		},
-		{
-			"name" : "embedded-gateway_IS_TOP_LEVEL",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Value Computed by CMake"
-				}
-			],
-			"type" : "STATIC",
-			"value" : "ON"
-		},
-		{
-			"name" : "embedded-gateway_SOURCE_DIR",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Value Computed by CMake"
-				}
-			],
-			"type" : "STATIC",
-			"value" : "E:/embedded-gateway"
-		},
-		{
-			"name" : "gateway-basic_BINARY_DIR",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Value Computed by CMake"
-				}
-			],
-			"type" : "STATIC",
-			"value" : "E:/embedded-gateway/modules/gateway-basic"
-		},
-		{
-			"name" : "gateway-basic_IS_TOP_LEVEL",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Value Computed by CMake"
-				}
-			],
-			"type" : "STATIC",
-			"value" : "OFF"
-		},
-		{
-			"name" : "gateway-basic_SOURCE_DIR",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Value Computed by CMake"
-				}
-			],
-			"type" : "STATIC",
-			"value" : "E:/embedded-gateway/modules/gateway-basic"
-		},
-		{
-			"name" : "gateway-scheduler_BINARY_DIR",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Value Computed by CMake"
-				}
-			],
-			"type" : "STATIC",
-			"value" : "E:/embedded-gateway/modules/gateway-scheduler"
-		},
-		{
-			"name" : "gateway-scheduler_IS_TOP_LEVEL",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Value Computed by CMake"
-				}
-			],
-			"type" : "STATIC",
-			"value" : "OFF"
-		},
-		{
-			"name" : "gateway-scheduler_SOURCE_DIR",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Value Computed by CMake"
-				}
-			],
-			"type" : "STATIC",
-			"value" : "E:/embedded-gateway/modules/gateway-scheduler"
-		},
-		{
-			"name" : "gateway-server_BINARY_DIR",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Value Computed by CMake"
-				}
-			],
-			"type" : "STATIC",
-			"value" : "E:/embedded-gateway/modules/gateway-server"
-		},
-		{
-			"name" : "gateway-server_IS_TOP_LEVEL",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Value Computed by CMake"
-				}
-			],
-			"type" : "STATIC",
-			"value" : "OFF"
-		},
-		{
-			"name" : "gateway-server_SOURCE_DIR",
-			"properties" : 
-			[
-				{
-					"name" : "HELPSTRING",
-					"value" : "Value Computed by CMake"
-				}
-			],
-			"type" : "STATIC",
-			"value" : "E:/embedded-gateway/modules/gateway-server"
-		}
-	],
-	"kind" : "cache",
-	"version" : 
-	{
-		"major" : 2,
-		"minor" : 0
-	}
-}

+ 0 - 147
.cmake/api/v1/reply/cmakeFiles-v1-ac00f54fecb9c1c3ff53.json

@@ -1,147 +0,0 @@
-{
-	"inputs" : 
-	[
-		{
-			"path" : "CMakeLists.txt"
-		},
-		{
-			"path" : "CMakeFiles/3.30.5/CMakeSystem.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/CMakeSystemSpecificInitialize.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/Platform/Linux-Initialize.cmake"
-		},
-		{
-			"path" : "CMakeFiles/3.30.5/CMakeCCompiler.cmake"
-		},
-		{
-			"path" : "CMakeFiles/3.30.5/CMakeCXXCompiler.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/CMakeSystemSpecificInformation.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/CMakeGenericSystem.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/CMakeInitializeConfigs.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/Platform/Linux.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/Platform/UnixPaths.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/CMakeCInformation.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/CMakeLanguageInformation.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/Compiler/GNU-C.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/Compiler/GNU.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/Platform/Linux-GNU-C.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/Platform/Linux-GNU.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/CMakeCommonLanguageInclude.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/CMakeCXXInformation.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/CMakeLanguageInformation.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/Compiler/GNU-CXX.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/Compiler/GNU.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/Platform/Linux-GNU-CXX.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/Platform/Linux-GNU.cmake"
-		},
-		{
-			"isCMake" : true,
-			"isExternal" : true,
-			"path" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30/Modules/CMakeCommonLanguageInclude.cmake"
-		},
-		{
-			"path" : "modules/gateway-basic/CMakeLists.txt"
-		},
-		{
-			"path" : "modules/gateway-scheduler/CMakeLists.txt"
-		},
-		{
-			"path" : "modules/gateway-server/CMakeLists.txt"
-		}
-	],
-	"kind" : "cmakeFiles",
-	"paths" : 
-	{
-		"build" : "E:/embedded-gateway",
-		"source" : "E:/embedded-gateway"
-	},
-	"version" : 
-	{
-		"major" : 1,
-		"minor" : 1
-	}
-}

+ 0 - 159
.cmake/api/v1/reply/codemodel-v2-f10e6914066e1b1ea646.json

@@ -1,159 +0,0 @@
-{
-	"configurations" : 
-	[
-		{
-			"directories" : 
-			[
-				{
-					"build" : ".",
-					"childIndexes" : 
-					[
-						1,
-						2,
-						3
-					],
-					"jsonFile" : "directory-.-d0094a50bb2071803777.json",
-					"minimumCMakeVersion" : 
-					{
-						"string" : "3.13"
-					},
-					"projectIndex" : 0,
-					"source" : "."
-				},
-				{
-					"build" : "modules/gateway-basic",
-					"jsonFile" : "directory-modules.gateway-basic-0cd18c0b274ae7603186.json",
-					"minimumCMakeVersion" : 
-					{
-						"string" : "3.13"
-					},
-					"parentIndex" : 0,
-					"projectIndex" : 1,
-					"source" : "modules/gateway-basic",
-					"targetIndexes" : 
-					[
-						0
-					]
-				},
-				{
-					"build" : "modules/gateway-scheduler",
-					"jsonFile" : "directory-modules.gateway-scheduler-d719f3c53bdee7fd76b3.json",
-					"minimumCMakeVersion" : 
-					{
-						"string" : "3.13"
-					},
-					"parentIndex" : 0,
-					"projectIndex" : 2,
-					"source" : "modules/gateway-scheduler",
-					"targetIndexes" : 
-					[
-						1
-					]
-				},
-				{
-					"build" : "modules/gateway-server",
-					"jsonFile" : "directory-modules.gateway-server-ff8eb450b6b9e59ddd8a.json",
-					"minimumCMakeVersion" : 
-					{
-						"string" : "3.13"
-					},
-					"parentIndex" : 0,
-					"projectIndex" : 3,
-					"source" : "modules/gateway-server",
-					"targetIndexes" : 
-					[
-						2
-					]
-				}
-			],
-			"name" : "",
-			"projects" : 
-			[
-				{
-					"childIndexes" : 
-					[
-						1,
-						2,
-						3
-					],
-					"directoryIndexes" : 
-					[
-						0
-					],
-					"name" : "embedded-gateway"
-				},
-				{
-					"directoryIndexes" : 
-					[
-						1
-					],
-					"name" : "gateway-basic",
-					"parentIndex" : 0,
-					"targetIndexes" : 
-					[
-						0
-					]
-				},
-				{
-					"directoryIndexes" : 
-					[
-						2
-					],
-					"name" : "gateway-scheduler",
-					"parentIndex" : 0,
-					"targetIndexes" : 
-					[
-						1
-					]
-				},
-				{
-					"directoryIndexes" : 
-					[
-						3
-					],
-					"name" : "gateway-server",
-					"parentIndex" : 0,
-					"targetIndexes" : 
-					[
-						2
-					]
-				}
-			],
-			"targets" : 
-			[
-				{
-					"directoryIndex" : 1,
-					"id" : "gateway-basic::@26444984b35057cfdfd9",
-					"jsonFile" : "target-gateway-basic-5afc96412c78d600d60f.json",
-					"name" : "gateway-basic",
-					"projectIndex" : 1
-				},
-				{
-					"directoryIndex" : 2,
-					"id" : "gateway-scheduler::@b14a20826b83cb04503c",
-					"jsonFile" : "target-gateway-scheduler-5b35df5f4d24c232017e.json",
-					"name" : "gateway-scheduler",
-					"projectIndex" : 2
-				},
-				{
-					"directoryIndex" : 3,
-					"id" : "gateway-server::@91cbd3ecfdd0686d89cc",
-					"jsonFile" : "target-gateway-server-5db9632f23c1e77089e5.json",
-					"name" : "gateway-server",
-					"projectIndex" : 3
-				}
-			]
-		}
-	],
-	"kind" : "codemodel",
-	"paths" : 
-	{
-		"build" : "E:/embedded-gateway",
-		"source" : "E:/embedded-gateway"
-	},
-	"version" : 
-	{
-		"major" : 2,
-		"minor" : 7
-	}
-}

+ 0 - 108
.cmake/api/v1/reply/index-2025-05-19T05-11-31-0090.json

@@ -1,108 +0,0 @@
-{
-	"cmake" : 
-	{
-		"generator" : 
-		{
-			"multiConfig" : false,
-			"name" : "Ninja"
-		},
-		"paths" : 
-		{
-			"cmake" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/bin/cmake.exe",
-			"cpack" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/bin/cpack.exe",
-			"ctest" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/bin/ctest.exe",
-			"root" : "D:/xhj/CLion 2024.3/bin/cmake/win/x64/share/cmake-3.30"
-		},
-		"version" : 
-		{
-			"isDirty" : false,
-			"major" : 3,
-			"minor" : 30,
-			"patch" : 5,
-			"string" : "3.30.5",
-			"suffix" : ""
-		}
-	},
-	"objects" : 
-	[
-		{
-			"jsonFile" : "codemodel-v2-f10e6914066e1b1ea646.json",
-			"kind" : "codemodel",
-			"version" : 
-			{
-				"major" : 2,
-				"minor" : 7
-			}
-		},
-		{
-			"jsonFile" : "cache-v2-6518418f9a2e812db9fa.json",
-			"kind" : "cache",
-			"version" : 
-			{
-				"major" : 2,
-				"minor" : 0
-			}
-		},
-		{
-			"jsonFile" : "cmakeFiles-v1-ac00f54fecb9c1c3ff53.json",
-			"kind" : "cmakeFiles",
-			"version" : 
-			{
-				"major" : 1,
-				"minor" : 1
-			}
-		},
-		{
-			"jsonFile" : "toolchains-v1-7c002d93335aea0b8309.json",
-			"kind" : "toolchains",
-			"version" : 
-			{
-				"major" : 1,
-				"minor" : 0
-			}
-		}
-	],
-	"reply" : 
-	{
-		"cache-v2" : 
-		{
-			"jsonFile" : "cache-v2-6518418f9a2e812db9fa.json",
-			"kind" : "cache",
-			"version" : 
-			{
-				"major" : 2,
-				"minor" : 0
-			}
-		},
-		"cmakeFiles-v1" : 
-		{
-			"jsonFile" : "cmakeFiles-v1-ac00f54fecb9c1c3ff53.json",
-			"kind" : "cmakeFiles",
-			"version" : 
-			{
-				"major" : 1,
-				"minor" : 1
-			}
-		},
-		"codemodel-v2" : 
-		{
-			"jsonFile" : "codemodel-v2-f10e6914066e1b1ea646.json",
-			"kind" : "codemodel",
-			"version" : 
-			{
-				"major" : 2,
-				"minor" : 7
-			}
-		},
-		"toolchains-v1" : 
-		{
-			"jsonFile" : "toolchains-v1-7c002d93335aea0b8309.json",
-			"kind" : "toolchains",
-			"version" : 
-			{
-				"major" : 1,
-				"minor" : 0
-			}
-		}
-	}
-}

+ 0 - 501
.cmake/api/v1/reply/target-gateway-scheduler-5b35df5f4d24c232017e.json

@@ -1,501 +0,0 @@
-{
-	"artifacts" : 
-	[
-		{
-			"path" : "deploy/bin/gateway-scheduler"
-		}
-	],
-	"backtrace" : 1,
-	"backtraceGraph" : 
-	{
-		"commands" : 
-		[
-			"add_executable",
-			"link_directories",
-			"add_library",
-			"add_definitions",
-			"include_directories"
-		],
-		"files" : 
-		[
-			"modules/gateway-scheduler/CMakeLists.txt",
-			"modules/gateway-basic/CMakeLists.txt",
-			"CMakeLists.txt"
-		],
-		"nodes" : 
-		[
-			{
-				"file" : 0
-			},
-			{
-				"command" : 0,
-				"file" : 0,
-				"line" : 41,
-				"parent" : 0
-			},
-			{
-				"command" : 1,
-				"file" : 0,
-				"line" : 24,
-				"parent" : 0
-			},
-			{
-				"file" : 1
-			},
-			{
-				"command" : 2,
-				"file" : 1,
-				"line" : 37,
-				"parent" : 3
-			},
-			{
-				"file" : 2
-			},
-			{
-				"command" : 3,
-				"file" : 2,
-				"line" : 44,
-				"parent" : 5
-			},
-			{
-				"command" : 3,
-				"file" : 2,
-				"line" : 43,
-				"parent" : 5
-			},
-			{
-				"command" : 3,
-				"file" : 2,
-				"line" : 41,
-				"parent" : 5
-			},
-			{
-				"command" : 4,
-				"file" : 0,
-				"line" : 18,
-				"parent" : 0
-			}
-		]
-	},
-	"compileGroups" : 
-	[
-		{
-			"compileCommandFragments" : 
-			[
-				{
-					"fragment" : "-std=gnu++1z -fdiagnostics-color=always"
-				}
-			],
-			"defines" : 
-			[
-				{
-					"backtrace" : 6,
-					"define" : "DATABASE_JSON_DIR=\"/usr/local/bin/database/json\""
-				},
-				{
-					"backtrace" : 7,
-					"define" : "DATABASE_SQLITE_DIR=\"/usr/local/bin/database/sqlite\""
-				},
-				{
-					"backtrace" : 8,
-					"define" : "DEBUG"
-				}
-			],
-			"includes" : 
-			[
-				{
-					"backtrace" : 9,
-					"path" : "E:/embedded-gateway/include"
-				},
-				{
-					"backtrace" : 9,
-					"path" : "E:/embedded-gateway/library/include"
-				},
-				{
-					"backtrace" : 9,
-					"path" : "E:/embedded-gateway/modules"
-				},
-				{
-					"backtrace" : 9,
-					"path" : "E:/embedded-gateway/deploy/library"
-				}
-			],
-			"language" : "CXX",
-			"languageStandard" : 
-			{
-				"backtraces" : 
-				[
-					1
-				],
-				"standard" : "17"
-			},
-			"sourceIndexes" : 
-			[
-				0,
-				1,
-				2,
-				3,
-				4,
-				5,
-				6,
-				7,
-				8,
-				9,
-				10,
-				11,
-				12,
-				13,
-				14,
-				15,
-				16,
-				17,
-				18,
-				19,
-				20,
-				21,
-				22,
-				23,
-				24,
-				25,
-				26,
-				27,
-				28,
-				29,
-				30
-			]
-		}
-	],
-	"dependencies" : 
-	[
-		{
-			"backtrace" : 1,
-			"id" : "gateway-basic::@26444984b35057cfdfd9"
-		}
-	],
-	"id" : "gateway-scheduler::@b14a20826b83cb04503c",
-	"link" : 
-	{
-		"commandFragments" : 
-		[
-			{
-				"fragment" : "",
-				"role" : "flags"
-			},
-			{
-				"backtrace" : 2,
-				"fragment" : "-LE:\\embedded-gateway\\library\\lib",
-				"role" : "libraryPath"
-			},
-			{
-				"fragment" : "-Wl,-rpath,E:/embedded-gateway/library/lib:E:/embedded-gateway/deploy/library",
-				"role" : "libraries"
-			},
-			{
-				"backtrace" : 1,
-				"fragment" : "-lsqlite3",
-				"role" : "libraries"
-			},
-			{
-				"backtrace" : 1,
-				"fragment" : "-lboost_filesystem",
-				"role" : "libraries"
-			},
-			{
-				"backtrace" : 1,
-				"fragment" : "-lmodbus",
-				"role" : "libraries"
-			},
-			{
-				"backtrace" : 1,
-				"fragment" : "-lpthread",
-				"role" : "libraries"
-			},
-			{
-				"backtrace" : 1,
-				"fragment" : "-lpaho-mqttpp3",
-				"role" : "libraries"
-			},
-			{
-				"backtrace" : 1,
-				"fragment" : "-lpaho-mqtt3as",
-				"role" : "libraries"
-			},
-			{
-				"backtrace" : 1,
-				"fragment" : "-liec61850",
-				"role" : "libraries"
-			},
-			{
-				"fragment" : "-Wl,-Bstatic",
-				"role" : "libraries"
-			},
-			{
-				"backtrace" : 1,
-				"fragment" : "-lloragw",
-				"role" : "libraries"
-			},
-			{
-				"fragment" : "-Wl,-Bdynamic",
-				"role" : "libraries"
-			},
-			{
-				"backtrace" : 1,
-				"fragment" : "deploy\\library\\libgateway-basic.so",
-				"role" : "libraries"
-			},
-			{
-				"backtrace" : 1,
-				"fragment" : "-lsqlite3",
-				"role" : "libraries"
-			},
-			{
-				"backtrace" : 1,
-				"fragment" : "-lboost_filesystem",
-				"role" : "libraries"
-			},
-			{
-				"backtrace" : 4,
-				"fragment" : "-lhiredis",
-				"role" : "libraries"
-			}
-		],
-		"language" : "CXX"
-	},
-	"name" : "gateway-scheduler",
-	"nameOnDisk" : "gateway-scheduler",
-	"paths" : 
-	{
-		"build" : "modules/gateway-scheduler",
-		"source" : "modules/gateway-scheduler"
-	},
-	"sourceGroups" : 
-	[
-		{
-			"name" : "Source Files",
-			"sourceIndexes" : 
-			[
-				0,
-				1,
-				2,
-				3,
-				4,
-				5,
-				6,
-				7,
-				8,
-				9,
-				10,
-				11,
-				12,
-				13,
-				14,
-				15,
-				16,
-				17,
-				18,
-				19,
-				20,
-				21,
-				22,
-				23,
-				24,
-				25,
-				26,
-				27,
-				28,
-				29,
-				30
-			]
-		}
-	],
-	"sources" : 
-	[
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/executant/BasicExecutant.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/executant/GPIOExecutant.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/executant/ModbusExecutant.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/insulated-switch-server/insulated_switch_server.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/lora_server/LoRaServer.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/main.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/report/MyIec61850Server.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/report/TaskReportService.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/repository/ScheduleCommunicationRepository.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/repository/ScheduleDeviceCommunicationRepository.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/repository/ScheduleDeviceProtocolRepository.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/repository/ScheduleDeviceRepository.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/repository/ScheduleProtocolRepository.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/repository/ScheduleTaskFormatterRepository.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/repository/ScheduleTaskRepository.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/service/BasicExecutorService.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/service/CalculateService.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/service/FlowerExecutorService.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/service/FormatterExecutorService.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/service/QueueService.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/service/ScheduleCommunicationService.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/service/ScheduleDeviceCommunicationService.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/service/ScheduleDeviceProtocolService.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/service/ScheduleDeviceService.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/service/ScheduleProtocolService.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/service/ScheduleService.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/service/ScheduleTaskFormatterService.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/service/ScheduleTaskService.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/service/TaskExecutorService.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/tcp_server/TcpServer.cpp",
-			"sourceGroupIndex" : 0
-		},
-		{
-			"backtrace" : 1,
-			"compileGroupIndex" : 0,
-			"path" : "modules/gateway-scheduler/src/utils/HashUtils.cpp",
-			"sourceGroupIndex" : 0
-		}
-	],
-	"type" : "EXECUTABLE"
-}

+ 0 - 87
.cmake/api/v1/reply/toolchains-v1-7c002d93335aea0b8309.json

@@ -1,87 +0,0 @@
-{
-	"kind" : "toolchains",
-	"toolchains" : 
-	[
-		{
-			"compiler" : 
-			{
-				"id" : "GNU",
-				"implicit" : 
-				{
-					"includeDirectories" : 
-					[
-						"E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/7.5.0/include",
-						"E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/7.5.0/include-fixed",
-						"E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/aarch64-linux-gnu/include",
-						"E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include"
-					],
-					"linkDirectories" : 
-					[
-						"E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/7.5.0",
-						"E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu",
-						"E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/lib/gcc",
-						"E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/aarch64-linux-gnu/lib64",
-						"E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/aarch64-linux-gnu/lib",
-						"E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/aarch64-linux-gnu/libc/lib",
-						"E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/lib"
-					],
-					"linkFrameworkDirectories" : [],
-					"linkLibraries" : 
-					[
-						"gcc",
-						"gcc_s",
-						"c",
-						"gcc",
-						"gcc_s"
-					]
-				},
-				"path" : "E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc.exe",
-				"version" : "7.5.0"
-			},
-			"language" : "C",
-			"sourceFileExtensions" : 
-			[
-				"c",
-				"m"
-			]
-		},
-		{
-			"compiler" : 
-			{
-				"id" : "GNU",
-				"implicit" : 
-				{
-					"includeDirectories" : [],
-					"linkDirectories" : [],
-					"linkFrameworkDirectories" : [],
-					"linkLibraries" : []
-				},
-				"path" : "E:/xhj/gcc-linaro-7.5.0-2019/gcc-linaro-7.5.0-2019.12-i686-mingw32_aarch64-linux-gnu/bin/aarch64-linux-gnu-g++.exe",
-				"version" : "7.5.0"
-			},
-			"language" : "CXX",
-			"sourceFileExtensions" : 
-			[
-				"C",
-				"M",
-				"c++",
-				"cc",
-				"cpp",
-				"cxx",
-				"mm",
-				"mpp",
-				"CPP",
-				"ixx",
-				"cppm",
-				"ccm",
-				"cxxm",
-				"c++m"
-			]
-		}
-	],
-	"version" : 
-	{
-		"major" : 1,
-		"minor" : 0
-	}
-}

BIN
.ninja_deps


+ 30 - 14
.ninja_log

@@ -1,7 +1,7 @@
 # ninja log v6
 540	28676	7691620008866687	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/report/MyIec61850Server.cpp.o	8c8a43e9c83cbe39
 249	4681	7691620005960781	modules/gateway-basic/CMakeFiles/gateway-basic.dir/src/utils/ThreadUtils.cpp.o	5d6f9aa9d944d2fb
-98	4343	7693223359154902	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/insulated-switch-server/insulated_switch_server.cpp.o	6debb6056819d6de
+35	4995	7708960780657415	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/insulated-switch-server/insulated_switch_server.cpp.o	6debb6056819d6de
 112	13421	7693237478779411	modules/gateway-server/CMakeFiles/gateway-server.dir/src/repository/FlowerOperatorRepository.cpp.o	233fc5403da47fc5
 286	5142	7691620006330796	modules/gateway-basic/CMakeFiles/gateway-basic.dir/src/utils/TimeUtils.cpp.o	95636d2c4ca71b0b
 358	9741	7691620007056128	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/executant/GPIOExecutant.cpp.o	893c68b9cd60acae
@@ -13,7 +13,7 @@
 212	11890	7691620005580642	modules/gateway-basic/CMakeFiles/gateway-basic.dir/src/utils/StringUtils.cpp.o	3455906afd556d5d
 490	26034	7693234381769501	modules/gateway-server/CMakeFiles/gateway-server.dir/src/controller/FlowerOperatorController.cpp.o	9e70dc771e46a6ed
 11892	13391	7691620122386315	deploy/library/libgateway-basic.so	a41b40461b2daf81
-52	6856	7691622842415479	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/main.cpp.o	4edd25c30a70ee81
+36	5680	7713238057123905	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/main.cpp.o	4edd25c30a70ee81
 5143	16743	7691620054903649	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/repository/ScheduleDeviceCommunicationRepository.cpp.o	2dafd0bf2b8e5e58
 5215	17164	7691620055629305	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/repository/ScheduleDeviceProtocolRepository.cpp.o	5ec11890d69fb2d0
 18268	25883	7691620186149992	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/service/ScheduleCommunicationService.cpp.o	e5ce0e16cfd3b4d0
@@ -42,10 +42,10 @@
 25453	34238	7691620257999509	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/service/ScheduleTaskFormatterService.cpp.o	cd4625953f7043b0
 25949	35387	7691620262971103	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/service/TaskExecutorService.cpp.o	bcd1dbd7090d01c0
 7926	36428	7691620082729303	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/repository/ScheduleProtocolRepository.cpp.o	3aaf10c249eda0fa
-27009	37923	7691620273560723	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/tcp_server/TcpServer.cpp.o	a1f99320b3b8c883
+82	7579	7699481774642067	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/tcp_server/TcpServer.cpp.o	a1f99320b3b8c883
 24660	43655	7691620250075588	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/service/ScheduleService.cpp.o	1eb6b9ea730c9467
 293	11083	7693237480593128	modules/gateway-server/CMakeFiles/gateway-server.dir/src/service/CommunicationService.cpp.o	2041fa7ba093b046
-4345	5749	7693223401627857	deploy/bin/gateway-scheduler	cf4d591547131fa4
+4999	6148	7708960830294005	deploy/bin/gateway-scheduler	6ad2153f61ff76af
 191	15276	7693237479564856	modules/gateway-server/CMakeFiles/gateway-server.dir/src/repository/TaskRepository.cpp.o	6e0681073bd91793
 365	21180	7693234380520195	modules/gateway-server/CMakeFiles/gateway-server.dir/src/controller/ExecutorController.cpp.o	a7fc8017e09a004f
 623	22319	7693234383107329	modules/gateway-server/CMakeFiles/gateway-server.dir/src/controller/RedisCacheController.cpp.o	590f8c53ce8621cf
@@ -69,7 +69,7 @@
 10816	16990	7693237585829003	modules/gateway-server/CMakeFiles/gateway-server.dir/src/service/DeviceService.cpp.o	1385ef52e5633e59
 11085	15547	7693237588517311	modules/gateway-server/CMakeFiles/gateway-server.dir/src/service/ExecutorService.cpp.o	c0a13ca6c85a5bf6
 15158	25660	7693237629253438	modules/gateway-server/CMakeFiles/gateway-server.dir/src/service/RedisReportCacheService.cpp.o	56450d89e102d75c
-69	6496	7693328365551542	modules/gateway-server/CMakeFiles/gateway-server.dir/src/server/BasicServer.cpp.o	3a059b9bc50684e9
+102	6034	7711605324284050	modules/gateway-server/CMakeFiles/gateway-server.dir/src/server/BasicServer.cpp.o	3a059b9bc50684e9
 13422	19258	7693237611878386	modules/gateway-server/CMakeFiles/gateway-server.dir/src/service/FlowerNodeService.cpp.o	de3b010aaccdaf3f
 21183	37230	7693234588695689	modules/gateway-server/CMakeFiles/gateway-server.dir/src/controller/UserController.cpp.o	59ff219136851c98
 242	18913	7693237480079505	modules/gateway-server/CMakeFiles/gateway-server.dir/src/server/BasicRouter.cpp.o	6b318a01684442a5
@@ -82,14 +82,30 @@
 137	25667	7693237479032802	modules/gateway-server/CMakeFiles/gateway-server.dir/src/repository/ProtocolRepository.cpp.o	c85c732f030cc6f6
 15424	22892	7693237631909631	modules/gateway-server/CMakeFiles/gateway-server.dir/src/service/TaskService.cpp.o	e3eabcaf25bac6e2
 345	21002	7693237481111927	modules/gateway-server/CMakeFiles/gateway-server.dir/src/service/DashboardDeviceService.cpp.o	7dd237d8a43ca343
-9040	11055	7693328455274321	deploy/bin/gateway-server	ce0929752e1db5b2
-12	366	7693346908107038	build.ninja	6a763902b4018f1
-40	9040	7693328365272250	modules/gateway-server/CMakeFiles/gateway-server.dir/src/large_screen_display/devices_info.cpp.o	690840fd0b4fbc98
+6036	8182	7711605383631211	deploy/bin/gateway-server	ce0929752e1db5b2
+54	371	7713238472517946	build.ninja	6a763902b4018f1
+65	14786	7711585551315968	modules/gateway-server/CMakeFiles/gateway-server.dir/src/large_screen_display/devices_info.cpp.o	690840fd0b4fbc98
 472	5214	7691620008191376	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/lora_server/LoRaServer.cpp.o	fc2812624c6741a
 13	152	7691619997487718	clean	92ade73078083541
-87	9211	7693349289438694	modules/gateway-server/CMakeFiles/gateway-server.dir/src/large_screen_display/devices_info.cpp.o	690840fd0b4fbc98
-9213	11382	7693349380687840	deploy/bin/gateway-server	ce0929752e1db5b2
-44	8054	7693350181897087	modules/gateway-server/CMakeFiles/gateway-server.dir/src/large_screen_display/devices_info.cpp.o	690840fd0b4fbc98
-8056	10428	7693350262007631	deploy/bin/gateway-server	ce0929752e1db5b2
-40	8105	7693359068066780	modules/gateway-server/CMakeFiles/gateway-server.dir/src/large_screen_display/devices_info.cpp.o	690840fd0b4fbc98
-8107	9806	7693359148732464	deploy/bin/gateway-server	ce0929752e1db5b2
+50	3566	7713238532815261	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/insulated-switch-server/SerialWriterThread.cpp.o	d98f59d899431c04
+3568	4743	7713238567991067	deploy/bin/gateway-scheduler	399acf951fc7de84
+55	3780	7713241808650466	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/insulated-switch-server/SerialWriterThread.cpp.o	d98f59d899431c04
+3781	4992	7713241845917583	deploy/bin/gateway-scheduler	399acf951fc7de84
+82	3919	7713243452083284	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/insulated-switch-server/SerialWriterThread.cpp.o	d98f59d899431c04
+3921	5162	7713243490476239	deploy/bin/gateway-scheduler	399acf951fc7de84
+65	3932	7713271903240848	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/insulated-switch-server/SerialWriterThread.cpp.o	d98f59d899431c04
+3933	5269	7713271941927708	deploy/bin/gateway-scheduler	399acf951fc7de84
+68	5041	7713932742722389	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/insulated-switch-server/insulated_switch_server.cpp.o	6debb6056819d6de
+5043	6081	7713932792461075	deploy/bin/gateway-scheduler	399acf951fc7de84
+46	3623	7713937161333468	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/insulated-switch-server/SerialWriterThread.cpp.o	d98f59d899431c04
+72	5197	7713937161593666	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/insulated-switch-server/insulated_switch_server.cpp.o	6debb6056819d6de
+5198	6229	7713937212853512	deploy/bin/gateway-scheduler	399acf951fc7de84
+50	4761	7713938780902396	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/insulated-switch-server/insulated_switch_server.cpp.o	6debb6056819d6de
+4763	5763	7713938828025818	deploy/bin/gateway-scheduler	399acf951fc7de84
+56	5019	7713941508109567	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/insulated-switch-server/insulated_switch_server.cpp.o	6debb6056819d6de
+84	5489	7713941508389584	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/main.cpp.o	4edd25c30a70ee81
+5490	6472	7713941562447823	deploy/bin/gateway-scheduler	399acf951fc7de84
+47	5193	7713956526097464	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/insulated-switch-server/insulated_switch_server.cpp.o	6debb6056819d6de
+5195	6307	7713956577570219	deploy/bin/gateway-scheduler	399acf951fc7de84
+61	4766	7713956890633987	modules/gateway-scheduler/CMakeFiles/gateway-scheduler.dir/src/insulated-switch-server/insulated_switch_server.cpp.o	6debb6056819d6de
+4769	5702	7713956937713902	deploy/bin/gateway-scheduler	399acf951fc7de84

+ 2 - 2
Testing/Temporary/LastTest.log

@@ -1,3 +1,3 @@
-Start testing: May 22 15:15 中国标准时间
+Start testing: Jun 13 17:29 中国标准时间
 ----------------------------------------------------------
-End testing: May 22 15:15 中国标准时间
+End testing: Jun 13 17:29 中国标准时间

File diff suppressed because it is too large
+ 86 - 1
build.ninja


+ 1 - 1
modules/gateway-scheduler/CMakeLists.txt

@@ -41,6 +41,6 @@ link_libraries(
 add_executable(${PROJECT_NAME} ${SRC_FILES})
 
 
-target_link_libraries(${PROJECT_NAME} PUBLIC gateway-basic)
+target_link_libraries(${PROJECT_NAME} PUBLIC gateway-basic stdc++fs)
 
 

+ 288 - 8
modules/gateway-scheduler/src/insulated-switch-server/insulated_switch_server.cpp

@@ -1,4 +1,4 @@
-
+#include <termios.h>
 #include "insulated_switch_server.h"
 
 #include <fcntl.h>
@@ -13,6 +13,10 @@
 #include <sstream>
 #include <unordered_set>
 #include <algorithm>
+#include <experimental/filesystem>  // 注意这里
+
+namespace fs = std::experimental::filesystem;
+
 using json = nlohmann::json;
 
 
@@ -22,7 +26,7 @@ std::map<std::string, std::string> deviceIdToName = {{"ABCDEF1234A1", "1"}, {"AB
 std::map<int, std::string> insulatedParaIndex = {{332,"压力"}, {30, "电池电压"}, {2054, "温度"}};
 
 
-std::string csvSavePath = "./saver/";
+std::string csvSavePath = "./inputs/";
 
 
 std::vector<std::string> splitATCommand(const std::string& data) {
@@ -106,12 +110,12 @@ float decodeInsulatedSwitchPara(std::vector<uint8_t> group){
 
 
 void saveFloatsToCSV(const std::string& filename,
-                     const std::vector<float>& data) {
+                     const std::vector<std::string>& data) {
   std::ofstream file(filename);
   if (!file.is_open()) {
     throw std::runtime_error("Failed to open file: " + filename);
   }
-
+//  std::cout << "saveFloatsToCSV " << filename << std::endl;
   // 直接写入单行数据
   for (size_t i = 0; i < data.size(); ++i) {
     file << data[i];
@@ -121,20 +125,27 @@ void saveFloatsToCSV(const std::string& filename,
 
 
 
-std::vector<float> decodeInsulatedSwitchData(const std::string& data){
+std::vector<std::string> decodeInsulatedSwitchData(const std::string& data){
+  std::vector<std::string> res;
   auto bytes = hex_string_to_bytes(&data[0]);
   print_hex_bytes(bytes);
+  if(bytes.size() != 63)
+    return res;
   uint16_t DataLen = bytes[6] >> 4;
   std::cout << "DataLen: " << DataLen << std::endl;
-  std::vector<float> res;
+
 
   for(int i = 0; i < DataLen; i++){
+    if(i == 2) //第三个压力不需要
+      continue;
     // 提取当前组的6个字节
     std::vector<uint8_t> group(
         bytes.begin() + 7 + i*6,
         bytes.begin() + 7 + i*6 + 6
     );
-    res.push_back(decodeInsulatedSwitchPara(group));
+
+
+    res.push_back(std::to_string(decodeInsulatedSwitchPara(group)));
   }
   return res;
 
@@ -160,6 +171,250 @@ std::string get_current_time_str() {
 }
 
 
+
+
+// 将十六进制字符串转换为字节数组
+std::vector<uint8_t> hex_to_bytes(const std::string& hex_str) {
+  std::vector<uint8_t> byte_data;
+  for (size_t i = 0; i < hex_str.length(); i += 2) {
+    std::string byte_str = hex_str.substr(i, 2);
+    uint8_t byte = static_cast<uint8_t>(std::stoi(byte_str, nullptr, 16));
+    byte_data.push_back(byte);
+  }
+  return byte_data;
+}
+
+float get_serial_pressure(const std::string& port_name) {
+  // 打开串口(读写模式)
+  int serial_port = open(port_name.c_str(), O_RDWR | O_NOCTTY);
+  if (serial_port < 0) {
+    std::cerr << "无法打开串口: " << port_name << std::endl;
+    return -1.0f;
+  }
+  struct termios tty;
+  memset(&tty, 0, sizeof(tty));
+
+  if (tcgetattr(serial_port, &tty) != 0) {
+    std::cerr << "tcgetattr 错误" << std::endl;
+    close(serial_port);
+    return -1.0f;
+  }
+
+  cfsetospeed(&tty, B9600);   // 设置波特率为 9600
+  cfsetispeed(&tty, B9600);
+
+  tty.c_cflag &= ~PARENB;     // 无校验
+  tty.c_cflag &= ~CSTOPB;     // 1 个停止位
+  tty.c_cflag &= ~CSIZE;
+  tty.c_cflag |= CS8;         // 8 数据位
+  tty.c_cflag &= ~CRTSCTS;    // 无硬件流控制
+  tty.c_cflag |= CREAD | CLOCAL;
+
+  tty.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); // 非规范模式,关闭回显
+  tty.c_iflag &= ~(IXON | IXOFF | IXANY);         // 关闭软件流控制
+  tty.c_oflag &= ~OPOST;                          // 原始输出
+
+  // 设置最小字符数和等待时间(非阻塞或超时)
+  tty.c_cc[VMIN] = 0;
+  tty.c_cc[VTIME] = 10;  // 1秒超时
+
+  if (tcsetattr(serial_port, TCSANOW, &tty) != 0) {
+    std::cerr << "tcsetattr 错误" << std::endl;
+    close(serial_port);
+    return -1.0f;
+  }
+
+  std::cout << "已连接串口: " << port_name << std::endl;
+
+  // 发送数据
+  std::string hexstr = "010300000002C40B";
+  std::vector<uint8_t> byte_data = hex_to_bytes(hexstr);
+
+  ssize_t bytes_written = write(serial_port, byte_data.data(), byte_data.size());
+  if (bytes_written < 0) {
+    std::cerr << "发送数据失败" << std::endl;
+    close(serial_port);
+    return -1.0f;
+  }
+
+  std::cout << "发送数据长度: " << byte_data.size() << "   ";
+  for (uint8_t byte : byte_data) {
+    std::cout << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>(byte) << " ";
+  }
+  std::cout << std::endl;
+
+  // 读取返回数据
+  uint8_t read_buffer[1024] = {0};
+  ssize_t bytes_read = read(serial_port, read_buffer, sizeof(read_buffer));
+  if (bytes_read <= 0) {
+    std::cerr << "未接收到数据" << std::endl;
+    close(serial_port);
+    return -1.0f;
+  }
+
+  std::cout << "接收数据: ";
+  for (int i = 0; i < bytes_read; ++i) {
+    std::cout << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>(read_buffer[i]) << " ";
+  }
+  std::cout << std::endl;
+
+  // 解析数据(假设返回9字节,第3-4字节为有效数据)
+  if (bytes_read == 9) {
+    uint16_t decimal_value = (read_buffer[3] << 8) | read_buffer[4];
+    if (decimal_value < 2000) {
+      float final_value = decimal_value / 10.0f;
+      std::cout << "解析值: " << final_value << std::endl;
+      close(serial_port);
+      return final_value;
+    }
+  }
+
+  close(serial_port);
+  return -1.0f; // 失败
+}
+
+
+
+
+// 将字节数组转为十六进制字符串
+std::string bytes_to_hex(const uint8_t* data, size_t length) {
+  std::stringstream ss;
+  for (size_t i = 0; i < length; ++i) {
+    ss << std::hex << std::setw(2) << std::setfill('0')
+       << static_cast<int>(data[i]) << " ";
+  }
+  return ss.str();
+}
+float get_usb_serial_pressure() {
+  // USB转串口设备路径(Linux下通常为/dev/ttyUSB0或/dev/ttyACM0)
+  const std::string usb_serial_port = "/dev/ttyUSB0";  // 根据实际设备修改
+
+  // 打开USB转串口(读写模式)
+  int serial_port = open(usb_serial_port.c_str(), O_RDWR | O_NOCTTY);
+  if (serial_port < 0) {
+    std::cerr << "无法打开USB转串口设备: " << usb_serial_port
+              << " (错误: " << strerror(errno) << ")" << std::endl;
+    return -1.0f;
+  }
+
+  // 配置串口参数
+  struct termios tty;
+  memset(&tty, 0, sizeof(tty));
+
+  if (tcgetattr(serial_port, &tty) != 0) {
+    std::cerr << "tcgetattr 错误: " << strerror(errno) << std::endl;
+    close(serial_port);
+    return -1.0f;
+  }
+
+  // 设置波特率
+  cfsetospeed(&tty, B9600);
+  cfsetispeed(&tty, B9600);
+
+  // 设置串口参数
+  tty.c_cflag &= ~PARENB;      // 无校验位
+  tty.c_cflag &= ~CSTOPB;      // 1个停止位
+  tty.c_cflag &= ~CSIZE;
+  tty.c_cflag |= CS8;          // 8数据位
+  tty.c_cflag &= ~CRTSCTS;     // 无硬件流控
+  tty.c_cflag |= CREAD | CLOCAL; // 启用接收,忽略调制解调器状态
+
+  // 输入模式设置
+  tty.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); // 非规范模式
+  tty.c_iflag &= ~(IXON | IXOFF | IXANY);         // 禁用软件流控
+  tty.c_oflag &= ~OPOST;                          // 原始输出模式
+
+  // 设置超时:100ms (VTIME以0.1秒为单位)
+  tty.c_cc[VMIN] = 0;
+  tty.c_cc[VTIME] = 1;
+
+  if (tcsetattr(serial_port, TCSANOW, &tty) != 0) {
+    std::cerr << "tcsetattr 错误: " << strerror(errno) << std::endl;
+    close(serial_port);
+    return -1.0f;
+  }
+
+  std::cout << "已连接USB转串口设备: " << usb_serial_port << std::endl;
+
+  // 准备发送的Modbus RTU命令
+  std::string hexstr = "010300000002C40B";
+  std::vector<uint8_t> byte_data = hex_to_bytes(hexstr);
+
+  // 发送数据
+  ssize_t bytes_written = write(serial_port, byte_data.data(), byte_data.size());
+  if (bytes_written < 0) {
+    std::cerr << "发送数据失败: " << strerror(errno) << std::endl;
+    close(serial_port);
+    return -1.0f;
+  }
+
+
+  std::cout << "发送数据长度: " << byte_data.size() << "   ";
+  for (uint8_t byte : byte_data) {
+    std::cout << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>(byte) << " ";
+  }
+  std::cout << std::endl;
+
+  // 读取返回数据
+  // 接收响应(循环读取)
+  std::vector<uint8_t> response;
+  uint8_t buffer[256];
+  while (true) {
+    ssize_t bytes_read = read(serial_port, buffer, sizeof(buffer));
+    if (bytes_read <= 0) break;
+    response.insert(response.end(), buffer, buffer + bytes_read);
+    if (response.size() >= 9) break;  // 根据预期长度退出
+  }
+  std::cout << "接收数据长度: " << response.size() << "   接收数据: ";
+  for (int i = 0; i < response.size(); ++i) {
+    std::cout << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>(response[i]) << " ";
+  }
+  std::cout << std::endl;
+
+  // 解析数据(假设返回9字节,第3-4字节为有效数据)
+  if (response.size() == 9)  {
+    uint16_t decimal_value = (response[3] << 8) | response[4];
+    if (decimal_value < 2000) {
+      float final_value = decimal_value / 10.0f;
+      std::cout << "解析值: " << final_value << std::endl;
+      close(serial_port);
+      return final_value;
+    }
+  }
+  close(serial_port);
+  return -1.0f; // 失败
+}
+
+
+struct FileEntry {
+  fs::path path;
+  fs::file_time_type time;
+};
+bool compareByTimeDesc(const FileEntry& a, const FileEntry& b) {
+  return a.time > b.time;
+}
+void keepOutputUnderLimit(const std::string& directoryPath, size_t maxFiles = 1000){
+  std::vector<FileEntry> files;
+
+  for (const auto& entry : fs::directory_iterator(directoryPath)) {
+    if (fs::is_regular_file(entry.status())) {
+      files.push_back({entry.path(), fs::last_write_time(entry.path())});
+    }
+  }
+
+  std::sort(files.begin(), files.end(), compareByTimeDesc);
+
+  for (size_t i = maxFiles; i < files.size(); ++i) {
+    try {
+      fs::remove(files[i].path);
+      std::cout << "已删除: " << files[i].path.filename().string() << std::endl;
+    } catch (const fs::filesystem_error& e) {
+      std::cerr << "删除失败: " << e.what() << std::endl;
+    }
+  }
+}
+
+
 void SerialPortReader::dataHandler(const std::string& data){
   if (data.find("AT+MDAT") == 0) {
 
@@ -169,8 +424,33 @@ void SerialPortReader::dataHandler(const std::string& data){
     if(whiteList.find(fields[1]) != whiteList.end()) {
       std::string path = csvSavePath + deviceIdToName[fields[1]] + "_" + get_current_time_str() + ".csv";
 //      std::cout << path << std::endl;
-      std::vector<float> res= decodeInsulatedSwitchData(fields[2]);
+      std::vector<std::string> res;
+      res.push_back(deviceIdToName[fields[1]]);
+      res.push_back(get_current_time_str());
+      std::vector<std::string> temp = decodeInsulatedSwitchData(fields[2]);
+      if(temp.empty())
+        return;
+      res.push_back(temp[3]);  //温度1
+      res.push_back(temp[4]);  //温度2
+      res.push_back(temp[5]);  //温度3
+      res.push_back(temp[6]);  //温度4
+      res.push_back(temp[7]);  //温度5
+      res.emplace_back("0");   //最大温度
+
+//      res.insert(res.end(), temp.begin(), temp.end());
+
+
+//      float pressure = get_serial_pressure("/dev/ttyS8");
+      float pressure = get_usb_serial_pressure();
+      res.push_back(std::to_string(pressure));
+      res.emplace_back("0");  //计算压力
+      res.push_back(temp[2]); //电池电压
+      res.push_back(temp[0]);
+      res.push_back(temp[1]);
       saveFloatsToCSV(path, res);
+
+      keepOutputUnderLimit("./outputs", 30000);
+
     }
   }
 }

+ 1 - 1
modules/gateway-scheduler/src/insulated-switch-server/insulated_switch_server.h

@@ -63,7 +63,7 @@ class SerialPortReader {
     while (running_.load()) {
       int n = read(fd_, buf, sizeof(buf));
       if (n > 0) {
-        std::cout << buf << std::endl;
+//        std::cout << buf << std::endl;
         std::lock_guard<std::mutex> lock(mutex_);
 
         write_to_serial("/dev/ttyS4", buf);

+ 12 - 6
modules/gateway-scheduler/src/main.cpp

@@ -2,18 +2,21 @@
 #include <exception>
 
 #include "gateway-basic/src/configuration.h"
+#include "gateway-scheduler/src/insulated-switch-server/SerialWriterThread.h"
+#include "gateway-scheduler/src/insulated-switch-server/insulated_switch_server.h"
+#include "gateway-scheduler/src/lora_server/LoRaServer.h"
+#include "gateway-scheduler/src/report/MyIec61850Server.h"
+#include "gateway-scheduler/src/report/TaskReportService.h"
 #include "gateway-scheduler/src/service/QueueService.h"
 #include "gateway-scheduler/src/service/ScheduleService.h"
-#include "gateway-scheduler/src/report/TaskReportService.h"
 #include "gateway-scheduler/src/tcp_server/TcpServer.h"
-#include "gateway-scheduler/src/report/MyIec61850Server.h"
-#include "gateway-scheduler/src/lora_server/LoRaServer.h"
-#include "gateway-scheduler/src/insulated-switch-server/insulated_switch_server.h"
 
-void terminate() { std::exit(1); }
 
 using namespace server::service;
-
+//void terminate() noexcept {
+//  std::cerr << "Custom terminate handler called." << std::endl;
+//  std::exit(1);
+//}
 int main(int argc, char* argv[]) {
   std::set_terminate(terminate);
   MESSAGE_PRINT(" scheduler starting");
@@ -33,6 +36,9 @@ int main(int argc, char* argv[]) {
       return 1;
     }
 
+    SerialWriterThread serialWriter;
+    serialWriter.start();
+
     while(true){
       sleep(1);
     }

+ 51 - 43
modules/gateway-scheduler/src/tcp_server/TcpServer.cpp

@@ -214,7 +214,11 @@ void TcpServer::handle_client(int client_socket) {
             // 水浸对象
             nlohmann::json water_data;
             water_data["name"] = "水浸状态";
-            water_data["value"] = ((buffer[7] << 8) + buffer[8]); // 0 表示无水浸,1 表示有水浸
+//            water_data["value"] = ((buffer[7] << 8) + buffer[8]); // 0 表示无水浸,1 表示有水浸
+            if((buffer[7] << 8) + buffer[8] == 0)
+              water_data["value"] = "正常";
+            else
+              water_data["value"] = "告警";
             water_data["format"] = "";
             water_data["format_id"] = 0;
             json_save["data"].push_back(water_data);
@@ -227,52 +231,56 @@ void TcpServer::handle_client(int client_socket) {
             // 烟感对象
             nlohmann::json smoke_data;
             smoke_data["name"] = "报警状态";
-            smoke_data["value"] = ((buffer[7] << 8) + buffer[8]); // 0 表示无烟,1 表示有烟
+//            smoke_data["value"] = ((buffer[7] << 8) + buffer[8]); // 0 表示无烟,1 表示有烟
+            if((buffer[7] << 8) + buffer[8] == 0)
+              smoke_data["value"] = "正常";
+            else
+              smoke_data["value"] = "告警";
             smoke_data["format"] = "";
             smoke_data["format_id"] = 0;
             json_save["data"].push_back(smoke_data);
         }
-//        else if (dev_type == 7) {
-//          device_name = "空调-" + std::to_string(dev_addr);
-//          json_save["device_name"] = "空调-" + std::to_string(dev_addr);
-//          json_save["device_id"] = dev_addr;
-//
-//          // 开关对象
-//          nlohmann::json switch_data;
-//          switch_data["name"] = "开关";
-//          switch_data["value"] = ((buffer[7] << 8) + buffer[8]);
-//          switch_data["format"] = "";
-//          switch_data["format_id"] = 0;
-//          json_save["data"].push_back(switch_data);
-//          // 模式对象
-//          nlohmann::json mode_data;
-//          mode_data["name"] = "模式";
-//          mode_data["value"] = ((buffer[9] << 8) + buffer[10]);
-//          mode_data["format"] = "";
-//          mode_data["format_id"] = 0;
-//          json_save["data"].push_back(mode_data);
-//          // 模式对象
-//          nlohmann::json set_temperature_data;
-//          set_temperature_data["name"] = "设定温度";
-//          set_temperature_data["value"] = ((buffer[11] << 8) + buffer[12]);
-//          set_temperature_data["format"] = "℃";
-//          set_temperature_data["format_id"] = 40;
-//          json_save["data"].push_back(set_temperature_data);
-//          // 模式对象
-//          nlohmann::json wind_speed_data;
-//          wind_speed_data["name"] = "风速";
-//          wind_speed_data["value"] = ((buffer[13] << 8) + buffer[14]);
-//          wind_speed_data["format"] = "m/s";
-//          wind_speed_data["format_id"] = 40;
-//          json_save["data"].push_back(wind_speed_data);
-//          // 模式对象
-//          nlohmann::json wind_direction_data;
-//          wind_direction_data["name"] = "风向";
-//          wind_direction_data["value"] = ((buffer[15] << 8) + buffer[16]);
-//          wind_direction_data["format"] = "";
-//          wind_direction_data["format_id"] = 0;
-//          json_save["data"].push_back(wind_direction_data);
-//        }
+        else if (dev_type == 7) {
+          device_name = "空调-" + std::to_string(dev_addr);
+          json_save["device_name"] = "空调-" + std::to_string(dev_addr);
+          json_save["device_id"] = dev_addr;
+
+          // 开关对象
+          nlohmann::json switch_data;
+          switch_data["name"] = "开关";
+          switch_data["value"] = ((buffer[7] << 8) + buffer[8]);
+          switch_data["format"] = "";
+          switch_data["format_id"] = 0;
+          json_save["data"].push_back(switch_data);
+          // 模式对象
+          nlohmann::json mode_data;
+          mode_data["name"] = "模式";
+          mode_data["value"] = ((buffer[9] << 8) + buffer[10]);
+          mode_data["format"] = "";
+          mode_data["format_id"] = 0;
+          json_save["data"].push_back(mode_data);
+          // 模式对象
+          nlohmann::json set_temperature_data;
+          set_temperature_data["name"] = "设定温度";
+          set_temperature_data["value"] = ((buffer[11] << 8) + buffer[12]);
+          set_temperature_data["format"] = "℃";
+          set_temperature_data["format_id"] = 40;
+          json_save["data"].push_back(set_temperature_data);
+          // 模式对象
+          nlohmann::json wind_speed_data;
+          wind_speed_data["name"] = "风速";
+          wind_speed_data["value"] = ((buffer[13] << 8) + buffer[14]);
+          wind_speed_data["format"] = "m/s";
+          wind_speed_data["format_id"] = 40;
+          json_save["data"].push_back(wind_speed_data);
+          // 模式对象
+          nlohmann::json wind_direction_data;
+          wind_direction_data["name"] = "风向";
+          wind_direction_data["value"] = ((buffer[15] << 8) + buffer[16]);
+          wind_direction_data["format"] = "";
+          wind_direction_data["format_id"] = 0;
+          json_save["data"].push_back(wind_direction_data);
+        }
 
         // 创建 Redis 连接
         redisContext *context = redisConnect("127.0.0.1", 6379);

+ 727 - 85
modules/gateway-server/src/large_screen_display/devices_info.cpp

@@ -12,17 +12,32 @@
 #include <map>
 #include <fstream>
 #include <sstream>
+#include <hiredis/hiredis.h>
+#include <sqlite3.h>
+#include <chrono>  // 时间相关头文件
 
+namespace fs = std::experimental::filesystem;  // 使用实验性版本
+
+
+struct HistoryData {
+  int id;
+  std::string data;
+  std::string time;
+  int device_id;
+  std::string device_name;
+  int gateway_id;
+  std::string status;
+};
 
 
-namespace fs = std::experimental::filesystem;  // 使用实验性版本
 
-string device_info_path = "./res";
+
+string device_info_path = "./outputs/";
 
 
 std::string formatTimestamp(const std::string& filename) {
   // 提取时间部分(假设固定格式)
-  std::string time_str = filename.substr(8, 19); // 跳过"1_"
+  std::string time_str = filename.substr(2, 19); // 跳过"1_"
 
   // 转换为tm结构
   struct tm tm = {0};
@@ -48,6 +63,7 @@ std::vector<string> readSingleLineCSV(const std::string& filename) {
   std::ifstream file(filename);
   if (!file.is_open()) {
     throw std::runtime_error("无法打开文件: " + filename);
+    return {};
   }
 
   std::string line;
@@ -73,9 +89,12 @@ std::vector<string> readSingleLineCSV(const std::string& filename) {
 
       // 转换为double
 //      row.push_back(std::stod(cell));
+//      std::ostringstream oss;
+//      oss << std::fixed << std::setprecision(2) << std::stod(cell);
       row.push_back(cell);
     } catch (const std::exception& e) {
       throw std::runtime_error("转换失败: '" + cell + "' 不是有效的浮点数");
+      return {};
     }
   }
 
@@ -83,15 +102,19 @@ std::vector<string> readSingleLineCSV(const std::string& filename) {
 }
 
 
-std::vector<fs::directory_entry> getMatchFileWithPrefix(const std::string& path, int id){
-  std::vector<fs::directory_entry> matching_files;
+std::vector<string> getMatchFileWithPrefix(const std::string& path, int id){
+  std::vector<string> matching_files;
   // 遍历目录,收集所有匹配前缀的文件
   for (const auto& entry : fs::directory_iterator(path)) {
     std::string filename = entry.path().filename().string();
     if (filename.rfind(to_string(id) + "_", 0) == 0) { // 检查是否以prefix开头
-      matching_files.push_back(entry);
+      matching_files.push_back(filename);
+      //formatTimestamp(filename);
     }
   }
+
+  std::sort(matching_files.begin(), matching_files.end(), std::greater<>());
+
   return matching_files;
 }
 
@@ -122,6 +145,319 @@ std::string getLatestFileWithPrefix(const std::string& path, const std::string&
 }
 
 
+struct AlertData {
+  std::string device_name;
+  std::string timestamp;
+  std::string alert_type;
+  std::string alert_value;
+};
+json createNariAbnormalStatus(){
+  sqlite3* db;
+  sqlite3_stmt* stmt;
+  std::vector<AlertData> results;
+
+  // 打开数据库连接
+  int rc = sqlite3_open("/usr/local/bin/database/sqlite/history_data.db", &db);
+  if (rc != SQLITE_OK) {
+    throw std::runtime_error("无法打开数据库: " + std::string(sqlite3_errmsg(db)));
+  }
+
+  // 查询所有相关数据
+  const char* sql_select_data = "SELECT device_name, time, data FROM history_data "
+      "WHERE (device_name LIKE '%水浸%' OR "
+      "device_name LIKE '%烟雾%' OR "
+      "device_name LIKE '%温湿度%')";
+
+  // 准备SQL语句
+  rc = sqlite3_prepare_v2(db, sql_select_data, -1, &stmt, nullptr);
+  if (rc != SQLITE_OK) {
+    throw std::runtime_error("SQL准备失败: " + std::string(sqlite3_errmsg(db)));
+  }
+  // 执行查询
+  char *zErrMsg = 0;
+  rc = sqlite3_exec(db, sql_select_data, nullptr, 0, &zErrMsg);
+  if (rc != SQLITE_OK) {
+    fprintf(stderr, "SQL error: %s\n", zErrMsg);
+    sqlite3_free(zErrMsg);
+  }
+
+  while (sqlite3_step(stmt) == SQLITE_ROW) {
+    std::string device_name = reinterpret_cast<const char*>(sqlite3_column_text(stmt, 0));
+    std::string timestamp = reinterpret_cast<const char*>(sqlite3_column_text(stmt, 1));
+    std::string data_str = reinterpret_cast<const char*>(sqlite3_column_text(stmt, 2));
+
+    try {
+      json data_json = json::parse(data_str);
+
+      // 检查是否为数组
+      if (!data_json.is_array()) {
+        continue;
+      }
+
+      for (const auto& item : data_json) {
+        // 水浸设备检查
+        if (device_name.find("水浸") != std::string::npos) {
+          if (item["name"] == "水浸状态" && item["value"] == 1) {
+            results.push_back({
+                device_name,
+                timestamp,
+                "水浸告警",
+                "告警"
+            });
+          }
+        }
+        // 烟雾设备检查
+        else if (device_name.find("烟雾") != std::string::npos) {
+          if (item["name"] == "报警状态" && item["value"] == 1) {
+            results.push_back({
+                device_name,
+                timestamp,
+                "烟雾告警",
+                "告警"
+            });
+          }
+        }
+        // 温湿度设备检查
+        else if (device_name.find("温湿度") != std::string::npos) {
+          if (item["name"] == "温度" && item["value"].get<double>() > 50) {
+            // 方法1:使用ostringstream格式化(推荐)
+            std::ostringstream oss;
+            oss << std::fixed << std::setprecision(1) << item["value"].get<double>();
+            std::string formattedValue = oss.str();
+
+            // 移除末尾多余的0(如52.0 -> 52)
+            formattedValue.erase(formattedValue.find_last_not_of('0') + 1, std::string::npos);
+            if (formattedValue.back() == '.') {
+              formattedValue.pop_back();
+            }
+
+            // 安全获取format字段
+            std::string unit = item.contains("format") ?
+                                                       item["format"].get<std::string>() :
+                                                       "℃"; // 默认单位
+
+            results.push_back({
+                device_name,
+                timestamp,
+                "高温告警",
+                formattedValue + " " + unit
+            });
+          }
+          if (item["name"] == "湿度" && item["value"].get<double>() > 80) {
+            // 方法1:使用ostringstream格式化(推荐)
+            std::ostringstream oss;
+            oss << std::fixed << std::setprecision(1) << item["value"].get<double>();
+            std::string formattedValue = oss.str();
+
+            // 移除末尾多余的0(如52.0 -> 52)
+            formattedValue.erase(formattedValue.find_last_not_of('0') + 1, std::string::npos);
+            if (formattedValue.back() == '.') {
+              formattedValue.pop_back();
+            }
+
+            // 安全获取format字段
+            std::string unit = item.contains("format") ?
+                                                       item["format"].get<std::string>() :
+                                                       "%RH"; // 默认单位
+
+            results.push_back({
+                device_name,
+                timestamp,
+                "高湿告警",
+                formattedValue + " " + unit
+            });
+          }
+        }
+      }
+    } catch (const json::parse_error& e) {
+      std::cerr << "JSON解析错误: " << e.what() << std::endl;
+      continue;
+    } catch (const std::exception& e) {
+      std::cerr << "数据处理错误: " << e.what() << std::endl;
+      continue;
+    }
+  }
+  sqlite3_finalize(stmt);
+  sqlite3_close(db);
+//  return results;
+  json result = json::array(); // 创建 JSON 数组
+
+  for (const auto& alert : results) {
+    json alertJson;
+    alertJson["device_name"] = alert.device_name;
+    alertJson["timestamp"] = alert.timestamp;
+    alertJson["alert_type"] = alert.alert_type;
+    alertJson["alert_value"] = alert.alert_value;
+
+    result.push_back(alertJson); // 将每个告警添加到数组
+  }
+
+  return result;
+
+}
+
+
+std::vector<Device> createNariDeviceInfo() {
+  sqlite3* db = nullptr;
+  sqlite3_stmt* stmt = nullptr;
+  std::vector<HistoryData> results;
+  std::vector<Device> devices;
+
+  // 打开数据库连接
+  int rc = sqlite3_open("/usr/local/bin/database/sqlite/history_data.db", &db);
+  if (rc != SQLITE_OK) {
+    throw std::runtime_error("无法打开数据库: " + std::string(sqlite3_errmsg(db)));
+  }
+
+//  std::cout << "===== 111开始查询每个设备的最新记录 =====" << std::endl;
+
+        // 使用窗口函数的SQL查询(SQLite 3.25.0+)
+  const char* sql_select_data  = R"(
+        SELECT id, data, time, device_id, device_name, gateway_id, status
+        FROM (
+            SELECT *,
+                   ROW_NUMBER() OVER (PARTITION BY device_name ORDER BY time DESC) as rn
+            FROM history_data
+        )
+        WHERE rn = 1
+    )";
+
+    // 准备SQL语句
+    rc = sqlite3_prepare_v2(db, sql_select_data, -1, &stmt, nullptr);
+    if (rc != SQLITE_OK) {
+      throw std::runtime_error("SQL准备失败: " + std::string(sqlite3_errmsg(db)));
+    }
+     // 执行查询
+    char *zErrMsg = 0;
+    rc = sqlite3_exec(db, sql_select_data, nullptr, 0, &zErrMsg);
+    if (rc != SQLITE_OK) {
+      fprintf(stderr, "SQL error: %s\n", zErrMsg);
+      sqlite3_free(zErrMsg);
+    }
+
+        // 执行查询
+  while ((rc = sqlite3_step(stmt)) == SQLITE_ROW) {
+    HistoryData record;
+
+    // 安全地获取每列数据
+    record.id = sqlite3_column_int(stmt, 0);
+
+    const unsigned char* data = sqlite3_column_text(stmt, 1);
+    record.data = data ? reinterpret_cast<const char*>(data) : "";
+
+    const unsigned char* time = sqlite3_column_text(stmt, 2);
+    record.time = time ? reinterpret_cast<const char*>(time) : "";
+
+    record.device_id = sqlite3_column_int(stmt, 3);
+
+    const unsigned char* name = sqlite3_column_text(stmt, 4);
+    record.device_name = name ? reinterpret_cast<const char*>(name) : "";
+
+    record.gateway_id = sqlite3_column_int(stmt, 5);
+
+    const unsigned char* status = sqlite3_column_text(stmt, 6);
+    record.status = status ? reinterpret_cast<const char*>(status) : "";
+
+    // 打印记录
+    std::cout << "\n===== 设备 " << record.device_name << " 的最新记录 =====" << std::endl;
+    std::cout << "ID: " << record.id << std::endl;
+    std::cout << "数据: " << record.data << std::endl;
+    std::cout << "时间: " << record.time << std::endl;
+    std::cout << "设备ID: " << record.device_id << std::endl;
+    std::cout << "网关ID: " << record.gateway_id << std::endl;
+    std::cout << "状态: " << record.status << std::endl;
+
+    results.push_back(record);
+    json jsonArray = json::parse(record.data);
+    std::vector<Measure> measures;
+    for (const auto& item : jsonArray) {
+      Measure measure;
+
+      // 提取 name 和 value
+      measure.point = item["name"].get<std::string>();
+
+      // 处理 value,它可能是数字或字符串
+      if (item["value"].is_number()) {
+
+        std::ostringstream oss;
+        oss << std::fixed << std::setprecision(1) << item["value"].get<double>();
+        measure.value = oss.str() + " " + item["format"].get<std::string>();
+      } else {
+        measure.value = item["value"].get<std::string>() + " " + item["format"].get<std::string>();
+      }
+
+      measures.push_back(measure);
+    }
+
+
+    Device device = {record.device_name, measures};
+    devices.push_back(device);
+  }
+
+  if (rc != SQLITE_DONE) {
+    throw std::runtime_error("查询执行错误: " + std::string(sqlite3_errmsg(db)));
+  }
+
+  std::cout << "\n===== 查询完成,共找到 " << results.size() << " 条记录 =====" << std::endl;
+  // 释放资源
+  if (stmt) sqlite3_finalize(stmt);
+  if (db) sqlite3_close(db);
+  return devices;
+//
+//  return {
+//      {"水浸-1", {{ "水浸状态", "正常" }}},
+//      {"温湿度-1", {{ "温度", "28℃" }, { "湿度", "56%" }}},
+//      {"水浸-2", {{ "水浸状态", "正常" }}},
+//      {"温湿度-2", {{ "温度", "28℃" }, { "湿度", "56%" }}},
+//      {"水浸-3", {{ "水浸状态", "正常" }}},
+//      {"温湿度-3", {{ "温度", "28℃" }, { "湿度", "56%" }}},
+//      {"水浸-4", {{ "水浸状态", "正常" }}},
+//      {"温湿度-4", {{ "温度", "28℃" }, { "湿度", "56%" }}},
+//      {"水浸-5", {{ "水浸状态", "正常" }}},
+//      {"温湿度-5", {{ "温度", "28℃" }, { "湿度", "56%" }}},
+//      {"空调-1",{
+//                     {"开关", "0"},
+//                     {"模式", "0"},
+//                     {"设定温度", "30"},
+//                     {"风速", "40"},
+//                     {"风向", "0"}}
+//      },
+//  };
+}
+
+
+void get_latest_device_info(int deviceid, std::vector<Device> &devices){
+  std::string file = getLatestFileWithPrefix(device_info_path, to_string(deviceid)+"_");
+  Device device = {};
+  string name;
+  if(deviceid == 1)
+    name = "触头感知监测终端A";
+  else if(deviceid == 2)
+    name = "触头感知监测终端B";
+  else if(deviceid == 3)
+    name = "触头感知监测终端C";
+
+  if (!file.empty()) {
+    std::cout << "Latest file with prefix '" << deviceid << "': " << file << std::endl;
+    auto data = readSingleLineCSV(file);
+    if(!data.empty()) {
+      float max_val = std::max({std::stof(data[3]), std::stof(data[4]), std::stof(data[5]), std::stof(data[6]), std::stof(data[2])});
+      std::ostringstream oss, oss1, oss2;
+      oss << std::fixed << std::setprecision(2) << max_val;
+      Measure measure1 = {"温度", oss.str()};
+      oss1 << std::fixed << std::setprecision(2) << std::stof(data[9]);
+      Measure measure2 = {"压力", oss1.str()};
+      oss2 << std::fixed << std::setprecision(2) << std::stof(data[10]);
+      Measure measure3 = {"电池电压", oss2.str()};
+      std::vector<Measure> measures = {measure1, measure2, measure3};
+      devices.push_back({name, measures});
+    }else{
+      fs::remove(file);
+    }
+  } else {
+    std::cout << "No file found with prefix '" << "1_" << "'" << std::endl;
+  }
+}
 
 // 创建模拟数据
 std::vector<Device> createDeviceInfo() {
@@ -137,66 +473,64 @@ std::vector<Device> createDeviceInfo() {
   // 获取以不同前缀开头的最新文件
   std::map<std::string, std::string> latest_files;
 
-  std::string file = getLatestFileWithPrefix(device_info_path, "1_");
-  if (!file.empty()) {
-//    std::cout << "Latest file with prefix '" << "1_" << "': " << file << std::endl;
-    auto data = readSingleLineCSV(file);
-    Measure measure1 = {"温度", (data[0])};
-    Measure measure2 = {"压力", (data[1])};
-    Measure measure3 = {"电池电压", (data[2])};
-    std::vector<Measure> measures = {measure1, measure2, measure3};
-    devices.push_back({"触头感知监测终端A",measures});
-  } else {
-    std::cout << "No file found with prefix '" << "1_" << "'" << std::endl;
-  }
+  get_latest_device_info(1, devices);
+  get_latest_device_info(2, devices);
+  get_latest_device_info(3, devices);
 
-  file = getLatestFileWithPrefix(device_info_path, "2_");
-  if (!file.empty()) {
+//  std::string file = getLatestFileWithPrefix(device_info_path, "1_");
+//  if (!file.empty()) {
+//    std::cout << "Latest file with prefix '" << "1_" << "': " << file << std::endl;
+//    auto data = readSingleLineCSV(file);
+//    if(!data.empty()) {
+//      float max_val = std::max({std::stof(data[3]), std::stof(data[4]), std::stof(data[5]), std::stof(data[6]), std::stof(data[2])});
+//      Measure measure1 = {"温度", to_string(max_val)};
+//      Measure measure2 = {"压力", (data[9])};
+//      Measure measure3 = {"电池电压", (data[10])};
+//      std::vector<Measure> measures = {measure1, measure2, measure3};
+//      devices.push_back({"触头感知监测终端A", measures});
+//    }else{
+//      fs::remove(file);
+//    }
+//  } else {
+//    std::cout << "No file found with prefix '" << "1_" << "'" << std::endl;
+//  }
+//
+//  file = getLatestFileWithPrefix(device_info_path, "2_");
+//  if (!file.empty()) {
 //    std::cout << "Latest file with prefix '" << "2_" << "': " << file << std::endl;
-    auto data = readSingleLineCSV(file);
-    Measure measure1 = {"温度", (data[0])};
-    Measure measure2 = {"压力", (data[1])};
-    Measure measure3 = {"电池电压", (data[2])};
-    std::vector<Measure> measures = {measure1, measure2, measure3};
-    devices.push_back({"触头感知监测终端B",measures});
-  } else {
-    std::cout << "No file found with prefix '" << "2_" << "'" << std::endl;
-  }
-
-  file = getLatestFileWithPrefix(device_info_path, "3_");
-  if (!file.empty()) {
+//    auto data = readSingleLineCSV(file);
+//    if(!data.empty()) {
+//      Measure measure1 = {"温度", (data[0])};
+//      Measure measure2 = {"压力", (data[1])};
+//      Measure measure3 = {"电池电压", (data[2])};
+//      std::vector<Measure> measures = {measure1, measure2, measure3};
+//      devices.push_back({"触头感知监测终端B", measures});
+//    }else{
+//      fs::remove(file);
+//    }
+//  } else {
+//    std::cout << "No file found with prefix '" << "2_" << "'" << std::endl;
+//  }
+//
+//  file = getLatestFileWithPrefix(device_info_path, "3_");
+//  if (!file.empty()) {
 //    std::cout << "Latest file with prefix '" << "3_" << "': " << file << std::endl;
-    auto data = readSingleLineCSV(file);
-    Measure measure1 = {"温度", (data[0])};
-    Measure measure2 = {"压力", (data[1])};
-    Measure measure3 = {"电池电压", (data[2])};
-    std::vector<Measure> measures = {measure1, measure2, measure3};
-    devices.push_back({"触头感知监测终端C",measures});
-  } else {
-    std::cout << "No file found with prefix '" << "3_" << "'" << std::endl;
-  }
+//    auto data = readSingleLineCSV(file);
+//    if(!data.empty()) {
+//      Measure measure1 = {"温度", (data[0])};
+//      Measure measure2 = {"压力", (data[1])};
+//      Measure measure3 = {"电池电压", (data[2])};
+//      std::vector<Measure> measures = {measure1, measure2, measure3};
+//      devices.push_back({"触头感知监测终端C", measures});
+//    }else{
+//      fs::remove(file);
+//    }
+//  } else {
+//    std::cout << "No file found with prefix '" << "3_" << "'" << std::endl;
+//  }
   return devices;
 
 
-//  return {
-//          {"水浸-1", {{ "水浸状态", "正常" }}},
-//          {"温湿度-1", {{ "温度", "28℃" }, { "湿度", "56%" }}},
-//          {"水浸-2", {{ "水浸状态", "正常" }}},
-//          {"温湿度-2", {{ "温度", "28℃" }, { "湿度", "56%" }}},
-//          {"水浸-3", {{ "水浸状态", "正常" }}},
-//          {"温湿度-3", {{ "温度", "28℃" }, { "湿度", "56%" }}},
-//          {"水浸-4", {{ "水浸状态", "正常" }}},
-//          {"温湿度-4", {{ "温度", "28℃" }, { "湿度", "56%" }}},
-//          {"水浸-5", {{ "水浸状态", "正常" }}},
-//          {"温湿度-5", {{ "温度", "28℃" }, { "湿度", "56%" }}},
-//          {"空调-1",{
-//                  {"开关", "0"},
-//                  {"模式", "0"},
-//                  {"设定温度", "30"},
-//                  {"风速", "40"},
-//                  {"风向", "0"}}
-//      },
-//  };
 }
 
 std::vector<AllowDevice> allowDevice() {
@@ -319,34 +653,111 @@ std::vector<Device> control_devices_status() {
 //  return root;
 //}
 
-json createDeviceHistoryJson(int id){
+// 工具函数:将 ISO 8601 字符串转换为 time_t 时间戳
+time_t parseISO8601ToTimeT(const std::string& isoTimeStr) {
+  std::tm tm = {};
+  int year, month, day, hour, min, sec;
+  char dummy;
 
-  json measurements = json::array();
+  // 使用 sscanf 解析 YYYY-MM-DDTHH:MM:SS 格式
+  if (sscanf(isoTimeStr.c_str(), "%d-%d-%d%c%d:%d:%d",
+             &year, &month, &day, &dummy, &hour, &min, &sec) != 7) {
+    std::cerr << "Failed to parse time string: " << isoTimeStr << std::endl;
+    return -1;
+  }
+
+  tm.tm_year = year - 1900;  // 年份从 1900 开始
+  tm.tm_mon = month - 1;     // 月份从 0 开始
+  tm.tm_mday = day;
+  tm.tm_hour = hour;
+  tm.tm_min = min;
+  tm.tm_sec = sec;
+  tm.tm_isdst = -1;          // 自动处理夏令时
 
+  return std::mktime(&tm);
+}
+// 判断 time 是否在 [start_time, end_time] 区间内
+bool isTimeInRange(
+    const std::string& time,
+    const char* start_time,
+    const char* end_time)
+{
+  time_t t = parseISO8601ToTimeT(time);
+  time_t start = parseISO8601ToTimeT(std::string(start_time));
+  time_t end = parseISO8601ToTimeT(std::string(end_time));
+
+  if (t == -1 || start == -1 || end == -1) {
+    std::cerr << "Error parsing time." << std::endl;
+    return false;
+  }
+
+  return (t >= start && t <= end);
+}
+
+std::string formatToTwoDecimal(float value) {
+  std::ostringstream oss;
+  oss << std::fixed << std::setprecision(2) << value;
+  return oss.str();
+}
+json createDeviceHistoryJson(int id, const char *start_time, const char *end_time){
 
-  std::vector<fs::directory_entry> files = getMatchFileWithPrefix(device_info_path, id);
+  json measurements = json::array();
+
+  std::vector<string> files = getMatchFileWithPrefix(device_info_path, id);
   for(const auto file :files){
     json timestamp_obj;
-    timestamp_obj["timestamp"] = formatTimestamp(file.path().string());
+    string time = formatTimestamp(file);
+    if(start_time != nullptr && end_time != nullptr && !isTimeInRange(time, start_time, end_time))
+      continue;
+
+
+    timestamp_obj["timestamp"] = time;
 
-    std::cout << "file : " << file.path().string() << std::endl;
-    auto data = readSingleLineCSV(file.path().string());
+//    std::cout << "createDeviceHistoryJson file : " << file << std::endl;
+//    std::cout << "createDeviceHistoryJson file : " << timestamp_obj["timestamp"] << std::endl;
+    auto data = readSingleLineCSV(device_info_path + file);
+    if(data.empty())
+      continue;
 
     json values_array = json::array();
+
+    float temp1 = std::stof(data[2]);
+    float temp2 = std::stof(data[3]);
+    float temp3 = std::stof(data[4]);
+    float temp4 = std::stof(data[5]);
+    float temp5 = std::stof(data[6]);
     // 温度数据
     json temperature;
-    temperature["name"] = "温度";
-    temperature["value"] = data[0]; // 动态值
+    temperature["name"] = "温度1";
+    temperature["value"] = formatToTwoDecimal(temp1); // 动态值
+    values_array.push_back(temperature);
+    temperature["name"] = "温度2";
+    temperature["value"] = formatToTwoDecimal(temp2); // 动态值
+    values_array.push_back(temperature);
+    temperature["name"] = "温度3";
+    temperature["value"] = formatToTwoDecimal(temp3);; // 动态值
+    values_array.push_back(temperature);
+    temperature["name"] = "温度4";
+    temperature["value"] = formatToTwoDecimal(temp4); // 动态值
+    values_array.push_back(temperature);
+    temperature["name"] = "温度5";
+    temperature["value"] = formatToTwoDecimal(temp5); // 动态值
+    values_array.push_back(temperature);
+    temperature["name"] = "最大温度";
+    float max_val = std::max({
+        temp1,temp2,temp3,temp4,temp5
+    });
+    temperature["value"] = formatToTwoDecimal(max_val); // 动态值
     values_array.push_back(temperature);
     // 压力数据
     json pressure;
     pressure["name"] = "压力";
-    pressure["value"] = data[1]; // 动态值
+    pressure["value"] = formatToTwoDecimal(std::stof(data[9])); // 动态值
     values_array.push_back(pressure);
     // 电池电压数据
     json battery_voltage;
     battery_voltage["name"] = "电池电压";
-    battery_voltage["value"] = data[2]; // 动态值
+    battery_voltage["value"] = formatToTwoDecimal(std::stof(data[10])); // 动态值
     values_array.push_back(battery_voltage);
     // 将 values 数组添加到时间点对象
     timestamp_obj["values"] = values_array;
@@ -356,33 +767,262 @@ json createDeviceHistoryJson(int id){
   return measurements;
 }
 
-json createDeviceHistoryData() {
+json createDeviceHistoryData(const char *start_time, const char *end_time) {
+  // ✅ 记录开始时间
+  auto start = std::chrono::high_resolution_clock::now();
+
   // 创建根数组
   json root = json::array();
 
+  json device1 = createDeviceHistoryJson(1, start_time, end_time);
   json device_obj;
-  device_obj["device_name"] = "触头感知监测终端A";
-  // 将 measurements 数组添加到设备对象
-  device_obj["measurements"] = createDeviceHistoryJson(1);
-  root.push_back(device_obj);
-
-  device_obj["device_name"] = "触头感知监测终端B";
-  // 将 measurements 数组添加到设备对象
-  device_obj["measurements"] = createDeviceHistoryJson(2);
-  root.push_back(device_obj);
+  if(!device1.empty()) {
+    device_obj["device_name"] = "触头感知监测终端A";
+    // 将 measurements 数组添加到设备对象
+    device_obj["measurements"] = device1;
+    root.push_back(device_obj);
+  }
 
-  device_obj["device_name"] = "触头感知监测终端C";
-  // 将 measurements 数组添加到设备对象
-  device_obj["measurements"] = createDeviceHistoryJson(3);
-  root.push_back(device_obj);
+  json device2 = createDeviceHistoryJson(2, start_time, end_time);
+  if(!device2.empty()) {
+    device_obj["device_name"] = "触头感知监测终端B";
+    // 将 measurements 数组添加到设备对象
+    device_obj["measurements"] = device2;
+    root.push_back(device_obj);
+  }
 
+  json device3 = createDeviceHistoryJson(3, start_time, end_time);
+  if(!device3.empty()) {
+    device_obj["device_name"] = "触头感知监测终端C";
+    // 将 measurements 数组添加到设备对象
+    device_obj["measurements"] = createDeviceHistoryJson(3, start_time, end_time);
+    root.push_back(device_obj);
+  }
   // 打印生成的 JSON 数据
-  std::cout << root.dump(4) << std::endl; // 格式化输出,缩进为 4 个空格
+//  std::cout << root.dump(4) << std::endl; // 格式化输出,缩进为 4 个空格
+
+  // ✅ 记录结束时间
+  auto end = std::chrono::high_resolution_clock::now();
+
+  // ✅ 计算耗时(微秒、毫秒、秒)
+  auto duration_us = std::chrono::duration_cast<std::chrono::microseconds>(end - start).count();
+  auto duration_ms = std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count();
+  auto duration_s  = std::chrono::duration_cast<std::chrono::seconds>(end - start).count();
+  // ✅ 输出结果
+  std::cout << "运行时间: " << duration_us << " 微秒" << std::endl;
+  std::cout << "运行时间: " << duration_ms << " 毫秒" << std::endl;
+  std::cout << "运行时间: " << duration_s << " 秒" << std::endl;
+
 
   return root;
 }
 
 
+json getAbnormalStatus(){
+//  json res = json::array();
+  std::vector<AlertData> results;
+  for (const auto& entry : fs::directory_iterator(device_info_path)) {
+    std::string filename = entry.path().filename().string();
+//    std::cout << filename << std::endl;
+    auto rows = readSingleLineCSV(device_info_path + filename);
+    if(rows.empty())
+      continue;
+    string device_name;
+    if (filename.rfind(to_string(1) + "_", 0) == 0)
+      device_name = "触头感知监测终端A";
+    else if (filename.rfind(to_string(2) + "_", 0) == 0)
+      device_name = "触头感知监测终端B";
+    else if (filename.rfind(to_string(3) + "_", 0) == 0)
+      device_name = "触头感知监测终端C";
+
+    float max_val = std::max({
+        std::stof(rows[3]),
+        std::stof(rows[4]),
+        std::stof(rows[5]),
+        std::stof(rows[6]),
+        std::stof(rows[2])
+    });
+    string tempeture = to_string(max_val);
+    string pressure = rows[9];
+    string voltage = rows[10];
+    if(std::stof(tempeture) > 105.0f){
+      results.push_back({
+          device_name,
+          formatTimestamp(filename),
+          "温度状态异常",
+          tempeture,
+      });
+    }
+    if(std::stof(pressure) < 45.0f){
+      results.push_back({
+          device_name,
+          formatTimestamp(filename),
+          "压力状态异常",
+          pressure,
+      });
+    }
+    if(std::stof(voltage) < 3.0f){
+      results.push_back({
+          device_name,
+          formatTimestamp(filename),
+          "电池电压异常",
+          voltage,
+      });
+    }
+  }
+
+  json result = json::array(); // 创建 JSON 数组
+
+  for (const auto& alert : results) {
+    json alertJson;
+    alertJson["device_name"] = alert.device_name;
+    alertJson["timestamp"] = alert.timestamp;
+    alertJson["alert_type"] = alert.alert_type;
+    alertJson["alert_value"] = alert.alert_value;
+
+    result.push_back(alertJson); // 将每个告警添加到数组
+  }
+
+  return result;
+}
+
+
+
+struct TimestampData {
+  std::string timestamp;
+  std::vector<Measure> values;
+};
+struct DeviceHistoryChart {
+  std::string device_name;
+  std::vector<TimestampData> measurements;
+};
+
+json createNariDeviceHistoryData() {
+  sqlite3* db = nullptr;
+  sqlite3_stmt* stmt = nullptr;
+  std::vector<HistoryData> results;
+  std::vector<Device> devices;
+  std::map<std::string, std::map<std::string, std::vector<Measure>>> tempData;
+  std::vector<DeviceHistoryChart> result;
+
+
+  // 打开数据库连接
+  int rc = sqlite3_open("/usr/local/bin/database/sqlite/history_data.db", &db);
+  if (rc != SQLITE_OK) {
+    throw std::runtime_error("无法打开数据库: " + std::string(sqlite3_errmsg(db)));
+  }
+
+  std::cout << "===== 111开始查询每个设备的最新记录 =====" << std::endl;
+
+  // 使用窗口函数的SQL查询(SQLite 3.25.0+)
+  const char* sql_select_data = "SELECT data, time, device_name FROM history_data";
+  // 准备SQL语句
+  rc = sqlite3_prepare_v2(db, sql_select_data, -1, &stmt, nullptr);
+  if (rc != SQLITE_OK) {
+    throw std::runtime_error("SQL准备失败: " + std::string(sqlite3_errmsg(db)));
+  }
+  // 执行查询
+  char *zErrMsg = 0;
+  rc = sqlite3_exec(db, sql_select_data, nullptr, 0, &zErrMsg);
+  if (rc != SQLITE_OK) {
+    fprintf(stderr, "SQL error: %s\n", zErrMsg);
+    sqlite3_free(zErrMsg);
+  }
+
+  // 执行查询
+  while ((rc = sqlite3_step(stmt)) == SQLITE_ROW) {
+    // 获取字段值
+    const char* dataJson = reinterpret_cast<const char*>(sqlite3_column_text(stmt, 0));
+    const char* timestamp = reinterpret_cast<const char*>(sqlite3_column_text(stmt, 1));
+    const char* deviceName = reinterpret_cast<const char*>(sqlite3_column_text(stmt, 2));
+
+    try {
+      // 解析data字段中的JSON数组
+      json measurements = json::parse(dataJson);
+
+      // 为每个时间戳创建值列表
+      std::vector<Measure> values;
+      for (auto& item : measurements) {
+        Measure mv;
+        mv.point = item["name"].get<std::string>();
+
+        // 处理value字段,确保是字符串
+        if (item["value"].is_number()) {
+//          mv.value = std::to_string(item["value"].get<double>());
+          std::ostringstream oss;
+          oss << std::fixed << std::setprecision(1) << item["value"].get<double>();
+          mv.value = oss.str();
+        } else {
+          mv.value = item["value"].get<std::string>();
+        }
+        values.push_back(mv);
+      }
+
+      // 添加到临时数据结构
+      tempData[deviceName][timestamp] = values;
+
+    } catch (const json::parse_error& e) {
+      std::cerr << "JSON解析错误: " << e.what() << " 数据: " << dataJson << std::endl;
+      continue;
+    }
+  }
+
+  if (rc != SQLITE_DONE) {
+    throw std::runtime_error("查询执行错误: " + std::string(sqlite3_errmsg(db)));
+  }
+
+  std::cout << "\n===== 查询完成,共找到 " << results.size() << " 条记录 =====" << std::endl;
+  // 释放资源
+  if (stmt) sqlite3_finalize(stmt);
+  if (db) sqlite3_close(db);
+
+
+
+  // 转换临时数据结构为最终格式
+  for (auto& device : tempData) {
+    DeviceHistoryChart dh;
+    dh.device_name = device.first;
+
+    for (auto& timestamp : device.second) {
+      TimestampData td;
+      td.timestamp = timestamp.first;
+      td.values = timestamp.second;
+      dh.measurements.push_back(td);
+    }
+
+    result.push_back(dh);
+  }
+
+  // 转换为JSON
+  json j;
+  for (auto& device : result) {
+    json deviceJson;
+    deviceJson["device_name"] = device.device_name;
+
+    json measurementsJson = json::array();
+    for (auto& measurement : device.measurements) {
+      json measurementJson;
+      measurementJson["timestamp"] = measurement.timestamp;
+
+      json valuesJson = json::array();
+      for (auto& value : measurement.values) {
+        json valueJson;
+        valueJson["name"] = value.point;
+        valueJson["value"] = value.value;
+        valuesJson.push_back(valueJson);
+      }
+
+      measurementJson["values"] = valuesJson;
+      measurementsJson.push_back(measurementJson);
+    }
+
+    deviceJson["measurements"] = measurementsJson;
+    j.push_back(deviceJson);
+  }
+
+  return j;
+}
+
 json allowDeviceInfoToJson(const std::vector<AllowDevice>& devices) {
   json j = json::array();
   for (const auto& device : devices) {
@@ -394,6 +1034,8 @@ json allowDeviceInfoToJson(const std::vector<AllowDevice>& devices) {
 // 将设备信息转换为 JSON 格式
 json deviceInfoToJson(const std::vector<Device>& devices) {
   json j = json::array();
+  if(devices.empty())
+    return j;
   for (const auto& device : devices) {
     json deviceJson;
     deviceJson["device_name"] = device.device_name;

+ 5 - 1
modules/gateway-server/src/large_screen_display/devices_info.h

@@ -49,8 +49,12 @@ struct DeviceHistory {
 vector<Device> control_devices_status();
 json deviceInfoToJson(const vector<Device>& devices);
 vector<Device> createDeviceInfo();
+vector<Device> createNariDeviceInfo();
 vector<AllowDevice> allowDevice();
-json createDeviceHistoryData();
+json createNariAbnormalStatus();
+json getAbnormalStatus();
+json createDeviceHistoryData(const char* start_time, const char* end_time);
+json createNariDeviceHistoryData();
 json deviceHistoryToJson(const vector<DeviceHistory>& devices_history);
 json allowDeviceInfoToJson(const vector<AllowDevice>& devices);
 #endif //DEVICES_INFO_H

+ 26 - 4
modules/gateway-server/src/server/BasicServer.cpp

@@ -116,23 +116,45 @@ MHD_Result BasicServer::requestHandler(void* cls, struct MHD_Connection* connect
       if (url_string.find("/video") != std::string::npos) {
 //        std::cout << "largeScreenDisplay video" << std::endl;
       } else if (url_string.find("/history_data") != std::string::npos) {
-        std::cout << "largeScreenDisplay history_data" << std::endl;
+        std::cout << "largeScreenDisplay history_data " << url_string << std::endl;
+        // 获取 GET 参数
+        const char *start_time = MHD_lookup_connection_value(connection, MHD_GET_ARGUMENT_KIND, "start_time");
+        const char *end_time = MHD_lookup_connection_value(connection, MHD_GET_ARGUMENT_KIND, "end_time");
+        const char *page = MHD_lookup_connection_value(connection, MHD_GET_ARGUMENT_KIND, "page");
+        const char *page_size = MHD_lookup_connection_value(connection, MHD_GET_ARGUMENT_KIND, "page_size");
+
+        if (start_time) std::cout << "start_time: " << start_time << std::endl;
+        if (end_time) std::cout << "end_time: " << end_time << std::endl;
+        if (page) std::cout << "page: " << page << std::endl;
+        if (page_size) std::cout << "page_size: " << page_size << std::endl;
+
 //        auto devices_history = createDeviceHistoryData();
-        Json response_json = createDeviceHistoryData();
+        Json response_json = createDeviceHistoryData(start_time, end_time);
+//        Json response_json = createNariDeviceHistoryData();
 //        std::cout << response_json.dump(4) << std::endl;
         response = response_json.dump();
       } else if (url_string.find("/devices_info") != std::string::npos) {
         std::cout << "largeScreenDisplay devices_info" << std::endl;
         auto devices = createDeviceInfo();
+//        auto devices = createNariDeviceInfo();
         Json response_json = deviceInfoToJson(devices);
-        // std::cout << response_json.dump() << std::endl;
+//         std::cout << response_json.dump() << std::endl;
+//         std::cout <<  createNariAbnormalStatus().dump() << std::endl;
         response = response_json.dump();
+      } else if (url_string.find("/abnormal_status") != std::string::npos) {
+        std::cout << "largeScreenDisplay abnormal_status" << std::endl;
+        auto devices = getAbnormalStatus();
+//          auto devices = createDeviceInfo();
+//        Json devices = createNariAbnormalStatus();
+//        Json response_json = deviceInfoToJson(devices);
+//        std::cout << devices.dump() << std::endl;
+        response = devices.dump();
       }
     }else if (url_string.find("/control-devices-status") != std::string::npos) {
       std::cout << "largeScreenDisplay control-devices-status" << std::endl;
       auto devices = control_devices_status();
       Json response_json = deviceInfoToJson(devices);
-      std::cout << response_json.dump() << std::endl;
+//      std::cout << response_json.dump() << std::endl;
       response = response_json.dump();
     }else if (url_string.find("/allow-device") != std::string::npos) {
       std::cout << "largeScreenDisplay allow-device" << std::endl;

Some files were not shown because too many files changed in this diff