Sripe.DataAcquisition.Mud 1.15.0
Sripe钻井液数据采集组件使用说明
1 概述
- 采集
2 What's new:
- 1.15.0(2023.7.16):
- *Update Dependences.
- 1.14.0(2023.7.16):
- *Update Dependences.
- 1.13.0(2023.7.16):
- *Update Dependences.
- 1.12.0(2023.7.16):
- *Update Dependences.
- 1.11.0(2023.7.15):
- *Update Dependences.
- 1.10.0(2023.7.14):
- *Update Dependences.
- 1.9.0(2023.7.14):
- *Update Dependences.
- 1.8.0(2023.7.14):
- *Update Dependences.
- 1.7.0(2023.7.13):
- *Update Dependences.
- 1.6.0(2023.7.10):
- *Update Dependences.
- 1.5.0(2023.6.5):
- *Update Dependences.
- 1.4.0(2023.1.5):
- *Update Dependences.
- 1.3.0(2022.12.13):
- *Update Dependences.
- 1.2.0(2022.12.12):
- *Update Dependences.
- 1.1.0(2022.10.27):
- *Update Dependences.
- 1.0.0(2022.5.18):
3 准备工作
- 安装
Sripe.DataAcquisition.Mud
包 - 在代码文件中引用
Sripe.DataAcquisition.Mud
命名空间
4 使用采集器
构建新实例:
var acquirer = new MudLogReliableAcquirer(30000, null); acquirer.OnDataAcquired += (s, e) => { //mudlog realtime data in e.Record };
启动采集器:
acquirer.StartAcquiringAsync();
停止采集, 关闭底层的网络资源.
acquirer.Close();
5 使用模拟采集器
构建新实例:
var acquirer = new MudLogAcquirerSimulator("测试井号"); acquirer.OnDataAcquired += (s, e) => { //mudlog realtime data in e.Record };
启动采集器:
acquirer.StartAcquiringAsync();
停止采集, 关闭资源.
acquirer.Close();
6 启用日志
使用内置日志机制(内部使用NLog)
using ijw.Next.Log var _logger = LogHelper.GetNLogger(); //然后可以将_logger传入采集器的构造函数中, 如: var acquirer = new MudLogReliableAcquirer(30000, _logger);
启动项目增加
NLog.config
文件, 并复制到生成文件夹中.项目运行后, 会根据
NLog.config
中的配置生成日志, 一般来说是在logs
文件夹下面按时间生成文件(第三方组件NLog
的功能).
7 其他
- 数据采集使用了事件处理器, 因此可能有内存泄露, 注意close之后, 解绑事件处理器挂载, 方便GC回收.
No packages depend on Sripe.DataAcquisition.Mud.
.NET Framework 4.0
- Sripe.DataAcquisition.WitsMessages (>= 1.15.0)
- IndexRange (>= 1.0.2)
.NET Framework 4.5
- Sripe.DataAcquisition.WitsMessages (>= 1.15.0)
- IndexRange (>= 1.0.2)
.NET 5.0
- Sripe.DataAcquisition.WitsMessages (>= 1.15.0)
.NET 6.0
- Sripe.DataAcquisition.WitsMessages (>= 1.15.0)
.NET Standard 2.0
- Sripe.DataAcquisition.WitsMessages (>= 1.15.0)
- IndexRange (>= 1.0.2)
.NET Standard 2.1
- Sripe.DataAcquisition.WitsMessages (>= 1.15.0)
Version | Downloads | Last updated |
---|---|---|
1.15.0 | 1 | 2025/4/17 |