sqlite返回结果以csv方式编码
This commit is contained in:
1 parent
20c890d6b3
commit
79a90c67e9
11 files changed
+152
-23
No files matched your search
@@ -945,6 +945,7 @@ CONFIG_PKG_LITTLEFS_VER="v2.11.2"
|
||||
# CONFIG_PKG_USING_GD32_ARM_CMSIS_DRIVER is not set
|
||||
# CONFIG_PKG_USING_GD32_ARM_SERIES_DRIVER is not set
|
||||
# CONFIG_PKG_USING_GD32_RISCV_SERIES_DRIVER is not set
|
||||
# CONFIG_PKG_USING_GD32VW55X_WIFI is not set
|
||||
# end of GD32 Drivers
|
||||
|
||||
#
|
||||
@@ -1230,7 +1231,12 @@ CONFIG_PKG_RS485_VER="v1.06"
|
||||
# CONFIG_PKG_USING_TINYSQUARE is not set
|
||||
# end of entertainment: terminal games and other interesting software packages
|
||||
|
||||
# CONFIG_PKG_USING_LIBCSV is not set
|
||||
CONFIG_PKG_USING_LIBCSV=y
|
||||
CONFIG_PKG_LIBCSV_PATH="/packages/misc/libcsv"
|
||||
CONFIG_PKG_USING_LIBCSV_V303=y
|
||||
# CONFIG_PKG_USING_LIBCSV_LATEST_VERSION is not set
|
||||
CONFIG_PKG_LIBCSV_VER="v3.0.3"
|
||||
# CONFIG_LIBCSV_USING_DEMO is not set
|
||||
# CONFIG_PKG_USING_OPTPARSE is not set
|
||||
# CONFIG_PKG_USING_FASTLZ is not set
|
||||
# CONFIG_PKG_USING_MINILZO is not set
|
||||
|
||||
@@ -147,6 +147,7 @@
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/LVGL-v8.3.10/src}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/cJSON-v1.7.17}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/ft5426/inc}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/libcsv-v3.0.3}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/littlefs-v2.11.2}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/qmodbus-v1.10/inc}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/rs485-v1.06/inc}"" />
|
||||
@@ -333,6 +334,7 @@
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/LVGL-v8.3.10/src}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/cJSON-v1.7.17}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/ft5426/inc}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/libcsv-v3.0.3}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/littlefs-v2.11.2}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/qmodbus-v1.10/inc}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/rs485-v1.06/inc}"" />
|
||||
@@ -491,6 +493,7 @@
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/LVGL-v8.3.10/src}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/cJSON-v1.7.17}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/ft5426/inc}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/libcsv-v3.0.3}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/littlefs-v2.11.2}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/qmodbus-v1.10/inc}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/rs485-v1.06/inc}"" />
|
||||
@@ -655,6 +658,7 @@
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/LVGL-v8.3.10/src}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/cJSON-v1.7.17}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/ft5426/inc}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/libcsv-v3.0.3}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/littlefs-v2.11.2}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/qmodbus-v1.10/inc}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/rs485-v1.06/inc}"" />
|
||||
@@ -812,6 +816,7 @@
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/LVGL-v8.3.10/src}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/cJSON-v1.7.17}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/ft5426/inc}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/libcsv-v3.0.3}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/littlefs-v2.11.2}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/qmodbus-v1.10/inc}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/rs485-v1.06/inc}"" />
|
||||
@@ -978,6 +983,7 @@
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/LVGL-v8.3.10/src}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/cJSON-v1.7.17}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/ft5426/inc}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/libcsv-v3.0.3}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/littlefs-v2.11.2}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/qmodbus-v1.10/inc}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/rs485-v1.06/inc}"" />
|
||||
@@ -1143,6 +1149,7 @@
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/LVGL-v8.3.10/src}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/cJSON-v1.7.17}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/ft5426/inc}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/libcsv-v3.0.3}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/littlefs-v2.11.2}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/qmodbus-v1.10/inc}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/rs485-v1.06/inc}"" />
|
||||
@@ -1310,6 +1317,7 @@
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/LVGL-v8.3.10/src}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/cJSON-v1.7.17}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/ft5426/inc}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/libcsv-v3.0.3}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/littlefs-v2.11.2}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/qmodbus-v1.10/inc}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/rs485-v1.06/inc}"" />
|
||||
@@ -1464,6 +1472,7 @@
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/LVGL-v8.3.10/src}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/cJSON-v1.7.17}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/ft5426/inc}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/libcsv-v3.0.3}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/littlefs-v2.11.2}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/qmodbus-v1.10/inc}"" />
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc://${ProjName}//packages/rs485-v1.06/inc}"" />
|
||||
@@ -1506,7 +1515,7 @@
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="//cubemx/Drivers|//cubemx/EWARM|//cubemx/Src/stm32h7xx_it.c|//cubemx/Src/system_stm32h7xx.c|//packages/LVGL-v8.3.10/demos|//packages/LVGL-v8.3.10/env_support/rt-thread/squareline|//packages/LVGL-v8.3.10/examples|//packages/LVGL-v8.3.10/tests|//packages/littlefs-v2.11.2/runners|//packages/sqlite/rtthread_io_methods.c|//packages/sqlite/rtthread_mutex.c|//packages/sqlite/rtthread_vfs.c|//packages/sqlite/shell.c|//rt-thread/components/dfs/dfs_v1/filesystems/cromfs|//rt-thread/components/dfs/dfs_v1/filesystems/mqueue|//rt-thread/components/dfs/dfs_v1/filesystems/nfs|//rt-thread/components/dfs/dfs_v1/filesystems/ramfs|//rt-thread/components/dfs/dfs_v1/filesystems/romfs|//rt-thread/components/dfs/dfs_v1/filesystems/skeleton|//rt-thread/components/dfs/dfs_v2|//rt-thread/components/drivers/audio|//rt-thread/components/drivers/can|//rt-thread/components/drivers/clk|//rt-thread/components/drivers/core/dm.c|//rt-thread/components/drivers/core/driver.c|//rt-thread/components/drivers/core/platform.c|//rt-thread/components/drivers/core/platform_ofw.c|//rt-thread/components/drivers/cputime|//rt-thread/components/drivers/fdt|//rt-thread/components/drivers/hwcrypto|//rt-thread/components/drivers/hwtimer|//rt-thread/components/drivers/i2c/i2c_bus.c|//rt-thread/components/drivers/i2c/i2c_dm.c|//rt-thread/components/drivers/i2c/soft_i2c.c|//rt-thread/components/drivers/ktime|//rt-thread/components/drivers/misc|//rt-thread/components/drivers/mtd/mtd_nand.c|//rt-thread/components/drivers/ofw|//rt-thread/components/drivers/phy|//rt-thread/components/drivers/pic|//rt-thread/components/drivers/pin/pin_dm.c|//rt-thread/components/drivers/pin/pin_ofw.c|//rt-thread/components/drivers/pinctrl|//rt-thread/components/drivers/pm|//rt-thread/components/drivers/rtc/alarm.c|//rt-thread/components/drivers/sensor|//rt-thread/components/drivers/serial/serial_dm.c|//rt-thread/components/drivers/serial/serial_tty.c|//rt-thread/components/drivers/serial/serial_v2.c|//rt-thread/components/drivers/spi/enc28j60.c|//rt-thread/components/drivers/spi/spi-bit-ops.c|//rt-thread/components/drivers/spi/spi_wifi_rw009.c|//rt-thread/components/drivers/usb/usbdevice|//rt-thread/components/drivers/usb/usbhost/class/adk.c|//rt-thread/components/drivers/usb/usbhost/class/hid.c|//rt-thread/components/drivers/usb/usbhost/class/ukbd.c|//rt-thread/components/drivers/usb/usbhost/class/umouse.c|//rt-thread/components/drivers/virtio|//rt-thread/components/drivers/wlan|//rt-thread/components/fal/samples/porting/fal_flash_stm32f2_port.c|//rt-thread/components/legacy|//rt-thread/components/libc/compilers/armlibc|//rt-thread/components/libc/compilers/dlib|//rt-thread/components/libc/compilers/musl|//rt-thread/components/libc/compilers/picolibc|//rt-thread/components/libc/cplusplus|//rt-thread/components/libc/posix|//rt-thread/components/lwp|//rt-thread/components/mm|//rt-thread/components/mprotect|//rt-thread/components/net|//rt-thread/components/utilities|//rt-thread/components/vbus|//rt-thread/libcpu/aarch64|//rt-thread/libcpu/arc|//rt-thread/libcpu/arm/AT91SAM7S|//rt-thread/libcpu/arm/AT91SAM7X|//rt-thread/libcpu/arm/am335x|//rt-thread/libcpu/arm/arm926|//rt-thread/libcpu/arm/armv6|//rt-thread/libcpu/arm/common/atomic_arm.c|//rt-thread/libcpu/arm/common/divsi3.S|//rt-thread/libcpu/arm/cortex-a|//rt-thread/libcpu/arm/cortex-m0|//rt-thread/libcpu/arm/cortex-m23|//rt-thread/libcpu/arm/cortex-m3|//rt-thread/libcpu/arm/cortex-m33|//rt-thread/libcpu/arm/cortex-m4|//rt-thread/libcpu/arm/cortex-m7/context_iar.S|//rt-thread/libcpu/arm/cortex-m7/context_rvds.S|//rt-thread/libcpu/arm/cortex-m7/mpu.c|//rt-thread/libcpu/arm/cortex-m85|//rt-thread/libcpu/arm/cortex-r4|//rt-thread/libcpu/arm/cortex-r52|//rt-thread/libcpu/arm/dm36x|//rt-thread/libcpu/arm/lpc214x|//rt-thread/libcpu/arm/lpc24xx|//rt-thread/libcpu/arm/realview-a8-vmm|//rt-thread/libcpu/arm/s3c24x0|//rt-thread/libcpu/arm/s3c44b0|//rt-thread/libcpu/arm/sep4020|//rt-thread/libcpu/arm/zynqmp-r5|//rt-thread/libcpu/avr32|//rt-thread/libcpu/blackfin|//rt-thread/libcpu/c-sky|//rt-thread/libcpu/ia32|//rt-thread/libcpu/m16c|//rt-thread/libcpu/mips|//rt-thread/libcpu/nios|//rt-thread/libcpu/ppc|//rt-thread/libcpu/risc-v|//rt-thread/libcpu/rx|//rt-thread/libcpu/sim|//rt-thread/libcpu/sparc-v8|//rt-thread/libcpu/ti-dsp|//rt-thread/libcpu/unicore32|//rt-thread/libcpu/v850|//rt-thread/libcpu/xilinx|//rt-thread/src/cpu.c|//rt-thread/src/mem.c|//rt-thread/src/scheduler_mp.c|//rt-thread/src/slab.c|//rt-thread/tools" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="" />
|
||||
<entry excluding="//cubemx/Drivers|//cubemx/EWARM|//cubemx/Src/stm32h7xx_it.c|//cubemx/Src/system_stm32h7xx.c|//packages/LVGL-v8.3.10/demos|//packages/LVGL-v8.3.10/env_support/rt-thread/squareline|//packages/LVGL-v8.3.10/examples|//packages/LVGL-v8.3.10/tests|//packages/libcsv-v3.0.3/example|//packages/littlefs-v2.11.2/runners|//packages/sqlite/rtthread_io_methods.c|//packages/sqlite/rtthread_mutex.c|//packages/sqlite/rtthread_vfs.c|//packages/sqlite/shell.c|//rt-thread/components/dfs/dfs_v1/filesystems/cromfs|//rt-thread/components/dfs/dfs_v1/filesystems/mqueue|//rt-thread/components/dfs/dfs_v1/filesystems/nfs|//rt-thread/components/dfs/dfs_v1/filesystems/ramfs|//rt-thread/components/dfs/dfs_v1/filesystems/romfs|//rt-thread/components/dfs/dfs_v1/filesystems/skeleton|//rt-thread/components/dfs/dfs_v2|//rt-thread/components/drivers/audio|//rt-thread/components/drivers/can|//rt-thread/components/drivers/clk|//rt-thread/components/drivers/core/dm.c|//rt-thread/components/drivers/core/driver.c|//rt-thread/components/drivers/core/platform.c|//rt-thread/components/drivers/core/platform_ofw.c|//rt-thread/components/drivers/cputime|//rt-thread/components/drivers/fdt|//rt-thread/components/drivers/hwcrypto|//rt-thread/components/drivers/hwtimer|//rt-thread/components/drivers/i2c/i2c_bus.c|//rt-thread/components/drivers/i2c/i2c_dm.c|//rt-thread/components/drivers/i2c/soft_i2c.c|//rt-thread/components/drivers/ktime|//rt-thread/components/drivers/misc|//rt-thread/components/drivers/mtd/mtd_nand.c|//rt-thread/components/drivers/ofw|//rt-thread/components/drivers/phy|//rt-thread/components/drivers/pic|//rt-thread/components/drivers/pin/pin_dm.c|//rt-thread/components/drivers/pin/pin_ofw.c|//rt-thread/components/drivers/pinctrl|//rt-thread/components/drivers/pm|//rt-thread/components/drivers/rtc/alarm.c|//rt-thread/components/drivers/sensor|//rt-thread/components/drivers/serial/serial_dm.c|//rt-thread/components/drivers/serial/serial_tty.c|//rt-thread/components/drivers/serial/serial_v2.c|//rt-thread/components/drivers/spi/enc28j60.c|//rt-thread/components/drivers/spi/spi-bit-ops.c|//rt-thread/components/drivers/spi/spi_wifi_rw009.c|//rt-thread/components/drivers/usb/usbdevice|//rt-thread/components/drivers/usb/usbhost/class/adk.c|//rt-thread/components/drivers/usb/usbhost/class/hid.c|//rt-thread/components/drivers/usb/usbhost/class/ukbd.c|//rt-thread/components/drivers/usb/usbhost/class/umouse.c|//rt-thread/components/drivers/virtio|//rt-thread/components/drivers/wlan|//rt-thread/components/fal/samples/porting/fal_flash_stm32f2_port.c|//rt-thread/components/legacy|//rt-thread/components/libc/compilers/armlibc|//rt-thread/components/libc/compilers/dlib|//rt-thread/components/libc/compilers/musl|//rt-thread/components/libc/compilers/picolibc|//rt-thread/components/libc/cplusplus|//rt-thread/components/libc/posix|//rt-thread/components/lwp|//rt-thread/components/mm|//rt-thread/components/mprotect|//rt-thread/components/net|//rt-thread/components/utilities|//rt-thread/components/vbus|//rt-thread/libcpu/aarch64|//rt-thread/libcpu/arc|//rt-thread/libcpu/arm/AT91SAM7S|//rt-thread/libcpu/arm/AT91SAM7X|//rt-thread/libcpu/arm/am335x|//rt-thread/libcpu/arm/arm926|//rt-thread/libcpu/arm/armv6|//rt-thread/libcpu/arm/common/atomic_arm.c|//rt-thread/libcpu/arm/common/divsi3.S|//rt-thread/libcpu/arm/cortex-a|//rt-thread/libcpu/arm/cortex-m0|//rt-thread/libcpu/arm/cortex-m23|//rt-thread/libcpu/arm/cortex-m3|//rt-thread/libcpu/arm/cortex-m33|//rt-thread/libcpu/arm/cortex-m4|//rt-thread/libcpu/arm/cortex-m7/context_iar.S|//rt-thread/libcpu/arm/cortex-m7/context_rvds.S|//rt-thread/libcpu/arm/cortex-m7/mpu.c|//rt-thread/libcpu/arm/cortex-m85|//rt-thread/libcpu/arm/cortex-r4|//rt-thread/libcpu/arm/cortex-r52|//rt-thread/libcpu/arm/dm36x|//rt-thread/libcpu/arm/lpc214x|//rt-thread/libcpu/arm/lpc24xx|//rt-thread/libcpu/arm/realview-a8-vmm|//rt-thread/libcpu/arm/s3c24x0|//rt-thread/libcpu/arm/s3c44b0|//rt-thread/libcpu/arm/sep4020|//rt-thread/libcpu/arm/zynqmp-r5|//rt-thread/libcpu/avr32|//rt-thread/libcpu/blackfin|//rt-thread/libcpu/c-sky|//rt-thread/libcpu/ia32|//rt-thread/libcpu/m16c|//rt-thread/libcpu/mips|//rt-thread/libcpu/nios|//rt-thread/libcpu/ppc|//rt-thread/libcpu/risc-v|//rt-thread/libcpu/rx|//rt-thread/libcpu/sim|//rt-thread/libcpu/sparc-v8|//rt-thread/libcpu/ti-dsp|//rt-thread/libcpu/unicore32|//rt-thread/libcpu/v850|//rt-thread/libcpu/xilinx|//rt-thread/src/cpu.c|//rt-thread/src/mem.c|//rt-thread/src/scheduler_mp.c|//rt-thread/src/slab.c|//rt-thread/tools" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="" />
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
|
||||
Binary file not shown.
@@ -5,7 +5,7 @@
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-1141698828038963161" id="ilg.gnuarmeclipse.managedbuild.cross.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT ARM Cross GCC Built-in Compiler Settings " parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-1131141442876082369" id="ilg.gnuarmeclipse.managedbuild.cross.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT ARM Cross GCC Built-in Compiler Settings " parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
||||
@@ -30,7 +30,7 @@ struct rt_messagequeue *response_mq; // Proc → UART
|
||||
char cjson_falg=0;//是否解析cjson
|
||||
char *json_buffer=NULL;//
|
||||
|
||||
char select_data[1024] = {0};
|
||||
char select_data[4096] = {0};
|
||||
/**
|
||||
* 截取两个指定子串之间的内容
|
||||
* @param src 源字符串
|
||||
@@ -378,7 +378,8 @@ void pasre_DAT(const char *api, const char *json_str)
|
||||
}
|
||||
else if (strcmp(api, "SC822") == 0)
|
||||
{
|
||||
db_send_select(DB_CMD_SELECT, "SELECT WorkOrder,ReDye,ProgramName FROM WorkOrder LIMIT 10;", 500,select_data);
|
||||
db_send_select(DB_CMD_SELECT, "SELECT * FROM WorkOrder WHERE State=101 LIMIT 16;", 500,select_data);
|
||||
|
||||
cJSON_AddItemToObject(dat,"ERR",cJSON_CreateString(select_data));
|
||||
}
|
||||
else if (strcmp(api, "SC827") == 0)
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <guider/generated/widgets_init.h>
|
||||
#include "lvgl.h"
|
||||
#include <ui_data_labels.h>
|
||||
#include "libcsv.h"
|
||||
|
||||
// 全局或静态数组
|
||||
char buf[8];
|
||||
|
||||
+121
-17
@@ -14,6 +14,7 @@
|
||||
#include "DB_SQLite.h"
|
||||
#include "sqlite3.h"
|
||||
#include <stdbool.h>
|
||||
#include "libcsv.h"
|
||||
|
||||
#define DB_NAME "/sddisk/SC828.db"
|
||||
int db_HelperInit;
|
||||
@@ -96,34 +97,136 @@ static void return_disabled(struct db_command *cmd) {
|
||||
/**
|
||||
* @brief SELECT 查询回调函数
|
||||
*/
|
||||
// 辅助函数:将单个字段转义为 CSV 字符串(原地写入 out,需足够大)
|
||||
static int csv_escape_field(const char *field, char *out, int out_size)
|
||||
{
|
||||
if (!field) {
|
||||
field = "";
|
||||
}
|
||||
|
||||
// 检查是否需要引号:包含 delimiter(,)、quote(")、换行(\n\r) 或首尾空格
|
||||
int need_quote = 0;
|
||||
const char *p = field;
|
||||
while (*p) {
|
||||
if (*p == ',' || *p == '"' || *p == '\n' || *p == '\r') {
|
||||
need_quote = 1;
|
||||
break;
|
||||
}
|
||||
p++;
|
||||
}
|
||||
|
||||
// 首尾空格也建议加引号(可选)
|
||||
if (!need_quote && (field[0] == ' ' || field[rt_strlen(field)-1] == ' ')) {
|
||||
need_quote = 1;
|
||||
}
|
||||
|
||||
if (!need_quote) {
|
||||
// 直接复制
|
||||
int len = rt_strlen(field);
|
||||
if (len >= out_size) return -1;
|
||||
rt_memcpy(out, field, len + 1);
|
||||
return len;
|
||||
}
|
||||
|
||||
// 需要加引号:先写开头引号
|
||||
if (out_size < 2) return -1;
|
||||
*out++ = '"';
|
||||
out_size--;
|
||||
|
||||
// 复制内容,双写引号
|
||||
p = field;
|
||||
int written = 1; // 已写入开头 "
|
||||
while (*p && out_size > 1) {
|
||||
if (*p == '"') {
|
||||
if (out_size < 3) return -1; // 需要 ""\0
|
||||
*out++ = '"';
|
||||
*out++ = '"';
|
||||
out_size -= 2;
|
||||
written += 2;
|
||||
} else {
|
||||
*out++ = *p;
|
||||
out_size--;
|
||||
written++;
|
||||
}
|
||||
p++;
|
||||
}
|
||||
|
||||
if (*p != '\0') return -1; // 缓冲区不足
|
||||
|
||||
// 写结尾引号
|
||||
if (out_size < 2) return -1;
|
||||
*out++ = '"';
|
||||
*out = '\0';
|
||||
return written + 1; // +1 for closing "
|
||||
}
|
||||
|
||||
// 第一次调用:写入列名 header
|
||||
static int first_call = 1;
|
||||
static int callback(void *result_str, int argc, char **argv, char **azColName) {
|
||||
//char *buf = (char *)result_str;
|
||||
int written = rt_strlen(result_str); // 当前已写入长度(假设 buf 是 \0 结尾的)
|
||||
int remaining = MAX_RESULT_LEN - written - 1; // -1 留给最终 \0
|
||||
char *buf = (char *)result_str;
|
||||
int written = rt_strlen(buf); // 当前长度(\0 结尾)
|
||||
int remaining = MAX_RESULT_LEN - written - 1; // 留 \0
|
||||
|
||||
if (remaining <= 0) {
|
||||
return 0; // 缓冲区已满,不再写入
|
||||
return 1; // 停止查询(缓冲区满)
|
||||
}
|
||||
|
||||
for (int i = 0; i < argc && remaining > 0; i++) {
|
||||
const char *val = argv[i] ? argv[i] : "NULL";
|
||||
// 预估所需长度(保守估计)
|
||||
int needed = rt_strlen(azColName[i]) + rt_strlen(val) + 2; // + "=...\0" 至少 2 字节(= 和 |)
|
||||
if (first_call) {
|
||||
first_call = 0;
|
||||
|
||||
if (needed > remaining) {
|
||||
break; // 空间不足,停止
|
||||
}
|
||||
for (int i = 0; i < argc; i++) {
|
||||
char temp[128];
|
||||
int esc_len = csv_escape_field(azColName[i], temp, sizeof(temp));
|
||||
if (esc_len < 0) continue; // 跳过超长列名
|
||||
|
||||
int n = rt_snprintf(result_str + written, remaining + 1, "%s=%s|", azColName[i], val);
|
||||
if (n < 0 || n > remaining) {
|
||||
break; // 写入失败或超限
|
||||
}
|
||||
int needed = esc_len + (i < argc - 1 ? 1 : 0); // + 逗号
|
||||
if (needed > remaining) break;
|
||||
|
||||
int n = rt_snprintf(buf + written, remaining + 1, "%s%s", temp, (i < argc - 1) ? "," : "");
|
||||
if (n <= 0 || n > remaining) break;
|
||||
|
||||
written += n;
|
||||
remaining -= n;
|
||||
}
|
||||
//buf[MAX_RESULT_LEN - 1] = '\0'; // 强制终止,防止意外
|
||||
return 0;
|
||||
|
||||
// 添加换行
|
||||
if (remaining >= 2) {
|
||||
buf[written++] = '\n';
|
||||
buf[written] = '\0';
|
||||
remaining--;
|
||||
}
|
||||
}
|
||||
|
||||
// 写入数据行
|
||||
for (int i = 0; i < argc; i++) {
|
||||
const char *val = argv[i] ? argv[i] : ""; // NULL 视为空字符串(CSV 标准)
|
||||
char temp[256]; // 足够大以容纳转义后字段
|
||||
int esc_len = csv_escape_field(val, temp, sizeof(temp));
|
||||
if (esc_len < 0) {
|
||||
// 字段太长,截断或跳过
|
||||
rt_strncpy(temp, val, sizeof(temp) - 1);
|
||||
temp[sizeof(temp)-1] = '\0';
|
||||
esc_len = rt_strlen(temp);
|
||||
}
|
||||
|
||||
int needed = esc_len + (i < argc - 1 ? 1 : 0); // + 逗号
|
||||
if (needed > remaining) break;
|
||||
|
||||
int n = rt_snprintf(buf + written, remaining + 1, "%s%s", temp, (i < argc - 1) ? "," : "");
|
||||
if (n <= 0 || n > remaining) break;
|
||||
|
||||
written += n;
|
||||
remaining -= n;
|
||||
}
|
||||
|
||||
// 行尾加换行
|
||||
if (remaining >= 2) {
|
||||
buf[written++] = '\n';
|
||||
buf[written] = '\0';
|
||||
remaining--;
|
||||
}
|
||||
|
||||
return 0; //
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -152,6 +255,7 @@ static void handle_db_command(struct db_command *cmd_dat) {
|
||||
|
||||
case DB_CMD_SELECT:
|
||||
cmd_dat->result[0] = '\0';
|
||||
first_call=1;
|
||||
rc = sqlite3_exec(g_db, cmd_dat->sql, callback, cmd_dat->result, &err_msg);
|
||||
if (rc != SQLITE_OK) {
|
||||
cmd_dat->result_code = rc;
|
||||
|
||||
@@ -25,7 +25,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef MAX_RESULT_LEN
|
||||
#define MAX_RESULT_LEN (1024) /**< 结果字符串最大长度 */
|
||||
#define MAX_RESULT_LEN (4096) /**< 结果字符串最大长度 */
|
||||
#endif
|
||||
|
||||
#ifndef DB_MAX_WAITING_MS
|
||||
|
||||
Submodule
+1
Submodule packages/libcsv-v3.0.3 added at 3643d18e2d.
@@ -33,5 +33,10 @@
|
||||
"path": "/packages/peripherals/rs485",
|
||||
"ver": "v1.06",
|
||||
"name": "RS485"
|
||||
},
|
||||
{
|
||||
"path": "/packages/misc/libcsv",
|
||||
"ver": "v3.0.3",
|
||||
"name": "LIBCSV"
|
||||
}
|
||||
]
|
||||
@@ -398,6 +398,8 @@
|
||||
/* entertainment: terminal games and other interesting software packages */
|
||||
|
||||
/* end of entertainment: terminal games and other interesting software packages */
|
||||
#define PKG_USING_LIBCSV
|
||||
#define PKG_USING_LIBCSV_V303
|
||||
/* end of miscellaneous packages */
|
||||
|
||||
/* Arduino libraries */
|
||||
|
||||
Reference in new issue
Block a user