Sripe.DataAcquisition.WitsMessages 1.15.0

Sripe Wits 消息采集组件类库说明

1 概述

基础类库包括Wits型的Sripe消息采集/解析的相关组件.

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.10.28):
    • +First release.
    • +SripeWitsRecordAcquirer/WitsMessageToRecordParser/WitsRecord等关键组件.

3 准备工作

  1. 安装Sripe.DataAcquisition.WitsMessages
  2. 在代码文件中引用Sripe.DataAcquisition.WitsMessages命名空间

4 使用采集器

  1. 构建新实例:

     var acquirer = new SripeWitsRecordAcquirer(30000, null);
     acquirer.OnDataAcquired += (s, e) => {
         //mudlog realtime data in e.Record
     };
    
  2. 启动采集器:

     acquirer.StartAcquiringAsync();
    
  3. 停止采集, 关闭底层的网络资源.

     acquirer.Close();
    

5 使用模拟采集器

  1. 构建新实例:

     var acquirer = new MudLogAcquirerSimulator(); 
     acquirer.OnDataAcquired += (s, e) => {
         //mudlog realtime data in e.Record
     };
    
  2. 启动采集器:

     acquirer.StartAcquiringAsync();
    
  3. 停止采集, 关闭资源.

     acquirer.Close();
    

6 启用日志

  1. 使用内置日志机制(内部使用NLog)

     using ijw.Next.Log
    
     var _logger = LogHelper.GetNLogger();
    
     //然后可以将_logger传入采集器的构造函数中, 如:
     var acquirer = new MudLogReliableAcquirer(30000, _logger);
    
  2. 启动项目增加NLog.config文件, 并复制到生成文件夹中.

  3. 项目运行后, 会根据NLog.config中的配置生成日志, 一般来说是在logs文件夹下面按时间生成文件(第三方组件NLog的功能).

7 其他

  1. 数据采集使用了事件处理器, 因此可能有内存泄露, 注意close之后, 解绑事件处理器挂载, 方便GC回收.

Showing the top 20 packages that depend on Sripe.DataAcquisition.WitsMessages.

Packages Downloads
Sripe.DataAcquisition.Mud
Package Description
19
Sripe.DataAcquisition.MudLog
提供录井数据采集的数据实体类、采集器、解析器与相关组件.
15
Sripe.DataAcquisition.MWD
提供定向数据采集的数据实体类与相关组件.
12

.NET Framework 4.0

.NET Framework 4.5

.NET 5.0

.NET 6.0

.NET Standard 2.0

.NET Standard 2.1

Version Downloads Last updated
1.15.0 13 2025/4/17