Sripe.DataAcquisition 2.5.12

Sripe数据采集组件基础类库说明

1 概述

基础类库包括一些基类, 如ReliableAcquirerBase, SimpleAcquirerBase等等. 从这些类继承可以方便地构造采集器.

2 What's new:

  • 2.5.12(2023.7.16):
    • *add interval in AcquirerSimulatorBase.
  • 2.5.8(2023.7.15): @TH12582
    • *Fix bug: some time string in wits is one digit, like 00:01:01 just 00101.
  • 2.5.7(2023.7.14): @TH12582
    • *Fix bug: keyofdate and keyoftime from dict got wrong.
    • *Fix bug: WitsStringParserTypedConfigBase.GetProperties(BindingFlags.Public | BindingFlags.Instance), remove Declared.
    • *Fix bug: year padding left, index using wrongly, ^2 -> ..^2.
  • 2.5.5(2023.7.13):
    • *time parse logic
  • 2.5.4(2023.1.5):
    • *update dep
  • 2.5.3(2022.12.12):
    • +string type propery value setting when parsing witsstring in WitsStringParserBase.
  • 2.5.2(2022.12.12):
    • *update dep
  • 2.5.0(2022.5.28):
    • +WitsStringParser and configs.
    • *change parseTime method in WitsStringParserBase, use datetime?
    • *change ctor in realtimeRecordBase, use datetime?
  • 2.2.1(2022.4.15):
    • *fix WitsConfig, wellno => jth.
  • 2.2.0(2022.4.14):
    • *update ijw.dataacquisition.
  • 2.1.8(2022.4.5):
    • +WitsConfig, a base class for all recordwitsconfig
    • +SingleWitsStringParserBase, a base class for all wits string parser
  • 2.0.1(2022.2.14):
    • +ReliableAcquirerBase
    • +dep on ijw.DataTransfer.Server
  • 2.0.0(2022.2.9):
    • *SimpleAcquirerBase SimpleAcquirerMockBase => generic version
  • 1.0.0(2021.12.7):
    • *dep on ijw.DataAcquisition
  • 0.9.14(2021.4.13):
    • +reader.OnReadingTimeOut -0.9.13(2020.12.5):
    • *bug.
  • 0.9.12(2020.10.20):
    • *loginfo
  • 0.9.5(2020.10.15):
    • *await bug
  • 0.9.0(2020.10.12):
    • +invalid record argument to RealtimeRecordAcquiredEventArg
  • 0.8.9(2020.9.28):
    • +async
  • 0.7.6(2020.9.25):
    • +rawdata reader and parser base classes
  • 0.5.9(2020.9.24):
    • *realtimeMonitor.currentRecord could be null
  • 0.5.8(2020.9.12):
    • *Fix: default wob unit is kN, not Mpa.
  • 0.5.6(2020.8.9):
    • +upgrade Sripe.DataAcquisition.
  • 0.5.4(2020.8.3):
    • *IRealtimeRecord related names.
    • +RawStringParserBase.
    • +MudLogRealtimeRecord and MudLogUnitConfig
    • +RealtimeRecordAcquirerBase
    • *IRealtimeRecordAcquirer, +OnAcquiringTimeOut event
    • -SerialPort
  • 0.4.0(2020.7.4):
    • +merge Sripe.DataAcquisition.SerialPortAcquirer, and move into Sripe.DataAcquisition.SerialPorts namespace.
    • +merge Sripe.DataAcquisition.WellTesting:
    • *refractoring: expro and fardux using serialPortAcquirer + Parser
    • +expro_parser.
    • +fardux_parser.
  • 0.3.0 (2019.10.15):
    • +First release.

3 准备工作

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

4 使用采集器

  1. 构建新实例:

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

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

     acquirer.Close();
    

5 使用模拟采集器

witsrecord 模拟器尚未实现

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.

Packages Downloads
Sripe.DataAcquisition.MudLog
提供录井数据采集的数据实体类、采集器、解析器与相关组件.
2
Sripe.DataAcquisition.WitsMessages
Package Description
2
Sripe.DataAcquisition.MWD.APS
What's New: 0.2.5(2020.09.27): *update pkg. 0.1.0(2020.09.22): +Move back from Sripe.DataAcquisition.MWD.
1
Sripe.DataAcquisition.Frac
Package Description
1
Sripe.DataAcquisition.SerialPortReader
Package Description
1
Sripe.DataAcquisition.ModBusReader
Package Description
1
Sripe.DataAcquisition.WellTesting
Introduction: This package provide the base classes and interfaces which could be used to build welltesting data acquiring program. What's in it: 1. IRealtimeRecordAcquirer: Base interface of front-end data acquiring. Sripe.SiteApp uses it to acquire data. You should implement this interface according to the specific equipment model. 2. RealtimeRecordAcquiredEventArg: event argument class for new data acquired event.
1
Sripe.DataAcquisition.MWD
提供定向数据采集的数据实体类与相关组件.
1
Sripe.SiteApp
What's New: 0.9.1(2020.9.27): +EF Core support. 0.8.3(2020.7.1): +EF Core support. 0.8.2(2020.1.10): +local ipendpoint 0.8.1(2019.12.28): *null or empty data disgard. 0.8.0(2019.11.14): *Dependence update. 0.7.7(2019.11.13): *Dependence update. 0.7.5(2019.11.13): *MultiTargetSiteSender: use async cache for net45. *SiteApp: use async cache for net45. 0.7.3(2019.11.5): *Async support. 0.7.2(2019.11.5): *Dependence update. 0.6.3(2019.11.4): +MultiTargetSiteApp and MultiTargetSiteSender classes. +Dependence update. *fix: LogCleaner may crash. 0.5.2(2019.11.1): *Dependence update. 0.5.1(2019.10.22): *Add runtime info/error events. 0.4.9(2019.10.21): *Dependence update. 0.4.7(2019.10.18): *Dependence update. 0.4.3(2019.10.17): *Dependence update. 0.4.1(2019.10.16): +Cleaning logs for the specific number of days ago. 0.3.0(2019.10.9): +First release. Introduction: This package includes a SiteApp class for building Sripe on-site application. What's in it: SiteApp class, which uses SripeDataClient and IDataAcquirer to simplify
1

Version Downloads Last updated
2.5.12 4 2025/4/17