From 7a6a34c344b9903e531414bb95cb048b02858ea4 Mon Sep 17 00:00:00 2001 From: mzhifa Date: Sun, 6 Aug 2023 23:49:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=9E=E6=97=B6=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=AF=BB=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StartServerWPF.Assets.csproj | 36 + StartServerWPF.Modules.Main/JsonParser.cs | 23 +- .../StartServerWPF.Modules.Main.csproj | 3 +- .../ViewModels/TreeMenuViewModel.cs | 2 +- .../Init/RedisConfigInfo.cs | 45 + .../Init/RedisManager.cs | 62 + .../Interface/RedisBase.cs | 95 + .../Models/StationModel.cs | 2 +- .../Models/WavesModel.cs | 35 +- .../Mseed2asciiApi.cs | 40 + .../MseedChartModule.cs | 2 + .../Service/RedisListService.cs | 299 + .../Service/RedisStringService.cs | 136 + .../StartServerWPF.Modules.MseedChart.csproj | 283 + .../ViewModels/ChartPlotRealDataViewModel.cs | 1029 ++ .../ViewModels/ChartPlotViewModel.cs | 14 +- .../Views/ChartPlotRealDataView.xaml | 61 + .../Views/ChartPlotRealDataView.xaml.cs | 29 + .../Views/ChartPlotView.xaml | 2 +- StartServerWPF.Modules.MseedChart/app.config | 31 + .../packages.config | 69 + StartServerWPF.sln | 62 +- StartServerWPF/App.xaml.cs | 3 +- StartServerWPF/StartServerWPF.csproj | 16 +- .../ViewModels/MainWindowViewModel.cs | 3 +- StartServerWPF/Views/MainWindow.xaml.cs | 3 +- mseedC/libmseed/.clang-format | 6 + mseedC/libmseed/.gitignore | 2 + mseedC/libmseed/ChangeLog | 1370 +++ mseedC/libmseed/INSTALL.md | 48 + mseedC/libmseed/LICENSE | 201 + mseedC/libmseed/Makefile | 119 + mseedC/libmseed/Makefile.win | 49 + mseedC/libmseed/README.byteorder | 25 + mseedC/libmseed/README.md | 32 + mseedC/libmseed/crc32c.c | 410 + mseedC/libmseed/doc/Doxyfile | 2739 +++++ mseedC/libmseed/doc/DoxygenLayout.xml | 196 + mseedC/libmseed/doc/build-push-docs.sh | 100 + mseedC/libmseed/doc/capabilities.dox | 78 + mseedC/libmseed/doc/customdoxygen.css | 20 + mseedC/libmseed/doc/examples.dox | 96 + mseedC/libmseed/doc/faq.dox | 110 + mseedC/libmseed/doc/footer.html | 8 + mseedC/libmseed/doc/mainpage.dox | 77 + mseedC/libmseed/doc/porting.dox | 179 + mseedC/libmseed/doc/tutorial.dox | 191 + mseedC/libmseed/example/Makefile | 49 + mseedC/libmseed/example/Makefile.win | 28 + mseedC/libmseed/example/README | 8 + mseedC/libmseed/example/lm_pack.c | 353 + .../libmseed/example/lm_pack_rollingbuffer.c | 147 + mseedC/libmseed/example/lm_pararead.c | 188 + mseedC/libmseed/example/lm_parse.c | 309 + mseedC/libmseed/example/lm_read_buffer.c | 320 + mseedC/libmseed/example/lm_read_recordlist.c | 204 + mseedC/libmseed/example/lm_read_selection.c | 117 + mseedC/libmseed/example/lm_sids.c | 87 + mseedC/libmseed/example/lm_timestr.c | 118 + mseedC/libmseed/example/mseedview.c | 235 + mseedC/libmseed/extraheaders.c | 1157 +++ mseedC/libmseed/extraheaders.h | 50 + mseedC/libmseed/fileutils.c | 1015 ++ mseedC/libmseed/genutils.c | 1874 ++++ mseedC/libmseed/gmtime64.c | 185 + mseedC/libmseed/gmtime64.h | 22 + mseedC/libmseed/libmseed.def | 100 + mseedC/libmseed/libmseed.h | 1467 +++ mseedC/libmseed/libmseed.lib | Bin 0 -> 1096656 bytes mseedC/libmseed/libmseed.map | 13 + mseedC/libmseed/logging.c | 657 ++ mseedC/libmseed/lookup.c | 239 + mseedC/libmseed/mseed.pc.in | 11 + mseedC/libmseed/mseedformat.h | 658 ++ mseedC/libmseed/msio.c | 830 ++ mseedC/libmseed/msio.h | 44 + mseedC/libmseed/msrutils.c | 395 + mseedC/libmseed/pack.c | 2089 ++++ mseedC/libmseed/packdata.c | 722 ++ mseedC/libmseed/packdata.h | 58 + mseedC/libmseed/parseutils.c | 1344 +++ mseedC/libmseed/selection.c | 927 ++ mseedC/libmseed/test/Makefile | 49 + mseedC/libmseed/test/Makefile.win | 22 + .../data/reference-testdata-defaults.mseed2 | Bin 0 -> 4096 bytes .../data/reference-testdata-defaults.mseed3 | Bin 0 -> 1595 bytes .../data/reference-testdata-float32.mseed2 | Bin 0 -> 2560 bytes .../data/reference-testdata-float32.mseed3 | Bin 0 -> 2295 bytes .../data/reference-testdata-float64.mseed2 | Bin 0 -> 4608 bytes .../data/reference-testdata-float64.mseed3 | Bin 0 -> 4531 bytes .../test/data/reference-testdata-int16.mseed2 | Bin 0 -> 512 bytes .../test/data/reference-testdata-int16.mseed3 | Bin 0 -> 499 bytes .../test/data/reference-testdata-int32.mseed2 | Bin 0 -> 2560 bytes .../test/data/reference-testdata-int32.mseed3 | Bin 0 -> 2295 bytes .../data/reference-testdata-steim1-LE.mseed2 | Bin 0 -> 2049 bytes .../data/reference-testdata-steim1.mseed2 | Bin 0 -> 2048 bytes .../data/reference-testdata-steim1.mseed3 | Bin 0 -> 1836 bytes .../data/reference-testdata-steim2-LE.mseed2 | Bin 0 -> 2049 bytes .../data/reference-testdata-steim2.mseed2 | Bin 0 -> 2048 bytes .../data/reference-testdata-steim2.mseed3 | Bin 0 -> 1836 bytes .../test/data/reference-testdata-text.mseed2 | Bin 0 -> 512 bytes .../test/data/reference-testdata-text.mseed3 | Bin 0 -> 294 bytes .../test/data/testdata-3channel-signal.mseed2 | Bin 0 -> 54784 bytes .../test/data/testdata-3channel-signal.mseed3 | Bin 0 -> 56906 bytes .../data/testdata-detection.record.mseed2 | Bin 0 -> 512 bytes .../test/data/testdata-encoding-CDSN.mseed2 | Bin 0 -> 4096 bytes .../test/data/testdata-encoding-DWWSSN.mseed2 | Bin 0 -> 4096 bytes ...ncoding-GEOSCOPE-16bit-3exp-encoded.mseed2 | Bin 0 -> 4096 bytes .../test/data/testdata-encoding-SRO.mseed2 | Bin 0 -> 4096 bytes .../testdata-invalid-blockette-offsets.mseed2 | Bin 0 -> 1536 bytes .../testdata-no-blockette1000-steim1.mseed2 | Bin 0 -> 8192 bytes ...a-oneseries-mixedlengths-mixedorder.mseed2 | Bin 0 -> 16256 bytes ...a-oneseries-mixedlengths-mixedorder.mseed3 | Bin 0 -> 16452 bytes .../testdata-unapplied-timecorrection.mseed2 | Bin 0 -> 4096 bytes mseedC/libmseed/test/lm_pack.c | 1 + mseedC/libmseed/test/lm_pack_rollingbuffer.c | 1 + mseedC/libmseed/test/lm_parse.c | 1 + mseedC/libmseed/test/lm_read_buffer.c | 1 + mseedC/libmseed/test/lm_read_recordlist.c | 1 + mseedC/libmseed/test/lm_read_selection.c | 1 + mseedC/libmseed/test/lm_sids.c | 1 + mseedC/libmseed/test/lm_timestr.c | 1 + mseedC/libmseed/test/tau/compilers.h | 183 + mseedC/libmseed/test/tau/misc.h | 81 + mseedC/libmseed/test/tau/tau.h | 1298 +++ mseedC/libmseed/test/tau/types.h | 155 + mseedC/libmseed/test/test-crc.c | 160 + mseedC/libmseed/test/test-extraheaders.c | 234 + mseedC/libmseed/test/test-read.c | 473 + mseedC/libmseed/test/test-runner.c | 144 + mseedC/libmseed/test/test-selection.c | 70 + mseedC/libmseed/test/test-sid.c | 75 + mseedC/libmseed/test/test-time.c | 114 + mseedC/libmseed/test/test-tracelist.c | 184 + mseedC/libmseed/test/test-write.c | 275 + mseedC/libmseed/test/testdata.h | 105 + mseedC/libmseed/tracelist.c | 2484 +++++ mseedC/libmseed/unpack.c | 1664 +++ mseedC/libmseed/unpack.h | 44 + mseedC/libmseed/unpackdata.c | 951 ++ mseedC/libmseed/unpackdata.h | 62 + mseedC/libmseed/yyjson.c | 9201 +++++++++++++++++ mseedC/libmseed/yyjson.h | 7690 ++++++++++++++ mseedC/lm_read_buffer.c | 320 + mseedC/mseedC.cpp | 30 + mseedC/mseedC.vcxproj | 150 + mseedC/mseedC.vcxproj.filters | 27 + 147 files changed, 50688 insertions(+), 26 deletions(-) create mode 100644 StartServerWPF.Modules.MseedChart/Init/RedisConfigInfo.cs create mode 100644 StartServerWPF.Modules.MseedChart/Init/RedisManager.cs create mode 100644 StartServerWPF.Modules.MseedChart/Interface/RedisBase.cs create mode 100644 StartServerWPF.Modules.MseedChart/Mseed2asciiApi.cs create mode 100644 StartServerWPF.Modules.MseedChart/Service/RedisListService.cs create mode 100644 StartServerWPF.Modules.MseedChart/Service/RedisStringService.cs create mode 100644 StartServerWPF.Modules.MseedChart/ViewModels/ChartPlotRealDataViewModel.cs create mode 100644 StartServerWPF.Modules.MseedChart/Views/ChartPlotRealDataView.xaml create mode 100644 StartServerWPF.Modules.MseedChart/Views/ChartPlotRealDataView.xaml.cs create mode 100644 StartServerWPF.Modules.MseedChart/app.config create mode 100644 mseedC/libmseed/.clang-format create mode 100644 mseedC/libmseed/.gitignore create mode 100644 mseedC/libmseed/ChangeLog create mode 100644 mseedC/libmseed/INSTALL.md create mode 100644 mseedC/libmseed/LICENSE create mode 100644 mseedC/libmseed/Makefile create mode 100644 mseedC/libmseed/Makefile.win create mode 100644 mseedC/libmseed/README.byteorder create mode 100644 mseedC/libmseed/README.md create mode 100644 mseedC/libmseed/crc32c.c create mode 100644 mseedC/libmseed/doc/Doxyfile create mode 100644 mseedC/libmseed/doc/DoxygenLayout.xml create mode 100644 mseedC/libmseed/doc/build-push-docs.sh create mode 100644 mseedC/libmseed/doc/capabilities.dox create mode 100644 mseedC/libmseed/doc/customdoxygen.css create mode 100644 mseedC/libmseed/doc/examples.dox create mode 100644 mseedC/libmseed/doc/faq.dox create mode 100644 mseedC/libmseed/doc/footer.html create mode 100644 mseedC/libmseed/doc/mainpage.dox create mode 100644 mseedC/libmseed/doc/porting.dox create mode 100644 mseedC/libmseed/doc/tutorial.dox create mode 100644 mseedC/libmseed/example/Makefile create mode 100644 mseedC/libmseed/example/Makefile.win create mode 100644 mseedC/libmseed/example/README create mode 100644 mseedC/libmseed/example/lm_pack.c create mode 100644 mseedC/libmseed/example/lm_pack_rollingbuffer.c create mode 100644 mseedC/libmseed/example/lm_pararead.c create mode 100644 mseedC/libmseed/example/lm_parse.c create mode 100644 mseedC/libmseed/example/lm_read_buffer.c create mode 100644 mseedC/libmseed/example/lm_read_recordlist.c create mode 100644 mseedC/libmseed/example/lm_read_selection.c create mode 100644 mseedC/libmseed/example/lm_sids.c create mode 100644 mseedC/libmseed/example/lm_timestr.c create mode 100644 mseedC/libmseed/example/mseedview.c create mode 100644 mseedC/libmseed/extraheaders.c create mode 100644 mseedC/libmseed/extraheaders.h create mode 100644 mseedC/libmseed/fileutils.c create mode 100644 mseedC/libmseed/genutils.c create mode 100644 mseedC/libmseed/gmtime64.c create mode 100644 mseedC/libmseed/gmtime64.h create mode 100644 mseedC/libmseed/libmseed.def create mode 100644 mseedC/libmseed/libmseed.h create mode 100644 mseedC/libmseed/libmseed.lib create mode 100644 mseedC/libmseed/libmseed.map create mode 100644 mseedC/libmseed/logging.c create mode 100644 mseedC/libmseed/lookup.c create mode 100644 mseedC/libmseed/mseed.pc.in create mode 100644 mseedC/libmseed/mseedformat.h create mode 100644 mseedC/libmseed/msio.c create mode 100644 mseedC/libmseed/msio.h create mode 100644 mseedC/libmseed/msrutils.c create mode 100644 mseedC/libmseed/pack.c create mode 100644 mseedC/libmseed/packdata.c create mode 100644 mseedC/libmseed/packdata.h create mode 100644 mseedC/libmseed/parseutils.c create mode 100644 mseedC/libmseed/selection.c create mode 100644 mseedC/libmseed/test/Makefile create mode 100644 mseedC/libmseed/test/Makefile.win create mode 100644 mseedC/libmseed/test/data/reference-testdata-defaults.mseed2 create mode 100644 mseedC/libmseed/test/data/reference-testdata-defaults.mseed3 create mode 100644 mseedC/libmseed/test/data/reference-testdata-float32.mseed2 create mode 100644 mseedC/libmseed/test/data/reference-testdata-float32.mseed3 create mode 100644 mseedC/libmseed/test/data/reference-testdata-float64.mseed2 create mode 100644 mseedC/libmseed/test/data/reference-testdata-float64.mseed3 create mode 100644 mseedC/libmseed/test/data/reference-testdata-int16.mseed2 create mode 100644 mseedC/libmseed/test/data/reference-testdata-int16.mseed3 create mode 100644 mseedC/libmseed/test/data/reference-testdata-int32.mseed2 create mode 100644 mseedC/libmseed/test/data/reference-testdata-int32.mseed3 create mode 100644 mseedC/libmseed/test/data/reference-testdata-steim1-LE.mseed2 create mode 100644 mseedC/libmseed/test/data/reference-testdata-steim1.mseed2 create mode 100644 mseedC/libmseed/test/data/reference-testdata-steim1.mseed3 create mode 100644 mseedC/libmseed/test/data/reference-testdata-steim2-LE.mseed2 create mode 100644 mseedC/libmseed/test/data/reference-testdata-steim2.mseed2 create mode 100644 mseedC/libmseed/test/data/reference-testdata-steim2.mseed3 create mode 100644 mseedC/libmseed/test/data/reference-testdata-text.mseed2 create mode 100644 mseedC/libmseed/test/data/reference-testdata-text.mseed3 create mode 100644 mseedC/libmseed/test/data/testdata-3channel-signal.mseed2 create mode 100644 mseedC/libmseed/test/data/testdata-3channel-signal.mseed3 create mode 100644 mseedC/libmseed/test/data/testdata-detection.record.mseed2 create mode 100644 mseedC/libmseed/test/data/testdata-encoding-CDSN.mseed2 create mode 100644 mseedC/libmseed/test/data/testdata-encoding-DWWSSN.mseed2 create mode 100644 mseedC/libmseed/test/data/testdata-encoding-GEOSCOPE-16bit-3exp-encoded.mseed2 create mode 100644 mseedC/libmseed/test/data/testdata-encoding-SRO.mseed2 create mode 100644 mseedC/libmseed/test/data/testdata-invalid-blockette-offsets.mseed2 create mode 100644 mseedC/libmseed/test/data/testdata-no-blockette1000-steim1.mseed2 create mode 100644 mseedC/libmseed/test/data/testdata-oneseries-mixedlengths-mixedorder.mseed2 create mode 100644 mseedC/libmseed/test/data/testdata-oneseries-mixedlengths-mixedorder.mseed3 create mode 100644 mseedC/libmseed/test/data/testdata-unapplied-timecorrection.mseed2 create mode 100644 mseedC/libmseed/test/lm_pack.c create mode 100644 mseedC/libmseed/test/lm_pack_rollingbuffer.c create mode 100644 mseedC/libmseed/test/lm_parse.c create mode 100644 mseedC/libmseed/test/lm_read_buffer.c create mode 100644 mseedC/libmseed/test/lm_read_recordlist.c create mode 100644 mseedC/libmseed/test/lm_read_selection.c create mode 100644 mseedC/libmseed/test/lm_sids.c create mode 100644 mseedC/libmseed/test/lm_timestr.c create mode 100644 mseedC/libmseed/test/tau/compilers.h create mode 100644 mseedC/libmseed/test/tau/misc.h create mode 100644 mseedC/libmseed/test/tau/tau.h create mode 100644 mseedC/libmseed/test/tau/types.h create mode 100644 mseedC/libmseed/test/test-crc.c create mode 100644 mseedC/libmseed/test/test-extraheaders.c create mode 100644 mseedC/libmseed/test/test-read.c create mode 100644 mseedC/libmseed/test/test-runner.c create mode 100644 mseedC/libmseed/test/test-selection.c create mode 100644 mseedC/libmseed/test/test-sid.c create mode 100644 mseedC/libmseed/test/test-time.c create mode 100644 mseedC/libmseed/test/test-tracelist.c create mode 100644 mseedC/libmseed/test/test-write.c create mode 100644 mseedC/libmseed/test/testdata.h create mode 100644 mseedC/libmseed/tracelist.c create mode 100644 mseedC/libmseed/unpack.c create mode 100644 mseedC/libmseed/unpack.h create mode 100644 mseedC/libmseed/unpackdata.c create mode 100644 mseedC/libmseed/unpackdata.h create mode 100644 mseedC/libmseed/yyjson.c create mode 100644 mseedC/libmseed/yyjson.h create mode 100644 mseedC/lm_read_buffer.c create mode 100644 mseedC/mseedC.cpp create mode 100644 mseedC/mseedC.vcxproj create mode 100644 mseedC/mseedC.vcxproj.filters diff --git a/StartServerWPF.Assets/StartServerWPF.Assets.csproj b/StartServerWPF.Assets/StartServerWPF.Assets.csproj index 4e0cc9a..8d0b5b3 100644 --- a/StartServerWPF.Assets/StartServerWPF.Assets.csproj +++ b/StartServerWPF.Assets/StartServerWPF.Assets.csproj @@ -31,6 +31,42 @@ prompt 4 + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + 7.3 + prompt + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + 7.3 + prompt + + + true + bin\x64\Debug\ + DEBUG;TRACE + full + x64 + 7.3 + prompt + + + bin\x64\Release\ + TRACE + true + pdbonly + x64 + 7.3 + prompt + diff --git a/StartServerWPF.Modules.Main/JsonParser.cs b/StartServerWPF.Modules.Main/JsonParser.cs index c5b9e65..cd46ea1 100644 --- a/StartServerWPF.Modules.Main/JsonParser.cs +++ b/StartServerWPF.Modules.Main/JsonParser.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json.Linq; @@ -141,5 +139,26 @@ namespace StartServerWPF.Modules.Main " -btime " + beginTime.GetDateTimeFormats('s')[0].ToString() + " >outMonitor.txt"; return moniSp; } + + + public static string[] ReadApmsJson(string apmsJsonPath) + { + using (StreamReader sr = File.OpenText(apmsJsonPath)) + { + + JsonTextReader reader = new JsonTextReader(sr); + JObject jobj = (JObject)JToken.ReadFrom(reader); + JObject jordb = JObject.Parse(jobj["channels"].ToString()); + + string sta = jordb["station"].ToString(); + + var staList= sta.Split(","); + return staList; + } + + } + + + } } diff --git a/StartServerWPF.Modules.Main/StartServerWPF.Modules.Main.csproj b/StartServerWPF.Modules.Main/StartServerWPF.Modules.Main.csproj index 3fa0cc5..6b587a0 100644 --- a/StartServerWPF.Modules.Main/StartServerWPF.Modules.Main.csproj +++ b/StartServerWPF.Modules.Main/StartServerWPF.Modules.Main.csproj @@ -2,7 +2,8 @@ net6.0-windows true - True + True + AnyCPU;x86;x64 diff --git a/StartServerWPF.Modules.Main/ViewModels/TreeMenuViewModel.cs b/StartServerWPF.Modules.Main/ViewModels/TreeMenuViewModel.cs index cc56951..e52f3e7 100644 --- a/StartServerWPF.Modules.Main/ViewModels/TreeMenuViewModel.cs +++ b/StartServerWPF.Modules.Main/ViewModels/TreeMenuViewModel.cs @@ -74,6 +74,6 @@ namespace StartServerWPF.Modules.Main.ViewModels } } List menuNames = new List() {"首页","实时波形","波形回放","设置","日志", }; - List viewName = new List() { "MainView", "ChartPlotView", "ChartPlotView", "SetParamView", "LogManagementView"}; + List viewName = new List() { "MainView", "ChartPlotRealDataView", "ChartPlotView", "SetParamView", "LogManagementView"}; } } diff --git a/StartServerWPF.Modules.MseedChart/Init/RedisConfigInfo.cs b/StartServerWPF.Modules.MseedChart/Init/RedisConfigInfo.cs new file mode 100644 index 0000000..d585d7b --- /dev/null +++ b/StartServerWPF.Modules.MseedChart/Init/RedisConfigInfo.cs @@ -0,0 +1,45 @@ +using System.Configuration; + +namespace ZhaoXi.Advanced.MyRedis.Init +{ + /// + /// redis配置文件信息 + /// 也可以放到配置文件去 + /// + public sealed class RedisConfigInfo + { + /// + /// 可写的Redis链接地址 + /// format:ip1,ip2 + /// + /// 默认6379端口 + /// + public string WriteServerList = "127.0.0.1:6379"; + /// + /// 可读的Redis链接地址 + /// format:ip1,ip2 + /// + public string ReadServerList = "127.0.0.1:6379"; + /// + /// 最大写链接数 + /// + public int MaxWritePoolSize = 60; + /// + /// 最大读链接数 + /// + public int MaxReadPoolSize = 60; + /// + /// 本地缓存到期时间,单位:秒 + /// + public int LocalCacheTime = 180; + /// + /// 自动重启 + /// + public bool AutoStart = true; + /// + /// 是否记录日志,该设置仅用于排查redis运行时出现的问题, + /// 如redis工作正常,请关闭该项 + /// + public bool RecordeLog = false; + } +} \ No newline at end of file diff --git a/StartServerWPF.Modules.MseedChart/Init/RedisManager.cs b/StartServerWPF.Modules.MseedChart/Init/RedisManager.cs new file mode 100644 index 0000000..3640d33 --- /dev/null +++ b/StartServerWPF.Modules.MseedChart/Init/RedisManager.cs @@ -0,0 +1,62 @@ + +using ServiceStack.Redis; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ZhaoXi.Advanced.MyRedis.Init +{ + /// + /// Redis管理中心 创建Redis链接 + /// + public class RedisManager + { + /// + /// redis配置文件信息 + /// + private static RedisConfigInfo RedisConfigInfo = new RedisConfigInfo(); + + /// + /// Redis客户端池化管理 + /// + private static PooledRedisClientManager prcManager; + + /// + /// 静态构造方法,初始化链接池管理对象 + /// + static RedisManager() + { + CreateManager(); + } + + /// + /// 创建链接池管理对象 + /// + private static void CreateManager() + { + string[] WriteServerConStr = RedisConfigInfo.WriteServerList.Split(','); + string[] ReadServerConStr = RedisConfigInfo.ReadServerList.Split(','); + prcManager = new PooledRedisClientManager(ReadServerConStr, WriteServerConStr, + new RedisClientManagerConfig + { + MaxWritePoolSize = RedisConfigInfo.MaxWritePoolSize, + MaxReadPoolSize = RedisConfigInfo.MaxReadPoolSize, + AutoStart = RedisConfigInfo.AutoStart, + DefaultDb=1 + }); + } + + /// + /// 客户端缓存操作对象 + /// + public static IRedisClient GetClient() + { + string[] WriteServerConStr = RedisConfigInfo.WriteServerList.Split(':'); + var client = new RedisClient(WriteServerConStr[0], Convert.ToInt32(WriteServerConStr[1]),password: "beijingtianxiangguoyue",db:1); + // return prcManager.GetClient(); + return client; + } + } +} diff --git a/StartServerWPF.Modules.MseedChart/Interface/RedisBase.cs b/StartServerWPF.Modules.MseedChart/Interface/RedisBase.cs new file mode 100644 index 0000000..8ef402d --- /dev/null +++ b/StartServerWPF.Modules.MseedChart/Interface/RedisBase.cs @@ -0,0 +1,95 @@ + +using ServiceStack.Redis; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ZhaoXi.Advanced.MyRedis.Init; + +namespace ZhaoXi.Advanced.MyRedis.Interface +{ + /// + /// RedisBase类,是redis操作的基类,继承自IDisposable接口,主要用于释放内存 + /// + public abstract class RedisBase : IDisposable + { + public IRedisClient iClient { get; private set; } + /// + /// 构造时完成链接的打开 + /// + public RedisBase() + { + iClient = RedisManager.GetClient(); + } + + //public static IRedisClient iClient { get; private set; } + //static RedisBase() + //{ + // iClient = RedisManager.GetClient(); + //} + + + private bool _disposed = false; + protected virtual void Dispose(bool disposing) + { + if (!this._disposed) + { + if (disposing) + { + iClient.Dispose(); + iClient = null; + } + } + this._disposed = true; + } + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + public void Transcation() + { + using (IRedisTransaction irt = this.iClient.CreateTransaction()) + { + try + { + irt.QueueCommand(r => r.Set("key", 20)); + irt.QueueCommand(r => r.Increment("key", 1)); + irt.Commit(); // 提交事务 + } + catch (Exception ex) + { + irt.Rollback(); + throw ex; + } + } + } + + + /// + /// 清除全部数据 请小心 + /// + public virtual void FlushAll() + { + iClient.FlushAll(); + } + + /// + /// 保存数据DB文件到硬盘 + /// + public void Save() + { + iClient.Save();//阻塞式save + } + + /// + /// 异步保存数据DB文件到硬盘 + /// + public void SaveAsync() + { + iClient.SaveAsync();//异步save + } + } +} diff --git a/StartServerWPF.Modules.MseedChart/Models/StationModel.cs b/StartServerWPF.Modules.MseedChart/Models/StationModel.cs index f116476..a5950f6 100644 --- a/StartServerWPF.Modules.MseedChart/Models/StationModel.cs +++ b/StartServerWPF.Modules.MseedChart/Models/StationModel.cs @@ -30,7 +30,7 @@ namespace StartServerWPF.Modules.MseedChart.Models public int SamplingFrequency { get; set; } - public DateTime BeginTime; + public DateTime BeginTime=DateTime.Now; public bool IsVisible = true; diff --git a/StartServerWPF.Modules.MseedChart/Models/WavesModel.cs b/StartServerWPF.Modules.MseedChart/Models/WavesModel.cs index abd0ec2..2f500b0 100644 --- a/StartServerWPF.Modules.MseedChart/Models/WavesModel.cs +++ b/StartServerWPF.Modules.MseedChart/Models/WavesModel.cs @@ -25,7 +25,7 @@ namespace StartServerWPF.Modules.MseedChart.Models //添加Z分量波形 if (item.dz.Count > 0) { - axisY.SetRange(item.dz.Min(), item.dz.Max()); + axisY.SetRange(0, 6000); } axisY.Title.Text = string.Format("Ch{0}.Z", item.Name); axisY.Title.DistanceToAxis = distancetoX; @@ -33,8 +33,8 @@ namespace StartServerWPF.Modules.MseedChart.Models //添加N分量波形 axisY = new AxisY(curChart.ViewXY); if (item.dn.Count > 0) - { - axisY.SetRange(item.dn.Min(), item.dn.Max()); + { + axisY.SetRange(0, 6000); } axisY.Title.Text = string.Format("Ch{0}.N", item.Name); axisY.Title.DistanceToAxis = distancetoX; @@ -43,8 +43,8 @@ namespace StartServerWPF.Modules.MseedChart.Models //添加E分量波形 axisY = new AxisY(curChart.ViewXY); if (item.de.Count > 0) - { - axisY.SetRange(item.de.Min(), item.de.Max()); + { + axisY.SetRange(0, 6000); } axisY.Title.Text = string.Format("Ch{0}.E", item.Name); axisY.Title.DistanceToAxis = distancetoX; @@ -272,5 +272,30 @@ namespace StartServerWPF.Modules.MseedChart.Models return null; } + + + + #region 实时数据解析 + + public ConcurrentQueue ReadWavesFromJson(string[] stations) + { + ConcurrentQueue temSM = new ConcurrentQueue(); + + StationModel station = new StationModel(); + + for (int i = 0; i < stations.Length; i++) + { + station = new StationModel(); + station.Name = stations[i].Trim(); + station.dz.Add(0); + station.dn.Add(0); + station.de.Add(0); + temSM.Enqueue(station); + } + + temSM.Reverse(); + return temSM; + } + #endregion } } diff --git a/StartServerWPF.Modules.MseedChart/Mseed2asciiApi.cs b/StartServerWPF.Modules.MseedChart/Mseed2asciiApi.cs new file mode 100644 index 0000000..7a967d1 --- /dev/null +++ b/StartServerWPF.Modules.MseedChart/Mseed2asciiApi.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; + +namespace StartServerWPF.Modules.MseedChart +{ + public class Mseed2asciiApi + { + public delegate void LoopCallbackHandler(AsciiDataStruct asciiData); + [DllImport("mseedC.dll", EntryPoint = "MseedDatas")] + public extern static int MseedDatas(int a, string[] name); + //public extern static int MseedDatas(Byte[] bytes, int lenght); + [DllImport("mseedC.dll", EntryPoint = "bufferMseedData")] + public extern static int bufferMseedData(int argc, Byte[] argv); + [DllImport("mseedC.dll", EntryPoint = "testc")] + public extern static int testc(int a, int b); + [DllImport("mseedC.dll")] + public static extern void MseedDatasCallFun(LoopCallbackHandler callback); + } + + [StructLayout(LayoutKind.Sequential)] + public struct AsciiDataStruct + { + public string sid; + // [MarshalAs(UnmanagedType.ByValArray, SizeConst = 30)] + public string starttime; //!< Time of first sample + // [MarshalAs(UnmanagedType.ByValArray, SizeConst = 30)] + public string endtime; //!< Time of last sample + public double samprate; //!< Nominal sample rate (Hz) + public Int64 samplecnt; //!< Number of samples in trace coverage + public UInt64 datasize; //!< Size of datasamples buffer in bytes + public Int64 numsamples; //!< Number of data samples in datasamples + public char sampletype; //!< Sample type code, see @ref sample-types + public char samplesize; + public System.IntPtr datasamples; //!< Data samples, \a numsamples of type \a sampletype + } +} diff --git a/StartServerWPF.Modules.MseedChart/MseedChartModule.cs b/StartServerWPF.Modules.MseedChart/MseedChartModule.cs index ebd632f..9a6599b 100644 --- a/StartServerWPF.Modules.MseedChart/MseedChartModule.cs +++ b/StartServerWPF.Modules.MseedChart/MseedChartModule.cs @@ -18,7 +18,9 @@ namespace StartServerWPF.Modules.MseedChart public void RegisterTypes(IContainerRegistry containerRegistry) { containerRegistry.RegisterForNavigation(); + containerRegistry.RegisterForNavigation(); containerRegistry.RegisterSingleton(); + containerRegistry.RegisterSingleton(); } } diff --git a/StartServerWPF.Modules.MseedChart/Service/RedisListService.cs b/StartServerWPF.Modules.MseedChart/Service/RedisListService.cs new file mode 100644 index 0000000..cb3f14d --- /dev/null +++ b/StartServerWPF.Modules.MseedChart/Service/RedisListService.cs @@ -0,0 +1,299 @@ +using ZhaoXi.Advanced.MyRedis.Interface; +using ServiceStack.Redis; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.IO; +using ServiceStack; +using System.Collections; +using System.Runtime.Serialization.Formatters.Binary; +using System.Runtime.Serialization; +using static System.Net.WebRequestMethods; + +namespace ZhaoXi.Advanced.MyRedis.Service +{ + /// + /// Redis list的实现为一个双向链表,即可以支持反向查找和遍历,更方便操作,不过带来了部分额外的内存开销, + /// Redis内部的很多实现,包括发送缓冲队列等也都是用的这个数据结构。 + /// + public class RedisListService : RedisBase + { + #region 赋值 + /// + /// 从左侧向list中添加值 + /// + public void LPush(string key, string value) + { + base.iClient.PushItemToList(key, value); + } + /// + /// 从左侧向list中添加值,并设置过期时间 + /// + public void LPush(string key, string value, DateTime dt) + { + + base.iClient.PushItemToList(key, value); + base.iClient.ExpireEntryAt(key, dt); + } + /// + /// 从左侧向list中添加值,设置过期时间 + /// + public void LPush(string key, string value, TimeSpan sp) + { + base.iClient.PushItemToList(key, value); + base.iClient.ExpireEntryIn(key, sp); + } + /// + /// 从右侧向list中添加值 + /// + public void RPush(string key, string value) + { + base.iClient.PrependItemToList(key, value); + } + /// + /// 从右侧向list中添加值,并设置过期时间 + /// + public void RPush(string key, string value, DateTime dt) + { + base.iClient.PrependItemToList(key, value); + base.iClient.ExpireEntryAt(key, dt); + } + /// + /// 从右侧向list中添加值,并设置过期时间 + /// + public void RPush(string key, string value, TimeSpan sp) + { + base.iClient.PrependItemToList(key, value); + base.iClient.ExpireEntryIn(key, sp); + } + /// + /// 添加key/value + /// + public void Add(string key, string value) + { + base.iClient.AddItemToList(key, value); + } + /// + /// 添加key/value ,并设置过期时间 + /// + public void Add(string key, string value, DateTime dt) + { + base.iClient.AddItemToList(key, value); + base.iClient.ExpireEntryAt(key, dt); + } + /// + /// 添加key/value。并添加过期时间 + /// + public void Add(string key, string value, TimeSpan sp) + { + base.iClient.AddItemToList(key, value); + base.iClient.ExpireEntryIn(key, sp); + } + /// + /// 为key添加多个值 + /// + public void Add(string key, List values) + { + base.iClient.AddRangeToList(key, values); + } + /// + /// 为key添加多个值,并设置过期时间 + /// + public void Add(string key, List values, DateTime dt) + { + base.iClient.AddRangeToList(key, values); + base.iClient.ExpireEntryAt(key, dt); + } + /// + /// 为key添加多个值,并设置过期时间 + /// + public void Add(string key, List values, TimeSpan sp) + { + base.iClient.AddRangeToList(key, values); + base.iClient.ExpireEntryIn(key, sp); + } + #endregion + + #region 获取值 + /// + /// 获取list中key包含的数据数量 + /// + public long Count(string key) + { + return base.iClient.GetListCount(key); + } + /// + /// 获取key包含的所有数据集合 + /// + public List Get(string key) + { + return base.iClient.GetAllItemsFromList(key); + } + /// + /// 获取key中下标为star到end的值集合 + /// + public List Get(string key, int star, int end) + { + return base.iClient.GetRangeFromList(key, star, end); + } + #endregion + + #region 阻塞命令 + /// + /// 阻塞命令:从list为key的尾部移除一个值,并返回移除的值,阻塞时间为sp + /// + public string BlockingPopItemFromList(string key, TimeSpan? sp) + { + return base.iClient.BlockingPopItemFromList(key, sp); + } + /// + /// 阻塞命令:从多个list中尾部移除一个值,并返回移除的值&key,阻塞时间为sp + /// + public ItemRef BlockingPopItemFromLists(string[] keys, TimeSpan? sp) + { + return base.iClient.BlockingPopItemFromLists(keys, sp); + } + + + /// + /// 阻塞命令:从list中keys的尾部移除一个值,并返回移除的值,阻塞时间为sp + /// + public string BlockingDequeueItemFromList(string key, TimeSpan? sp) + { + return base.iClient.BlockingDequeueItemFromList(key, sp); + } + + /// + /// 阻塞命令:从多个list中尾部移除一个值,并返回移除的值&key,阻塞时间为sp + /// + public ItemRef BlockingDequeueItemFromLists(string[] keys, TimeSpan? sp) + { + return base.iClient.BlockingDequeueItemFromLists(keys, sp); + } + + /// + /// 阻塞命令:从list中一个fromkey的尾部移除一个值,添加到另外一个tokey的头部,并返回移除的值,阻塞时间为sp + /// + public string BlockingPopAndPushItemBetweenLists(string fromkey, string tokey, TimeSpan? sp) + { + return base.iClient.BlockingPopAndPushItemBetweenLists(fromkey, tokey, sp); + } + #endregion + + #region 删除 + /// + /// 从尾部移除数据,返回移除的数据 + /// + public string PopItemFromList(string key) + { + var sa = base.iClient.CreateSubscription(); + return base.iClient.PopItemFromList(key); + } + /// + /// 从尾部移除数据,返回移除的数据 + /// + public string DequeueItemFromList(string key) + { + return base.iClient.DequeueItemFromList(key); + } + + /// + /// 移除list中,key/value,与参数相同的值,并返回移除的数量 + /// + public long RemoveItemFromList(string key, string value) + { + return base.iClient.RemoveItemFromList(key, value); + } + /// + /// 从list的尾部移除一个数据,返回移除的数据 + /// + public string RemoveEndFromList(string key) + { + return base.iClient.RemoveEndFromList(key); + } + /// + /// 从list的头部移除一个数据,返回移除的值 + /// + public string RemoveStartFromList(string key) + { + return base.iClient.RemoveStartFromList(key); + } + #endregion + + #region 其它 + /// + /// 从一个list的尾部移除一个数据,添加到另外一个list的头部,并返回移动的值 + /// + public string PopAndPushItemBetweenLists(string fromKey, string toKey) + { + return base.iClient.PopAndPushItemBetweenLists(fromKey, toKey); + } + + + public void TrimList(string key, int start, int end) + { + base.iClient.TrimList(key, start, end); + } + #endregion + + #region 发布订阅 + public void Publish(string channel, string message) + { + base.iClient.PublishMessage(channel, message); + } + + public void Subscribe(string channel, Action actionOnMessage) + { + var subscription = base.iClient.CreateSubscription(); + subscription.OnSubscribe = c => + { + Console.WriteLine($"订阅频道{c}"); + Console.WriteLine(); + }; + //取消订阅 + subscription.OnUnSubscribe = c => + { + Console.WriteLine($"取消订阅 {c}"); + Console.WriteLine(); + }; + subscription.OnMessage += (c, s) => + { + // actionOnMessage(c, s, subscription); + }; + subscription.OnMessageBytes += (c, s) => + { + // ByteToFile(s, "test.mseed"); + actionOnMessage(c, s, subscription); + }; + Console.WriteLine($"开始启动监听 {channel}"); + subscription.SubscribeToChannels(channel); //blocking + } + + public void UnSubscribeFromChannels(string channel) + { + var subscription = base.iClient.CreateSubscription(); + subscription.UnSubscribeFromChannels(channel); + } + + public static bool ByteToFile(byte[] byteArray, string fileName) + { + bool result = false; + try + { + using (FileStream fs = new FileStream(fileName, FileMode.OpenOrCreate, FileAccess.Write)) + { + fs.Write(byteArray, 0, byteArray.Length); + result = true; + } + } + catch + { + result = false; + } + return result; + } + #endregion + } +} diff --git a/StartServerWPF.Modules.MseedChart/Service/RedisStringService.cs b/StartServerWPF.Modules.MseedChart/Service/RedisStringService.cs new file mode 100644 index 0000000..23be397 --- /dev/null +++ b/StartServerWPF.Modules.MseedChart/Service/RedisStringService.cs @@ -0,0 +1,136 @@ +using ZhaoXi.Advanced.MyRedis.Interface; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ZhaoXi.Advanced.MyRedis.Service +{ + /// + /// key-value 键值对:value可以是序列化的数据 + /// + public class RedisStringService : RedisBase + { + #region 赋值 + /// + /// 设置key的value + /// + public bool Set(string key, T value) + { + //iClient.Db =2; + return base.iClient.Set(key, value); + } + /// + /// 设置key的value并设置过期时间 + /// + public bool Set(string key, T value, DateTime dt) + { + //iClient.Db = 2; + return base.iClient.Set(key, value, dt); + } + /// + /// 设置key的value并设置过期时间 + /// + public bool Set(string key, T value, TimeSpan sp) + { + //iClient.Db = 2; + return base.iClient.Set(key, value, sp); + } + /// + /// 设置多个key/value 可以一次保存多个key value ---多个key value 不是分多次,是一个独立的命令; + /// + public void Set(Dictionary dic) + { + //iClient.Db = 2; + base.iClient.SetAll(dic); + } + + #endregion + + #region 追加 + /// + /// 在原有key的value值之后追加value,没有就新增一项 + /// + public long Append(string key, string value) + { + return base.iClient.AppendToValue(key, value); + } + #endregion + + #region 获取值 + /// + /// 获取key的value值 + /// + public string Get(string key) + { + return base.iClient.GetValue(key); + } + /// + /// 获取多个key的value值 + /// + public List Get(List keys) + { + return base.iClient.GetValues(keys); + } + /// + /// 获取多个key的value值 + /// + public List Get(List keys) + { + return base.iClient.GetValues(keys); + } + #endregion + + #region 获取旧值赋上新值 + /// + /// 获取旧值赋上新值 + /// + public string GetAndSetValue(string key, string value) + { + return base.iClient.GetAndSetValue(key, value); + } + #endregion + + #region 辅助方法 + /// + /// 获取值的长度 + /// + public long GetLength(string key) + { + return base.iClient.GetStringCount(key); + } + /// + /// 自增1,返回自增后的值 保存的是10 调用后,+1 返回11 + /// + public long Incr(string key) + { + return base.iClient.IncrementValue(key); + } + /// + /// 自增count,返回自增后的值 自定义自增的步长值 + /// + public long IncrBy(string key, int count) + { + return base.iClient.IncrementValueBy(key, count); + } + /// + /// 自减1,返回自减后的值,Redis操作是单线程操作;不会出现超卖的情况 + /// + public long Decr(string key) + { + return base.iClient.DecrementValue(key); + } + /// + /// 自减count ,返回自减后的值 + /// + /// + /// + /// + public long DecrBy(string key, int count) + { + return base.iClient.DecrementValueBy(key, count); + } + #endregion + } +} diff --git a/StartServerWPF.Modules.MseedChart/StartServerWPF.Modules.MseedChart.csproj b/StartServerWPF.Modules.MseedChart/StartServerWPF.Modules.MseedChart.csproj index 81b86c7..d9e34c4 100644 --- a/StartServerWPF.Modules.MseedChart/StartServerWPF.Modules.MseedChart.csproj +++ b/StartServerWPF.Modules.MseedChart/StartServerWPF.Modules.MseedChart.csproj @@ -1,5 +1,6 @@  + Debug @@ -13,6 +14,8 @@ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 true + + true @@ -31,6 +34,42 @@ prompt 4 + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + 7.3 + prompt + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + 7.3 + prompt + + + true + bin\x64\Debug\ + DEBUG;TRACE + full + x64 + 7.3 + prompt + + + bin\x64\Release\ + TRACE + true + pdbonly + x64 + 7.3 + prompt + False @@ -71,6 +110,96 @@ ..\packages\DryIoc.dll.4.7.7\lib\net45\DryIoc.dll + + ..\packages\Microsoft.AspNetCore.Cryptography.Internal.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Cryptography.Internal.dll + + + ..\packages\Microsoft.AspNetCore.Cryptography.KeyDerivation.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Cryptography.KeyDerivation.dll + + + ..\packages\Microsoft.AspNetCore.Hosting.2.2.7\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.dll + + + ..\packages\Microsoft.AspNetCore.Hosting.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Abstractions.dll + + + ..\packages\Microsoft.AspNetCore.Hosting.Server.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Hosting.Server.Abstractions.dll + + + ..\packages\Microsoft.AspNetCore.Http.2.2.2\lib\netstandard2.0\Microsoft.AspNetCore.Http.dll + + + ..\packages\Microsoft.AspNetCore.Http.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Abstractions.dll + + + ..\packages\Microsoft.AspNetCore.Http.Extensions.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Extensions.dll + + + ..\packages\Microsoft.AspNetCore.Http.Features.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll + + + ..\packages\Microsoft.AspNetCore.WebUtilities.2.2.0\lib\netstandard2.0\Microsoft.AspNetCore.WebUtilities.dll + + + ..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll + + + ..\packages\Microsoft.Extensions.Configuration.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll + + + ..\packages\Microsoft.Extensions.Configuration.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll + + + ..\packages\Microsoft.Extensions.Configuration.Binder.2.2.4\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll + + + ..\packages\Microsoft.Extensions.Configuration.EnvironmentVariables.2.2.4\lib\netstandard2.0\Microsoft.Extensions.Configuration.EnvironmentVariables.dll + + + ..\packages\Microsoft.Extensions.Configuration.FileExtensions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.FileExtensions.dll + + + ..\packages\Microsoft.Extensions.Configuration.Json.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Json.dll + + + ..\packages\Microsoft.Extensions.Configuration.UserSecrets.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.UserSecrets.dll + + + ..\packages\Microsoft.Extensions.DependencyInjection.2.2.0\lib\net461\Microsoft.Extensions.DependencyInjection.dll + + + ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll + + + ..\packages\Microsoft.Extensions.FileProviders.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Abstractions.dll + + + ..\packages\Microsoft.Extensions.FileProviders.Physical.2.2.0\lib\netstandard2.0\Microsoft.Extensions.FileProviders.Physical.dll + + + ..\packages\Microsoft.Extensions.FileSystemGlobbing.2.2.0\lib\netstandard2.0\Microsoft.Extensions.FileSystemGlobbing.dll + + + ..\packages\Microsoft.Extensions.Hosting.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Hosting.Abstractions.dll + + + ..\packages\Microsoft.Extensions.Logging.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Logging.dll + + + ..\packages\Microsoft.Extensions.Logging.Abstractions.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll + + + ..\packages\Microsoft.Extensions.ObjectPool.2.2.0\lib\netstandard2.0\Microsoft.Extensions.ObjectPool.dll + + + ..\packages\Microsoft.Extensions.Options.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Options.dll + + + ..\packages\Microsoft.Extensions.Primitives.2.2.0\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll + + + ..\packages\Microsoft.Net.Http.Headers.2.2.0\lib\netstandard2.0\Microsoft.Net.Http.Headers.dll + ..\packages\Microsoft.Xaml.Behaviors.Wpf.1.1.31\lib\net45\Microsoft.Xaml.Behaviors.dll @@ -86,12 +215,143 @@ ..\packages\Prism.Wpf.8.1.97\lib\net461\Prism.Wpf.dll + + ..\packages\ServiceStack.6.0.2\lib\netstandard2.0\ServiceStack.dll + + + ..\packages\ServiceStack.Client.6.0.2\lib\netstandard2.0\ServiceStack.Client.dll + + + ..\packages\ServiceStack.Common.6.0.2\lib\netstandard2.0\ServiceStack.Common.dll + + + ..\packages\ServiceStack.Interfaces.6.0.2\lib\netstandard2.0\ServiceStack.Interfaces.dll + + + ..\packages\ServiceStack.Redis.6.0.2\lib\netstandard2.0\ServiceStack.Redis.dll + + + ..\packages\ServiceStack.Text.6.0.2\lib\netstandard2.0\ServiceStack.Text.dll + + + ..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll + + + ..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll + + + ..\packages\System.Collections.NonGeneric.4.3.0\lib\net46\System.Collections.NonGeneric.dll + True + True + + + ..\packages\System.Collections.Specialized.4.3.0\lib\net46\System.Collections.Specialized.dll + True + True + + + ..\packages\System.ComponentModel.Annotations.5.0.0\lib\net461\System.ComponentModel.Annotations.dll + + + + + ..\packages\System.ComponentModel.Primitives.4.3.0\lib\net45\System.ComponentModel.Primitives.dll + True + True + + + ..\packages\System.Data.Common.4.3.0\lib\net451\System.Data.Common.dll + True + True + + + ..\packages\System.Diagnostics.DiagnosticSource.4.5.1\lib\net46\System.Diagnostics.DiagnosticSource.dll + + + + ..\packages\System.Drawing.Common.5.0.2\lib\net461\System.Drawing.Common.dll + + + + ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + + + + ..\packages\System.Net.NameResolution.4.3.0\lib\net46\System.Net.NameResolution.dll + True + True + + + ..\packages\System.Net.NetworkInformation.4.3.0\lib\net46\System.Net.NetworkInformation.dll + True + True + + + ..\packages\System.Net.Security.4.3.2\lib\net46\System.Net.Security.dll + True + True + + + + ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Reflection.Metadata.1.6.0\lib\netstandard2.0\System.Reflection.Metadata.dll + + + ..\packages\System.Reflection.TypeExtensions.4.7.0\lib\net461\System.Reflection.TypeExtensions.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.3\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + + + ..\packages\System.Runtime.Serialization.Primitives.4.3.0\lib\net46\System.Runtime.Serialization.Primitives.dll + True + True + + + ..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net461\System.Security.Cryptography.Algorithms.dll + True + True + + + ..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll + True + True + + + ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll + True + True + + + ..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll + True + True + + + + ..\packages\System.ServiceModel.Primitives.4.8.1\lib\net461\System.ServiceModel.Primitives.dll + + + ..\packages\System.Text.Encodings.Web.4.5.0\lib\netstandard2.0\System.Text.Encodings.Web.dll + + + ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll + + + ..\packages\System.Threading.Thread.4.3.0\lib\net46\System.Threading.Thread.dll + True + True + ..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll + @@ -107,6 +367,10 @@ + + + + @@ -128,7 +392,13 @@ True + + + + + ChartPlotRealDataView.xaml + ChartPlotView.xaml @@ -136,6 +406,7 @@ ResXFileCodeGenerator Resources.Designer.cs + SettingsSingleFileGenerator @@ -143,6 +414,10 @@ + + MSBuild:Compile + Designer + MSBuild:Compile Designer @@ -155,4 +430,12 @@ + + + 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 + + + + + \ No newline at end of file diff --git a/StartServerWPF.Modules.MseedChart/ViewModels/ChartPlotRealDataViewModel.cs b/StartServerWPF.Modules.MseedChart/ViewModels/ChartPlotRealDataViewModel.cs new file mode 100644 index 0000000..13ccb2a --- /dev/null +++ b/StartServerWPF.Modules.MseedChart/ViewModels/ChartPlotRealDataViewModel.cs @@ -0,0 +1,1029 @@ +using Arction.Wpf.Charting; +using Arction.Wpf.Charting.Axes; +using Arction.Wpf.Charting.SeriesXY; +using Arction.Wpf.Charting.Views.ViewXY; +using Microsoft.Win32; +using StartServerWPF.Modules.MseedChart.Models; +using Prism.Commands; +using Prism.Events; +using Prism.Mvvm; +using SharpDX.Direct2D1; +using SharpDX.DirectWrite; +using System; +using System.Collections; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using System.ComponentModel.Design.Serialization; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Net.Http.Headers; +using System.Reflection; +using System.Security.Cryptography; +using System.Threading; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Documents; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Threading; +using System.Xml.Linq; +using Prism.Regions; +using static System.Collections.Specialized.BitVector32; +using ZhaoXi.Advanced.MyRedis.Service; +using ServiceStack; +using ServiceStack.Redis; +using Arction.Licensing; +using System.Runtime.InteropServices; + +namespace StartServerWPF.Modules.MseedChart.ViewModels +{ + public class ChartPlotRealDataViewModel : BindableBase, INavigationAware + { + + Mseed2asciiApi.LoopCallbackHandler loopCallback; + public ChartPlotRealDataViewModel() + { + _dispatcher = Application.Current.Dispatcher; + _wavesModel = new WavesModel(); + (Application.Current.MainWindow as System.Windows.Window).Closing += ApplicationClosingDispose; + IntervalTime=100; + CreateChart(); + loopCallback = new Mseed2asciiApi.LoopCallbackHandler(Mseed2AsciiEvent); + Mseed2asciiApi.MseedDatasCallFun(loopCallback); + GC.KeepAlive(loopCallback); + } + + #region 字段 + Dispatcher _dispatcher; + public int CurPoints; + int _channelCount = 0; + int _samplingFrequency = 500; // 采样频率 (Hz). + WavesModel _wavesModel; + private int _lChartCount = 1; + public ConcurrentQueue smList=new ConcurrentQueue(); + + public List _chartAxisY=new List(); + + private DispatcherTimer dispatcherTimer=new DispatcherTimer(); + #endregion + + #region 属性 + private string _title = "数据中心"; + public string Title + { + get { return _title; } + set + { + SetProperty(ref _title, value); + } + } + private bool _isRealtimeData =false; + public bool IsRealtimeData + { + get { return _isRealtimeData; } + set + { + SetProperty(ref _isRealtimeData, value); + } + } + + private bool _isMultFiles; + public bool IsMultFiles + { + get { return _isMultFiles; } + set + { + SetProperty(ref _isMultFiles, value); + } + } + private int _xaisInterval; + + public int XaisInterval + { + get { return _xaisInterval; } + set + { + SetProperty(ref _xaisInterval, value); + } + } + /// + /// 波形控件数量 + /// + public int LChartCount + { + get { return _lChartCount; } + set { _lChartCount = value; } + } + private LightningChart _lChartAll; + /// + /// 所有波形 + /// + public LightningChart LChartALL + { + get { return _lChartAll; } + set { _lChartAll = value; } + } + + private FrameworkElement childContent; + public FrameworkElement ChildContent + { + get { return childContent; } + set { childContent = value; } + } + + private Grid gridChart; + + public Grid GridChart + { + get { return gridChart; } + set { gridChart = value; } + } + private StationEventJson _currentEventTime; + + public StationEventJson CurrentEventTime + { + + get { return _currentEventTime; } + set { _currentEventTime = value; } + } + + private List _stationsName; + + public List StationsName + { + get { return _stationsName; } + set { + + SetProperty(ref _stationsName, value); + } + } + + private string _currentTime; + + public string CurrentTime + { + get { return _currentTime; } + set { + + SetProperty(ref _currentTime, value); + } + } + + private YAxisAutoPlacement _yaxisPlacement; + + public YAxisAutoPlacement YaxisPlacement + { + get { return _yaxisPlacement; } + set + { + LChartALL.ViewXY.AxisLayout.YAxisAutoPlacement = value; + int distancetoX =_wavesModel.SetYasixPlacement(LChartALL); + foreach (var item in LChartALL.ViewXY.YAxes) + { + item.Title.DistanceToAxis = distancetoX; + } + SetProperty(ref _yaxisPlacement, value); + } + } + + private int _IntervalTime=10; + + public int IntervalTime + { + get { return _IntervalTime; } + set + { + if (value >=10) + { + dispatcherTimer.Interval = TimeSpan.FromMilliseconds(value); + } + SetProperty(ref _IntervalTime, value); + } + } + + + private bool _SingleChannel=false; + + public bool SingleChannel + { + get { return _SingleChannel; } + set + { + if(!value) + { + YasixZENVisible("SHZ", false); + YasixZENVisible("SHN", false); + YasixZENVisible("SHE", false); + } + else + { + YasixZENVisible("SHZ", true); + YasixZENVisible("SHN", true); + YasixZENVisible("SHE", true); + YasixZENVisible(SelectChannel, false); + } + + SetProperty(ref _SingleChannel, value); + } + } + + private string _SelectChannel; + public string SelectChannel + { + get { return _SelectChannel; } + set + { + if (SingleChannel) + { + //隐藏上当前轴 + YasixZENVisible(_SelectChannel, true); + //显示选择轴 + YasixZENVisible(value, false); + } + SetProperty(ref _SelectChannel, value); + } + } + #endregion + + #region 事件 + public DelegateCommand LoadedCommand => new DelegateCommand(Loaded); + public DelegateCommand UnloadedCommand => new DelegateCommand(UnLoaded); + public DelegateCommand AxesYVisibleCommand => new DelegateCommand(AxesYVisible); + public DelegateCommand FileSelectorCommand => new DelegateCommand(FileSelector); + public DelegateCommand OtimeSortCommand => new DelegateCommand(OtimeSort); + public DelegateCommand IntervalSureCommand => new DelegateCommand(IntervalSure); + public DelegateCommand RealTimeDataCommand => new DelegateCommand(RealTimeData); + + Dictionary subNameList; + private void Loaded() + { + string station = "N05";//,N07,N08,N09,N10,N11,N12,N13,N14,N15,N16,N17,N18,N19,N20,N21,N22,N23,N24,N25,N26,N27"; + var stations = station.Split(','); + smList = _wavesModel.ReadWavesFromJson(stations); + } + + private void UnLoaded() + { + + } + + private void AxesYVisible(object isCheck) + { + if (_lChartAll != null) + { + bool yAxesVisible = ((bool)isCheck == true); + _lChartAll.BeginUpdate(); + foreach (AxisY yAxis in _lChartAll.ViewXY.YAxes) + { + yAxis.Visible = yAxesVisible; + } + _lChartAll.EndUpdate(); + + } + } + + private void FileSelector(object obj) + { + IsMultFiles = Convert.ToBoolean(obj); + OpenFileDialog openFileDialog = new OpenFileDialog + { + RestoreDirectory = true, + Filter = ".mseed|*.mseed|.json|*.json|.txt|*.txt", + }; + if (openFileDialog.ShowDialog() == true) + { + string asciiSavePath = openFileDialog.FileName.Replace("Mseed", "Txt"); + asciiSavePath = Path.ChangeExtension(asciiSavePath, ".txt"); + string JsonPath = Path.ChangeExtension(openFileDialog.FileName, "Json"); + Stopwatch st = new Stopwatch(); + st.Start(); + //读取.json文件 + CurrentEventTime = _wavesModel.ReadChartJsonFile(JsonPath); + //读取.mseed文件 + smList = _wavesModel.ReadMseedFile(openFileDialog.FileName, asciiSavePath, IsMultFiles); + _channelCount = smList.Count * 3; + CurrentTime = smList.First().BeginTime.ToShortDateString(); + StationsName = smList.Select(a => new StationAxis{Name= a.Name,IsChecked=true,SelectCommand =new DelegateCommand(StationsNameVisible)}).ToList(); + StartChart(); + st.Stop(); + Debug.WriteLine("统计时间StartChart************:{0}", st.Elapsed); + FeedDatasToChart(); + if (CurrentEventTime != null) + { + _wavesModel.CreateAxisYEventTime(CurrentEventTime, LChartALL.ViewXY, smList.ToList()); + } + } + } + + private void OtimeSort(object isCheck) + { + if (_lChartAll != null&& (_chartAxisY.Count!=0)) + { + LChartALL.BeginUpdate(); + bool yAxesVisible = ((bool)isCheck == true); + ViewXY v = _lChartAll.ViewXY; + IOrderedEnumerable lines; + if (yAxesVisible) + { + lines = v.LineCollections.Where(a => a.Tag != null && a.Tag.ToString().Contains("SHZ")).OrderBy(a => a.Lines[0].AX); + } + else + { + lines = v.LineCollections.Where(a => a.Tag != null && a.Tag.ToString().Contains("SHZ")).OrderByDescending(b => b.Lines[0].AX); ; + } + int number = v.YAxes.Count / (_chartAxisY.Count / 3); + foreach (var item in lines.Reverse()) + { + int index = item.AssignYAxisIndex; + for (int i = 0; i < number; i++) + { + if (index == -1) continue; //隐藏轴不需要处理 + AxisY axisY = v.YAxes[index + i]; + v.YAxes.RemoveAt(index + i); + v.YAxes.Insert(i, axisY); + } + } + LChartALL.EndUpdate(); + } + } + /// + /// Y轴的显示和隐藏 + /// + /// SHZ,SHN,SHE + /// true 隐藏轴,false显示轴 + private void YasixZENVisible(string content, bool yAxesVisible) + { + if (_lChartAll != null) + { + _lChartAll.BeginUpdate(); + + ViewXY v = _lChartAll.ViewXY; + string conStr = (content == "SHZ") ? ".Z" : (content == "SHN") ? ".N" : ".E"; + for (int i = 0; i <_chartAxisY.Count; i++) + { + AxisY axisY = _chartAxisY[i]; + if (axisY.Title.Text.Contains(conStr)) + { + if (yAxesVisible) + { + //隐藏轴 + v.YAxes.Remove(axisY); + } + else + { + //显示轴 + var axis= v.YAxes.Where(y => y.Title.Text==axisY.Title.Text).FirstOrDefault(); + if (axis != null) + { + //找到相同的轴不用处理 + continue; + } + string str = axisY.Title.Text.Replace(conStr, ""); + int yIndex = 0; + if (content == "SHZ") + { + yIndex = v.YAxes.FindIndex(y => y.Title.Text.Contains(str)); + } + else if (content == "SHE") + { + yIndex = v.YAxes.FindLastIndex(y => y.Title.Text.Contains(str)); + if (yIndex != -1) yIndex += 1; + } + else + { + yIndex = v.YAxes.FindIndex(y => y.Title.Text.Contains(str)); + if (yIndex != -1) + { + if (v.YAxes[yIndex].Title.Text.Contains(".Z")) + { + yIndex = yIndex + 1; + } + } + } + //如果没有查到,直接添加到前面,如果为容器最大索引,只能添加到后面 + if (yIndex == -1 || (yIndex == v.YAxes.Count)) + { + yIndex = v.YAxes.Count; + v.YAxes.Add(axisY); + } + else + { + v.YAxes.Insert(yIndex, axisY); + } + int sampleIndex = v.SampleDataSeries.FindIndex(y => y.Title.Text == _chartAxisY[i].Title.Text); + v.SampleDataSeries[sampleIndex].AssignYAxisIndex = yIndex; + int lineIndex = v.LineCollections.FindIndex(a => a.Title.Text.Contains(_chartAxisY[i].Title.Text)); + if (lineIndex != -1) + { + v.LineCollections[lineIndex].AssignYAxisIndex = yIndex; + } + } + } + } + _lChartAll.EndUpdate(); + } + } + + private void IntervalSure() + { + if (_lChartAll != null) + { + _lChartAll.BeginUpdate(); + + if (XaisInterval >= 2) + { + _lChartAll.ViewXY.XAxes[0].MajorDivCount = XaisInterval; + } + _lChartAll.EndUpdate(); + + } + } + + private void StationsNameVisible(object obj) + { + var station = obj as StationAxis; + if (_lChartAll != null) + { + _lChartAll.BeginUpdate(); + bool yAxesVisible = (station.IsChecked == false); + ViewXY v = _lChartAll.ViewXY; + var yAxisList= _chartAxisY.Where(y => y.Title.Text.Contains(station.Name)); + foreach (var item in yAxisList) + { + if (yAxesVisible) + { + v.YAxes.Remove(item); + } + else + { + v.YAxes.Add(item); + //SampleDataSeries查找数据对应的Y轴索引, 重新分配到对应的轴 + int sampleIndex = v.SampleDataSeries.FindIndex(s => s.Title.Text == item.Title.Text); + v.SampleDataSeries[sampleIndex].AssignYAxisIndex = v.YAxes.Count()-1; + //LineCollections查找数据对应的Y轴索引, 重新分配到对应的轴 + int lineIndex = v.LineCollections.FindIndex(s => s.Title.Text.Contains(item.Title.Text)); + if (lineIndex != -1) + { + v.LineCollections[lineIndex].AssignYAxisIndex = v.YAxes.Count() - 1; + } + } + } + _lChartAll.EndUpdate(); + } + } + + private void RealTimeData(object isCheck) + { + + _channelCount = smList.Count * 3; + CurrentTime = smList.First().BeginTime.ToShortDateString(); + StationsName = smList.Select(a => new StationAxis { Name = a.Name, IsChecked = true, SelectCommand = new DelegateCommand(StationsNameVisible) }).ToList(); + + if (_lChartAll != null) + { + bool isStartRealData = (Convert.ToBoolean(isCheck) == true); + if (smList.Count == 0) + { + return; + } + _lChartAll.BeginUpdate(); + if (isStartRealData) + { + _data = CreateInputData(_channelCount, _samplingFrequency); + StartChart(); + //Set real-time monitoring automatic old data destruction + LChartALL.ViewXY.DropOldSeriesData = true; + _pointsAppended = LChartALL.ViewXY.XAxes[0].Minimum; + dispatcherTimer.Tick -= CompositionTarget_Rendering; + dispatcherTimer.Tick += CompositionTarget_Rendering; + LChartALL.ViewXY.XAxes[0].ScrollMode = XAxisScrollMode.Scrolling; + dispatcherTimer.Start(); + + using (RedisListService service = new RedisListService()) + { + foreach (var subName in subNameList) + { + service.UnSubscribeFromChannels(subName.Key); + } + } + foreach (var subName in subNameList) + { + Task.Run(() => + { + Debug.WriteLine($"注册{1}:{subName.Key}"); + using (RedisListService service = new RedisListService()) + { + service.Subscribe(subName.Key, (c, message, iRedisSubscription) => + { + Debug.WriteLine($"注册{1}{c}"); + Mseed2asciiApi.bufferMseedData(message.Length, message); + }); + } + }); + } + } + else + { + dispatcherTimer.Stop(); + LChartALL.ViewXY.XAxes[0].ScrollMode = XAxisScrollMode.None; + dispatcherTimer.Tick -= CompositionTarget_Rendering; + using (RedisListService service = new RedisListService()) + { + foreach (var subName in subNameList) + { + service.UnSubscribeFromChannels(subName.Key); + } + } + } + + _lChartAll.EndUpdate(); + } + } + + private void Mseed2AsciiEvent(AsciiDataStruct asciiData) + { + byte[] bytes = new byte[asciiData.numsamples * asciiData.samplesize]; + // IntPtr bufferHandler = Marshal.AllocHGlobal((int)asciiData.datasize); + Marshal.Copy(asciiData.datasamples, bytes, 0, bytes.Length); + List lines = new List(); + + string[] sid = asciiData.sid.Split('_'); + string name = $"HA.{sid[1]}.{sid[2]}.{sid[3]}{sid[4]}{sid[5]}"; + + + + if (asciiData.sampletype == 'i') + { + for (int index = 0; index < bytes.Length; index += 4) + { + var a = BitConverter.ToInt32(bytes, index); + lines.Add(a); + } + } + string lineStr= String.Join(",", lines); + + //else if (asciiData.sampletype == 'f') + //{ + // for (int index = 0; index < bytes.Length; index += 4) + // { + // var b = BitConverter.ToSingle(bytes, index); + // lines.Add(b); + // } + //} + //else if (asciiData.sampletype == 'd') + //{ + // for (int index = 0; index < bytes.Length; index += 8) + // { + // var b = BitConverter.ToDouble(bytes, index); + // lines.Add(b); + // } + //} + + using (RedisListService service = new RedisListService()) + { + // string data = System.Text.Encoding.ASCII.GetString(bytes); + service.RPush(name, lineStr); + } + } + + + #endregion + private void CreateChart() + { + if (LChartALL != null) + { + LChartALL = null; + } + LChartALL = new LightningChart(); + LChartALL.Title.Align = ChartTitleAlignment.TopCenter; + LChartALL.ChartRenderOptions.DeviceType = RendererDeviceType.AutoPreferD11; + LChartALL.ChartRenderOptions.LineAAType2D = LineAntiAliasingType.QLAA; + + LChartALL.Title.Text = "事件波形"; + LChartALL.Title.Font = new WpfFont("等线", 20); + + //轴属性和布局 + LChartALL.ViewXY.AxisLayout.YAxesLayout = YAxesLayout.Stacked; + LChartALL.ViewXY.AxisLayout.SegmentsGap = 0; + LChartALL.ViewXY.ZoomPanOptions.PanDirection = PanDirection.Horizontal; + LChartALL.ViewXY.ZoomPanOptions.WheelZooming = WheelZooming.Horizontal; + LChartALL.ViewXY.AxisLayout.YAxisAutoPlacement = YAxisAutoPlacement.AllRight; + LChartALL.ViewXY.AxisLayout.YAxisTitleAutoPlacement = false; + LChartALL.ViewXY.AxisLayout.AutoAdjustMargins = false; + + LChartALL.ViewXY.ZoomPanOptions.DevicePrimaryButtonAction = UserInteractiveDeviceButtonAction.Pan; + LChartALL.ViewXY.ZoomPanOptions.DeviceSecondaryButtonAction = UserInteractiveDeviceButtonAction.None; + LChartALL.ViewXY.ZoomPanOptions.WheelZooming = WheelZooming.Horizontal; + // 反锯齿系数。值0和1都不会应用反锯齿 + LChartALL.ChartRenderOptions.AntiAliasLevel = 0; + //X轴设置 + LChartALL.ViewXY.XAxes[0].AllowScrolling = true; + LChartALL.ViewXY.XAxes[0].PanningEnabled = true; + LChartALL.ViewXY.XAxes[0].MajorGrid.Pattern = LinePattern.Solid; + LChartALL.ViewXY.XAxes[0].ValueType = AxisValueType.DateTime; + LChartALL.ViewXY.XAxes[0].KeepDivCountOnRangeChange = true; + //LChartALL.ViewXY.XAxes[0].MajorDiv =6; + LChartALL.ViewXY.XAxes[0].LabelsColor = Colors.Black; + LChartALL.ViewXY.XAxes[0].AutoDivSpacing = false; + LChartALL.ViewXY.XAxes[0].MajorDivCount = 5; + XaisInterval = 5; + + //图表背景颜色 + LChartALL.ViewXY.GraphBackground.Color = Colors.White; + LChartALL.ViewXY.GraphBackground.GradientColor = Colors.White; + LChartALL.ChartBackground.GradientFill = GradientFill.Solid; + LChartALL.ChartBackground.Color = Color.FromArgb(0, 0, 0, 0); + GridChart = new Grid(); + GridChart.ColumnDefinitions.Add(new ColumnDefinition()); + GridChart.Name = "chartGrid"; + GridChart.Children.Add(LChartALL); + + this.ChildContent = GridChart; + } + + private void StartChart() + { + DisposeAllAndClear(_chartAxisY); + subNameList = new Dictionary(); + ViewXY v = LChartALL.ViewXY; + LChartALL.SizeChanged -= LChartALL_SizeChanged; + LChartALL.SizeChanged += LChartALL_SizeChanged; + LChartALL.ViewXY.Zoomed -= ViewXY_Zoomed; + LChartALL.ViewXY.Zoomed += ViewXY_Zoomed; + LChartALL.ViewXY.Panned -= ViewXY_Panned; + LChartALL.ViewXY.Panned += ViewXY_Panned; + DisposeAllAndClear(v.YAxes); + DisposeAllAndClear(v.SampleDataSeries); + DisposeAllAndClear(v.LineCollections); + v.Margins=new Thickness(60, 30, 60, 60); + + v.YAxes.AddRange(_wavesModel.CreateYAxisChart(smList.ToList(), LChartALL)); + v.LegendBoxes[0].Position = LegendBoxPositionXY.RightCenter; + v.LegendBoxes[0].Offset.SetValues(-10, 180); + v.LegendBoxes[0].Layout = LegendBoxLayout.Vertical; + v.LegendBoxes[0].Visible = false; + v.LegendBoxes[0].Shadow.Color = Colors.Transparent; + v.LegendBoxes[0].BorderColor = Colors.Transparent; + v.AutoSpaceLegendBoxes = true; + v.AxisLayout.SegmentsGap = 3; + v.LegendBoxes[0].Shadow.Visible = false; + + StationModel stationModel = smList.First(); + var beginTime= stationModel.BeginTime; + if (AxisValueType.DateTime == v.XAxes[0].ValueType) + { + //设置X轴的开始时间 + v.XAxes[0].AutoFormatLabels = false; + v.XAxes[0].LabelsTimeFormat = "HH:mm:ss.ff"; + v.XAxes[0].DateOriginYear = beginTime.Year; + v.XAxes[0].DateOriginDay = beginTime.Day; + v.XAxes[0].DateOriginMonth = beginTime.Month; + DateTime MaxDateTime = beginTime.AddSeconds(_samplingFrequency == 500 ? 30 : 60); + v.XAxes[0].SetRange(v.XAxes[0].DateTimeToAxisValue(beginTime), v.XAxes[0].DateTimeToAxisValue(MaxDateTime)); + } + double firstSampleTimeStamp = v.XAxes[0].DateTimeToAxisValue(beginTime); + + int count = stationModel.Dzne.Count; + int number= smList.Count*3; + + for (int i = 0; i < number; i++) + { + int seriesIndex = i; + AxisY axisY = v.YAxes[seriesIndex]; + axisY.LabelsColor = Colors.Black; + axisY.Title.Shadow.DropColor = Colors.Transparent; + // axisY.Title.Shadow.ContrastColor = Colors.Transparent; + axisY.Title.AllowDragging = true; + axisY.AllowAutoYFit = true; + axisY.Units.Visible = false; + axisY.LabelsFont.Size = 10; + axisY.Title.Angle = 0; + axisY.MinorGrid.Visible = false; + axisY.AutoDivSpacing = false; + axisY.MajorDivCount = 2; + // axisY.MajorDiv = 1; + axisY.MinorDivTickStyle.Visible = false; + axisY.MajorGrid.Visible = true; + axisY.MajorGrid.Pattern = LinePattern.Solid; + axisY.MajorDivTickStyle.Alignment = seriesIndex % 2 == 0 ? Alignment.Near : Alignment.Far; + // axisY.MajorDivTickStyle.LineLength = 6; + axisY.MajorDivTickStyle.Color = Colors.Black; + axisY.Title.Color = Colors.Black; + axisY.Title.Font = new WpfFont("Segoe UI", 10, false, false); + axisY.PanningEnabled = false; + axisY.AllowScrolling = true; + axisY.AllowScaling = true; + + SampleDataSeries series = new SampleDataSeries(v, v.XAxes[0], axisY); + series.ShowInLegendBox = false; + series.FirstSampleTimeStamp = firstSampleTimeStamp; + series.SamplingFrequency = _samplingFrequency; + series.Title.Text = axisY.Title.Text; + series.SampleFormat = SampleFormat.DoubleFloat; + + string subName = string.Empty; + string name = axisY.Title.Text.Substring(2,3); + if (seriesIndex % 3 == 0) + { + subName = $"HA.{name}.06.SHZ"; + series.LineStyle.Color = System.Windows.Media.Colors.DeepSkyBlue; + } + else if (seriesIndex % 3 == 1) + { + subName = $"HA.{name}.06.SHN"; + series.LineStyle.Color = System.Windows.Media.Colors.OrangeRed; + } + else if (seriesIndex % 3 == 2) + { + subName = $"HA.{name}.06.SHE"; + series.LineStyle.Color = System.Windows.Media.Colors.ForestGreen; + } + subNameList.Add(subName,i); + series.LineStyle.Width = 0.2; + series.ScrollModePointsKeepLevel = 1; + //series.ScrollingStabilizing = true; + v.SampleDataSeries.Add(series); + _chartAxisY.Add(axisY); + } + } + + private void ViewXY_Panned(object sender, PannedXYEventArgs e) + { + foreach (var item in LChartALL.ViewXY.LineCollections) + { + double b = LChartALL.ViewXY.XAxes[0].ValueToCoordD(item.Lines[0].AX) - 80; + item.Title.Offset.SetValues((int)b, 3); + } + } + + private void ViewXY_Zoomed(object sender, ZoomedXYEventArgs e) + { + foreach (var item in LChartALL.ViewXY.LineCollections) + { + double b = LChartALL.ViewXY.XAxes[0].ValueToCoordD(item.Lines[0].AX) - 80; + item.Title.Offset.SetValues((int)b, 3); + } + } + + private void LChartALL_SizeChanged(object sender, SizeChangedEventArgs e) + { + int distancetoX = _wavesModel.SetYasixPlacement(LChartALL); + foreach (var item in LChartALL.ViewXY.YAxes) + { + item.Title.DistanceToAxis = distancetoX; + } + foreach (var item in LChartALL.ViewXY.LineCollections) + { + double b = LChartALL.ViewXY.XAxes[0].ValueToCoordD(item.Lines[0].AX)-80; + item.Title.Offset.SetValues((int)b, 3); + } + } + + private void FeedDatasToChart() + { + _data = new double[smList.Count * 3][]; + try + { + for (int channelIndex = 0; channelIndex < smList.Count; channelIndex++) + { + _data[channelIndex * 3] = smList.ElementAt(channelIndex).dz.ToArray(); + _data[channelIndex * 3 + 1] = smList.ElementAt(channelIndex).dn.ToArray(); + _data[channelIndex * 3 + 2] = smList.ElementAt(channelIndex).de.ToArray(); + } + // Invoke FeedNewDataToChart. + _dispatcher.Invoke(() => + { + LChartALL.BeginUpdate(); + for (int channelIndex = 0; channelIndex < _channelCount; channelIndex++) + { + LChartALL.ViewXY.SampleDataSeries[channelIndex].AddSamples(_data[channelIndex], true); + } + LChartALL.EndUpdate(); + }); + } + catch (Exception ex) + { + throw ex; + } + } + + private void ApplicationClosingDispose(object sender, CancelEventArgs e) + { + if (LChartALL != null) + { + LChartALL.Dispose(); + LChartALL = null; + } + } + + private void DisposeAllAndClear(List list) where T : IDisposable + { + if (list == null) + { + return; + } + + while (list.Count > 0) + { + int lastInd = list.Count - 1; + T item = list[lastInd]; // take item ref from list. + list.RemoveAt(lastInd); // remove item first + if (item != null) + { + (item as IDisposable).Dispose(); // then dispose it. + } + } + } + public void Dispose() + { + gridChart.Children.Clear(); + + if (LChartALL != null) + { + LChartALL.Dispose(); + LChartALL = null; + } + } + + #region 实时数据 + private void CompositionTarget_Rendering(object sender, EventArgs e) + { + RenderNextFrame(); + } + private void RenderNextFrame() + { + if (_lChartAll == null) + { + return; + } + + _dispatcher.Invoke(() => + { + FeedData(/*chartTitleText*/); + }); + } + int _iRound = 0; + double _pointsAppended = 0; + double[][] _data; + int PreGenerateDataForRoundCount = 6; + + + //Y axis minimum + private const double YMin = 0; + //Y axis maximum + private const double YMax = 10; + private double[][] CreateInputData(int seriesCount, int appendCountPerRound) + { + //Create input data for all series. + double[][] data = new double[seriesCount][]; + // System.Threading.Tasks.Parallel.For(0, seriesCount, (seriesIndex) => + for (int seriesIndex = 0; seriesIndex < seriesCount; seriesIndex++) + { + + int dataPointCount = PreGenerateDataForRoundCount * appendCountPerRound; + double[] seriesData = new double[dataPointCount]; + double seriesIndexPlus1 = seriesIndex + 1; + Random rand = new Random((int)DateTime.Now.Ticks / (seriesIndex + 1)); + + double y = 50; + for (int i = 0; i < dataPointCount; i++) + { + y = y - 0.05 + rand.NextDouble() / 10.0; + if (y > YMax) + { + y = YMax; + } + + if (y < YMin) + { + y = YMin; + } + + seriesData[i] = (float)y; + } + data[seriesIndex] = seriesData; + }//); + + return data; + } + + private void FeedData() + { + if (_lChartAll != null) + { + _lChartAll.BeginUpdate(); + + //Append data to series + using (RedisListService service = new RedisListService()) + { + foreach (var item in subNameList) + { + string data= service.BlockingDequeueItemFromList(item.Key, TimeSpan.FromMilliseconds(5000)); + if(data == null) + { + System.Diagnostics.Debug.WriteLine("***********注册:{0},没有收到数据,time:{1}", item.Key, DateTime.Now); + continue; + } + // byte[] bytes = System.Text.Encoding.ASCII.GetBytes(data); + // List thisSeriesData = new List(); + + var thisSeriesData = data.Split(',').Select(a=>Convert.ToDouble(a)).ToArray(); + // if (asciiData.sampletype == 'i') + { + //for (int index = 0; index < bytes.Length; index += 4) + //{ + // int a = BitConverter.ToInt32(bytes, index); + // thisSeriesData.Add(a); + //} + + } + _lChartAll.ViewXY.SampleDataSeries[subNameList[item.Key]].AddSamples(thisSeriesData, false); + System.Diagnostics.Debug.WriteLine("***********index:{0}, pointCount:{1},time:{2}", subNameList[item.Key], + _lChartAll.ViewXY.SampleDataSeries[subNameList[item.Key]].PointCount, DateTime.Now); + } + } + + //System.Threading.Tasks.Parallel.For(0, _channelCount, (seriesIndex) => + //{ + // double[] thisSeriesData = _data[seriesIndex]; + // double[] dataToAppendNow = new double[_samplingFrequency]; + // Array.Copy(thisSeriesData, 0, dataToAppendNow, 0, _samplingFrequency); + // System.Diagnostics.Debug.WriteLine("***********index:{0}, pointCount:{1},time:{2}", seriesIndex, + // _lChartAll.ViewXY.SampleDataSeries[seriesIndex].PointCount, DateTime.Now); + //}); + _pointsAppended += 1; + + //Set X axis real-time scrolling position + double lastX = _pointsAppended; + _lChartAll.ViewXY.XAxes[0].ScrollPosition = lastX; + + //Update sweep bands + if (_lChartAll.ViewXY.XAxes[0].ScrollMode == XAxisScrollMode.Sweeping) + { + + //Dark band of old page fading away + double pageLen = _lChartAll.ViewXY.XAxes[0].Maximum - _lChartAll.ViewXY.XAxes[0].Minimum; + double sweepGapWidth = pageLen / 20.0; + _lChartAll.ViewXY.Bands[0].SetValues(lastX - pageLen, lastX - pageLen + sweepGapWidth); + if (_lChartAll.ViewXY.Bands[0].Visible == false) + { + _lChartAll.ViewXY.Bands[0].Visible = true; + } + + + //Bright new page band + _lChartAll.ViewXY.Bands[1].SetValues(lastX - sweepGapWidth / 6, lastX); + if (_lChartAll.ViewXY.Bands[1].Visible == false) + { + _lChartAll.ViewXY.Bands[1].Visible = true; + } + } + else + { + //Hide sweeping bands if not in sweeping mode + //if (_lChartAll.ViewXY.Bands[0].Visible == true) + //{ + // _lChartAll.ViewXY.Bands[0].Visible = false; + //} + + //if (_lChartAll.ViewXY.Bands[1].Visible == true) + //{ + // _lChartAll.ViewXY.Bands[1].Visible = false; + //} + } + _lChartAll.EndUpdate(); + + _iRound++; + } + } + + public void OnNavigatedTo(NavigationContext navigationContext) + { + var str= navigationContext.Parameters.GetValue("model"); + if(str == "实时波形") + { + IsRealtimeData = true; + } + else + { + IsRealtimeData = false; + } + } + + public bool IsNavigationTarget(NavigationContext navigationContext) + { + return true; + } + + public void OnNavigatedFrom(NavigationContext navigationContext) + { + } + + #endregion + } +} diff --git a/StartServerWPF.Modules.MseedChart/ViewModels/ChartPlotViewModel.cs b/StartServerWPF.Modules.MseedChart/ViewModels/ChartPlotViewModel.cs index 8d56be9..004492e 100644 --- a/StartServerWPF.Modules.MseedChart/ViewModels/ChartPlotViewModel.cs +++ b/StartServerWPF.Modules.MseedChart/ViewModels/ChartPlotViewModel.cs @@ -33,6 +33,7 @@ using System.Windows.Media.Imaging; using System.Windows.Threading; using System.Xml.Linq; using Prism.Regions; +using static System.Collections.Specialized.BitVector32; namespace StartServerWPF.Modules.MseedChart.ViewModels { @@ -463,15 +464,24 @@ namespace StartServerWPF.Modules.MseedChart.ViewModels private void RealTimeData(object isCheck) { + // + String str = "N02,N03,N04,N05,N06";//,N07,N08,N09,N10,N11,N12,N13,N14,N15,N16,N17,N18,N19,N20,N21,N22,N23,N24,N25,N26,N27"; + var stations= str.Split(','); + smList = _wavesModel.ReadWavesFromJson(stations); + _channelCount = smList.Count * 3; + CurrentTime = smList.First().BeginTime.ToShortDateString(); + StationsName = smList.Select(a => new StationAxis { Name = a.Name, IsChecked = true, SelectCommand = new DelegateCommand(StationsNameVisible) }).ToList(); + // StartChart(); + if (_lChartAll != null) { - bool yAxesVisible = ((bool)isCheck == true); + bool isStartRealData = (Convert.ToBoolean(isCheck) == true); if (smList.Count == 0) { return; } _lChartAll.BeginUpdate(); - if (yAxesVisible) + if (isStartRealData) { StartChart(); //Set real-time monitoring automatic old data destruction diff --git a/StartServerWPF.Modules.MseedChart/Views/ChartPlotRealDataView.xaml b/StartServerWPF.Modules.MseedChart/Views/ChartPlotRealDataView.xaml new file mode 100644 index 0000000..bec9882 --- /dev/null +++ b/StartServerWPF.Modules.MseedChart/Views/ChartPlotRealDataView.xaml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 时间间隔: + + + + + + + + + + + + + diff --git a/StartServerWPF.Modules.MseedChart/Views/ChartPlotRealDataView.xaml.cs b/StartServerWPF.Modules.MseedChart/Views/ChartPlotRealDataView.xaml.cs new file mode 100644 index 0000000..6877fc5 --- /dev/null +++ b/StartServerWPF.Modules.MseedChart/Views/ChartPlotRealDataView.xaml.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace StartServerWPF.Modules.MseedChart.Views +{ + /// + /// Interaction logic for ViewA.xaml + /// + public partial class ChartPlotRealDataView : UserControl + { + public ChartPlotRealDataView() + { + InitializeComponent(); + } + + } +} diff --git a/StartServerWPF.Modules.MseedChart/Views/ChartPlotView.xaml b/StartServerWPF.Modules.MseedChart/Views/ChartPlotView.xaml index 50ac620..f7646a7 100644 --- a/StartServerWPF.Modules.MseedChart/Views/ChartPlotView.xaml +++ b/StartServerWPF.Modules.MseedChart/Views/ChartPlotView.xaml @@ -66,7 +66,7 @@ - + diff --git a/StartServerWPF.Modules.MseedChart/app.config b/StartServerWPF.Modules.MseedChart/app.config new file mode 100644 index 0000000..374208e --- /dev/null +++ b/StartServerWPF.Modules.MseedChart/app.config @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StartServerWPF.Modules.MseedChart/packages.config b/StartServerWPF.Modules.MseedChart/packages.config index d4f8144..8648005 100644 --- a/StartServerWPF.Modules.MseedChart/packages.config +++ b/StartServerWPF.Modules.MseedChart/packages.config @@ -1,10 +1,79 @@  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/StartServerWPF.sln b/StartServerWPF.sln index 54479c0..bf938ad 100644 --- a/StartServerWPF.sln +++ b/StartServerWPF.sln @@ -3,36 +3,86 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.3.32819.101 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StartServerWPF.Modules.Main", "StartServerWPF.Modules.Main\StartServerWPF.Modules.Main.csproj", "{D9A5C84C-296A-458E-9CCB-BCD95959F88B}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StartServerWPF", "StartServerWPF\StartServerWPF.csproj", "{7585A28B-9A36-4B10-9033-0214C93F68F5}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartServerWPF.Modules.MseedChart", "StartServerWPF.Modules.MseedChart\StartServerWPF.Modules.MseedChart.csproj", "{E0B8EEB4-E63B-488C-BEAD-F03D488CDCB6}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartServerWPF.Assets", "StartServerWPF.Assets\StartServerWPF.Assets.csproj", "{EA0D3C2D-5BEB-420C-9222-2E6E5F40BF5C}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mseedC", "mseedC\mseedC.vcxproj", "{69F6D457-8FC8-440D-B390-8D7D76D88C05}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StartServerWPF.Modules.Main", "Modules\StartServerWPF.Modules.Main\StartServerWPF.Modules.Main.csproj", "{9A6AF364-195E-4017-9CF8-D3E59928D124}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D9A5C84C-296A-458E-9CCB-BCD95959F88B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D9A5C84C-296A-458E-9CCB-BCD95959F88B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D9A5C84C-296A-458E-9CCB-BCD95959F88B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D9A5C84C-296A-458E-9CCB-BCD95959F88B}.Release|Any CPU.Build.0 = Release|Any CPU {7585A28B-9A36-4B10-9033-0214C93F68F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7585A28B-9A36-4B10-9033-0214C93F68F5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7585A28B-9A36-4B10-9033-0214C93F68F5}.Debug|x64.ActiveCfg = Debug|x64 + {7585A28B-9A36-4B10-9033-0214C93F68F5}.Debug|x64.Build.0 = Debug|x64 + {7585A28B-9A36-4B10-9033-0214C93F68F5}.Debug|x86.ActiveCfg = Debug|x86 + {7585A28B-9A36-4B10-9033-0214C93F68F5}.Debug|x86.Build.0 = Debug|x86 {7585A28B-9A36-4B10-9033-0214C93F68F5}.Release|Any CPU.ActiveCfg = Release|Any CPU {7585A28B-9A36-4B10-9033-0214C93F68F5}.Release|Any CPU.Build.0 = Release|Any CPU + {7585A28B-9A36-4B10-9033-0214C93F68F5}.Release|x64.ActiveCfg = Release|x64 + {7585A28B-9A36-4B10-9033-0214C93F68F5}.Release|x64.Build.0 = Release|x64 + {7585A28B-9A36-4B10-9033-0214C93F68F5}.Release|x86.ActiveCfg = Release|x86 + {7585A28B-9A36-4B10-9033-0214C93F68F5}.Release|x86.Build.0 = Release|x86 {E0B8EEB4-E63B-488C-BEAD-F03D488CDCB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E0B8EEB4-E63B-488C-BEAD-F03D488CDCB6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E0B8EEB4-E63B-488C-BEAD-F03D488CDCB6}.Debug|x64.ActiveCfg = Debug|x64 + {E0B8EEB4-E63B-488C-BEAD-F03D488CDCB6}.Debug|x64.Build.0 = Debug|x64 + {E0B8EEB4-E63B-488C-BEAD-F03D488CDCB6}.Debug|x86.ActiveCfg = Debug|x86 + {E0B8EEB4-E63B-488C-BEAD-F03D488CDCB6}.Debug|x86.Build.0 = Debug|x86 {E0B8EEB4-E63B-488C-BEAD-F03D488CDCB6}.Release|Any CPU.ActiveCfg = Release|Any CPU {E0B8EEB4-E63B-488C-BEAD-F03D488CDCB6}.Release|Any CPU.Build.0 = Release|Any CPU + {E0B8EEB4-E63B-488C-BEAD-F03D488CDCB6}.Release|x64.ActiveCfg = Release|x64 + {E0B8EEB4-E63B-488C-BEAD-F03D488CDCB6}.Release|x64.Build.0 = Release|x64 + {E0B8EEB4-E63B-488C-BEAD-F03D488CDCB6}.Release|x86.ActiveCfg = Release|x86 + {E0B8EEB4-E63B-488C-BEAD-F03D488CDCB6}.Release|x86.Build.0 = Release|x86 {EA0D3C2D-5BEB-420C-9222-2E6E5F40BF5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EA0D3C2D-5BEB-420C-9222-2E6E5F40BF5C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EA0D3C2D-5BEB-420C-9222-2E6E5F40BF5C}.Debug|x64.ActiveCfg = Debug|x64 + {EA0D3C2D-5BEB-420C-9222-2E6E5F40BF5C}.Debug|x64.Build.0 = Debug|x64 + {EA0D3C2D-5BEB-420C-9222-2E6E5F40BF5C}.Debug|x86.ActiveCfg = Debug|x86 + {EA0D3C2D-5BEB-420C-9222-2E6E5F40BF5C}.Debug|x86.Build.0 = Debug|x86 {EA0D3C2D-5BEB-420C-9222-2E6E5F40BF5C}.Release|Any CPU.ActiveCfg = Release|Any CPU {EA0D3C2D-5BEB-420C-9222-2E6E5F40BF5C}.Release|Any CPU.Build.0 = Release|Any CPU + {EA0D3C2D-5BEB-420C-9222-2E6E5F40BF5C}.Release|x64.ActiveCfg = Release|x64 + {EA0D3C2D-5BEB-420C-9222-2E6E5F40BF5C}.Release|x64.Build.0 = Release|x64 + {EA0D3C2D-5BEB-420C-9222-2E6E5F40BF5C}.Release|x86.ActiveCfg = Release|x86 + {EA0D3C2D-5BEB-420C-9222-2E6E5F40BF5C}.Release|x86.Build.0 = Release|x86 + {69F6D457-8FC8-440D-B390-8D7D76D88C05}.Debug|Any CPU.ActiveCfg = Debug|x64 + {69F6D457-8FC8-440D-B390-8D7D76D88C05}.Debug|Any CPU.Build.0 = Debug|x64 + {69F6D457-8FC8-440D-B390-8D7D76D88C05}.Debug|x64.ActiveCfg = Debug|x64 + {69F6D457-8FC8-440D-B390-8D7D76D88C05}.Debug|x64.Build.0 = Debug|x64 + {69F6D457-8FC8-440D-B390-8D7D76D88C05}.Debug|x86.ActiveCfg = Debug|Win32 + {69F6D457-8FC8-440D-B390-8D7D76D88C05}.Debug|x86.Build.0 = Debug|Win32 + {69F6D457-8FC8-440D-B390-8D7D76D88C05}.Release|Any CPU.ActiveCfg = Release|x64 + {69F6D457-8FC8-440D-B390-8D7D76D88C05}.Release|Any CPU.Build.0 = Release|x64 + {69F6D457-8FC8-440D-B390-8D7D76D88C05}.Release|x64.ActiveCfg = Release|x64 + {69F6D457-8FC8-440D-B390-8D7D76D88C05}.Release|x64.Build.0 = Release|x64 + {69F6D457-8FC8-440D-B390-8D7D76D88C05}.Release|x86.ActiveCfg = Release|Win32 + {69F6D457-8FC8-440D-B390-8D7D76D88C05}.Release|x86.Build.0 = Release|Win32 + {9A6AF364-195E-4017-9CF8-D3E59928D124}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9A6AF364-195E-4017-9CF8-D3E59928D124}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9A6AF364-195E-4017-9CF8-D3E59928D124}.Debug|x64.ActiveCfg = Debug|x64 + {9A6AF364-195E-4017-9CF8-D3E59928D124}.Debug|x64.Build.0 = Debug|x64 + {9A6AF364-195E-4017-9CF8-D3E59928D124}.Debug|x86.ActiveCfg = Debug|Any CPU + {9A6AF364-195E-4017-9CF8-D3E59928D124}.Debug|x86.Build.0 = Debug|Any CPU + {9A6AF364-195E-4017-9CF8-D3E59928D124}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9A6AF364-195E-4017-9CF8-D3E59928D124}.Release|Any CPU.Build.0 = Release|Any CPU + {9A6AF364-195E-4017-9CF8-D3E59928D124}.Release|x64.ActiveCfg = Release|Any CPU + {9A6AF364-195E-4017-9CF8-D3E59928D124}.Release|x64.Build.0 = Release|Any CPU + {9A6AF364-195E-4017-9CF8-D3E59928D124}.Release|x86.ActiveCfg = Release|Any CPU + {9A6AF364-195E-4017-9CF8-D3E59928D124}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/StartServerWPF/App.xaml.cs b/StartServerWPF/App.xaml.cs index 715f06d..c480eb6 100644 --- a/StartServerWPF/App.xaml.cs +++ b/StartServerWPF/App.xaml.cs @@ -1,5 +1,4 @@ -using Microsoft.VisualBasic.Logging; -using Prism.Ioc; +using Prism.Ioc; using Prism.Modularity; using StartServerWPF.Modules.Main; using StartServerWPF.Views; diff --git a/StartServerWPF/StartServerWPF.csproj b/StartServerWPF/StartServerWPF.csproj index d5dc264..348e122 100644 --- a/StartServerWPF/StartServerWPF.csproj +++ b/StartServerWPF/StartServerWPF.csproj @@ -3,19 +3,33 @@ WinExe net6.0-windows true + AnyCPU;x86;x64 + preview-all + + - + + + True + True + Settings.settings + + Always + + SettingsSingleFileGenerator + Settings.Designer.cs + PreserveNewest diff --git a/StartServerWPF/ViewModels/MainWindowViewModel.cs b/StartServerWPF/ViewModels/MainWindowViewModel.cs index 756030a..2292e40 100644 --- a/StartServerWPF/ViewModels/MainWindowViewModel.cs +++ b/StartServerWPF/ViewModels/MainWindowViewModel.cs @@ -1,5 +1,4 @@ -using Microsoft.VisualBasic.ApplicationServices; -using Prism.Commands; +using Prism.Commands; using Prism.Ioc; using Prism.Mvvm; using StartServerWPF.Assets; diff --git a/StartServerWPF/Views/MainWindow.xaml.cs b/StartServerWPF/Views/MainWindow.xaml.cs index 329ef78..981524a 100644 --- a/StartServerWPF/Views/MainWindow.xaml.cs +++ b/StartServerWPF/Views/MainWindow.xaml.cs @@ -1,5 +1,4 @@ -using Org.BouncyCastle.Tls.Crypto; -using Prism.Ioc; +using Prism.Ioc; using Prism.Regions; using StartServerWPF.Modules.Main.ViewModels; using System.Windows; diff --git a/mseedC/libmseed/.clang-format b/mseedC/libmseed/.clang-format new file mode 100644 index 0000000..e0c08ef --- /dev/null +++ b/mseedC/libmseed/.clang-format @@ -0,0 +1,6 @@ +BasedOnStyle: LLVM +AlwaysBreakAfterDefinitionReturnType: TopLevel +SpaceBeforeParens: Always +BreakBeforeBraces: Allman +AlignConsecutiveAssignments: true +ColumnLimit: 0 diff --git a/mseedC/libmseed/.gitignore b/mseedC/libmseed/.gitignore new file mode 100644 index 0000000..8803df1 --- /dev/null +++ b/mseedC/libmseed/.gitignore @@ -0,0 +1,2 @@ +doc/working/ +doc/gh-pages/ diff --git a/mseedC/libmseed/ChangeLog b/mseedC/libmseed/ChangeLog new file mode 100644 index 0000000..119a739 --- /dev/null +++ b/mseedC/libmseed/ChangeLog @@ -0,0 +1,1370 @@ +2023.206: 3.0.17 + - Add tests for default record length and encoding. + - Document versioning schema as semantic versioning. + - Add const qualifiers to packing routines that do not modify the + passed MS3Record structure. + +2023.204: 3.0.16 + - Additional Steim 1 & 2 decoder optimization. + - Add more const qualifiers to pointer values. Thanks @damb. + +2023.185: + - Fix logic in `msr3_duplicate()` for certain cases. + - Add many const qualifiers to pointer values where the library + interface does not modify the data. Thanks @damb + +2023.180: + - Add const qualifier to record pointer declarations where the + library interface does not modify the data. + +2023.177: + - Incorporate ms_gswapX() functions into libmseed.h to promote inlining. + - Optimize Steim 1 & 2 decoders. + - Change test for environment variable DECODE_DEBUG to compile-time define + - Change test for environment variable ENCODE_DEBUG to compile-time define + +2023.162: 3.0.15 + - Print sample rate in Hz consistently in msr3_print() + - Fix writing of SNR values field 9 of Blockette 201 (v2) + - Read and write microsecond offsets to/from Blockette 500 (v2) + - Fix addition of Clock Model field 9 of Blocketee 500 (v2) + +2023.160: 3.0.14 + - Add FAQ to documentation and update example code to match API changes. + - Change sample type for text encoding to 't', value 'a' still supported. + +2023.159: + WARNING: API change as follows: + The `fpos` and `last` arguments of ms3_readmsr(), ms3_readmsr_r(), + and ms3_readmsr_selection() have been removed. The same capabilities + is avaiable and details are included in the porting guide. + + - Add JSON Merge Patch capability to mseh_set_ptr_r(). + - Fix zero-padding of empty bytes following data in miniSEED v2 creation. + - Rename DE_ASCII to DE_TEXT to generalize to UTF-8, legacy mapping provided. + - Add MS3Tolerance_INITIALIZER for MS3Tolerance values. + +2023.155: + WARNING: API change as follows: + The `MS3TraceList.numtraces` was renamed `MS3TraceList.numtraceids`. + + - New test suite based on Tau :https://github.com/jasmcaus/tau. + Many tests were added and the suite now works on MS-Windows. + + - Update example/lm_pack.c: + * Use improved test sinusuoid that contains all differences for + Steim1 and Steim2 encoding. + * Add `-2` option to generate miniSEED v2 instead of default v3. + +2023.105: + - Handle special case of year 0 when parsing version 2 blockettes. These + are now treated as "unset" and not included in the extra headers. + - Add nstime_t special value of NSTUNSET for use as "unset" meaning. + +2023.099: + WARNING: API change as follows: + The `path` argument to mseh_get and mseh_set routines is now in + JSON Pointer (RFC 6901) format. This is a more appropriate, and + standardized, format than the pseudo-JSON Path, dotted string style + previously used. It also allows more flexibility such as specification + of an array element. + + - `mseh_get_path_r()` and `mseh_set_path_r()`, previously named without + the `_r` suffix, now take a additional `parsestate` argument. This + functionality allows the parsed extra headers to be retained between + calls to avoid re-parsing. For advanced usage, this allows more efficient + getting or setting of multiple extraheader values. If used, this state + information must be free'd with `mseh_free_parsestate()`. If used + with `mseh_set_path_r()` the headers must also be serialized with + `mseh_serialize()`. + + - `mseh_get_path_r()` and `mseh_set_path_r()` accept a value type of `i` + that is used with int64_t values. + + - Replace JSON library with yyjson (https://github.com/ibireme/yyjson). + Benefits include performance, shortest accurate real number representation, + JSON Pointer support, and UTF-8 support. + + +2023.082: + WARNING: API changes as follows: + 1. mstl3_printtracelist() now takes an additional `versions` argument. + When non-zero the routine will decorate SIDs with publication versions. + 2. The MS3TraceID structure is no longer a simple linked list. Instead + it is a skip list, slightly changing the syntax for traversing the list + as illustrated in the examples. + + - Significant optimization for the case of constructing trace lists with + large numbers of differnt source IDs, by using a skip list. Implementation + inspired by: https://github.com/tdeck/c-skiplist, thanks @tdeck! + - Add new mstl3_findID() function for searching a trace list for specific + SourceID and, optionally, publication version. + +2023.068: + - Optimize trace construction in mstl3_addmsr_recordptr() for the case + of duplicate records. + - Add 'const' declarations to ms_sid2nslc() and ms_nslc2sid() to guarantee + input will not be modified. + - Add cURL detection and full build support to example/Makefile. + - Fix logic test for LIBMSEED_NO_THREADING declaration. + +2023.029: 3.0.13 + - Embed current leap second list, used by default and replaced by + ms_readleapsecondfile(). + +2023.028: + - Add ISOMONTHDAY_DOY time string variant, with day-of-year. + - Add '_Z' variants of time string formats for trailing Z versions. + - Print record timestamp in new ISOMONTHDAY_DOY_Z format. + - Deprecated the ms_nstime2timestrz() function. + - Re-brand to EarthScope. + +2022.338: 3.0.12 + - Change printing of bit flag sets to print each bit flag in + most-significant-bit first order to match binary number representation. + +2022.156: 3.0.11 + - Generate proper HTTP Range header by always including a start value, + defaulting to 0, when a range end is specified. + - When time correction value is present always set the time correction + applied bit when creating V2 records. Thanks @nicoleroy-ipgp. + - mseedview example: always emit accumulated log messages, and print + basic summary correctly. + +2022.103: 3.0.10 + - Fix uninitialized file position in ms3_readtracelist_selection() (#80) + by @anowacki. + - Fix array index warning in crc32c.c. + - Update emmbedded Parson to 1.4.0. + - Simplify byte swapping routines (#75) by @QuLogic. + - Initialize selection.pubversion to 0 in ms3_readtracelist_timewin() + by @Cuda-Chen. + - Make logging facility thread safe, with per-thread parameters. + - Add lm_pararead.c example to illustrate reading miniSEED in parallel + using re-entrant interfaces and POSIX threading. + - Add Add MS_HPTIME2NSTIME and MS_NSTIME2HPTIME macros to convert + to/from version 2.x time values. + +2021.234: 3.0.9 + - Update Source Identifier handling to the adopted specification of: + FDSN:NET_STA_LOC_BAND_SOURCE_POSITION + +2020.156: 3.0.8 + - Add error/warning log registry for accumulation of messages. + - Log and diagnostic printing callbacks now require 'const char *'. + - Verbose-triggered messages are now sent to stdout instead of stderr. + +2020.137: + - Add capability to read data from URLs. This feature is optional, + enabled at build time with LIBMSEED_URL and requires libcurl to be + available on the system. + +2019.216: + - Copy only UTF-8 characters in ms_strncpclean(), ms_strncpcleantail(), + and ms_strncpopen(). + +2019.172: 3.0.7 + - Add conversion of epoch values via ms_timestr2nstime(). + - Allow trailing 'Z' in date-times in ms_timestr2nstime(). + +2019.170: 3.0.6 + - Generalize ms_timestr2nstime() to detect all supported time formats. + - Rename old ms_timestr2nstime() to ms_mdtimestr2nstime(). + - Change minimum valid year from 1000 to 1678 to avoid wrap-around. + - ms_nstime2timestr(): fix printing of pre-epoch values for UNIXEPOCH. + - Add test for time string parsing and conversion. + +2019.166: 3.0.5 + - Allow trace list packing with multiple data sample types. + +2019.163: + - Portable printing of size_t values. + +2019.162: + - Re-license all libmseed code under the Apache License V2.0. + +2019.161: 3.0.4 + - Add record record list capability, replacing segment-level record metadata. + +2019.142: + - Add ability to pack miniSEED version 2 records. + +2019.137: + - Allow packing records with no payload, i.e. header-only. + +2019.135: + - Add pre-allocation of data buffers, enable on Windows and disable otherwise. + +2019.123: 3.0.3 + - Fix version splitting, clarify behavior + - Fix publication version filtering, thanks @krischer + - Allow selections without time ranges, thanks @krischer + - Normalize encoding string lookups, the SEED manual values are messy no need to perpetuate them + - Add option to build PDF manual and clarifications in documentation + - Remove steps in install target of Makefile that no longer function, thanks @senshu + +2019.103: 3.0.2 + - mstl3_pack() can be called without modifying the Trace List with MSF_MAINTAINMSTL flag. + - Add lm_pack_rollingbuffer.c example of generating records with a rolling buffer. + - Consistently provide extra headers as terminated string from MS3Record.extra. + - Fix segment start time tracking in mstl3_pack(). + +2019.102: 3.0.1 + - Add mstl3_readbuffer_selection() and fix selection-based ms3_readmsr_selection(). + - Use callback functions for time and sample rate tolerance instead of fixed values. + - Fix progression of record start time when packing records. + - Optionally store record-level metadata, header flags and extra headers, in a MS3TraceList. + - More documentation and examples. + +2019.094: 3.0.0 + - A new major version refactored to support the next generation miniSEED + Documentation including porting guide avilable at: + https://iris-edu.github.io/libmseed/ + + Almost all core data structures and functions have been modified, + often mostly in name (due to structure changes), so porting is required. + + Major new features and changes of note: + + - Support for reading/writing of miniSEED 3 and read support of miniSEED 2. + + - Support for nanosecond time resolution: + The HPTMODULUS is renamed NSTMODULUS and changed for nanoseconds. + Related change of HTPERROR to NSTPERROR value. + hptime_t changed to nstime_t and all time functions changed accordingly. + The hptime2XYZtimestr() function is combined into single nstime2timestr() + function with format flag. + + - Added mstl3_readbuffer() to read all records in a data buffer into a Trace List. + + - Add global libmseed_memory that contains user-definable function pointers to + malloc(), realloc() and free(). This allows all memory management from the library + to be performed with user-defined functions. + + - Data structure change and rename: + Rename MSRecord to MS3Record and restructure for miniSEED 3. + Rename MSTrace[ID,Seg,List] to MS3Trace[ID,Seg,List] and restructure for miniSEED 3. + Rename Selections and SelectTime to MS3Selections and MS3SelectTime. + + - Remove MSTrace_s and MSTraceGroup and related functions, use MS3Trace[ID,Seg,List] instead. + + - Remove all platform defines (LWP_*) except LWP_WIN for MS Windows. + + - Rename all library structs by removing the "_s" suffix so they match their typedef names + + - Rename macros and functions specific to miniSEED 2.x by adding "2". + + - Remove packheaderbyteorder and packdatabyteorder handling and related + envrionment variables. Byte order is either detected or fixed. + + - Decrease MINRECLEN from 256 to 40, decrease MAXRECLEN from 1MB to 128 KiB. + + - Increase 'recbuflen' to msr3_parse[_selection]() to uint64_t to work with very large buffers. + + - Remove record length specifier from many parsing routines, always autodetermined. + + - Remove MS_ISVALIDBLANK macro, was only used for notification of archaic structure. + + - Add JSON handling and general wrapper functions to support extra headers + + - Add CRC-32C calculation, new ms_crc32c() function. + + - Set msr->swapflag bit flags to indicate if header and payload need swapping during parsing. + + - Selection file format allows two selection listing variants + If the "quality" field is an integer it is assumed to be a publication version, + otherwise it is ignored. + + - Remove capability to read the deprecated "pack" file format used at IRIS DMC. + + - Remove StreamState tracking, effectively dropping the compression history capability + between records. Not worth the complexity. + +2017.283: 2.19.5 + - msr_endtime(): calculate correct end time during a leap second. + - Fixed signedness comparison warning. + +2017.125: + - Export LM_SIZEOF_OFF_T on Windows via libmseed.def. + +2017.118: 2.19.4 + - Add global LM_SIZEOF_OFF_T variable that is set to the size of + the off_t data type as determined at compile time. + +2017.075: 2.19.3 + - Add missing public, global symbols to libmseed.map, thanks + to Elliott Sales de Andrade. + +2017.061: 2.19.2 + - Provide install target in Makefile thanks to by Pierre Duperray. + - Deprecate dynamic build target, the shared target will now build + shared or dynamic (Darwin) libraries depending on the system. + - Limit symbols exported in shared libraries to public interfaces + as defined in libmseed.map, thanks again to Pierre Duperray. + - Allow tests to work on Darwin with dynamic libraries. + +2017.060: 2.19.1 + - Derive versioning of shared/dynamic library from canonical version + defined as LIBMSEED_VERSION in libmseed.h. + - Apply updates to more standardized use of NAME and typos in man pages, + submitted by Pierre Duperray. + +2017.053: 2.19 + - Incorporate lmplatform.h details into libmseed.h for improved usage. + All that is needed is the static/shared/dynamic library and libmseed.h. + - Avoid undefined left shifts of signed values that would go out of + range and specify the types of some constants. + +2016.290: + - Remove dependency on ntwin32.mak for Windows nmake makefiles, now + building works in plain MSVC development environments. + +2016.286: 2.18 + - Remove limitation on sample rate before calling ms_genfactmult() + in the normal path of packing records. Previously generating the + factor and multiplier was not attempted for rates higher than + 32,767. + +2016.281: 2.18rc4 + - ms_genfactmult() now support a much larger range of integer + sample rates and periods. + - ms_genfactmult() now sets the factor and multiplier using the + SECONDS/SAMPLE notation for sample rates less than 1.0 to retain + precision for low rates. + - ms_genfactmult() now assumes the specified rate is a sample + period in seconds if the samprate value is negative. + - Add ms_rsqrt64() as a general use reciprocal sqrt for doubles. + - Use memcpy() instead of assignment when unpacking float32 and + float64 samples to avoid problems with NaN's. Thanks Lion Krischer. + - Add test for reading records without Blockette 1000. + - Reformat all source code using included clang-format profile. + +2016.277: + - A more elegant sanity check for output length in packing by mbyt. + +2016:276: 2.18rc3 + - Improvements for test suite, more consistency. + - Remove msr_decode_steim? from libmseed.def, they are internal. + - Add sanity to length check before memset calls in packing functions. + +2016:274: 2.18rc2 + - Check for environment variables ENCODE_DEBUG and DECODE_DEBUG + and set debugging output, at this point it is Steim frame details + and differences being encoded/decoded. + - Fix padding in steim[12] encoding routines. + - Remove unneeded output buffer checks in steim[12] decoding routines. + +2016.272: 2.18rc1 + - Replace data sample packing and unpacking routines from qlib2 with + new routines developed from scratch. All code is now LGPL licensed. + - Add test suite with tests for encoding, decoding, parsing, etc. + - Update licensing to GNU-LGPL version 3 and include (L)GPL licenses + in LICENSE.txt. + +2015.053: + - Define needed C99 int types for MSVC 2012 or earlier. Previously + this was only done for versions earlier than MSVC 2010. + +2015.213: 2.17 + - Round Fixed Section Data Header start time values to the nearest + tenth of millisecond and restrict the microsecond offset value + to a range between -50 and +49 as recommended in SEED. Previously + start times were truncated at tenths of millisecond resolution + and the microsecond offset value was between 0 and +99. This also + addresses a bug where microsecond offsets were off by 100ms for times + before Jan 1 1970. Thanks to Lion Krischer for reporting. + + Note to future hackers: the definition of HPTMODULUS governing the + time tick interval for high precision time values implies that this + tick interval may be changed. In reality, this should not be changed + from the default, microsecond tick value without thorough testing. + Some logic is know to be dependent on the microsecond tick. + +2015.134: 2.16m + - Add defines for needed integer types and macros from inttypes.h + missing in older MSVC versions. MSVC 2010 and later appear to have + enough C99 support. + - Add define tests for _WIN32 and _WIN64 to cover all WINs. + - ms_fread(): Add cast to quiet warning for conversion from size_t + to int. In this case the read will always be <= MAXRECLEN, much + smaller than int, making the conversion safe. + +2015.113: 2.16 + - Update minor release version in Makefile. + +2015.108: + - Cleanup of lmplatform.h removing unneeded headers and using C99 + standard headers except for a few platform specific cases. + - Convert all printf() and scanf() usage of %lld for 64-bit integers + to use the C99 PRId64 and SCNd64 macros for portability (MinGW). + - Change detection of Linux/Cygwin to set global define LMP_LINUX + instead of LMP_GLIB2 (now marked as deprecated). + - Change detection of Windows to set global define LMP_WIN instead + of LMP_WIN32 (now marked as deprecated). + - Add detection of __MINGW64__ define. + - Tested building on Win7 with: Open Watcom 1.9, MinGW gcc 4.8.1 and + Cygwin 1.7.35 (gcc 2.9.2). + +2015.074: + - Define NTP-Posix time epoch conversion constant specifically as + a long long integer to avoid warnings on some compilers. + +2015.070: 2.15 + - Fix infinite loop if blockette chain is corrupt. Patch submitted + by Elliott Sales de Andrade. + +2015.062: 2.14 + - Fix memory leak when msr_pack() returns after an error. Patch + contributed by Larry Baker and Eric Thomas. + - Change casting of values passed to isdigit() to int intead of + unsigned character. Apparently this was consufing on ARM archs. + +2015.061: + - Add ms_readleapseconds() and ms_readleapsecondfile() routines to + read a leap seconds file into an internal list. + - Modify msr_endtime() to check for an internal leap second list, + check for overlap with the record and adjust the end time as needed + when leap seconds are present. When a leap second list is present + any indication of positive leap seconds in the fixed section data + header are ignored. + +2014.248: + - Add casting to size_t and int to avoid build warnings on certain + build systems (e.g. older MS Visual Studio). + The effective maximum sample buffer and record buffer size is ~2GB. + +2014.234: 2.13 + - Clean up Makefile and example/Makefile, remove all GCC-specific and + debug targets. Makefiles are compatible with both GNU and BSD make. + As before, the shared target works only for GCC-compatible compilers. + Thanks to Elliott Sales de Andrade for pointing out that shared library + targets did not work with parallel builds, prompting this clean up. + +2014.197: 2.13rc + - Support 128-byte record length by changing MINRECLEN to 128 (was 256). + The current SEED specification is a minimum record length of 256-bytes, + but there are cases (e.g. low latency data flow) using 128-byte records. + - Add declarations, casting and string truncation to clear warnings + uncovered in ObsPy testing (thanks to Elliott Sales de Andrade). + +2014.074: + - Add __CYGWIN__ defined test to Linux section of lmplatform.h. + +2013.273: 2.12 + - Add mst_convertsamples() and mstl_convertsamples() to convert sample + types. When converting from float & double types to integer type + a simple rounding is employed to compensate for machine representation + of floating point numbers. + +2013.267: + - msr_endtime(): Check activity flags in fixed section of data header, + if bit 4 is set then a positive leap occurred during the record and + the end time should be reduced by one second to properly match the now + shifted UTC time. As long as the next record in the series is + properly marked with the correct UTC time no artificial time tear + will be generated when reconstructing the time series. + +2013.137: + - Update docs for transition to 64-bit sample counts done in 2011! + +2013.117: 2.11 + - Initialize internal counters in mst_pack() to avoid their use + in error conditions. Thanks to D. Ketchum and M. Potter for help. + - Add 'const' qualifier to the msfile argument of the file reading and + writing family of routines to stop compiler warnings resulting from + generated binding functions. Thanks to M. Bach for reporting. + +2013.056: 2.10 + - Add more sanity checks to msr_unpack_data() to catch bad/corrupted + data records and avoid crashes due to impossible pointer construction. + +2013.053: 2.9 + - Extend parsing of day-of-year style time strings to allow parsing + of time fields separated by dashes in addition to allowing the day + and time fields to be separated by a 'T' or space. Modifications + were made to ms_seedtimestr2hptime(). + - Extend parsing of year-month-day style time strings to allow parsing + of time fields separated by commas. Modifications were made to + ms_timestr2hptime(). + +2013.050: + - Add MS_ISVALIDYEARDAY() macro to test range for year and day values, + years between 1900 and 2100 and days between 1 and 366. + - Use new macro to determine when byte swapping is needed. This test + leaves a non-determination of byte order for days 1, 256 and 257 in + the year 2056, beware future data users. + +2013.007: 2.8 (again) + - Add msr_parse_selection() to libmseed.def for Windows builds. + - Fix errors in pseudo code in doc/msr_parse.3. + +2012.363: 2.8 + - Implement msr_parse_selection() which is a wrapper of msr_parse() + that searches for the first parsable miniSEED record in a memory + buffer and returns it. Optionally a Selections list may be specified + to limit the returned data to records matching specific criteria. + +2012.357: + - Fix corruption of float sample types when opposite byte order than + host in certain architecture combinations. By not addressing + individual float samples directly as floats prior to byte swapping + we avoid the values being placed into the FPU where they may be + corrupted. Thanks to Moritz Beyreuther and Lion Krischer for discovery + and testing. + - Expose the msr_unpack_data() function for use by removing the static + declaration. Change verbose flag type to match others and document. + - Fix some logging messages, typos, etc. + +2012.138: 2.7 + Add define for MINGW32 to use _fstat and _stat. + +2012.114: 2.7rc2 + - Change record parsing code to trim trailing spaces from network, + station, location and channel parameters. Spaces in between non-space + characters remain. + +2012.111: + - Update example/test.mseed to new data with an earthquake to make it + more recognizable compared to ambient noise in the previous example. + +2012.105: 2.7rc1 + - Add many type casts to quiet newer GCC and MSVC compilers. + For 32-bit programs there are some places, mostly in packing routines, + where 64-bit integers are converted to 32-bit values for sample buffer + sizes and counts leaving the potential for overflow. This will become + a problem when byte counts for sample buffers are beyond 2^31, for + 32-bit integer sample values that is more than 536 million samples. + So programmer beware if using such buffer sizes for packing miniSEED. + +2012.088: + - When parsing records copy the ASCII string fields (sequence number, + network, station, location, channel) directly without removing spaces. + This makes the parser more lenient to unallowed characters and + synchronizes read and write capabilities. + + - For sampling rates above 32,767 Hz only print a warning for high + verbosity settings and set the sample rate factor and multipler to zero. + Previously an error was printed during rational approximation. + The expectation is that a record with such a high sample rate will + include a blockette 100 to specify the actual sample rate. + This is not an official convention for SEED, but is a kludge to + support extremly high sample rates without printing errors. + + - Fix conversion to doubles in examples/msrepack.c. + +2011.304: 2.6.2 + - Increase precision of sample rate in SYNC printing routines to + avoid trucation of rate values. + +2011.262: + - Add '_lm' suffix to declaration of pivotal_gmtime_r_stamp in + genutils.c to avoid conflicts with other libraries. Thanks to Doug + Neuhauser for the tip. + +2011.164: + - example/msrepack.c: add -N option to specify network code for output + data records. + +2011.160: + - example/msrepack.c: make sure input buffer is flushed/packed, retain + good input data when the end of the file contains bad data. + +2011.158: + - example/msrepack.c: convert samples to needed type for specified + output encoding, e.g. integers to floats. + - example/msrepack.c: do not open output file until after all options + have been parsed to avoid clobbering the output file unnecessarily. + +2011.144: 2.6.1 + - Update dynamic library version. + - Add notes to the users guide and intro about functions useful for + detecting and parsing records in a memory buffer. + +2011.129: + - Correctly determine record lengths implied by presence of pack header + by avoiding record header searches in buffer beyond pack header. + - Fix ms_parse to return correct hint of how many more bytes are needed + when record length has not been determined. + - Change the samplecnt and numsamples elements of the MSRecord, MSTrace + and MSTraceSeg structures to 64-bit integers to avoid overflow. + +2011.124: + - Allow lowercase 't' in ISO time string parsing. + +2011.090: + - Add check for invalid blockette offset in ms_detect(). + +2011.056: 2.6 + - Fix handling of sample data in internal MSTraceList routines. + - Cleanup WIN32 defines, make MSVC and Open Watcom play nicely. + - Default data byte order to big endian when blockette 1000 contains + invalid byte order value, previously defaulted to host byte order. + +2011.042: + - Update libmseed.def to match current libmseed.h declaractions. + - Cleanup to avoid MSVC warnings. + +2011.039: 2.6rc4 + - Do not return MS_NOTSEED when no records read from packed file. + - Update user guide to include note about MSTraceLists and change + the miniSEED creation example to use mst_writemseed(). + +2011.036: 2.6rc3 + - Fix parsing of records without blockette 1000, use pack headers + and end-of-file to determine implied record lengths. + +2011.032: 2.6rc2 + - Fix handling of truncated records, partial reads at EOF. + - Fix offset tracking when reading from stdin. + +2011.006: 2.6rc1 + - Add convience routines to only read selected records from a file: + ms_readtracegroup_timewin() + ms_readtracegroup_selection() + ms_readtracelist_timewin() + ms_readtracelist_selection() + - Add convience routines to write miniSEED data to specified file: + msr_writemseed() + mst_writemseed() + mst_writemseedgroup(). + - Fix bug when either mst_pack() or mst_packgroup() was called with + a NULL packedsamples pointer. + - Fix bugs when (re)initializing read buffer. + - Fix return of file position in ms_readmsr_main().. + +2010.365: + - Add internal ms_gmtime_r() to replace call to system gmtime_r(). The + internal version handles dates beyond year 2038 and avoids the system + call. Tested with years up to 5000. + +2010.363: + - Add parseutils.c source file. + - Add msr_parse() to detect & unpack a record in a memory buffer. + - Add ms_detect() to check a memory buffer for a record. + + - Rewrite ms_readmsr_main() to use msr_parse() and reduce I/O by + using a double-buffer to increase the average read size and other + simplifications and optimizations. + + The internal read buffer size is MAXRECLEN as defined in libmseed.h. + Each file parameter structure used, including the global default, + will allocate a buffer of this size. For specialized applications + requiring low memory use the MAXRECLEN, current 1 MB, can be reduced. + + - Change ms_readmsr_main() to interpret reclen <= 0 as a request + for autodetection of each record, a value of 0 no longer means all + records are the same length as the first record. + - Remove ms_find_reclen() function, replacement is ms_detect(). + - Move ms_parse_raw() into parseutils.c. + - Change year sanity check to allow range 1800 to 5000. + - Use 64-bit values in hptime calculation to correctly handle years + beyond 2038. + - The "last" record indicator argument to the ms_readmsr() family + is considered deprecated and will probably be removed in future + releases. New programs should not use this functionality, it does + not, and will never, work in cases where there is more than + MINRECLEN padding after the last valid record in a file. + +2010.304: + - Use gmtime_r() to avoid the non-thread-safe system gmtime() function. + - Define gmtime_r() for WIN32 and WIN64 in terms of gmtime() which is + thread-safe under WIN32. + - Add define for WIN64 even though WIN32 is probably defined for 64-bit. + +2010.291: + - Add check for spaces as valid characters in sequence numbers. + +2010.253: + - Add check for log parameters in ms_log_main(). + +2010.129: + - Fix small printing bug in diagnostic ms_printselections(). + +2010.068: 2.5.1 + - Allow file name for ms_readselectionfile() to be "-" and read + stdin as a special case. + +2010.047: 2.5 + - Fix tracking of first and last MSTraceSeg entries in mstl_addmsr(). + - Make the non-fatal Steim integrity failure and sample mismatch log + output print as "Warning" instead of "ERROR". + +2010.015: 2.4 + - Change ms_addselect() to take a srcname argument and create + ms_addselect_comp() as a wrapper that creates a srcname from + individual source name components. + +2010.012: + - Fix unpacking of 16-bit integer encoded data, thanks to + Robert Barsch. + +2010.008: + - Fix special case of "--" location ID in ms_addselect(). + +2010.007: + - Add SelectTime **ppselecttime argument to ms_matchselect() + and msr_matchselect() routines so that the matching time range + can optionally be returned to the caller. + +2010.006: + - Add a check for ATTRIBUTE_PACKED define (lmplatform.h) and + if set add an __attribute__((packed)) qualifier to all structs + that are mapped to SEED structures (and cannot be padded). + This is useful on platforms such as ARM that pad structures + for alignment by default. To use add "-DATTRIBUTE_PACKED" to + CFLAGS or equivalent. + - Fixes to gswapX() routines for platforms where structures + are padded for alignment; patch from Laurence Withers, thanks. + - Add msr_matchselect and ms_printselections() routine to + selections.c. + +2010.005: + - Simplify packed file reading in ms_readmsr_main() and allow + data sections to be skipped based on a Selection list, packed + files are used internally at the IRIS DMC. + - Rename ms_readmsr_r() to ms_readmsr_main() and create a + simple wrapper function for ms_readmsr_r(). + +2010.004: + - Add selection.c containing routines to manage data selection + lists based on network, station, location, channel, quality, + start and end times. The name parameters may contain globbing + charaters for matching. External routines are: ms_addselect(), + ms_matchselect(), ms_readselectionfile() and ms_freeselections(). + +2009.365: + - Correctly track microsecond offset in Blockette 1001 when + msr_pack() creates more than one record. + +2009.357: + - Reduce error accumulation of record start times in pack.c, + thanks to Roman Racine for the report and suggested fix. + The error only accumulated to significant values when packing + a large number of records with a single call to msr_pack(). + +2009.354: + - Change return type of internal ms_readpackinfo() to off_t and + fix small error return check. + +2009.353: + - Add ms_splitsrcname() routine to split "NET_STA_LOC_CHAN[_QUAL]" + into separate components. + - Update MINOR_VER version to 4 anticipating the 2.4 release + (seem to have forgotten 3). + +2009.201: 2.3 + - msr_unpack(): change new blockette count and data offset + test failures to "Warning" instead of "ERROR". + +2009.194: 2.3rc + - Fix record offset reporting when record length detection fails. + - Add diagnostic reporting of data problems in ms_readmsr_r() + by calling ms_parse_raw(). + +2009.174: + - Fix corner case trace sorting error in mstl_addmsr(). + - Add ms_nomsamprate() to genutils.c to calculate the sample rate + specified as a SEED sample rate factor and multiplier. + - Add ms_parse_raw() implementing a simple validating parser + to report invalid header values and print raw header fields. + - msr_unpack(): add tests for blockette count and data offset. + - Change byte swapping test of year to 1920 to 2050 range. + - Store blockette offset in BlktLink structure. + +2009.111: 2.2 + - Add CDSN decoding support due to popular demand. + - Incorporate enhanced dynamic library versioning as recommended + by Laurence Withers. + - Fix bug in ASCII encoding routine, thanks again Laurence Withers. + - Add and update libmseed.def which can be used with the Win32 DLL + for linking, original file contributed by Robert Barsch. + +2008.361: 2.2rc3 + - Improve mstl_addmsr() sorting and suturing logic so that it + matches the healed and sorted output from the trace group routines. + +2008.327: 2.2rc2 + - Add ms_readtracelist() to read all records from a file into a + MSTraceList. + - Update all man pages with changes and add new man pages. + - Fix auto sorting of traces in mstl_addmsr(). + +2008.320: 2.2rc + - Add MSTraceList facility which is functionally equivalent to + the existing MSTraceGroup facility but more efficiently populated, + especially when data records are in time order or the time series + are very gappy. The MSTraceList related functions are prefixed + with "mstl_" and exist in the new source file tracelist.c. + - Add mst_printsynclist() and mstl_printsynclist() functions to + print trace segment lists in SYNC format. + +2008.318: + - Change one call in fileutils.c to fseeko() to lmp_fseeko() + so Win32 builds work again. + +2008.313: + - Optimize mst_findadjacent() by first testing for time segment + match, then sample rate and finally source name components. + +2008.283: 2.1.7 + - Allow a caller of ms_readmsr()/ms_readmsr_r() to specify a + starting offset into the file by setting the value pointed to by + the fpos argument to a negative value (interpreted as a positive + offset). + +2008.220: 2.1.6 + - Optimize Steim 1 & 2 encoders significantly by using small local + working buffers and eliminating many redundant calculations. + Thanks to Jean-Francois Fels. + +2008.171: + - Add Matlab/GNU Octave interface routines, thanks to Stefan Mertl. + - Remove 'const' qualifier from argument of log printing function + pointers, too many useless compiler warnings. + +2008.163: + - Allow data record sequence numbers to be NULL values in addition + to ASCII numbers. + +2008.161: 2.1.5 + - Fix string parsing error for IRIS DMC packed files, thanks Sandy! + - Use a merge sort algorithm insteam of the bubble sort previsouly + used in mst_groupsort(), better performance. + - Do raw string manipulation in msr_srcname() and mst_srcname() + instead of using sprintf(), slightly better performance. + - Do raw string comparison in mst_findmatch() for better performance. + +2007.228: 2.1.4 + - Include compression history for Steim encodings by tracking the + last sample value packed for each data stream. For the first + record of a stream, a cold-start, the first difference is zero. + This included the addition of a StreamState struct and associated + pointers for MSRecord and MSTrace which get allocated during packing + routines. + - Do not adjust start time of record header during packing when + sampling rate is zero or negative. + - Add ms_hptime2mdtimestr() and ms_btime2mdtimestr routines to + create time strings in month-day format, this is the same as + the ISO format without the 'T' between the date and time. + - Add a 'subsecond' flag argument to all ms_hptime2 + routines to control the addition of sub-second precision. + +2007.178: 2.1.3 + - Fix log message bug for unknown encoding format while unpacking, + this could cause certain systems to segfault if encountered. + - Rename MS_UNPACKENCODINGFORMATFALLBACK macro to + MS_UNPACKENCODINGFALLBACK to match the actual variable name. + - Fix handling of fallback encoding format in unpack.c, worked + earlier but had regressed to a broken state. + - Remove declaration for lmp_strerror() which does not exist. + +2007.148: 2.1.2 + - Use calloc instead of malloc to allocate and clear a fsdh_s + in msr_pack_header_raw() when none is available in the passed + MSRecord. Previously this could result in a subtle bug for systems + where malloc'd memory is not zeroed. This would only have effected + programs that were creating miniSEED in a particular way. + +2007.138: 2.1.1 + - Create LMP_BSD platform definition to cover the BSDs including + Apple Mac OS X, this replaces LMP_DARWIN. Specifically FreeBSD, + OpenBSD, NetBSD and Apple are detected for this platform. + +2007.118: + - Add msr_duplicate() function to duplicate an MSRecord struct. + - Use msr_duplicate() in example/msrepack.c example program to + track the most current MSRecord as a template for packing. + +2007.102: 2.1 + - Removed caveat comment from mst_groupheal() man page. + +2007.083: + - mst_groupheal() now sorts the MSTraceGroup before it tries to + heal the traces, this increases the chances of healing all + possible segments. + - msr_pack(): add void *handlerdata argument that wil be passed + directly to the record_handler(), this is intended to allow + private data to be passed from the msr_repack() caller to the + record handling routine. + - mst_pack(): add void *handlerdata argument that is passed + directly to msr_pack() and used as described above. + - mst_packgroup(): add void *handlerdata argument that is passed + directly to mst_pack() and used as described above. + - Add macros for setting the pack & unpack, header & data byte + order override variables: MS_PACKHEADERBYTEORDER(X), + MS_PACKDATABYTEORDER(X), MS_UNPACKHEADERBYTEORDER(X) and + MS_UNPACKDATABYTEORDER(X). + - Add macros for setting the unpack encoding format override and + encoding format fallback variables: MS_UNPACKENCODINGFORMAT(X) + and MS_UNPACKENCODINGFORMATFALLBACK(X). + +2007.074: + - Fix typos in the docs referring to msr_readtraces() that should + be ms_readtraces(), thanks Richard Boaz. + +2007.034: + - mst_groupheal(): fix removal of first trace in group. + - mst_groupheal(): reset MSTrace data quality indicator when + merged traces do not have matching qualities. + +2007.030: 2.0 + - Set no default CFLAGS and CC variables for building and add a + note to the Makefile about using them for build configuration. + - Eliminate compiler warning for genutils.c routines. + +2007.028: + - Add new pack file type 8. + - Allow 'M' as a valid data record indidator/quality flag. + +2007.023: + - Determine needs for GEOSCOPE decoding and remove the need + for using the pow() function and linking with the math library. + +2007.005: + - Fix resetting of global MSFileParam in ms_readmsr_f() when + cleanup is requested. + +2006.363: + - Change mst_groupsort() to sort on: srcname, then starttime, + then descending endtime and finally sample rate. This moves + sample rate to the end of the criteria, the previous order was: + srcname, sample rate, starttime and endtime. + +2006.354: 2.0rc1 + - Stamp 2.0rc1. + - Fix diagnostic printing bug in pack.c. + - Fix ms_gswap.3 man page. + +2006.346: + - Change "get_" prefix for lookup routines to "ms_". + - Change ms_encoding() to ms_encodingstr(). + - Document ms_errorstr() in the lookup and other man pages. + - Document and use ms_log(3) in User Guide/ms_intro(3). + +2006.344: + - Add "ms_" prefix to gswap routines. + - Change SWAPBTIME macro to MS_SWAPBTIME. + +2006.339: 2.0pre8 + - Add buffer length sanity check in ms_find_reclen() suggested by + Doreen Pahlke. + - Change mst_printracelist() and mst_printgaplist() to print + "-0" when the gap is 0 (one sample overlap) and "==" when there + is no gap. + +2006.332: + - Add memory allocation checks, every allocation is now tested. + - Fix usage message for example programs, use fprintf for the long + section of the output. + +2006.331: 2.0pre7 + - Add source name to all unpacking error and diagnostic messages. + - Add source name to all packing error and diagnostic messages. + - Reorganize sanity check code in msr_unpack() to use the + MS_ISVALIDHEADER macro. + - Add ms_recsrcname() function to calculate the source name for + an unpacked record. + +2006.326: 2.0pre6 + - Add ms_readmsr_r() as a reenentrant, thread safe version of what + ms_readmsr() used to be and make ms_readmsr() a wrapper for the new + reentrant version that uses global file reading parameters. + - Use ms_readmsr_r() in ms_readtraces() so that it's now thread + safe too. + - Add logging.c routines and declarations in libmseed.h. This + constitutes a new logging facility that is used throughout the + library and can be used by libmseed based programs. The facility + allows the caller to redirect all the log, diagnostic and error + output from the library to specific functions. The facility + also allows user specifed prefixes for all output messages. + +2006.321: + - Prefix all data encoding type defines with DE_ to avoid collision. + - Add GEOSCOPE (three subtypes), SRO and DWWSSN data decoders, there + are no encoders for these types. + - Need of the pow() function now requires linking with -lm (math lib). + +2006.312: 2.0pre5 + - Add MS_ISVALIDBLANK macro to libmseed.h to test memory for valid + blank/noise records: valid sequence number followed by ASCII spaces. + - Use MS_ISVALIDBLANK in ms_find_reclen() to implicitly find record + lengths, when reading ahead the record length can now be determined + if then next record is a real data record or a blank record. + - Use MS_ISVALIDBLANK in ms_readmsr() to print out a more specific + message when skipping blank records as opposed to non-data records + records. + +2006.311: 2.0pre4 + - Use MS_ISVALIDHEADER instead of MS_ISDATAINDICATOR when verifying + data records when the record length is not autodetected in ms_readmsr(). + - In msr_unpack_data() move the test of reallocation directly after + the reallocation so it's only tested when actually done. + - In msr_unpack_data() include text description of encoding in the + unsupported encoding error message. + +2006.296: 2.0pre3 + - Add 'quality' flag argument to mst_srcname() to control the + addition of the quality indicator in the srcname. + - Add 'quality' flag argument to mst_groupsort() to control the + inclusion of quality indicator in the sorting. + +2006.292: 2.0pre2 + - Use memory-aligned swap functions in unpackdata.c for speed. + +2006.291: + - Fix return type of ms_readtraces() on success and documentation. + - Tweak verbose flag checking in fileutils.c to avoid spurious msgs. + - Add gcc32gprof and gcc64gprof targets to Makefiles for profiling. + +2006.284: 2.0pre + - Fix dynamic target and update API version in Makefile. + - Require GCC for shared and dynamic library building. + - Include ctype.h header in lmplatform.h for WIN32 platform. + +2006.283: + - Add function msr_normalize_header() to update the FSDH and + blockettes with values at the MSRecord level. + - Add 'normalize' flag argument to msr_pack_header() control the + calling of msr_normalize_header() when packing. + - Change the MSRecord element 'private' to 'prvtptr' to avoid + collision with the C++ reserved word. + - Add a 'quality' flag argument to msr_srcname() to control the + addition of the quality indicator to the srcname. + - Move MS_ISVALIDHEADER(X) macro to libmseed.h for general use; this + macro tests for valid SEED data record signatures and is used for + detection of data records when reading data from files. + - Remove two redundant tests of swapflag in Steim-1 decompression. + - Declare starttime in msr_starttime() as hptime_t instead of double, + testing indicates that this never caused a problem in practice. + - Update example programs for API changes. + - Add -fPIC to GCCFLAGS in Makefile. + - Remove declaration for non-existent ms_verify_header() in libmseed.h + (thanks LLoyd Carothers). + +2006.251: + - Add correct swapping of fsdh.numsamples and fsdh.data_offset, + problem and fix reported by Doreen Pahlke (thanks!). This fixes + packing of data when packing to a byte-order opposite of the host + machine. + +2006.208: version 1.8 + - Fix memmove bounds for out-of-time-order data additions in both + mst_addmsr() and mst_addspan(). + - Fix memory leak in mst_pack() by freeing the temporary MSRecord + when no template is used. + - Add get_errorstr() function in lookup.c to return text descriptions + for specified libmseed return/error codes. + - Add gcc32, gcc32debug and gcc64debug targets to Makefiles. + +2006.182: version 1.7 + - Add MS_WRONGLENGTH error code and have msr_unpack() and the + file reading routines return it when the read length does not match + length specified in the Blockette 1000. This most commonly occurs + when either the specified record length or the length of the first + record is auto detected and the following record lengths assumed + do not match the actual records. + - Use MS_ISRATETOLERABLE macro in mst_groupsort() to compare the + sampling rates of adjacent trace segments. This is how sampling + rates are compared in other routines and will avoid problems + associated with testing the equality of floating point values. + +2006.173: + - Remove some of the useless error codes. + - Steim compression integrity check failure and sample count + mismatch are not fatal unpacking errors, only warnings are printed. + +2006.172: + - Changed return type of ms_readmsr() to int and added a pointer + to a pointer to an MSRecord to the arguments. Function now returns + status/error codes. + - Changed return type of ms_readtraces() to int and added a pointer + to a pointer to an MSTraceGroup to the arguments. Function now + returns status/error codes. + - Changed return type of msr_unpack() to int. Function now + returns status/error codes. + - Changes to many internal functions to support the new unpacking + error code bubble. + - Removed the MSRecord.unpackerr element as it is now unneeded. + - Found and fixed bug resulting in the assumption that all sample + sizes were 8 bytes (which would usually be wrong) during unpacking. + +2006.124: version 1.6.3 + - Fix (int *)packedsamples handling for packing routines. + - Fix compilation under Open Watcom (Win32). + +2006.122: version 1.6.2 + - More fixes for sampling rate == 0 when calculating the sample + period. + +2006.121: version 1.6.1 + - msr_endtime() now checks that the sample count is greater than + zero. If the sampling rate or sample count is less than or equal + to zero msr_endtime() returns the starttime. + +2006.115: version 1.6 + - Rename mst_heal() to mst_groupheal(). + - Change examples for ms_readtraces() in documentation that implied + an incorrect return type. + - Small changes to error messages for clarity (e.g. add file read + offset, print sample types as char not int). + - Fix offset determination for packed files and files without + blockette 1000s. + +2006.107: + - Add MS_ISVALIDHEADER macro to fileutils.c, verifies that a + specified buffer contains a valid fixed section data header. + - ms_find_reclen(): moved to fileutils.c + - ms_find_reclen(): More data record verification by checking + for valid time values (e.g. 0 <= hour <= 23 ). + - ms_find_reclen(): Detect record lengths even when no blockette + 1000 is found by reading the next 48 bytes from the file and + looking for another record header or EOF. This check is not + performed if the specified FILE pointer is NULL. The original + file read position is restored. This required adding another + argument: FILE *fileptr. + - Change output of msr_print() to include record length for + the lowest detail output (single line per record). + - Change example msview program to autodetect each record by + default. + +2006.082: version 1.5.2 + - Make msr_pack() emit a warning with the function pointer to + the record_handler() is not set instead of bombing out. The + packed record is not accessible any other way. + - Make the packedsamples argument to msr_pack() optional, the + pointer can be NULL if this information is not needed. + - Modify ms_readmsr() to be able to read packed files which are + indexed files used internally at the IRIS-DMC and probably no + where else. + - Add lmp_fseeko() portable function (used in fileutils.c). + +2006.079: version 1.5.1 + - Add file name check in ms_readmsr() to make sure subsequent + reads are done on the same file. If the function is called with a + different file name than the file that is currently open the + current file will be closed and the new one opened and an error + message printed. + - Change mst_srcname to include the data quality code in the + srcname if it is non-zero. + - Remove the data quality code specifics from mst_print* functions + as it is now included in the source name. + +2006.076: version 1.5 + - No changes, just stamp 1.5. + +2006.058: + - Change structure names: + * Trace -> MSTrace + * TraceGroup -> MSTraceGroup + * MSrecord -> MSRecord + A bothersome change, but it will ease inclusion into source + base of other libraries, etc. + - Change struct fsdh.drec_indicator to fsdh.dataquality. + - Change MSRecord.drec_indicator to MSRecord.dataquality. + - Add MSTrace.dataquality element. + - Add data quality matching flag arguments to ms_readtraces() + and mst_addmsrtogroup() to control matching of data qualities. + - Add data quality value arguments to mst_findmatch() and + mst_findadjacent() to control matching of data qualities. + - Modify mst_printtracelist() and mst_printgaplist() to include + data quality flags in their output when they have been set. + +2005.336: 1.4.5 + - Improve the data record verification in ms_find_reclen() to + improve the detection of non-data versus data records. In + particular the routine now requires a record to start with + 6 ASCII digits followed by a valid data record indicator + followed by either a space or NULL character (even though + a NULL here is not valid SEED). + - Fix mst_groupsort for near srcname matches. + +2005.325: 1.4.4 + - Add end time sort level to mst_groupsort(), now the function + will sort on: source name, sample rate, start time and + descending end time in that order. + +2005.315: 1.4.3 + - Include WIN32 define for strcasecmp->_stricmp. + - Fix typo in blockette 200 printing. + +2005.300: 1.4.2 + - Include sys/types.h for Win32 systems in lmplatform.h and + do not typedef off_t. + +2005.299: 1.4.1 + - In mst_findadjacent() do not perform the time and sample + rate tolerance checks if the tolerance is specified as -2.0. + - Remove the msi.c example program, it has diverged from the + separate released msi. + +2005.292: 1.4 + - In mst_addmsr() and mst_addspan() test if data sample + memory needs to be moved before moving, allows adding an + msr to a trace which has no data samples (e.g. a flushing + pack has been done). + - Do not try to pack Traces with numsamples==0 in + mst_packgroup(). + +2005.289: + - Add check for sample count mismatch and decrement + mst->samplecnt when packing in mst_pack(). + - Free mst->private in mst_init(). + +2005.271: 1.3 + - Add lmplatform.[ch] to hold platform dependent defines + and portability routines. + - Create lmp_ftello() portable routines and use it. + - Change all uses of fopen() to include a 'b' in the mode + in order to open files in "binary" mode on Win32. + - Add Makefile.wat for Open Watcom's wmake. + - Add Makefile.win for Microsoft's nmake. + - Test using Open Watcom 1.3 under Win32 (Windows XP). + - Add 'dynamic' target in Makefile to build a dynamic lib + on Mac OSX. + +2005.269: 1.2 + - Update many unpacking routines so that the MS_SAMPMISMATCH + error code is correctly returned and that none of the errors + are show stoppers, it is left to the application to decide. + - Remove error message when read fails during detection, the + end of the file is simply that, no error. + - Fix definition of MS_EPOCH2HPTIME and MS_HPTIME2EPOCH in + ms_time.3 man page. + - Change int64_t types to hptime_t types in documentation. + +2005.203: 1.1 + - Add 'chainpos' argument to msr_addblockette() to control + which end of the blockette chain the blockette is added to. + - Change msr_pack() to add any missing 1000 Blockettes to + the end of the blockette chain. + +2005.201: 1.0 Final + - Change version of example programs so they don't conflict + with future, non-example versions. + - Generate links to man pages and tar up a source package. + - No library code changes since pre6. + +2005.173: 1.0pre6 + - Set MSrecord->reclen to -1 in msr_init() to trigger + the default value in msr_pack(), etc. + +2005.157: 1.0pre5 + - Fix off-by-one error in number of samples for overlaps. + +2005.146: 1.0pre4 + - Add check for an UNPACK_DATA_FORMAT_FALLBACK environment + variable that defines a fallback format for when no encoding + format is specified in the data record (no blkt 1000). + - Set a default format fallback encoding of 10 (Steim 1). + If this default gets invoked, the byteorder will fallback + to big-endian if it has not been specified. + - Change the MS_EPOCH2HPTIME(X) and MS_HPTIME2EPOCH(X) + macro definitions to not include a semi-colon, duh. + - Add a 'timeformat' flag to the mst_printtracelist() and + mst_printgaplist() functions that indicates which format + the time stamp will be in: SEED time, ISO time or epoch. + - Add an option to msi to specify the time format in trace + and gap listings. + +2005.117: 1.0pre3 + - Add check for the following environment variable to force + the data encoding format when unpacking: + UNPACK_DATA_FORMAT = data encoding format + - Add '-e' option to msi/msrepack to specify the input data + encoding format allowing them to work with plain data records. + - Define _LARGEFILE_SOURCE in fileutils.c to get ftello() + without a compiler warning on Linux. + - Fixup swapping when byte order is forced on LE arch. + +2005.116: 1.0pre2 + - Add checking for the following environment variables that + can be used to force the byte-order for the header and data: + PACK_HEADER_BYTEORDER = 0 or 1 + PACK_DATA_BYTEORDER = 0 or 1 + UNPACK_HEADER_BYTEORDER = 0 or 1 + UNPACK_DATA_BYTEORDER = 0 or 1 + - Change the fpos argument to ms_readmsr() to be type off_t. + - Change the calls to ftell() in ms_readmsr() to ftello() to + return type off_t, this is required for large file support + where 64-bit offsets are needed. + - Change the header byte order determination to check for + start years between 1920 and 2020. + - Add gcc64 target to Makefile and example/Makefile. + +2005.102: 1.0pre1 + - Change msr_pack() to use a 'D' record indicator by default. + - Cleanup examples directory. + +2005.097: 0.9.9b + - Remove '-g' from common GCCFLAGS in examples/Makefile. + - Small update to ms_time.3 to clarify that MS_HPTIME2EPOCH + can be used to get both a truncated integer epoch or a + double precision epoch. + +2005.093: 0.9.9a + - Remove '-g' from common GCCFLAGS in Makefile. + +2005.091: 0.9.9 + - Fix printing of Blockette 500. + - Change macro defines to upper case macro names. + +2005.080: 0.9.8 + - Add ms_isratetolerable() macro to perform the default + sample rate tolerance check. Update appropriate functions. + - Fix sample rate checking in mst_print*() functions. + - Fix msi example code so negative min/max gaps (overlaps) + are parsed correctly from command line. + +2005.069: 0.9.7 + - Change mst_print() to mst_printtracelist() and add + mst_printgaplist(). + - Both of the above routines now report gaps as the time + of the first sample after the gap minus the time of the last + sample before the gap, sample "coverage" time is no longer + included. + - Make mst_groupsort() sort on source->samplerate->starttime + instead of source->starttime. + - ms_readmsr() will now skip non-data records when doing + record length autodetection. + - Add ms_hptime2epoch() macro to convert hptimes to + Unix/POSIX epoch times, integer truncation, no rounding. + - Add macro ms_isdataindicator() which tests a character + for a valid data record header indicator (D,R,Q,etc.) + - Example program msi now takes -min and -max options to + specify min and max gap/overlap to display in gap list. + +2005.047: 0.9.6 + - Add ms_epoch2hptime() macro to convert Unix/POSIX + epoch times to hptimes. + +2005.025: 0.9.5 + - Add 'skipnotdata' flag argument to ms_readmsr() and + ms_readtraces() and update their respective man pages. + - Shuffle order of arguments for ms_readtraces(), no big + deal but since the interface was changing anyway... + +2005.004: 0.9.4 + - Change printing of sample rates to print higher precision + so that small differences in rates are noticeable. + - Change fixed section header printing of sample rate to be + the actual calculated value using the factor and multiplier. + - Spell check README/INSTALL files and man pages. + - Remove WIN32 Makefiles and hooks in example sources. + - Minor printing fixups in the example code msi.c. + +2004.352: 0.9.3 + - Change ms_readmsr() to search valid record lengths up + to 8192 bytes when auto detecting the record size. + - Change msr_addblockette() to always add Blockette 1000s + to the beginning of the blockette chain and others to the + end of the blockette chain. + +2004.349: + - Fix reduction of precision when unpacking doubles. + - Change typo in pack.c from 'Unpacking' to 'Packing'. + - Improve printing of float/double samples in msi. + +2004.342: 0.9.2 + - Add proper rounding for span calculation in msr_endtime(). + +2004.341 - Release version 0.9.1 diff --git a/mseedC/libmseed/INSTALL.md b/mseedC/libmseed/INSTALL.md new file mode 100644 index 0000000..32145f4 --- /dev/null +++ b/mseedC/libmseed/INSTALL.md @@ -0,0 +1,48 @@ + +The library requires that C99 integer types are available on the +target computer. Specifically the int8_t, int16_t, int32_t, int64_t +and their unsigned counterpart types. + +## Unix, Linux, macOS + +A simple `make` on most Unix-like systems should build the library. + +The included Makefile should work for most Unix-like environments and +many make variants. It is known to work with GNU make, which, if not the +default, is sometimes installed as `gmake`. + +The `CC`, `CFLAGS`, `LDFLAGS` and `CPPFLAGS` environment variables can be set +to control the build. + +If the **LIBMSEED_URL** variable is defined during the build, the library will +be compiled with support for reading from URLs. Currently, this support requires +that [libcurl](https://curl.haxx.se/) be installed on the target system. + +The simplest way to build the library with URL support is to include `-DLIMSEED_URL` +in the CFLAGS environment variable. Or invoking the build as such: + +``` +CFLAGS+=" -DLIBMSEED_URL" make +``` + +By default a statically linked version of the library is built: **libmseed.a**, +with an accompanying header **libmseed.h**. + +With GCC, clang or compatible build tools it is possible to build a shared +library with `make shared`. + +A simple install method for the shared library can be invoked with +`make install`. By default the installation destination is /usr/local. +The install destination may be specified using the **PREFIX** variable, for +example: + +``` +make install PREFIX=/path/to/install/ +``` + +## Windows + +On a Windows platform the library can be compiled by using the +NMake compatible Makefile.win (e.g. 'nmake -f Makefile.win'). +The default target is a static library 'libmseed.lib'. +A libmseed.def file is included for use building and linking a DLL. diff --git a/mseedC/libmseed/LICENSE b/mseedC/libmseed/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/mseedC/libmseed/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/mseedC/libmseed/Makefile b/mseedC/libmseed/Makefile new file mode 100644 index 0000000..ef0fd1e --- /dev/null +++ b/mseedC/libmseed/Makefile @@ -0,0 +1,119 @@ + +# Build environment can be configured the following +# environment variables: +# CC : Specify the C compiler to use +# CFLAGS : Specify compiler options to use +# LDFLAGS : Specify linker options to use +# CPPFLAGS : Specify c-preprocessor options to use + +# Extract version from libmseed.h, expected line should include LIBMSEED_VERSION "#.#.#" +MAJOR_VER = $(shell grep LIBMSEED_VERSION libmseed.h | grep -Eo '[0-9]+.[0-9]+.[0-9]+' | cut -d . -f 1) +FULL_VER = $(shell grep LIBMSEED_VERSION libmseed.h | grep -Eo '[0-9]+.[0-9]+.[0-9]+') +COMPAT_VER = $(MAJOR_VER).0.0 + +# Default settings for install target +PREFIX ?= /usr/local +EXEC_PREFIX ?= $(PREFIX) +LIBDIR ?= $(EXEC_PREFIX)/lib +INCLUDEDIR ?= $(PREFIX)/include +DATAROOTDIR ?= $(PREFIX)/share +DOCDIR ?= $(DATAROOTDIR)/doc/libmseed +MANDIR ?= $(DATAROOTDIR)/man +MAN3DIR ?= $(MANDIR)/man3 + +LIB_SRCS = fileutils.c genutils.c msio.c lookup.c yyjson.c msrutils.c \ + extraheaders.c pack.c packdata.c tracelist.c gmtime64.c crc32c.c \ + parseutils.c unpack.c unpackdata.c selection.c logging.c + +LIB_OBJS = $(LIB_SRCS:.c=.o) +LIB_LOBJS = $(LIB_SRCS:.c=.lo) + +LIB_NAME = libmseed +LIB_A = $(LIB_NAME).a + +OS := $(shell uname -s) + +# Build dynamic (.dylib) on macOS/Darwin, otherwise shared (.so) +ifeq ($(OS), Darwin) + LIB_SO_BASE = $(LIB_NAME).dylib + LIB_SO_MAJOR = $(LIB_NAME).$(MAJOR_VER).dylib + LIB_SO = $(LIB_NAME).$(FULL_VER).dylib + LIB_OPTS = -dynamiclib -compatibility_version $(COMPAT_VER) -current_version $(FULL_VER) -install_name $(LIB_SO) +else + LIB_SO_BASE = $(LIB_NAME).so + LIB_SO_MAJOR = $(LIB_NAME).so.$(MAJOR_VER) + LIB_SO = $(LIB_NAME).so.$(FULL_VER) + LIB_OPTS = -shared -Wl,--version-script=libmseed.map -Wl,-soname,$(LIB_SO_MAJOR) +endif + +# Automatically configure LDFLAGS for URL support if requested and libcurl is available +# Test for LIBMSEED_URL in CFLAGS, then if curl-config is available, implying libcurl is available +ifneq (,$(findstring LIBMSEED_URL,$(CFLAGS))) + ifneq (,$(shell command -v curl-config;)) + export LM_CURL_VERSION=$(shell curl-config --version) + export LDLIBS:=$(LDLIBS) $(shell curl-config --libs) + endif +endif + +all: static + +static: $(LIB_A) + +shared dynamic: $(LIB_SO) + +# Build static library +$(LIB_A): $(LIB_OBJS) + @echo "Building static library $(LIB_A)" + $(RM) -f $(LIB_A) + $(AR) -crs $(LIB_A) $(LIB_OBJS) + +# Build shared/dynamic library +$(LIB_SO): $(LIB_LOBJS) + @echo "Building shared library $(LIB_SO)" + $(RM) -f $(LIB_SO) $(LIB_SO_MAJOR) $(LIB_SO_BASE) + $(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(LIB_OPTS) -o $(LIB_SO) $(LIB_LOBJS) + ln -s $(LIB_SO) $(LIB_SO_BASE) + ln -s $(LIB_SO) $(LIB_SO_MAJOR) + +test check: static FORCE + @$(MAKE) -C test test + +example: static FORCE + @$(MAKE) -C example + +clean: + @$(RM) $(LIB_OBJS) $(LIB_LOBJS) $(LIB_A) $(LIB_SO) $(LIB_SO_MAJOR) $(LIB_SO_BASE) + @$(MAKE) -C test clean + @$(MAKE) -C example clean + @echo "All clean." + +install: shared + @echo "Installing into $(PREFIX)" + @mkdir -p $(DESTDIR)$(PREFIX)/include + @cp libmseed.h $(DESTDIR)$(PREFIX)/include + @mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig + @cp -a $(LIB_SO_BASE) $(LIB_SO_MAJOR) $(LIB_SO_NAME) $(LIB_SO) $(DESTDIR)$(LIBDIR) + @sed -e 's|@PREFIX@|$(PREFIX)|g' \ + -e 's|@EXEC_PREFIX@|$(EXEC_PREFIX)|g' \ + -e 's|@LIBDIR@|$(LIBDIR)|g' \ + -e 's|@INCLUDEDIR@|$(PREFIX)/include|g' \ + -e 's|@VERSION@|$(FULL_VER)|g' \ + mseed.pc.in > $(DESTDIR)$(LIBDIR)/pkgconfig/mseed.pc + @mkdir -p $(DESTDIR)$(DOCDIR)/example + @cp -r example $(DESTDIR)$(DOCDIR)/ + +.SUFFIXES: .c .o .lo + +# Standard object building +.c.o: + $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ + +# Standard object building for shared library using -fPIC +.c.lo: + $(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -c $< -o $@ + +# Print Makefile expanded variables, e.g. % make print-LIB_SO +print-%: + @echo '$*=$($*)' + +FORCE: diff --git a/mseedC/libmseed/Makefile.win b/mseedC/libmseed/Makefile.win new file mode 100644 index 0000000..76cfed3 --- /dev/null +++ b/mseedC/libmseed/Makefile.win @@ -0,0 +1,49 @@ +# +# Nmake file for libmseed - MS Visual C/C++ +# Use 'nmake -f Makefile.win' + +NODEBUG=1 + +INCS = /I. +OPTS = /O2 /D_CRT_SECURE_NO_WARNINGS +LM_LIB = libmseed.lib +LM_DLL = libmseed.dll +LM_DEF = libmseed.def + +OBJS = fileutils.obj \ + genutils.obj \ + msio.obj \ + lookup.obj \ + yyjson.obj \ + msrutils.obj \ + extraheaders.obj\ + pack.obj \ + packdata.obj \ + tracelist.obj \ + gmtime64.obj \ + crc32c.obj \ + parseutils.obj \ + unpack.obj \ + unpackdata.obj \ + selection.obj \ + logging.obj + +all: lib + +lib: $(OBJS) + link.exe /lib /nologo /OUT:$(LM_LIB) $(OBJS) + +dll: $(OBJS) + link.exe /dll /nologo /OUT:$(LM_DLL) $(OBJS) + +.c.obj: + $(CC) /nologo $(CFLAGS) $(INCS) $(OPTS) /c $< + +# Run test suite +test: lib + pushd $@ && $(MAKE) /NOLOGO /f Makefile.win /$(MAKEFLAGS) & popd + +# Clean-up directives +clean: + -del a.out core *.o *.obj *% *~ libmseed.exp $(LM_LIB) $(LM_DLL) + @pushd test && $(MAKE) /NOLOGO /f Makefile.win $@ /$(MAKEFLAGS) & popd diff --git a/mseedC/libmseed/README.byteorder b/mseedC/libmseed/README.byteorder new file mode 100644 index 0000000..98bd12a --- /dev/null +++ b/mseedC/libmseed/README.byteorder @@ -0,0 +1,25 @@ + + -- Byte order handling in libmseed -- + +The miniSEED 3 format is defined as little-endian headers with the +endianess of the data payload explicitly defined by the encoding +value. + +The SEED 2.4 standard allows data only SEED (miniSEED) to be either in +big (most significant byte first) or little (least significant byte +first) endian byte order. One exception is that Steim-1 and Steim-2 +data compression are only defined as big-endian. + +How libmseed determines the byte order of a 2.x record: + +The byte order of a miniSEED 2.x record header including blockettes is +determined by checking if the record start year and day is a sane +value (e.g. year between 1900 and 2100 and day between 1 and 366). +The byte order of encoded data samples is determined by the byte order +flag in the Blockette 1000, if a Blockette 1000 is not present the +byte order is assumed to be the same as the header. + +In what byte order libmseed creates 2.x records: + +If the library ever creates miniSEED 2.x records, they will be in +big-endian byte order for maximum compatibility. diff --git a/mseedC/libmseed/README.md b/mseedC/libmseed/README.md new file mode 100644 index 0000000..9d046b9 --- /dev/null +++ b/mseedC/libmseed/README.md @@ -0,0 +1,32 @@ + +# libmseed - The miniSEED library + +The miniSEED library provides a framework for manipulation of SEED +data records, a format for commonly used for seismological time series +and related data. The library includes the functionality to read and +write data records, in addition to reconstructing time series from +multiple records. + +The library should work in Unix-like, Windows and potentially other +environments. + +## Documentation + +The [Documentation](https://earthscope.github.io/libmseed) provides an +overview of using the library, a tutorial and function level details. + +## License + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +Copyright (C) 2023 Chad Trabant, EarthScope Data Services diff --git a/mseedC/libmseed/crc32c.c b/mseedC/libmseed/crc32c.c new file mode 100644 index 0000000..d553409 --- /dev/null +++ b/mseedC/libmseed/crc32c.c @@ -0,0 +1,410 @@ +/*************************************************************************** + * CRC-32C calculation routines, clean and simple. Orignal file was named + * 'crc_sw.c' and found at: https://github.com/awslabs/aws-checksums + * + * All copyrights and license notifications have been retained. + * Unecessary routines have been removed for use in this code base. + ***************************************************************************/ + +/* +* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. +* +* Licensed under the Apache License, Version 2.0 (the "License"). +* You may not use this file except in compliance with the License. +* A copy of the License is located at +* +* http://aws.amazon.com/apache2.0 +* +* or in the "license" file accompanying this file. This file is distributed +* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +* express or implied. See the License for the specific language governing +* permissions and limitations under the License. +*/ + +#include "libmseed.h" + +/* The Castagnoli, iSCSI CRC32c polynomial (reverse of 0x1EDC6F41) */ +#define CRC32C_POLYNOMIAL 0x82F63B78 + +/** Castagnoli CRC32c (iSCSI) lookup table for slice-by-4/8/16 */ +/* Table truncated to 8 top-level tables from original, slice-by-16 is not supported in this code */ +const uint32_t CRC32C_TABLE[8][256] = { + { + 0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4, 0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB, // [0][0x08] + 0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B, 0x4D43CFD0, 0xBF284CD3, 0xAC78BF27, 0x5E133C24, // [0][0x10] + 0x105EC76F, 0xE235446C, 0xF165B798, 0x030E349B, 0xD7C45070, 0x25AFD373, 0x36FF2087, 0xC494A384, // [0][0x18] + 0x9A879FA0, 0x68EC1CA3, 0x7BBCEF57, 0x89D76C54, 0x5D1D08BF, 0xAF768BBC, 0xBC267848, 0x4E4DFB4B, // [0][0x20] + 0x20BD8EDE, 0xD2D60DDD, 0xC186FE29, 0x33ED7D2A, 0xE72719C1, 0x154C9AC2, 0x061C6936, 0xF477EA35, // [0][0x28] + 0xAA64D611, 0x580F5512, 0x4B5FA6E6, 0xB93425E5, 0x6DFE410E, 0x9F95C20D, 0x8CC531F9, 0x7EAEB2FA, // [0][0x30] + 0x30E349B1, 0xC288CAB2, 0xD1D83946, 0x23B3BA45, 0xF779DEAE, 0x05125DAD, 0x1642AE59, 0xE4292D5A, // [0][0x38] + 0xBA3A117E, 0x4851927D, 0x5B016189, 0xA96AE28A, 0x7DA08661, 0x8FCB0562, 0x9C9BF696, 0x6EF07595, // [0][0x40] + 0x417B1DBC, 0xB3109EBF, 0xA0406D4B, 0x522BEE48, 0x86E18AA3, 0x748A09A0, 0x67DAFA54, 0x95B17957, // [0][0x48] + 0xCBA24573, 0x39C9C670, 0x2A993584, 0xD8F2B687, 0x0C38D26C, 0xFE53516F, 0xED03A29B, 0x1F682198, // [0][0x50] + 0x5125DAD3, 0xA34E59D0, 0xB01EAA24, 0x42752927, 0x96BF4DCC, 0x64D4CECF, 0x77843D3B, 0x85EFBE38, // [0][0x58] + 0xDBFC821C, 0x2997011F, 0x3AC7F2EB, 0xC8AC71E8, 0x1C661503, 0xEE0D9600, 0xFD5D65F4, 0x0F36E6F7, // [0][0x60] + 0x61C69362, 0x93AD1061, 0x80FDE395, 0x72966096, 0xA65C047D, 0x5437877E, 0x4767748A, 0xB50CF789, // [0][0x68] + 0xEB1FCBAD, 0x197448AE, 0x0A24BB5A, 0xF84F3859, 0x2C855CB2, 0xDEEEDFB1, 0xCDBE2C45, 0x3FD5AF46, // [0][0x70] + 0x7198540D, 0x83F3D70E, 0x90A324FA, 0x62C8A7F9, 0xB602C312, 0x44694011, 0x5739B3E5, 0xA55230E6, // [0][0x78] + 0xFB410CC2, 0x092A8FC1, 0x1A7A7C35, 0xE811FF36, 0x3CDB9BDD, 0xCEB018DE, 0xDDE0EB2A, 0x2F8B6829, // [0][0x80] + 0x82F63B78, 0x709DB87B, 0x63CD4B8F, 0x91A6C88C, 0x456CAC67, 0xB7072F64, 0xA457DC90, 0x563C5F93, // [0][0x88] + 0x082F63B7, 0xFA44E0B4, 0xE9141340, 0x1B7F9043, 0xCFB5F4A8, 0x3DDE77AB, 0x2E8E845F, 0xDCE5075C, // [0][0x90] + 0x92A8FC17, 0x60C37F14, 0x73938CE0, 0x81F80FE3, 0x55326B08, 0xA759E80B, 0xB4091BFF, 0x466298FC, // [0][0x98] + 0x1871A4D8, 0xEA1A27DB, 0xF94AD42F, 0x0B21572C, 0xDFEB33C7, 0x2D80B0C4, 0x3ED04330, 0xCCBBC033, // [0][0xa0] + 0xA24BB5A6, 0x502036A5, 0x4370C551, 0xB11B4652, 0x65D122B9, 0x97BAA1BA, 0x84EA524E, 0x7681D14D, // [0][0xa8] + 0x2892ED69, 0xDAF96E6A, 0xC9A99D9E, 0x3BC21E9D, 0xEF087A76, 0x1D63F975, 0x0E330A81, 0xFC588982, // [0][0xb0] + 0xB21572C9, 0x407EF1CA, 0x532E023E, 0xA145813D, 0x758FE5D6, 0x87E466D5, 0x94B49521, 0x66DF1622, // [0][0xb8] + 0x38CC2A06, 0xCAA7A905, 0xD9F75AF1, 0x2B9CD9F2, 0xFF56BD19, 0x0D3D3E1A, 0x1E6DCDEE, 0xEC064EED, // [0][0xc0] + 0xC38D26C4, 0x31E6A5C7, 0x22B65633, 0xD0DDD530, 0x0417B1DB, 0xF67C32D8, 0xE52CC12C, 0x1747422F, // [0][0xc8] + 0x49547E0B, 0xBB3FFD08, 0xA86F0EFC, 0x5A048DFF, 0x8ECEE914, 0x7CA56A17, 0x6FF599E3, 0x9D9E1AE0, // [0][0xd0] + 0xD3D3E1AB, 0x21B862A8, 0x32E8915C, 0xC083125F, 0x144976B4, 0xE622F5B7, 0xF5720643, 0x07198540, // [0][0xd8] + 0x590AB964, 0xAB613A67, 0xB831C993, 0x4A5A4A90, 0x9E902E7B, 0x6CFBAD78, 0x7FAB5E8C, 0x8DC0DD8F, // [0][0xe0] + 0xE330A81A, 0x115B2B19, 0x020BD8ED, 0xF0605BEE, 0x24AA3F05, 0xD6C1BC06, 0xC5914FF2, 0x37FACCF1, // [0][0xe8] + 0x69E9F0D5, 0x9B8273D6, 0x88D28022, 0x7AB90321, 0xAE7367CA, 0x5C18E4C9, 0x4F48173D, 0xBD23943E, // [0][0xf0] + 0xF36E6F75, 0x0105EC76, 0x12551F82, 0xE03E9C81, 0x34F4F86A, 0xC69F7B69, 0xD5CF889D, 0x27A40B9E, // [0][0xf8] + 0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E, 0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351 // [0][0x100] + }, + { + 0x00000000, 0x13A29877, 0x274530EE, 0x34E7A899, 0x4E8A61DC, 0x5D28F9AB, 0x69CF5132, 0x7A6DC945, // [1][0x08] + 0x9D14C3B8, 0x8EB65BCF, 0xBA51F356, 0xA9F36B21, 0xD39EA264, 0xC03C3A13, 0xF4DB928A, 0xE7790AFD, // [1][0x10] + 0x3FC5F181, 0x2C6769F6, 0x1880C16F, 0x0B225918, 0x714F905D, 0x62ED082A, 0x560AA0B3, 0x45A838C4, // [1][0x18] + 0xA2D13239, 0xB173AA4E, 0x859402D7, 0x96369AA0, 0xEC5B53E5, 0xFFF9CB92, 0xCB1E630B, 0xD8BCFB7C, // [1][0x20] + 0x7F8BE302, 0x6C297B75, 0x58CED3EC, 0x4B6C4B9B, 0x310182DE, 0x22A31AA9, 0x1644B230, 0x05E62A47, // [1][0x28] + 0xE29F20BA, 0xF13DB8CD, 0xC5DA1054, 0xD6788823, 0xAC154166, 0xBFB7D911, 0x8B507188, 0x98F2E9FF, // [1][0x30] + 0x404E1283, 0x53EC8AF4, 0x670B226D, 0x74A9BA1A, 0x0EC4735F, 0x1D66EB28, 0x298143B1, 0x3A23DBC6, // [1][0x38] + 0xDD5AD13B, 0xCEF8494C, 0xFA1FE1D5, 0xE9BD79A2, 0x93D0B0E7, 0x80722890, 0xB4958009, 0xA737187E, // [1][0x40] + 0xFF17C604, 0xECB55E73, 0xD852F6EA, 0xCBF06E9D, 0xB19DA7D8, 0xA23F3FAF, 0x96D89736, 0x857A0F41, // [1][0x48] + 0x620305BC, 0x71A19DCB, 0x45463552, 0x56E4AD25, 0x2C896460, 0x3F2BFC17, 0x0BCC548E, 0x186ECCF9, // [1][0x50] + 0xC0D23785, 0xD370AFF2, 0xE797076B, 0xF4359F1C, 0x8E585659, 0x9DFACE2E, 0xA91D66B7, 0xBABFFEC0, // [1][0x58] + 0x5DC6F43D, 0x4E646C4A, 0x7A83C4D3, 0x69215CA4, 0x134C95E1, 0x00EE0D96, 0x3409A50F, 0x27AB3D78, // [1][0x60] + 0x809C2506, 0x933EBD71, 0xA7D915E8, 0xB47B8D9F, 0xCE1644DA, 0xDDB4DCAD, 0xE9537434, 0xFAF1EC43, // [1][0x68] + 0x1D88E6BE, 0x0E2A7EC9, 0x3ACDD650, 0x296F4E27, 0x53028762, 0x40A01F15, 0x7447B78C, 0x67E52FFB, // [1][0x70] + 0xBF59D487, 0xACFB4CF0, 0x981CE469, 0x8BBE7C1E, 0xF1D3B55B, 0xE2712D2C, 0xD69685B5, 0xC5341DC2, // [1][0x78] + 0x224D173F, 0x31EF8F48, 0x050827D1, 0x16AABFA6, 0x6CC776E3, 0x7F65EE94, 0x4B82460D, 0x5820DE7A, // [1][0x80] + 0xFBC3FAF9, 0xE861628E, 0xDC86CA17, 0xCF245260, 0xB5499B25, 0xA6EB0352, 0x920CABCB, 0x81AE33BC, // [1][0x88] + 0x66D73941, 0x7575A136, 0x419209AF, 0x523091D8, 0x285D589D, 0x3BFFC0EA, 0x0F186873, 0x1CBAF004, // [1][0x90] + 0xC4060B78, 0xD7A4930F, 0xE3433B96, 0xF0E1A3E1, 0x8A8C6AA4, 0x992EF2D3, 0xADC95A4A, 0xBE6BC23D, // [1][0x98] + 0x5912C8C0, 0x4AB050B7, 0x7E57F82E, 0x6DF56059, 0x1798A91C, 0x043A316B, 0x30DD99F2, 0x237F0185, // [1][0xa0] + 0x844819FB, 0x97EA818C, 0xA30D2915, 0xB0AFB162, 0xCAC27827, 0xD960E050, 0xED8748C9, 0xFE25D0BE, // [1][0xa8] + 0x195CDA43, 0x0AFE4234, 0x3E19EAAD, 0x2DBB72DA, 0x57D6BB9F, 0x447423E8, 0x70938B71, 0x63311306, // [1][0xb0] + 0xBB8DE87A, 0xA82F700D, 0x9CC8D894, 0x8F6A40E3, 0xF50789A6, 0xE6A511D1, 0xD242B948, 0xC1E0213F, // [1][0xb8] + 0x26992BC2, 0x353BB3B5, 0x01DC1B2C, 0x127E835B, 0x68134A1E, 0x7BB1D269, 0x4F567AF0, 0x5CF4E287, // [1][0xc0] + 0x04D43CFD, 0x1776A48A, 0x23910C13, 0x30339464, 0x4A5E5D21, 0x59FCC556, 0x6D1B6DCF, 0x7EB9F5B8, // [1][0xc8] + 0x99C0FF45, 0x8A626732, 0xBE85CFAB, 0xAD2757DC, 0xD74A9E99, 0xC4E806EE, 0xF00FAE77, 0xE3AD3600, // [1][0xd0] + 0x3B11CD7C, 0x28B3550B, 0x1C54FD92, 0x0FF665E5, 0x759BACA0, 0x663934D7, 0x52DE9C4E, 0x417C0439, // [1][0xd8] + 0xA6050EC4, 0xB5A796B3, 0x81403E2A, 0x92E2A65D, 0xE88F6F18, 0xFB2DF76F, 0xCFCA5FF6, 0xDC68C781, // [1][0xe0] + 0x7B5FDFFF, 0x68FD4788, 0x5C1AEF11, 0x4FB87766, 0x35D5BE23, 0x26772654, 0x12908ECD, 0x013216BA, // [1][0xe8] + 0xE64B1C47, 0xF5E98430, 0xC10E2CA9, 0xD2ACB4DE, 0xA8C17D9B, 0xBB63E5EC, 0x8F844D75, 0x9C26D502, // [1][0xf0] + 0x449A2E7E, 0x5738B609, 0x63DF1E90, 0x707D86E7, 0x0A104FA2, 0x19B2D7D5, 0x2D557F4C, 0x3EF7E73B, // [1][0xf8] + 0xD98EEDC6, 0xCA2C75B1, 0xFECBDD28, 0xED69455F, 0x97048C1A, 0x84A6146D, 0xB041BCF4, 0xA3E32483 // [1][0x100] + }, + { + 0x00000000, 0xA541927E, 0x4F6F520D, 0xEA2EC073, 0x9EDEA41A, 0x3B9F3664, 0xD1B1F617, 0x74F06469, // [2][0x08] + 0x38513EC5, 0x9D10ACBB, 0x773E6CC8, 0xD27FFEB6, 0xA68F9ADF, 0x03CE08A1, 0xE9E0C8D2, 0x4CA15AAC, // [2][0x10] + 0x70A27D8A, 0xD5E3EFF4, 0x3FCD2F87, 0x9A8CBDF9, 0xEE7CD990, 0x4B3D4BEE, 0xA1138B9D, 0x045219E3, // [2][0x18] + 0x48F3434F, 0xEDB2D131, 0x079C1142, 0xA2DD833C, 0xD62DE755, 0x736C752B, 0x9942B558, 0x3C032726, // [2][0x20] + 0xE144FB14, 0x4405696A, 0xAE2BA919, 0x0B6A3B67, 0x7F9A5F0E, 0xDADBCD70, 0x30F50D03, 0x95B49F7D, // [2][0x28] + 0xD915C5D1, 0x7C5457AF, 0x967A97DC, 0x333B05A2, 0x47CB61CB, 0xE28AF3B5, 0x08A433C6, 0xADE5A1B8, // [2][0x30] + 0x91E6869E, 0x34A714E0, 0xDE89D493, 0x7BC846ED, 0x0F382284, 0xAA79B0FA, 0x40577089, 0xE516E2F7, // [2][0x38] + 0xA9B7B85B, 0x0CF62A25, 0xE6D8EA56, 0x43997828, 0x37691C41, 0x92288E3F, 0x78064E4C, 0xDD47DC32, // [2][0x40] + 0xC76580D9, 0x622412A7, 0x880AD2D4, 0x2D4B40AA, 0x59BB24C3, 0xFCFAB6BD, 0x16D476CE, 0xB395E4B0, // [2][0x48] + 0xFF34BE1C, 0x5A752C62, 0xB05BEC11, 0x151A7E6F, 0x61EA1A06, 0xC4AB8878, 0x2E85480B, 0x8BC4DA75, // [2][0x50] + 0xB7C7FD53, 0x12866F2D, 0xF8A8AF5E, 0x5DE93D20, 0x29195949, 0x8C58CB37, 0x66760B44, 0xC337993A, // [2][0x58] + 0x8F96C396, 0x2AD751E8, 0xC0F9919B, 0x65B803E5, 0x1148678C, 0xB409F5F2, 0x5E273581, 0xFB66A7FF, // [2][0x60] + 0x26217BCD, 0x8360E9B3, 0x694E29C0, 0xCC0FBBBE, 0xB8FFDFD7, 0x1DBE4DA9, 0xF7908DDA, 0x52D11FA4, // [2][0x68] + 0x1E704508, 0xBB31D776, 0x511F1705, 0xF45E857B, 0x80AEE112, 0x25EF736C, 0xCFC1B31F, 0x6A802161, // [2][0x70] + 0x56830647, 0xF3C29439, 0x19EC544A, 0xBCADC634, 0xC85DA25D, 0x6D1C3023, 0x8732F050, 0x2273622E, // [2][0x78] + 0x6ED23882, 0xCB93AAFC, 0x21BD6A8F, 0x84FCF8F1, 0xF00C9C98, 0x554D0EE6, 0xBF63CE95, 0x1A225CEB, // [2][0x80] + 0x8B277743, 0x2E66E53D, 0xC448254E, 0x6109B730, 0x15F9D359, 0xB0B84127, 0x5A968154, 0xFFD7132A, // [2][0x88] + 0xB3764986, 0x1637DBF8, 0xFC191B8B, 0x595889F5, 0x2DA8ED9C, 0x88E97FE2, 0x62C7BF91, 0xC7862DEF, // [2][0x90] + 0xFB850AC9, 0x5EC498B7, 0xB4EA58C4, 0x11ABCABA, 0x655BAED3, 0xC01A3CAD, 0x2A34FCDE, 0x8F756EA0, // [2][0x98] + 0xC3D4340C, 0x6695A672, 0x8CBB6601, 0x29FAF47F, 0x5D0A9016, 0xF84B0268, 0x1265C21B, 0xB7245065, // [2][0xa0] + 0x6A638C57, 0xCF221E29, 0x250CDE5A, 0x804D4C24, 0xF4BD284D, 0x51FCBA33, 0xBBD27A40, 0x1E93E83E, // [2][0xa8] + 0x5232B292, 0xF77320EC, 0x1D5DE09F, 0xB81C72E1, 0xCCEC1688, 0x69AD84F6, 0x83834485, 0x26C2D6FB, // [2][0xb0] + 0x1AC1F1DD, 0xBF8063A3, 0x55AEA3D0, 0xF0EF31AE, 0x841F55C7, 0x215EC7B9, 0xCB7007CA, 0x6E3195B4, // [2][0xb8] + 0x2290CF18, 0x87D15D66, 0x6DFF9D15, 0xC8BE0F6B, 0xBC4E6B02, 0x190FF97C, 0xF321390F, 0x5660AB71, // [2][0xc0] + 0x4C42F79A, 0xE90365E4, 0x032DA597, 0xA66C37E9, 0xD29C5380, 0x77DDC1FE, 0x9DF3018D, 0x38B293F3, // [2][0xc8] + 0x7413C95F, 0xD1525B21, 0x3B7C9B52, 0x9E3D092C, 0xEACD6D45, 0x4F8CFF3B, 0xA5A23F48, 0x00E3AD36, // [2][0xd0] + 0x3CE08A10, 0x99A1186E, 0x738FD81D, 0xD6CE4A63, 0xA23E2E0A, 0x077FBC74, 0xED517C07, 0x4810EE79, // [2][0xd8] + 0x04B1B4D5, 0xA1F026AB, 0x4BDEE6D8, 0xEE9F74A6, 0x9A6F10CF, 0x3F2E82B1, 0xD50042C2, 0x7041D0BC, // [2][0xe0] + 0xAD060C8E, 0x08479EF0, 0xE2695E83, 0x4728CCFD, 0x33D8A894, 0x96993AEA, 0x7CB7FA99, 0xD9F668E7, // [2][0xe8] + 0x9557324B, 0x3016A035, 0xDA386046, 0x7F79F238, 0x0B899651, 0xAEC8042F, 0x44E6C45C, 0xE1A75622, // [2][0xf0] + 0xDDA47104, 0x78E5E37A, 0x92CB2309, 0x378AB177, 0x437AD51E, 0xE63B4760, 0x0C158713, 0xA954156D, // [2][0xf8] + 0xE5F54FC1, 0x40B4DDBF, 0xAA9A1DCC, 0x0FDB8FB2, 0x7B2BEBDB, 0xDE6A79A5, 0x3444B9D6, 0x91052BA8 // [2][0x100] + }, + { + 0x00000000, 0xDD45AAB8, 0xBF672381, 0x62228939, 0x7B2231F3, 0xA6679B4B, 0xC4451272, 0x1900B8CA, // [3][0x08] + 0xF64463E6, 0x2B01C95E, 0x49234067, 0x9466EADF, 0x8D665215, 0x5023F8AD, 0x32017194, 0xEF44DB2C, // [3][0x10] + 0xE964B13D, 0x34211B85, 0x560392BC, 0x8B463804, 0x924680CE, 0x4F032A76, 0x2D21A34F, 0xF06409F7, // [3][0x18] + 0x1F20D2DB, 0xC2657863, 0xA047F15A, 0x7D025BE2, 0x6402E328, 0xB9474990, 0xDB65C0A9, 0x06206A11, // [3][0x20] + 0xD725148B, 0x0A60BE33, 0x6842370A, 0xB5079DB2, 0xAC072578, 0x71428FC0, 0x136006F9, 0xCE25AC41, // [3][0x28] + 0x2161776D, 0xFC24DDD5, 0x9E0654EC, 0x4343FE54, 0x5A43469E, 0x8706EC26, 0xE524651F, 0x3861CFA7, // [3][0x30] + 0x3E41A5B6, 0xE3040F0E, 0x81268637, 0x5C632C8F, 0x45639445, 0x98263EFD, 0xFA04B7C4, 0x27411D7C, // [3][0x38] + 0xC805C650, 0x15406CE8, 0x7762E5D1, 0xAA274F69, 0xB327F7A3, 0x6E625D1B, 0x0C40D422, 0xD1057E9A, // [3][0x40] + 0xABA65FE7, 0x76E3F55F, 0x14C17C66, 0xC984D6DE, 0xD0846E14, 0x0DC1C4AC, 0x6FE34D95, 0xB2A6E72D, // [3][0x48] + 0x5DE23C01, 0x80A796B9, 0xE2851F80, 0x3FC0B538, 0x26C00DF2, 0xFB85A74A, 0x99A72E73, 0x44E284CB, // [3][0x50] + 0x42C2EEDA, 0x9F874462, 0xFDA5CD5B, 0x20E067E3, 0x39E0DF29, 0xE4A57591, 0x8687FCA8, 0x5BC25610, // [3][0x58] + 0xB4868D3C, 0x69C32784, 0x0BE1AEBD, 0xD6A40405, 0xCFA4BCCF, 0x12E11677, 0x70C39F4E, 0xAD8635F6, // [3][0x60] + 0x7C834B6C, 0xA1C6E1D4, 0xC3E468ED, 0x1EA1C255, 0x07A17A9F, 0xDAE4D027, 0xB8C6591E, 0x6583F3A6, // [3][0x68] + 0x8AC7288A, 0x57828232, 0x35A00B0B, 0xE8E5A1B3, 0xF1E51979, 0x2CA0B3C1, 0x4E823AF8, 0x93C79040, // [3][0x70] + 0x95E7FA51, 0x48A250E9, 0x2A80D9D0, 0xF7C57368, 0xEEC5CBA2, 0x3380611A, 0x51A2E823, 0x8CE7429B, // [3][0x78] + 0x63A399B7, 0xBEE6330F, 0xDCC4BA36, 0x0181108E, 0x1881A844, 0xC5C402FC, 0xA7E68BC5, 0x7AA3217D, // [3][0x80] + 0x52A0C93F, 0x8FE56387, 0xEDC7EABE, 0x30824006, 0x2982F8CC, 0xF4C75274, 0x96E5DB4D, 0x4BA071F5, // [3][0x88] + 0xA4E4AAD9, 0x79A10061, 0x1B838958, 0xC6C623E0, 0xDFC69B2A, 0x02833192, 0x60A1B8AB, 0xBDE41213, // [3][0x90] + 0xBBC47802, 0x6681D2BA, 0x04A35B83, 0xD9E6F13B, 0xC0E649F1, 0x1DA3E349, 0x7F816A70, 0xA2C4C0C8, // [3][0x98] + 0x4D801BE4, 0x90C5B15C, 0xF2E73865, 0x2FA292DD, 0x36A22A17, 0xEBE780AF, 0x89C50996, 0x5480A32E, // [3][0xa0] + 0x8585DDB4, 0x58C0770C, 0x3AE2FE35, 0xE7A7548D, 0xFEA7EC47, 0x23E246FF, 0x41C0CFC6, 0x9C85657E, // [3][0xa8] + 0x73C1BE52, 0xAE8414EA, 0xCCA69DD3, 0x11E3376B, 0x08E38FA1, 0xD5A62519, 0xB784AC20, 0x6AC10698, // [3][0xb0] + 0x6CE16C89, 0xB1A4C631, 0xD3864F08, 0x0EC3E5B0, 0x17C35D7A, 0xCA86F7C2, 0xA8A47EFB, 0x75E1D443, // [3][0xb8] + 0x9AA50F6F, 0x47E0A5D7, 0x25C22CEE, 0xF8878656, 0xE1873E9C, 0x3CC29424, 0x5EE01D1D, 0x83A5B7A5, // [3][0xc0] + 0xF90696D8, 0x24433C60, 0x4661B559, 0x9B241FE1, 0x8224A72B, 0x5F610D93, 0x3D4384AA, 0xE0062E12, // [3][0xc8] + 0x0F42F53E, 0xD2075F86, 0xB025D6BF, 0x6D607C07, 0x7460C4CD, 0xA9256E75, 0xCB07E74C, 0x16424DF4, // [3][0xd0] + 0x106227E5, 0xCD278D5D, 0xAF050464, 0x7240AEDC, 0x6B401616, 0xB605BCAE, 0xD4273597, 0x09629F2F, // [3][0xd8] + 0xE6264403, 0x3B63EEBB, 0x59416782, 0x8404CD3A, 0x9D0475F0, 0x4041DF48, 0x22635671, 0xFF26FCC9, // [3][0xe0] + 0x2E238253, 0xF36628EB, 0x9144A1D2, 0x4C010B6A, 0x5501B3A0, 0x88441918, 0xEA669021, 0x37233A99, // [3][0xe8] + 0xD867E1B5, 0x05224B0D, 0x6700C234, 0xBA45688C, 0xA345D046, 0x7E007AFE, 0x1C22F3C7, 0xC167597F, // [3][0xf0] + 0xC747336E, 0x1A0299D6, 0x782010EF, 0xA565BA57, 0xBC65029D, 0x6120A825, 0x0302211C, 0xDE478BA4, // [3][0xf8] + 0x31035088, 0xEC46FA30, 0x8E647309, 0x5321D9B1, 0x4A21617B, 0x9764CBC3, 0xF54642FA, 0x2803E842 // [3][0x100] + }, + { + 0x00000000, 0x38116FAC, 0x7022DF58, 0x4833B0F4, 0xE045BEB0, 0xD854D11C, 0x906761E8, 0xA8760E44, // [4][0x08] + 0xC5670B91, 0xFD76643D, 0xB545D4C9, 0x8D54BB65, 0x2522B521, 0x1D33DA8D, 0x55006A79, 0x6D1105D5, // [4][0x10] + 0x8F2261D3, 0xB7330E7F, 0xFF00BE8B, 0xC711D127, 0x6F67DF63, 0x5776B0CF, 0x1F45003B, 0x27546F97, // [4][0x18] + 0x4A456A42, 0x725405EE, 0x3A67B51A, 0x0276DAB6, 0xAA00D4F2, 0x9211BB5E, 0xDA220BAA, 0xE2336406, // [4][0x20] + 0x1BA8B557, 0x23B9DAFB, 0x6B8A6A0F, 0x539B05A3, 0xFBED0BE7, 0xC3FC644B, 0x8BCFD4BF, 0xB3DEBB13, // [4][0x28] + 0xDECFBEC6, 0xE6DED16A, 0xAEED619E, 0x96FC0E32, 0x3E8A0076, 0x069B6FDA, 0x4EA8DF2E, 0x76B9B082, // [4][0x30] + 0x948AD484, 0xAC9BBB28, 0xE4A80BDC, 0xDCB96470, 0x74CF6A34, 0x4CDE0598, 0x04EDB56C, 0x3CFCDAC0, // [4][0x38] + 0x51EDDF15, 0x69FCB0B9, 0x21CF004D, 0x19DE6FE1, 0xB1A861A5, 0x89B90E09, 0xC18ABEFD, 0xF99BD151, // [4][0x40] + 0x37516AAE, 0x0F400502, 0x4773B5F6, 0x7F62DA5A, 0xD714D41E, 0xEF05BBB2, 0xA7360B46, 0x9F2764EA, // [4][0x48] + 0xF236613F, 0xCA270E93, 0x8214BE67, 0xBA05D1CB, 0x1273DF8F, 0x2A62B023, 0x625100D7, 0x5A406F7B, // [4][0x50] + 0xB8730B7D, 0x806264D1, 0xC851D425, 0xF040BB89, 0x5836B5CD, 0x6027DA61, 0x28146A95, 0x10050539, // [4][0x58] + 0x7D1400EC, 0x45056F40, 0x0D36DFB4, 0x3527B018, 0x9D51BE5C, 0xA540D1F0, 0xED736104, 0xD5620EA8, // [4][0x60] + 0x2CF9DFF9, 0x14E8B055, 0x5CDB00A1, 0x64CA6F0D, 0xCCBC6149, 0xF4AD0EE5, 0xBC9EBE11, 0x848FD1BD, // [4][0x68] + 0xE99ED468, 0xD18FBBC4, 0x99BC0B30, 0xA1AD649C, 0x09DB6AD8, 0x31CA0574, 0x79F9B580, 0x41E8DA2C, // [4][0x70] + 0xA3DBBE2A, 0x9BCAD186, 0xD3F96172, 0xEBE80EDE, 0x439E009A, 0x7B8F6F36, 0x33BCDFC2, 0x0BADB06E, // [4][0x78] + 0x66BCB5BB, 0x5EADDA17, 0x169E6AE3, 0x2E8F054F, 0x86F90B0B, 0xBEE864A7, 0xF6DBD453, 0xCECABBFF, // [4][0x80] + 0x6EA2D55C, 0x56B3BAF0, 0x1E800A04, 0x269165A8, 0x8EE76BEC, 0xB6F60440, 0xFEC5B4B4, 0xC6D4DB18, // [4][0x88] + 0xABC5DECD, 0x93D4B161, 0xDBE70195, 0xE3F66E39, 0x4B80607D, 0x73910FD1, 0x3BA2BF25, 0x03B3D089, // [4][0x90] + 0xE180B48F, 0xD991DB23, 0x91A26BD7, 0xA9B3047B, 0x01C50A3F, 0x39D46593, 0x71E7D567, 0x49F6BACB, // [4][0x98] + 0x24E7BF1E, 0x1CF6D0B2, 0x54C56046, 0x6CD40FEA, 0xC4A201AE, 0xFCB36E02, 0xB480DEF6, 0x8C91B15A, // [4][0xa0] + 0x750A600B, 0x4D1B0FA7, 0x0528BF53, 0x3D39D0FF, 0x954FDEBB, 0xAD5EB117, 0xE56D01E3, 0xDD7C6E4F, // [4][0xa8] + 0xB06D6B9A, 0x887C0436, 0xC04FB4C2, 0xF85EDB6E, 0x5028D52A, 0x6839BA86, 0x200A0A72, 0x181B65DE, // [4][0xb0] + 0xFA2801D8, 0xC2396E74, 0x8A0ADE80, 0xB21BB12C, 0x1A6DBF68, 0x227CD0C4, 0x6A4F6030, 0x525E0F9C, // [4][0xb8] + 0x3F4F0A49, 0x075E65E5, 0x4F6DD511, 0x777CBABD, 0xDF0AB4F9, 0xE71BDB55, 0xAF286BA1, 0x9739040D, // [4][0xc0] + 0x59F3BFF2, 0x61E2D05E, 0x29D160AA, 0x11C00F06, 0xB9B60142, 0x81A76EEE, 0xC994DE1A, 0xF185B1B6, // [4][0xc8] + 0x9C94B463, 0xA485DBCF, 0xECB66B3B, 0xD4A70497, 0x7CD10AD3, 0x44C0657F, 0x0CF3D58B, 0x34E2BA27, // [4][0xd0] + 0xD6D1DE21, 0xEEC0B18D, 0xA6F30179, 0x9EE26ED5, 0x36946091, 0x0E850F3D, 0x46B6BFC9, 0x7EA7D065, // [4][0xd8] + 0x13B6D5B0, 0x2BA7BA1C, 0x63940AE8, 0x5B856544, 0xF3F36B00, 0xCBE204AC, 0x83D1B458, 0xBBC0DBF4, // [4][0xe0] + 0x425B0AA5, 0x7A4A6509, 0x3279D5FD, 0x0A68BA51, 0xA21EB415, 0x9A0FDBB9, 0xD23C6B4D, 0xEA2D04E1, // [4][0xe8] + 0x873C0134, 0xBF2D6E98, 0xF71EDE6C, 0xCF0FB1C0, 0x6779BF84, 0x5F68D028, 0x175B60DC, 0x2F4A0F70, // [4][0xf0] + 0xCD796B76, 0xF56804DA, 0xBD5BB42E, 0x854ADB82, 0x2D3CD5C6, 0x152DBA6A, 0x5D1E0A9E, 0x650F6532, // [4][0xf8] + 0x081E60E7, 0x300F0F4B, 0x783CBFBF, 0x402DD013, 0xE85BDE57, 0xD04AB1FB, 0x9879010F, 0xA0686EA3 // [4][0x100] + }, + { + 0x00000000, 0xEF306B19, 0xDB8CA0C3, 0x34BCCBDA, 0xB2F53777, 0x5DC55C6E, 0x697997B4, 0x8649FCAD, // [5][0x08] + 0x6006181F, 0x8F367306, 0xBB8AB8DC, 0x54BAD3C5, 0xD2F32F68, 0x3DC34471, 0x097F8FAB, 0xE64FE4B2, // [5][0x10] + 0xC00C303E, 0x2F3C5B27, 0x1B8090FD, 0xF4B0FBE4, 0x72F90749, 0x9DC96C50, 0xA975A78A, 0x4645CC93, // [5][0x18] + 0xA00A2821, 0x4F3A4338, 0x7B8688E2, 0x94B6E3FB, 0x12FF1F56, 0xFDCF744F, 0xC973BF95, 0x2643D48C, // [5][0x20] + 0x85F4168D, 0x6AC47D94, 0x5E78B64E, 0xB148DD57, 0x370121FA, 0xD8314AE3, 0xEC8D8139, 0x03BDEA20, // [5][0x28] + 0xE5F20E92, 0x0AC2658B, 0x3E7EAE51, 0xD14EC548, 0x570739E5, 0xB83752FC, 0x8C8B9926, 0x63BBF23F, // [5][0x30] + 0x45F826B3, 0xAAC84DAA, 0x9E748670, 0x7144ED69, 0xF70D11C4, 0x183D7ADD, 0x2C81B107, 0xC3B1DA1E, // [5][0x38] + 0x25FE3EAC, 0xCACE55B5, 0xFE729E6F, 0x1142F576, 0x970B09DB, 0x783B62C2, 0x4C87A918, 0xA3B7C201, // [5][0x40] + 0x0E045BEB, 0xE13430F2, 0xD588FB28, 0x3AB89031, 0xBCF16C9C, 0x53C10785, 0x677DCC5F, 0x884DA746, // [5][0x48] + 0x6E0243F4, 0x813228ED, 0xB58EE337, 0x5ABE882E, 0xDCF77483, 0x33C71F9A, 0x077BD440, 0xE84BBF59, // [5][0x50] + 0xCE086BD5, 0x213800CC, 0x1584CB16, 0xFAB4A00F, 0x7CFD5CA2, 0x93CD37BB, 0xA771FC61, 0x48419778, // [5][0x58] + 0xAE0E73CA, 0x413E18D3, 0x7582D309, 0x9AB2B810, 0x1CFB44BD, 0xF3CB2FA4, 0xC777E47E, 0x28478F67, // [5][0x60] + 0x8BF04D66, 0x64C0267F, 0x507CEDA5, 0xBF4C86BC, 0x39057A11, 0xD6351108, 0xE289DAD2, 0x0DB9B1CB, // [5][0x68] + 0xEBF65579, 0x04C63E60, 0x307AF5BA, 0xDF4A9EA3, 0x5903620E, 0xB6330917, 0x828FC2CD, 0x6DBFA9D4, // [5][0x70] + 0x4BFC7D58, 0xA4CC1641, 0x9070DD9B, 0x7F40B682, 0xF9094A2F, 0x16392136, 0x2285EAEC, 0xCDB581F5, // [5][0x78] + 0x2BFA6547, 0xC4CA0E5E, 0xF076C584, 0x1F46AE9D, 0x990F5230, 0x763F3929, 0x4283F2F3, 0xADB399EA, // [5][0x80] + 0x1C08B7D6, 0xF338DCCF, 0xC7841715, 0x28B47C0C, 0xAEFD80A1, 0x41CDEBB8, 0x75712062, 0x9A414B7B, // [5][0x88] + 0x7C0EAFC9, 0x933EC4D0, 0xA7820F0A, 0x48B26413, 0xCEFB98BE, 0x21CBF3A7, 0x1577387D, 0xFA475364, // [5][0x90] + 0xDC0487E8, 0x3334ECF1, 0x0788272B, 0xE8B84C32, 0x6EF1B09F, 0x81C1DB86, 0xB57D105C, 0x5A4D7B45, // [5][0x98] + 0xBC029FF7, 0x5332F4EE, 0x678E3F34, 0x88BE542D, 0x0EF7A880, 0xE1C7C399, 0xD57B0843, 0x3A4B635A, // [5][0xa0] + 0x99FCA15B, 0x76CCCA42, 0x42700198, 0xAD406A81, 0x2B09962C, 0xC439FD35, 0xF08536EF, 0x1FB55DF6, // [5][0xa8] + 0xF9FAB944, 0x16CAD25D, 0x22761987, 0xCD46729E, 0x4B0F8E33, 0xA43FE52A, 0x90832EF0, 0x7FB345E9, // [5][0xb0] + 0x59F09165, 0xB6C0FA7C, 0x827C31A6, 0x6D4C5ABF, 0xEB05A612, 0x0435CD0B, 0x308906D1, 0xDFB96DC8, // [5][0xb8] + 0x39F6897A, 0xD6C6E263, 0xE27A29B9, 0x0D4A42A0, 0x8B03BE0D, 0x6433D514, 0x508F1ECE, 0xBFBF75D7, // [5][0xc0] + 0x120CEC3D, 0xFD3C8724, 0xC9804CFE, 0x26B027E7, 0xA0F9DB4A, 0x4FC9B053, 0x7B757B89, 0x94451090, // [5][0xc8] + 0x720AF422, 0x9D3A9F3B, 0xA98654E1, 0x46B63FF8, 0xC0FFC355, 0x2FCFA84C, 0x1B736396, 0xF443088F, // [5][0xd0] + 0xD200DC03, 0x3D30B71A, 0x098C7CC0, 0xE6BC17D9, 0x60F5EB74, 0x8FC5806D, 0xBB794BB7, 0x544920AE, // [5][0xd8] + 0xB206C41C, 0x5D36AF05, 0x698A64DF, 0x86BA0FC6, 0x00F3F36B, 0xEFC39872, 0xDB7F53A8, 0x344F38B1, // [5][0xe0] + 0x97F8FAB0, 0x78C891A9, 0x4C745A73, 0xA344316A, 0x250DCDC7, 0xCA3DA6DE, 0xFE816D04, 0x11B1061D, // [5][0xe8] + 0xF7FEE2AF, 0x18CE89B6, 0x2C72426C, 0xC3422975, 0x450BD5D8, 0xAA3BBEC1, 0x9E87751B, 0x71B71E02, // [5][0xf0] + 0x57F4CA8E, 0xB8C4A197, 0x8C786A4D, 0x63480154, 0xE501FDF9, 0x0A3196E0, 0x3E8D5D3A, 0xD1BD3623, // [5][0xf8] + 0x37F2D291, 0xD8C2B988, 0xEC7E7252, 0x034E194B, 0x8507E5E6, 0x6A378EFF, 0x5E8B4525, 0xB1BB2E3C // [5][0x100] + }, + { + 0x00000000, 0x68032CC8, 0xD0065990, 0xB8057558, 0xA5E0C5D1, 0xCDE3E919, 0x75E69C41, 0x1DE5B089, // [6][0x08] + 0x4E2DFD53, 0x262ED19B, 0x9E2BA4C3, 0xF628880B, 0xEBCD3882, 0x83CE144A, 0x3BCB6112, 0x53C84DDA, // [6][0x10] + 0x9C5BFAA6, 0xF458D66E, 0x4C5DA336, 0x245E8FFE, 0x39BB3F77, 0x51B813BF, 0xE9BD66E7, 0x81BE4A2F, // [6][0x18] + 0xD27607F5, 0xBA752B3D, 0x02705E65, 0x6A7372AD, 0x7796C224, 0x1F95EEEC, 0xA7909BB4, 0xCF93B77C, // [6][0x20] + 0x3D5B83BD, 0x5558AF75, 0xED5DDA2D, 0x855EF6E5, 0x98BB466C, 0xF0B86AA4, 0x48BD1FFC, 0x20BE3334, // [6][0x28] + 0x73767EEE, 0x1B755226, 0xA370277E, 0xCB730BB6, 0xD696BB3F, 0xBE9597F7, 0x0690E2AF, 0x6E93CE67, // [6][0x30] + 0xA100791B, 0xC90355D3, 0x7106208B, 0x19050C43, 0x04E0BCCA, 0x6CE39002, 0xD4E6E55A, 0xBCE5C992, // [6][0x38] + 0xEF2D8448, 0x872EA880, 0x3F2BDDD8, 0x5728F110, 0x4ACD4199, 0x22CE6D51, 0x9ACB1809, 0xF2C834C1, // [6][0x40] + 0x7AB7077A, 0x12B42BB2, 0xAAB15EEA, 0xC2B27222, 0xDF57C2AB, 0xB754EE63, 0x0F519B3B, 0x6752B7F3, // [6][0x48] + 0x349AFA29, 0x5C99D6E1, 0xE49CA3B9, 0x8C9F8F71, 0x917A3FF8, 0xF9791330, 0x417C6668, 0x297F4AA0, // [6][0x50] + 0xE6ECFDDC, 0x8EEFD114, 0x36EAA44C, 0x5EE98884, 0x430C380D, 0x2B0F14C5, 0x930A619D, 0xFB094D55, // [6][0x58] + 0xA8C1008F, 0xC0C22C47, 0x78C7591F, 0x10C475D7, 0x0D21C55E, 0x6522E996, 0xDD279CCE, 0xB524B006, // [6][0x60] + 0x47EC84C7, 0x2FEFA80F, 0x97EADD57, 0xFFE9F19F, 0xE20C4116, 0x8A0F6DDE, 0x320A1886, 0x5A09344E, // [6][0x68] + 0x09C17994, 0x61C2555C, 0xD9C72004, 0xB1C40CCC, 0xAC21BC45, 0xC422908D, 0x7C27E5D5, 0x1424C91D, // [6][0x70] + 0xDBB77E61, 0xB3B452A9, 0x0BB127F1, 0x63B20B39, 0x7E57BBB0, 0x16549778, 0xAE51E220, 0xC652CEE8, // [6][0x78] + 0x959A8332, 0xFD99AFFA, 0x459CDAA2, 0x2D9FF66A, 0x307A46E3, 0x58796A2B, 0xE07C1F73, 0x887F33BB, // [6][0x80] + 0xF56E0EF4, 0x9D6D223C, 0x25685764, 0x4D6B7BAC, 0x508ECB25, 0x388DE7ED, 0x808892B5, 0xE88BBE7D, // [6][0x88] + 0xBB43F3A7, 0xD340DF6F, 0x6B45AA37, 0x034686FF, 0x1EA33676, 0x76A01ABE, 0xCEA56FE6, 0xA6A6432E, // [6][0x90] + 0x6935F452, 0x0136D89A, 0xB933ADC2, 0xD130810A, 0xCCD53183, 0xA4D61D4B, 0x1CD36813, 0x74D044DB, // [6][0x98] + 0x27180901, 0x4F1B25C9, 0xF71E5091, 0x9F1D7C59, 0x82F8CCD0, 0xEAFBE018, 0x52FE9540, 0x3AFDB988, // [6][0xa0] + 0xC8358D49, 0xA036A181, 0x1833D4D9, 0x7030F811, 0x6DD54898, 0x05D66450, 0xBDD31108, 0xD5D03DC0, // [6][0xa8] + 0x8618701A, 0xEE1B5CD2, 0x561E298A, 0x3E1D0542, 0x23F8B5CB, 0x4BFB9903, 0xF3FEEC5B, 0x9BFDC093, // [6][0xb0] + 0x546E77EF, 0x3C6D5B27, 0x84682E7F, 0xEC6B02B7, 0xF18EB23E, 0x998D9EF6, 0x2188EBAE, 0x498BC766, // [6][0xb8] + 0x1A438ABC, 0x7240A674, 0xCA45D32C, 0xA246FFE4, 0xBFA34F6D, 0xD7A063A5, 0x6FA516FD, 0x07A63A35, // [6][0xc0] + 0x8FD9098E, 0xE7DA2546, 0x5FDF501E, 0x37DC7CD6, 0x2A39CC5F, 0x423AE097, 0xFA3F95CF, 0x923CB907, // [6][0xc8] + 0xC1F4F4DD, 0xA9F7D815, 0x11F2AD4D, 0x79F18185, 0x6414310C, 0x0C171DC4, 0xB412689C, 0xDC114454, // [6][0xd0] + 0x1382F328, 0x7B81DFE0, 0xC384AAB8, 0xAB878670, 0xB66236F9, 0xDE611A31, 0x66646F69, 0x0E6743A1, // [6][0xd8] + 0x5DAF0E7B, 0x35AC22B3, 0x8DA957EB, 0xE5AA7B23, 0xF84FCBAA, 0x904CE762, 0x2849923A, 0x404ABEF2, // [6][0xe0] + 0xB2828A33, 0xDA81A6FB, 0x6284D3A3, 0x0A87FF6B, 0x17624FE2, 0x7F61632A, 0xC7641672, 0xAF673ABA, // [6][0xe8] + 0xFCAF7760, 0x94AC5BA8, 0x2CA92EF0, 0x44AA0238, 0x594FB2B1, 0x314C9E79, 0x8949EB21, 0xE14AC7E9, // [6][0xf0] + 0x2ED97095, 0x46DA5C5D, 0xFEDF2905, 0x96DC05CD, 0x8B39B544, 0xE33A998C, 0x5B3FECD4, 0x333CC01C, // [6][0xf8] + 0x60F48DC6, 0x08F7A10E, 0xB0F2D456, 0xD8F1F89E, 0xC5144817, 0xAD1764DF, 0x15121187, 0x7D113D4F // [6][0x100] + }, + { + 0x00000000, 0x493C7D27, 0x9278FA4E, 0xDB448769, 0x211D826D, 0x6821FF4A, 0xB3657823, 0xFA590504, // [7][0x08] + 0x423B04DA, 0x0B0779FD, 0xD043FE94, 0x997F83B3, 0x632686B7, 0x2A1AFB90, 0xF15E7CF9, 0xB86201DE, // [7][0x10] + 0x847609B4, 0xCD4A7493, 0x160EF3FA, 0x5F328EDD, 0xA56B8BD9, 0xEC57F6FE, 0x37137197, 0x7E2F0CB0, // [7][0x18] + 0xC64D0D6E, 0x8F717049, 0x5435F720, 0x1D098A07, 0xE7508F03, 0xAE6CF224, 0x7528754D, 0x3C14086A, // [7][0x20] + 0x0D006599, 0x443C18BE, 0x9F789FD7, 0xD644E2F0, 0x2C1DE7F4, 0x65219AD3, 0xBE651DBA, 0xF759609D, // [7][0x28] + 0x4F3B6143, 0x06071C64, 0xDD439B0D, 0x947FE62A, 0x6E26E32E, 0x271A9E09, 0xFC5E1960, 0xB5626447, // [7][0x30] + 0x89766C2D, 0xC04A110A, 0x1B0E9663, 0x5232EB44, 0xA86BEE40, 0xE1579367, 0x3A13140E, 0x732F6929, // [7][0x38] + 0xCB4D68F7, 0x827115D0, 0x593592B9, 0x1009EF9E, 0xEA50EA9A, 0xA36C97BD, 0x782810D4, 0x31146DF3, // [7][0x40] + 0x1A00CB32, 0x533CB615, 0x8878317C, 0xC1444C5B, 0x3B1D495F, 0x72213478, 0xA965B311, 0xE059CE36, // [7][0x48] + 0x583BCFE8, 0x1107B2CF, 0xCA4335A6, 0x837F4881, 0x79264D85, 0x301A30A2, 0xEB5EB7CB, 0xA262CAEC, // [7][0x50] + 0x9E76C286, 0xD74ABFA1, 0x0C0E38C8, 0x453245EF, 0xBF6B40EB, 0xF6573DCC, 0x2D13BAA5, 0x642FC782, // [7][0x58] + 0xDC4DC65C, 0x9571BB7B, 0x4E353C12, 0x07094135, 0xFD504431, 0xB46C3916, 0x6F28BE7F, 0x2614C358, // [7][0x60] + 0x1700AEAB, 0x5E3CD38C, 0x857854E5, 0xCC4429C2, 0x361D2CC6, 0x7F2151E1, 0xA465D688, 0xED59ABAF, // [7][0x68] + 0x553BAA71, 0x1C07D756, 0xC743503F, 0x8E7F2D18, 0x7426281C, 0x3D1A553B, 0xE65ED252, 0xAF62AF75, // [7][0x70] + 0x9376A71F, 0xDA4ADA38, 0x010E5D51, 0x48322076, 0xB26B2572, 0xFB575855, 0x2013DF3C, 0x692FA21B, // [7][0x78] + 0xD14DA3C5, 0x9871DEE2, 0x4335598B, 0x0A0924AC, 0xF05021A8, 0xB96C5C8F, 0x6228DBE6, 0x2B14A6C1, // [7][0x80] + 0x34019664, 0x7D3DEB43, 0xA6796C2A, 0xEF45110D, 0x151C1409, 0x5C20692E, 0x8764EE47, 0xCE589360, // [7][0x88] + 0x763A92BE, 0x3F06EF99, 0xE44268F0, 0xAD7E15D7, 0x572710D3, 0x1E1B6DF4, 0xC55FEA9D, 0x8C6397BA, // [7][0x90] + 0xB0779FD0, 0xF94BE2F7, 0x220F659E, 0x6B3318B9, 0x916A1DBD, 0xD856609A, 0x0312E7F3, 0x4A2E9AD4, // [7][0x98] + 0xF24C9B0A, 0xBB70E62D, 0x60346144, 0x29081C63, 0xD3511967, 0x9A6D6440, 0x4129E329, 0x08159E0E, // [7][0xa0] + 0x3901F3FD, 0x703D8EDA, 0xAB7909B3, 0xE2457494, 0x181C7190, 0x51200CB7, 0x8A648BDE, 0xC358F6F9, // [7][0xa8] + 0x7B3AF727, 0x32068A00, 0xE9420D69, 0xA07E704E, 0x5A27754A, 0x131B086D, 0xC85F8F04, 0x8163F223, // [7][0xb0] + 0xBD77FA49, 0xF44B876E, 0x2F0F0007, 0x66337D20, 0x9C6A7824, 0xD5560503, 0x0E12826A, 0x472EFF4D, // [7][0xb8] + 0xFF4CFE93, 0xB67083B4, 0x6D3404DD, 0x240879FA, 0xDE517CFE, 0x976D01D9, 0x4C2986B0, 0x0515FB97, // [7][0xc0] + 0x2E015D56, 0x673D2071, 0xBC79A718, 0xF545DA3F, 0x0F1CDF3B, 0x4620A21C, 0x9D642575, 0xD4585852, // [7][0xc8] + 0x6C3A598C, 0x250624AB, 0xFE42A3C2, 0xB77EDEE5, 0x4D27DBE1, 0x041BA6C6, 0xDF5F21AF, 0x96635C88, // [7][0xd0] + 0xAA7754E2, 0xE34B29C5, 0x380FAEAC, 0x7133D38B, 0x8B6AD68F, 0xC256ABA8, 0x19122CC1, 0x502E51E6, // [7][0xd8] + 0xE84C5038, 0xA1702D1F, 0x7A34AA76, 0x3308D751, 0xC951D255, 0x806DAF72, 0x5B29281B, 0x1215553C, // [7][0xe0] + 0x230138CF, 0x6A3D45E8, 0xB179C281, 0xF845BFA6, 0x021CBAA2, 0x4B20C785, 0x906440EC, 0xD9583DCB, // [7][0xe8] + 0x613A3C15, 0x28064132, 0xF342C65B, 0xBA7EBB7C, 0x4027BE78, 0x091BC35F, 0xD25F4436, 0x9B633911, // [7][0xf0] + 0xA777317B, 0xEE4B4C5C, 0x350FCB35, 0x7C33B612, 0x866AB316, 0xCF56CE31, 0x14124958, 0x5D2E347F, // [7][0xf8] + 0xE54C35A1, 0xAC704886, 0x7734CFEF, 0x3E08B2C8, 0xC451B7CC, 0x8D6DCAEB, 0x56294D82, 0x1F1530A5 // [7][0x100] + } +}; + +/* private (static) function factoring out byte-by-byte CRC computation using just one slice of the lookup table*/ +static uint32_t s_crc_generic_sb1(const uint8_t *input, int length, uint32_t crc, const uint32_t *table_ptr) { + uint32_t(*table)[8][256] = (uint32_t(*)[8][256])table_ptr; + while (length-- > 0) { + crc = (crc >> 8) ^ (*table)[0][(crc & 0xff) ^ *input++]; + } + return crc; +} + +/* The inner loops of the CRC functions that process large blocks of data work best when input is aligned*/ +/* This function begins processing input data one byte at a time until the input pointer is 4-byte aligned*/ +/* Advances the input pointer and reduces the length (both passed by reference)*/ +static inline uint32_t s_crc_generic_align( + const uint8_t **input, + int *length, + uint32_t crc, + const uint32_t *table_ptr) { + + /* Get the 4-byte memory alignment of our input buffer by looking at the least significant 2 bits*/ + size_t input_alignment = ((size_t)*input) & 0x3; + + /* Compute the number of input bytes that precede the first 4-byte aligned block (will be in range 0-3)*/ + size_t leading = (4 - input_alignment) & 0x3; + + /* Determine what's left without the leading input bytes (might be negative)*/ + size_t remaining = *length - leading; + + /* Process unaligned leading input bytes one at a time*/ + if (leading && remaining > 0) { + crc = s_crc_generic_sb1(*input, (uint32_t)leading, crc, table_ptr); + *input += leading; + *length -= (int)leading; + } + + return crc; +} + +/* private (static) function to compute a generic slice-by-4 CRC using the specified lookup table (4 table slices)*/ +static uint32_t s_crc_generic_sb4(const uint8_t *input, int length, uint32_t crc, const uint32_t *table_ptr) { + const uint32_t *current = (const uint32_t *)input; + int remaining = length; + uint32_t(*table)[8][256] = (uint32_t(*)[8][256])table_ptr; + + while (remaining >= 4) { + crc ^= *current++; + crc = (*table)[3][crc & 0xff] ^ (*table)[2][(crc >> 8) & 0xff] ^ (*table)[1][(crc >> 16) & 0xff] ^ + (*table)[0][crc >> 24]; + remaining -= 4; + } + + return s_crc_generic_sb1(&input[length - remaining], remaining, crc, table_ptr); +} + +/* private (static) function to compute a generic slice-by-8 CRC using the specified lookup table (8 table slices)*/ +static uint32_t s_crc_generic_sb8(const uint8_t *input, int length, uint32_t crc, const uint32_t *table_ptr) { + const uint32_t *current = (const uint32_t *)input; + int remaining = length; + uint32_t(*table)[8][256] = (uint32_t(*)[8][256])table_ptr; + + while (remaining >= 8) { + uint32_t c1 = *current++ ^ crc; + uint32_t c2 = *current++; + uint32_t t1 = (*table)[7][c1 & 0xff] ^ (*table)[6][(c1 >> 8) & 0xff] ^ (*table)[5][(c1 >> 16) & 0xff] ^ + (*table)[4][(c1 >> 24) & 0xff]; + uint32_t t2 = (*table)[3][c2 & 0xff] ^ (*table)[2][(c2 >> 8) & 0xff] ^ (*table)[1][(c2 >> 16) & 0xff] ^ + (*table)[0][(c2 >> 24) & 0xff]; + crc = t1 ^ t2; + remaining -= 8; + } + return s_crc_generic_sb4(&input[length - remaining], remaining, crc, table_ptr); +} + +/* Computes the Castagnoli CRC32c (iSCSI) using one byte at a time, i.e. no slicing. */ +static uint32_t s_crc32c_no_slice(const uint8_t *input, int length, uint32_t previousCrc32c) { + return ~s_crc_generic_sb1(input, length, ~previousCrc32c, &CRC32C_TABLE[0][0]); +} + +/* Computes the Castagnoli CRC32c (iSCSI) using slice-by-8. */ +static uint32_t s_crc32c_sb8(const uint8_t *input, int length, uint32_t previousCrc32) { + uint32_t crc = s_crc_generic_align(&input, &length, ~previousCrc32, &CRC32C_TABLE[0][0]); + return ~s_crc_generic_sb8(input, length, crc, &CRC32C_TABLE[0][0]); +} + + +/************************************************************************ + * + * Calculate CRC-32C (Castagnoli) for the specified input data. + * + * If the host is big endian the calculation is the byte-by-byte, aka, + * slice-by-1, version. Otherwise the calculation utilizes the + * slice-by-8 optimized calculation. + * + * Return the CRC value on success or 0 on error. + ************************************************************************/ +uint32_t +ms_crc32c (const uint8_t* input, int length, uint32_t previousCRC32C) +{ + if (!input || length <= 0) + return 0; + + if (ms_bigendianhost()) + return s_crc32c_no_slice(input, length, previousCRC32C); + else + return s_crc32c_sb8(input, length, previousCRC32C); +} /* End of ms_crc32c() */ diff --git a/mseedC/libmseed/doc/Doxyfile b/mseedC/libmseed/doc/Doxyfile new file mode 100644 index 0000000..3abcdb9 --- /dev/null +++ b/mseedC/libmseed/doc/Doxyfile @@ -0,0 +1,2739 @@ +# Doxyfile 1.9.7 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). +# +# Note: +# +# Use doxygen to compare the used configuration file with the template +# configuration file: +# doxygen -x [configFile] +# Use doxygen to compare the used configuration file with the template +# configuration file without replacing the environment variables or CMake type +# replacement variables: +# doxygen -x_noenv [configFile] + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the configuration +# file that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# https://www.gnu.org/software/libiconv/ for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = libmseed + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "The miniSEED data format library" + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = . + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096 +# sub-directories (in 2 levels) under the output directory of each output format +# and will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. Adapt CREATE_SUBDIRS_LEVEL to +# control the number of sub-directories. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# Controls the number of sub-directories that will be created when +# CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every +# level increment doubles the number of directories, resulting in 4096 +# directories at level 8 which is the default and also the maximum value. The +# sub-directories are organized in 2 levels, the first level always has a fixed +# number of 16 directories. +# Minimum value: 0, maximum value: 8, default value: 8. +# This tag requires that the tag CREATE_SUBDIRS is set to YES. + +CREATE_SUBDIRS_LEVEL = 8 + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian, +# Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English +# (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek, +# Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with +# English messages), Korean, Korean-en (Korean with English messages), Latvian, +# Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, +# Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, +# Swedish, Turkish, Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = NO + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line +# such as +# /*************** +# as being the beginning of a Javadoc-style comment "banner". If set to NO, the +# Javadoc-style will behave just like regular comments and it will not be +# interpreted by doxygen. +# The default value is: NO. + +JAVADOC_BANNER = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# By default Python docstrings are displayed as preformatted text and doxygen's +# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the +# doxygen's special commands can be used and the contents of the docstring +# documentation blocks is shown as doxygen documentation. +# The default value is: YES. + +PYTHON_DOCSTRING = YES + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:^^" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". Note that you cannot put \n's in the value part of an alias +# to insert newlines (in the resulting output). You can put ^^ in the value part +# of an alias to insert a newline as if a physical newline was in the original +# file. When you need a literal { or } or , in the value part of an alias you +# have to escape them by means of a backslash (\), this can lead to conflicts +# with the commands \{ and \} for these it is advised to use the version @{ and +# @} or use a double escape (\\{ and \\}) + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice +# sources only. Doxygen will then generate output that is more tailored for that +# language. For instance, namespaces will be presented as modules, types will be +# separated into more groups, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_SLICE = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, +# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice, +# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: +# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser +# tries to guess whether the code is fixed or free formatted code, this is the +# default for Fortran type files). For instance to make doxygen treat .inc files +# as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. When specifying no_extension you should add +# * to the FILE_PATTERNS. +# +# Note see also the list of default file extension mappings. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See https://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 5. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 0 + +# The MARKDOWN_ID_STYLE tag can be used to specify the algorithm used to +# generate identifiers for the Markdown headings. Note: Every identifier is +# unique. +# Possible values are: DOXYGEN Use a fixed 'autotoc_md' string followed by a +# sequence number starting at 0. and GITHUB Use the lower case version of title +# with any whitespace replaced by '-' and punctations characters removed.. +# The default value is: DOXYGEN. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +MARKDOWN_ID_STYLE = DOXYGEN + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = YES + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = YES + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +# The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use +# during processing. When set to 0 doxygen will based this on the number of +# cores available in the system. You can set it explicitly to a value larger +# than 0 to get more control over the balance between CPU load and processing +# speed. At this moment only the input processing can be done using multiple +# threads. Since this is still an experimental feature the default is set to 1, +# which effectively disables parallel processing. Please report any issues you +# encounter. Generating dot graphs in parallel is controlled by the +# DOT_NUM_THREADS setting. +# Minimum value: 0, maximum value: 32, default value: 1. + +NUM_PROC_THREADS = 1 + +# If the TIMESTAMP tag is set different from NO then each generated page will +# contain the date or date and time when the page was generated. Setting this to +# NO can help when comparing the output of multiple runs. +# Possible values are: YES, NO, DATETIME and DATE. +# The default value is: NO. + +TIMESTAMP = NO + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual +# methods of a class will be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIV_VIRTUAL = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If this flag is set to YES, the name of an unnamed parameter in a declaration +# will be determined by the corresponding definition. By default unnamed +# parameters remain unnamed in the output. +# The default value is: YES. + +RESOLVE_UNNAMED_PARAMS = YES + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# will also hide undocumented C++ concepts if enabled. This option has no effect +# if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# declarations. If set to NO, these declarations will be included in the +# documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# With the correct setting of option CASE_SENSE_NAMES doxygen will better be +# able to match the capabilities of the underlying filesystem. In case the +# filesystem is case sensitive (i.e. it supports files in the same directory +# whose names only differ in casing), the option must be set to YES to properly +# deal with such files in case they appear in the input. For filesystems that +# are not case sensitive the option should be set to NO to properly deal with +# output files written for symbols that only differ in casing, such as for two +# classes, one named CLASS and the other named Class, and to also support +# references to files without having to specify the exact matching casing. On +# Windows (including Cygwin) and MacOS, users should typically set this option +# to NO, whereas on Linux or other Unix flavors it should typically be set to +# YES. +# Possible values are: SYSTEM, NO and YES. +# The default value is: SYSTEM. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class +# will show which file needs to be included to use the class. +# The default value is: YES. + +SHOW_HEADERFILE = YES + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = NO + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = NO + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. See also section "Changing the +# layout of pages" for information. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = YES + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as documenting some parameters in +# a documented function twice, or documenting parameters that don't exist or +# using markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete +# function parameter documentation. If set to NO, doxygen will accept that some +# parameters have no documentation without warning. +# The default value is: YES. + +WARN_IF_INCOMPLETE_DOC = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong parameter +# documentation, but not about the absence of documentation. If EXTRACT_ALL is +# set to YES then this flag will automatically be disabled. See also +# WARN_IF_INCOMPLETE_DOC +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# If WARN_IF_UNDOC_ENUM_VAL option is set to YES, doxygen will warn about +# undocumented enumeration values. If set to NO, doxygen will accept +# undocumented enumeration values. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: NO. + +WARN_IF_UNDOC_ENUM_VAL = NO + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS +# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but +# at the end of the doxygen process doxygen will return with a non-zero status. +# If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS_PRINT then doxygen behaves +# like FAIL_ON_WARNINGS but in case no WARN_LOGFILE is defined doxygen will not +# write the warning messages in between other messages but write them at the end +# of a run, in case a WARN_LOGFILE is defined the warning messages will be +# besides being in the defined file also be shown at the end of a run, unless +# the WARN_LOGFILE is defined as - i.e. standard output (stdout) in that case +# the behavior will remain as with the setting FAIL_ON_WARNINGS. +# Possible values are: NO, YES, FAIL_ON_WARNINGS and FAIL_ON_WARNINGS_PRINT. +# The default value is: NO. + +WARN_AS_ERROR = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# See also: WARN_LINE_FORMAT +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# In the $text part of the WARN_FORMAT command it is possible that a reference +# to a more specific place is given. To make it easier to jump to this place +# (outside of doxygen) the user can define a custom "cut" / "paste" string. +# Example: +# WARN_LINE_FORMAT = "'vi $file +$line'" +# See also: WARN_FORMAT +# The default value is: at line $line of file $file. + +WARN_LINE_FORMAT = "at line $line of file $file" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). In case the file specified cannot be opened for writing the +# warning and error messages are written to standard error. When as file - is +# specified the warning and error messages are written to standard output +# (stdout). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = . \ + ../libmseed.h \ + ../extraheaders.c \ + ../fileutils.c \ + ../genutils.c \ + ../logging.c \ + ../lookup.c \ + ../msrutils.c \ + ../pack.c \ + ../parseutils.c \ + ../selection.c \ + ../tracelist.c \ + ../unpack.c + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: +# https://www.gnu.org/software/libiconv/) for the list of possible encodings. +# See also: INPUT_FILE_ENCODING +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses The INPUT_FILE_ENCODING tag can be used to specify +# character encoding on a per file pattern basis. Doxygen will compare the file +# name with each pattern and apply the encoding instead of the default +# INPUT_ENCODING) if there is a match. The character encodings are a list of the +# form: pattern=encoding (like *.php=ISO-8859-1). See cfg_input_encoding +# "INPUT_ENCODING" for further information on supported encodings. + +INPUT_FILE_ENCODING = + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# Note the list of default checked file patterns might differ from the list of +# default file extension mappings. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.l, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, +# *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C +# comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, +# *.vhdl, *.ucf, *.qsf and *.ice. + +FILE_PATTERNS = *.dox \ + *.md + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# ANamespace::AClass, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = ../example + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that doxygen will use the data processed and written to standard output +# for further processing, therefore nothing else, like debug statements or used +# commands (so in case of a Windows batch file always use @echo OFF), should be +# written to standard output. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +#USE_MDFILE_AS_MAINPAGE = index.md + +# The Fortran standard specifies that for fixed formatted Fortran code all +# characters from position 72 are to be considered as comment. A common +# extension is to allow longer lines before the automatic comment starts. The +# setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can +# be processed before the automatic comment starts. +# Minimum value: 7, maximum value: 10000, default value: 72. + +FORTRAN_COMMENT_AFTER = 72 + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# entity all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see https://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The IGNORE_PREFIX tag can be used to specify a prefix (or a list of prefixes) +# that should be ignored while generating the index headers. The IGNORE_PREFIX +# tag works for classes, function and member names. The entity will be placed in +# the alphabetical list under the first letter of the entity name that remains +# after removing the prefix. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = gh-pages + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = footer.html + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). +# Note: Since the styling of scrollbars can currently not be overruled in +# Webkit/Chromium, the styling will be left out of the default doxygen.css if +# one or more extra stylesheets have been specified. So if scrollbar +# customization is desired it has to be added explicitly. For an example see the +# documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = customdoxygen.css + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output +# should be rendered with a dark or light theme. +# Possible values are: LIGHT always generate light mode output, DARK always +# generate dark mode output, AUTO_LIGHT automatically set the mode according to +# the user preference, use light mode if no preference is set (the default), +# AUTO_DARK automatically set the mode according to the user preference, use +# dark mode if no preference is set and TOGGLE allow to user to switch between +# light and dark mode via a button. +# The default value is: AUTO_LIGHT. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE = AUTO_LIGHT + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a color-wheel, see +# https://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 230 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use gray-scales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 120 + +# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML +# documentation will contain a main index with vertical navigation menus that +# are dynamically created via JavaScript. If disabled, the navigation index will +# consists of multiple levels of tabs that are statically embedded in every HTML +# page. Disable this option to support browsers that do not have JavaScript, +# like the Qt help browser. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_MENUS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: +# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To +# create a documentation set, doxygen will generate a Makefile in the HTML +# output directory. Running make will produce the docset in that directory and +# running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy +# genXcode/_index.html for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag determines the URL of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDURL = + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# on Windows. In the beginning of 2021 Microsoft took the original page, with +# a.o. the download links, offline the HTML help workshop was already many years +# in maintenance mode). You can download the HTML help workshop from the web +# archives at Installation executable (see: +# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo +# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe). +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the main .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# The SITEMAP_URL tag is used to specify the full URL of the place where the +# generated documentation will be placed on the server by the user during the +# deployment of the documentation. The generated sitemap is called sitemap.xml +# and placed on the directory specified by HTML_OUTPUT. In case no SITEMAP_URL +# is specified no sitemap is generated. For information about the sitemap +# protocol see https://www.sitemaps.org +# This tag requires that the tag GENERATE_HTML is set to YES. + +SITEMAP_URL = + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location (absolute path +# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to +# run qhelpgenerator on the generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine tune the look of the index (see "Fine-tuning the output"). As an +# example, the default style sheet generated by doxygen has an example that +# shows how to put an image at the root of the tree instead of the PROJECT_NAME. +# Since the tree basically has the same information as the tab index, you could +# consider setting DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = NO + +# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the +# FULL_SIDEBAR option determines if the side bar is limited to only the treeview +# area (value NO) or if it should extend to the full height of the window (value +# YES). Setting this to YES gives a layout similar to +# https://docs.readthedocs.io with more room for contents, but less room for the +# project logo, title, and description. If either GENERATE_TREEVIEW or +# DISABLE_INDEX is set to NO, this option has no effect. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FULL_SIDEBAR = NO + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email +# addresses. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +OBFUSCATE_EMAILS = YES + +# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg +# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see +# https://inkscape.org) to generate formulas as SVG images instead of PNGs for +# the HTML output. These images will generally look nicer at scaled resolutions. +# Possible values are: png (the default) and svg (looks nicer but requires the +# pdf2svg or inkscape tool). +# The default value is: png. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FORMULA_FORMAT = png + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands +# to create new LaTeX commands to be used in formulas as building blocks. See +# the section "Including formulas" for details. + +FORMULA_MACROFILE = + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# https://www.mathjax.org) which uses client side JavaScript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# With MATHJAX_VERSION it is possible to specify the MathJax version to be used. +# Note that the different versions of MathJax have different requirements with +# regards to the different settings, so it is possible that also other MathJax +# settings have to be changed when switching between the different MathJax +# versions. +# Possible values are: MathJax_2 and MathJax_3. +# The default value is: MathJax_2. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_VERSION = MathJax_2 + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. For more details about the output format see MathJax +# version 2 (see: +# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3 +# (see: +# http://docs.mathjax.org/en/latest/web/components/output.html). +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility. This is the name for Mathjax version 2, for MathJax version 3 +# this will be translated into chtml), NativeMML (i.e. MathML. Only supported +# for NathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This +# is the name for Mathjax version 3, for MathJax version 2 this will be +# translated into HTML-CSS) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from https://www.mathjax.org before deployment. The default value is: +# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2 +# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3 +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/ + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# for MathJax version 2 (see +# https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions): +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# For example for MathJax version 3 (see +# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html): +# MATHJAX_EXTENSIONS = ams +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: +# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /