Skip to content

Commit e42da48

Browse files
authored
Dev 3.1 (#11)
* init dev3.1 * 清理 deps * fix VIPM_Job.yml * #12 * revert change * #1 * [add] #14 add delete-multiple interface * docs: 更新 README 文档内容并完善项目描述 - 重新组织文档结构,增加目录说明 - 详细描述核心特性和 API 功能 - 添加最佳实践和示例程序说明 - 补充安装要求和贡献指南 * docs: 添加英文版README并更新中文README链接 在README.md中添加中英文切换链接,并创建英文版README(en).md文件,包含完整的项目文档翻译 * 修改属性 * modify probe * Change probe format * 更新 Probes * 更新 probe * avoid crash with probe * 更新 probe * try to fix broken * #15 * CHANGE Probes/TagDB List Probe.vi * 整理范例 * docs: 更新README和库描述文档 - 统一并简化示例程序命名 - 完善库描述文档内容,增加最佳实践指南 - 更新安装配置选项 * 修改VI属性 --------- Co-authored-by: NEVSTOP <nevstop>
1 parent b8b49a2 commit e42da48

92 files changed

Lines changed: 303 additions & 103 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/VIPM_Job.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
shell: powershell
9292

9393
- name: Upload a Build Artifact
94-
uses: actions/upload-artifact@v3.0.0
94+
uses: actions/upload-artifact@v4.3.2
9595
with:
9696
# Artifact name
9797
name: ${{ steps.vip-name.outputs.vipName }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,4 @@ Build
5555
/Requirement/*.lock
5656
/src/_benchmark/*.tdms_index
5757
/*.vcfg
58+
*.tagdb

Benchmark/EXAMPLE_PARSEFILE.vi

12.8 KB
Binary file not shown.

Benchmark/TagDB-TestMain.vi

209 KB
Binary file not shown.

Benchmark/benchmark-tagDB.vi

-4.6 KB
Binary file not shown.

Benchmark/benchmark.tdms

0 Bytes
Binary file not shown.

LabVIEW-TagDB.vipb

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<VI_Package_Builder_Settings Version="2018" Created_Date="2015-10-20 15:34:05" Modified_Date="2023-12-29 11:43:01" Creator="Administrator" Comments="" ID="1f80511f993aa0610e11fbfce054412c">
1+
<VI_Package_Builder_Settings Version="2018" Created_Date="2015-10-20 15:34:05" Modified_Date="2025-10-08 20:52:47" Creator="Administrator" Comments="" ID="9843ccf7ef0d7ae39714a1486fad6e62">
22
<Library_General_Settings>
33
<Package_File_Name>NEVSTOP_TagDB_library</Package_File_Name>
4-
<Library_Version>3.0.0.2</Library_Version>
4+
<Library_Version>3.1.0.2</Library_Version>
55
<Auto_Increment_Version>false</Auto_Increment_Version>
66
<Library_Source_Folder>src</Library_Source_Folder>
77
<Library_Output_Folder>vip</Library_Output_Folder>
@@ -28,37 +28,41 @@
2828
<VI_Package_Configuration_File>LabVIEW-TagDB.vipc</VI_Package_Configuration_File>
2929
<Description>
3030
<One_Line_Description_Summary>TagDB Library for LabVIEW Programming</One_Line_Description_Summary>
31-
<Description># LabVIEW TagDB Library
31+
<Description>NEVSTOP TagDB is an advanced data management library designed specifically for the LabVIEW environment, providing efficient reading, writing, storage, and sharing of configuration and Tag data. Through optimized data structures and caching mechanisms, it offers reliable data persistence and real-time data access solutions for LabVIEW applications.
3232

33-
Used for providing configuration and Tag data functionality.
33+
## Best Practices
3434

35-
## FEATURE
35+
### Data Management
36+
- **Data sharing in multi-threaded environments**: Use TagDB as a data sharing center between multi-threaded applications, avoiding the use of global variables
37+
- **Configuration information storage**: Store system configuration information in TagDB for easy import/export and version control
38+
- **Temporary data caching**: Utilize TagDB's caching functionality to achieve asynchronous updates and fast access to data points
39+
- **Control reference management**: Store LabVIEW front panel control References for convenient dynamic UI manipulation
3640

37-
- Cache functionality. If TagDB is not changed, Read action uses a local cache istead of accessing the TagDB.
38-
- TagDB could be obtain by name.
39-
- LabVIEW Reference support is enhanced.
40-
- Configuration file(*.vcfg) is supported.
41-
- A Customer Probe is provide for debuggin.
41+
### Performance Optimization
42+
- For frequently accessed data, consider using TagDB's caching mechanism
43+
- When performing bulk data operations, properly use batch operation functions to improve efficiency
44+
- Appropriately use the locking feature to prevent data modification during critical operations
4245

43-
## VI PALETTE
46+
### Debugging Techniques
47+
- Use the three built-in Probe tools to monitor the status and data changes of TagDB during runtime
48+
- Regularly check the database status using TagDB-Status.vi to detect issues in a timely manner
49+
- Use TagDB-Change Detector.vi to monitor changes in specific Tags, facilitating debugging of complex interaction logic
4450

45-
- TagDB Obtain
46-
- TagDB Load Config File
47-
- TagDB Save Config File
48-
- TagDB Read
49-
- TagDB Write
50-
- TagDB Delete
51-
- TagDB Status
52-
- TagDB Free
51+
## Example Programs
5352

54-
## BEST PRACTICE
53+
The library includes multiple example programs demonstrating usage in different scenarios:
5554

56-
- Tag/Cfg information shared for multiple threads.
57-
- LabVIEW Refnum management. </Description>
55+
- **TagDB Example.vi**: Basic function demonstration
56+
- **TagDB Application Example**: Practical application demonstration with a complete model configuration system
57+
- **TagDB For Control Reference.vi**: Example of handling Reference type data for UI controls
58+
- **TagDB Multi-Thread Example**: Usage example in multi-threaded environments
59+
- **TagDB Using regexp Example.vi**: Regular expression query example</Description>
5860
<Copyright/>
5961
<Packager>NEVSTOP</Packager>
6062
<URL>https://github.com/NEVSTOP-LAB</URL>
61-
<Release_Notes>Update to lv2017 and use vim instead of xnode.</Release_Notes>
63+
<Release_Notes>[add] #14 add delete-multiple interface
64+
Update to lv2017 and use vim instead of xnode.
65+
</Release_Notes>
6266
</Description>
6367
<Destinations>
6468
<Toolkit_VIs>

README(en).md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# NEVSTOP TagDB Library
2+
3+
[English](./README(en).md) | [中文](./README.md)
4+
5+
NEVSTOP TagDB is an advanced data management library designed specifically for the LabVIEW environment, providing efficient reading, writing, storage, and sharing of configuration and Tag data. Through optimized data structures and caching mechanisms, it offers reliable data persistence and real-time data access solutions for LabVIEW applications.
6+
7+
## Directory Structure
8+
9+
```
10+
├── .github/ # GitHub workflow configurations
11+
├── Benchmark/ # Performance test related files
12+
├── Documentation/ # Documentation and icon resources
13+
├── src/ # Source code directory
14+
│ ├── Example/ # Example programs
15+
│ ├── Probes/ # Custom debugging probes
16+
│ └── TagDB/ # Core library files
17+
│ ├── API/ # Public interface functions
18+
│ ├── Add-ons/ # Additional features
19+
│ └── Typedef/ # Type definitions
20+
├── LabVIEW-TagDB.lvproj # Main project file
21+
└── LabVIEW-TagDB.vipb # VIPackage build file
22+
```
23+
24+
## Core Features
25+
26+
### 1. Flexible Data Storage
27+
- Supports persistent storage of configuration data and Tag data
28+
- Automatically supports conversion and storage of all LabVIEW data types through VIM (VI Macro)
29+
- Specially optimized for Reference type data to ensure efficient storage and retrieval
30+
31+
### 2. Multi-thread Safety
32+
- Provides a comprehensive data sharing mechanism in multi-threaded environments
33+
- Built-in thread safety protection to avoid concurrent access conflicts
34+
- Supports data access and synchronization across VIs and tasks
35+
36+
### 3. High Performance Design
37+
- Implements efficient caching mechanism for fast data access
38+
- Optimized data structures to reduce memory usage and improve retrieval efficiency
39+
- Supports name-based DBRef acquisition method, similar to LabVIEW Named Queue, simplifying programming patterns
40+
41+
### 4. Configuration Management
42+
- Complete configuration file import/export functionality
43+
- Supports saving and restoring system status information
44+
- Provides configuration locking feature to prevent accidental modifications
45+
46+
### 5. Debugging Support
47+
- Offers three custom Probes for convenient runtime debugging and monitoring
48+
- Includes TagDB Probe, TagDB Table Probe, and TagDB Monitor Probe
49+
50+
## API Reference
51+
52+
### Basic Operation Functions
53+
54+
| Function Name | Description |
55+
|--------------|-------------|
56+
| TagDB-Obtain.vi | Obtains TagDB Refnum, creates or opens an existing database |
57+
| TagDB-Release.vi | Releases TagDB Refnum, closes the database |
58+
| TagDB-IsValid.vi | Checks if TagDB Refnum is valid |
59+
60+
### Data Read/Write Functions
61+
62+
| Function Name | Description |
63+
|--------------|-------------|
64+
| TagDB-Write.vim | Writes/updates the value of a single Tag |
65+
| TagDB-Read.vim | Reads the value of a single Tag |
66+
| TagDB-Read By RegExp.vim | Batch reads Tags using regular expressions |
67+
| TagDB-Delete.vi | Deletes a Tag |
68+
69+
### Configuration Management Functions
70+
71+
| Function Name | Description |
72+
|--------------|-------------|
73+
| TagDB-Load.vi | Loads TagDB configuration from file |
74+
| TagDB-Save.vi | Saves TagDB configuration to file |
75+
| TagDB-Set Lock.vi | Locks/unlocks TagDB, disallows/allows adding new Tags |
76+
77+
### Utility Functions
78+
79+
| Function Name | Description |
80+
|--------------|-------------|
81+
| TagDB-Status.vi | Gets current status information of TagDB |
82+
| TagDB-List.vi | Lists all Tag names in the database |
83+
| TagDB_Find Names.vi | Finds Tag names that meet the criteria |
84+
| TagDB-Timestamp.vi | Gets timestamp of TagDB operations |
85+
| TagDB-UpdateUI.vi | Updates UI controls associated with Tags |
86+
| TagDB-Change Detector.vi | Detects changes in Tag values |
87+
88+
## Best Practices
89+
90+
### Data Management
91+
- **Data sharing in multi-threaded environments**: Use TagDB as a data sharing center between multi-threaded applications, avoiding the use of global variables
92+
- **Configuration information storage**: Store system configuration information in TagDB for easy import/export and version control
93+
- **Temporary data caching**: Utilize TagDB's caching functionality to achieve asynchronous updates and fast access to data points
94+
- **Control reference management**: Store LabVIEW front panel control References for convenient dynamic UI manipulation
95+
96+
### Performance Optimization
97+
- For frequently accessed data, consider using TagDB's caching mechanism
98+
- When performing bulk data operations, properly use batch operation functions to improve efficiency
99+
- Appropriately use the locking feature to prevent data modification during critical operations
100+
101+
### Debugging Techniques
102+
- Use the three built-in Probe tools to monitor the status and data changes of TagDB during runtime
103+
- Regularly check the database status using TagDB-Status.vi to detect issues in a timely manner
104+
- Use TagDB-Change Detector.vi to monitor changes in specific Tags, facilitating debugging of complex interaction logic
105+
106+
## Example Programs
107+
108+
The library includes multiple example programs demonstrating usage in different scenarios:
109+
110+
- **TagDB Example.vi**: Basic function demonstration
111+
- **TagDB Application Example**: Practical application demonstration with a complete model configuration system
112+
- **TagDB For Control Reference.vi**: Example of handling Reference type data for UI controls
113+
- **TagDB Multi-Thread Example**: Usage example in multi-threaded environments
114+
- **TagDB Using regexp Example.vi**: Regular expression query example
115+
116+
## Installation Instructions
117+
118+
Install the VIP package using VIPM (VI Package Manager)
119+
120+
## System Requirements
121+
122+
- LabVIEW 2017 or later
123+
- VIPM 2017 or later is recommended for installation
124+
125+
## License
126+
127+
This project is licensed under the MIT License, see the [LICENSE](LICENSE) file for details.
128+
129+
## Contribution Guidelines
130+
131+
Contributions in the form of issue reports and improvement suggestions are welcome. To contribute code, please follow these steps:
132+
1. Fork this repository
133+
2. Create a feature branch
134+
3. Commit your changes
135+
4. Push to the branch
136+
5. Submit a Pull Request

README.md

Lines changed: 135 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,138 @@
11
# NEVSTOP TagDB Library
22

3-
用于在 LabVIEW 系统中提供配置、Tag 数据的读写功能。
4-
5-
## FEATURE
6-
7-
- 实现配置、Tag数据的数据保存功能。
8-
- 提供多线程中的数据共享功能
9-
- 通过 Xnode/VIM 支持 LabVIEW 任何数据类型自动转换
10-
- 提供 cache 机制,提供快速的数据访问
11-
- 提供名称获取 DBRef 方法,类似 LabVIEW Named Queue。
12-
- 针对 Reference 类型优化
13-
- 支持配置文件,可导入导出配置、状态信息
14-
- 提供自定义Probe,便于调试
15-
16-
## VI PALETTE
17-
18-
- 获取 TagDB Refnum
19-
- 载入配置文件
20-
- 保存配置文件
21-
- 锁定 TagDB(禁止增加新的Tag)
22-
- 更新 Tag
23-
- 获取 Tag
24-
- 删除 Tag
25-
- 获取 TagDB 状态
26-
- 释放 TagDB
27-
28-
## BEST PRACTICE
29-
30-
- 多线程保存临时数据
31-
- 保存系统配置信息,对配置进行导入导出。
32-
- 提供 Tag 数据点的异步更新,利用 Cache 功能快速的访问数据。
33-
- 存储LabVIEW 前面板控件 Refnum。
3+
[English](./README(en).md) | [中文](./README.md)
4+
5+
NEVSTOP TagDB 是一个专为 LabVIEW 环境设计的高级数据管理库,提供配置及 Tag 数据的高效读写、存储和共享功能。它通过优化的数据结构和缓存机制,为 LabVIEW 应用程序提供了可靠的数据持久化和实时数据访问解决方案。
6+
7+
## 目录结构
8+
9+
```
10+
├── .github/ # GitHub 工作流配置
11+
├── Benchmark/ # 性能测试相关文件
12+
├── Documentation/ # 文档和图标资源
13+
├── src/ # 源代码目录
14+
│ ├── Example/ # 示例程序
15+
│ ├── Probes/ # 自定义调试探针
16+
│ └── TagDB/ # 核心库文件
17+
│ ├── API/ # 公共接口函数
18+
│ ├── Add-ons/ # 附加功能
19+
│ └── Typedef/ # 类型定义
20+
├── LabVIEW-TagDB.lvproj # 主项目文件
21+
└── LabVIEW-TagDB.vipb # VIPackage 构建文件
22+
```
23+
24+
## 核心特性
25+
26+
### 1. 灵活的数据存储
27+
- 支持配置数据和 Tag 数据的持久化存储
28+
- 通过 VIM (VI Macro) 自动支持 LabVIEW 所有数据类型的转换和存储
29+
- 针对 Reference 类型数据进行了特别优化,确保高效存储和检索
30+
31+
### 2. 多线程安全
32+
- 提供完善的多线程环境下的数据共享机制
33+
- 内置线程安全保护,避免并发访问冲突
34+
- 支持跨VI、跨任务的数据访问和同步
35+
36+
### 3. 高性能设计
37+
- 实现高效的缓存机制,提供快速数据访问
38+
- 优化的数据结构,减少内存占用和提高检索效率
39+
- 支持按名称获取 DBRef 的方法,类似 LabVIEW Named Queue,简化编程模式
40+
41+
### 4. 配置管理
42+
- 完整的配置文件导入导出功能
43+
- 支持保存和恢复系统状态信息
44+
- 提供配置锁定功能,防止意外修改
45+
46+
### 5. 调试支持
47+
- 提供三种自定义 Probe,方便运行时调试和监控
48+
- 包括 TagDB Probe、TagDB Table Probe 和 TagDB Monitor Probe
49+
50+
## API 参考
51+
52+
### 基础操作函数
53+
54+
| 函数名称 | 功能描述 |
55+
|---------|---------|
56+
| TagDB-Obtain.vi | 获取 TagDB Refnum,创建或打开现有数据库 |
57+
| TagDB-Release.vi | 释放 TagDB Refnum,关闭数据库 |
58+
| TagDB-IsValid.vi | 检查 TagDB Refnum 是否有效 |
59+
60+
### 数据读写函数
61+
62+
| 函数名称 | 功能描述 |
63+
|---------|---------|
64+
| TagDB-Write.vim | 写入/更新单个 Tag 的值 |
65+
| TagDB-Read.vim | 读取单个 Tag 的值 |
66+
| TagDB-Read By RegExp.vim | 使用正则表达式批量读取 Tag |
67+
| TagDB-Delete.vi | 删除 Tag |
68+
69+
### 配置管理函数
70+
71+
| 函数名称 | 功能描述 |
72+
|---------|---------|
73+
| TagDB-Load.vi | 从文件加载 TagDB 配置 |
74+
| TagDB-Save.vi | 将 TagDB 配置保存到文件 |
75+
| TagDB-Set Lock.vi | 锁定/解锁 TagDB,禁止/允许添加新 Tag |
76+
77+
### 实用工具函数
78+
79+
| 函数名称 | 功能描述 |
80+
|---------|---------|
81+
| TagDB-Status.vi | 获取 TagDB 当前状态信息 |
82+
| TagDB-List.vi | 列出数据库中所有 Tag 名称 |
83+
| TagDB_Find Names.vi | 查找符合条件的 Tag 名称 |
84+
| TagDB-Timestamp.vi | 获取 TagDB 操作的时间戳 |
85+
| TagDB-UpdateUI.vi | 更新与 Tag 关联的 UI 控件 |
86+
| TagDB-Change Detector.vi | 检测 Tag 值的变化 |
87+
88+
## 最佳实践
89+
90+
### 数据管理
91+
- **多线程环境下的数据共享**:使用 TagDB 作为多线程应用程序之间的数据共享中心,避免使用全局变量
92+
- **配置信息存储**:将系统配置信息存储在 TagDB 中,便于导入导出和版本控制
93+
- **临时数据缓存**:利用 TagDB 的缓存功能实现数据点的异步更新与快速访问
94+
- **控件引用管理**:存储 LabVIEW 前面板控件 Reference,方便动态操作 UI
95+
96+
### 性能优化
97+
- 对于频繁访问的数据,考虑使用 TagDB 的缓存机制
98+
- 在大量数据操作时,合理使用批量操作函数以提高效率
99+
- 适当使用锁定功能,防止在关键操作期间数据被修改
100+
101+
### 调试技巧
102+
- 使用内置的三种 Probe 工具监控运行时 TagDB 的状态和数据变化
103+
- 利用 TagDB-Status.vi 定期检查数据库状态,及时发现问题
104+
- 使用 TagDB-Change Detector.vi 监控特定 Tag 的变化,便于调试复杂交互逻辑
105+
106+
## 示例程序
107+
108+
库包含多个示例程序,展示不同场景下的使用方法:
109+
110+
- **TagDB Example.vi**:基础功能演示
111+
- **TagDB Application Example**:带有完整模型配置系统的实际应用演示
112+
- **TagDB For Control Reference.vi**:用于 UI 控件的 Reference 类型数据处理示例
113+
- **TagDB Multi-Thread Example**:多线程环境下的使用示例
114+
- **TagDB Using regexp Example.vi**:正则表达式查询示例
115+
116+
## 安装说明
117+
118+
使用 VIPM (VI Package Manager) 打安装 VIP 包
119+
120+
## 系统要求
121+
122+
- LabVIEW 2017 或更高版本
123+
- 建议使用 VIPM 2017 或更高版本进行安装
124+
125+
## 许可证
126+
127+
本项目使用 MIT 许可证,详见 [LICENSE](LICENSE) 文件。
128+
129+
## 贡献指南
130+
131+
欢迎提交问题报告和改进建议。如需贡献代码,请遵循以下流程:
132+
1. Fork 本仓库
133+
2. 创建功能分支
134+
3. 提交更改
135+
4. 推送到分支
136+
5. 提交 Pull Request
137+
34138

0 commit comments

Comments
 (0)