Compare commits
9 Commits
v2.0.17
...
befda072e5
Author | SHA1 | Date | |
---|---|---|---|
befda072e5 | |||
0b1cb2f230 | |||
ce444814c2 | |||
eec3853af9 | |||
25e114dbea | |||
740116c7ba | |||
5899bd646b | |||
1d33a81ad2 | |||
b58efae107 |
2
.github/workflows/pypi-deploy.yml
vendored
2
.github/workflows/pypi-deploy.yml
vendored
@@ -3,7 +3,7 @@ name: CI Build Wheel
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
#branches: [master]
|
# branches: [master]
|
||||||
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
|
tags: ["v[0-9]+.[0-9]+.[0-9]+"]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
17
README.md
17
README.md
@@ -1,13 +1,13 @@
|
|||||||
|
|
||||||
[](https://img.shields.io/github/license/RecordEvolution/IMCtermite)
|
[](https://img.shields.io/github/license/RecordEvolution/IMCtermite)
|
||||||
[](https://img.shields.io/github/stars/RecordEvolution/IMCtermite)
|
[](https://img.shields.io/github/stars/RecordEvolution/IMCtermite)
|
||||||

|

|
||||||
[](https://pypi.org/project/IMCtermite/)
|
[](https://pypi.org/project/IMCtermite/)
|
||||||
|
|
||||||
# IMCtermite
|
# IMCtermite
|
||||||
|
|
||||||
_IMCtermite_ provides access to the proprietary data format
|
_IMCtermite_ provides access to the proprietary data format
|
||||||
_IMC Bus Format_ with the file extension _.raw_ introduced and developed by
|
_IMC2 Data Format_ with the file extension _.raw_ (or .dat) introduced and developed by
|
||||||
[imc Test & Measurement GmbH](https://www.imc-tm.de/). This data format is
|
[imc Test & Measurement GmbH](https://www.imc-tm.de/). This data format is
|
||||||
employed i.a. by the measurement hardware
|
employed i.a. by the measurement hardware
|
||||||
[imc CRONOSflex](https://www.imc-tm.de/produkte/messtechnik-hardware/imc-cronosflex/ueberblick/)
|
[imc CRONOSflex](https://www.imc-tm.de/produkte/messtechnik-hardware/imc-cronosflex/ueberblick/)
|
||||||
@@ -18,7 +18,9 @@ for measurement data control and analysis. Thanks to the integrated Python modul
|
|||||||
the extracted measurement data can be stored in any open-source file format
|
the extracted measurement data can be stored in any open-source file format
|
||||||
accessible by Python like i.a. _csv_, _json_ or _parquet_.
|
accessible by Python like i.a. _csv_, _json_ or _parquet_.
|
||||||
|
|
||||||
On the [Record Evolution Platform](https://www.record-evolution.de/en/home-en/), the library can be used both as a command line tool for interactive usage and as a Python module to integrate the _.raw_ format into any ETL workflow.
|
On the [Record Evolution Platform](https://www.record-evolution.de/en/home-en/),
|
||||||
|
the library can be used both as a command line tool for interactive usage and as a
|
||||||
|
Python module to integrate the _.raw_ format into any ETL workflow.
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
@@ -29,12 +31,11 @@ On the [Record Evolution Platform](https://www.record-evolution.de/en/home-en/),
|
|||||||
|
|
||||||
## File format
|
## File format
|
||||||
|
|
||||||
[Warning: Take a look at [this issue](https://github.com/RecordEvolution/IMCtermite/issues/14) when reading this section regarding the file format.]
|
A file of the _IMC2 Data Format_ type with extension _.raw_ (or .dat) is a _mixed text/binary
|
||||||
|
|
||||||
A data file of the _IMC Bus Format_ type with the extension _.raw_ is a _mixed text/binary
|
|
||||||
file_ featuring a set of markers (keys) that indicate the start of various blocks
|
file_ featuring a set of markers (keys) that indicate the start of various blocks
|
||||||
of data that provide meta information and the actual measurement data. Every single
|
of data that provide meta information and the actual measurement data. Every single
|
||||||
marker is introduced by the character `"|" = 0x 7c` followed by two uppercase letters that characterize the type of marker. Each block is further divided into several
|
marker is introduced by the character `"|" = 0x 7c` followed by two uppercase letters that
|
||||||
|
characterize the type of marker. Each block is further divided into several
|
||||||
parameters separated by commata `"," = 0x 2c` and terminated by a semicolon
|
parameters separated by commata `"," = 0x 2c` and terminated by a semicolon
|
||||||
`";" = 0x 3b`. For instance, the header - first 600 bytes - of a raw file may
|
`";" = 0x 3b`. For instance, the header - first 600 bytes - of a raw file may
|
||||||
look like this (in UTF-8 encoding):
|
look like this (in UTF-8 encoding):
|
||||||
@@ -223,6 +224,8 @@ can be found in the `python/examples` folder.
|
|||||||
|
|
||||||
- https://www.imc-tm.de/produkte/messtechnik-software/imc-famos/funktionen/im-und-export/
|
- https://www.imc-tm.de/produkte/messtechnik-software/imc-famos/funktionen/im-und-export/
|
||||||
- https://www.imc-tm.de/produkte/messtechnik-hardware/imc-cronosflex/ueberblick/
|
- https://www.imc-tm.de/produkte/messtechnik-hardware/imc-cronosflex/ueberblick/
|
||||||
|
- https://www.imc-tm.de/download-center/produkt-downloads/imc-famos/handbuecher
|
||||||
|
- https://www.imc-tm.de/fileadmin/Public/Downloads/Manuals/imc_FAMOS/imcGemeinsameKomponenten.pdf
|
||||||
- https://cython.readthedocs.io/en/latest/src/userguide/wrapping_CPlusPlus.html
|
- https://cython.readthedocs.io/en/latest/src/userguide/wrapping_CPlusPlus.html
|
||||||
- https://github.com/Apollo3zehn/ImcFamosFile
|
- https://github.com/Apollo3zehn/ImcFamosFile
|
||||||
- https://apollo3zehn.github.io/ImcFamosFile/api/ImcFamosFile.FamosFileKeyType.html
|
- https://apollo3zehn.github.io/ImcFamosFile/api/ImcFamosFile.FamosFileKeyType.html
|
||||||
|
@@ -496,35 +496,28 @@ namespace imc
|
|||||||
// convert any description, units etc. to UTF-8 (by default)
|
// convert any description, units etc. to UTF-8 (by default)
|
||||||
void convert_encoding()
|
void convert_encoding()
|
||||||
{
|
{
|
||||||
// actual input codepage
|
|
||||||
std::string cpn;
|
|
||||||
|
|
||||||
if ( !codepage_.empty() )
|
if ( !codepage_.empty() )
|
||||||
{
|
{
|
||||||
// construct iconv-compatible name for respective codepage
|
// construct iconv-compatible name for respective codepage
|
||||||
cpn = std::string("CP") + codepage_;
|
std::string cpn = std::string("CP") + codepage_;
|
||||||
}
|
|
||||||
else {
|
|
||||||
// assume codepage 1252 by default
|
|
||||||
cpn = std::string("CP1252");
|
|
||||||
}
|
|
||||||
|
|
||||||
// set up converter
|
// set up converter
|
||||||
std::string utf = std::string("UTF-8");
|
std::string utf = std::string("UTF-8");
|
||||||
iconverter conv(cpn,utf);
|
iconverter conv(cpn,utf);
|
||||||
|
|
||||||
conv.convert(name_);
|
conv.convert(name_);
|
||||||
conv.convert(comment_);
|
conv.convert(comment_);
|
||||||
conv.convert(origin_);
|
conv.convert(origin_);
|
||||||
conv.convert(origin_comment_);
|
conv.convert(origin_comment_);
|
||||||
conv.convert(text_);
|
conv.convert(text_);
|
||||||
conv.convert(language_code_);
|
conv.convert(language_code_);
|
||||||
conv.convert(yname_);
|
conv.convert(yname_);
|
||||||
conv.convert(yunit_);
|
conv.convert(yunit_);
|
||||||
conv.convert(xname_);
|
conv.convert(xname_);
|
||||||
conv.convert(xunit_);
|
conv.convert(xunit_);
|
||||||
conv.convert(group_name_);
|
conv.convert(group_name_);
|
||||||
conv.convert(group_comment_);
|
conv.convert(group_comment_);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// get info string
|
// get info string
|
||||||
@@ -539,6 +532,7 @@ namespace imc
|
|||||||
<<std::setw(width)<<std::left<<"name:"<<name_<<"\n"
|
<<std::setw(width)<<std::left<<"name:"<<name_<<"\n"
|
||||||
<<std::setw(width)<<std::left<<"comment:"<<comment_<<"\n"
|
<<std::setw(width)<<std::left<<"comment:"<<comment_<<"\n"
|
||||||
<<std::setw(width)<<std::left<<"origin:"<<origin_<<"\n"
|
<<std::setw(width)<<std::left<<"origin:"<<origin_<<"\n"
|
||||||
|
<<std::setw(width)<<std::left<<"origin-comment:"<<origin_comment_<<"\n"
|
||||||
<<std::setw(width)<<std::left<<"description:"<<text_<<"\n"
|
<<std::setw(width)<<std::left<<"description:"<<text_<<"\n"
|
||||||
<<std::setw(width)<<std::left<<"trigger-time-nt:"<<std::put_time(std::gmtime(&tt),"%FT%T")<<"\n"
|
<<std::setw(width)<<std::left<<"trigger-time-nt:"<<std::put_time(std::gmtime(&tt),"%FT%T")<<"\n"
|
||||||
<<std::setw(width)<<std::left<<"trigger-time:"<<std::put_time(std::gmtime(&att),"%FT%T")<<"\n"
|
<<std::setw(width)<<std::left<<"trigger-time:"<<std::put_time(std::gmtime(&att),"%FT%T")<<"\n"
|
||||||
@@ -577,6 +571,7 @@ namespace imc
|
|||||||
<<"\",\"name\":\""<<name_
|
<<"\",\"name\":\""<<name_
|
||||||
<<"\",\"comment\":\""<<comment_
|
<<"\",\"comment\":\""<<comment_
|
||||||
<<"\",\"origin\":\""<<origin_
|
<<"\",\"origin\":\""<<origin_
|
||||||
|
<<"\",\"origin-comment\":\""<<origin_comment_
|
||||||
<<"\",\"description\":\""<<text_
|
<<"\",\"description\":\""<<text_
|
||||||
<<"\",\"trigger-time-nt\":\""<<std::put_time(std::gmtime(&tt),"%FT%T")
|
<<"\",\"trigger-time-nt\":\""<<std::put_time(std::gmtime(&tt),"%FT%T")
|
||||||
<<"\",\"trigger-time\":\""<<std::put_time(std::gmtime(&att),"%FT%T")
|
<<"\",\"trigger-time\":\""<<std::put_time(std::gmtime(&att),"%FT%T")
|
||||||
|
@@ -1 +1 @@
|
|||||||
2.0.16
|
2.0.20
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
|CR,1,49,1,3.921568627450980E-2,0.000000000000000E+0,1,1,V;
|
|CR,1,49,1,3.921568627450980E-2,0.000000000000000E+0,1,1,V;
|
||||||
|ND,1,50,-1,-1,-1,0.000000000000000E+0,1.000000000000000E+1;|CN,1,17,1,0,0,6,kanal2,0,;
|
|ND,1,50,-1,-1,-1,0.000000000000000E+0,1.000000000000000E+1;|CN,1,17,1,0,0,6,kanal2,0,;
|
||||||
|CS,1,8,1,leclass="Code Example" translate="true">
|
|CS,1,8,1,leclass="Code Example" translate="true">
|
||||||
|NO,1,37,1,9, imc-FAMOS,20,Erzeugt:E.Mustermann; |CG,1,5,2,2,2;
|
|NO,1,37,1,9,imc-FAMOS,20,Erzeugt:E.Mustermann; |CG,1,5,2,2,2;
|
||||||
|CD,1,31,1.000000000000000E-1,1,0,,0,0,0;|NT,1,27,10, 6,1993,19,18,20.0000000;
|
|CD,1,31,1.000000000000000E-1,1,0,,0,0,0;|NT,1,27,10, 6,1993,19,18,20.0000000;
|
||||||
|CC,1,3,1,1;|CP,1,16,1,4,7,32,0,0,1,0;|Cb,1,40,1,0,1,1,0,16,0,16,1,0.000000000000E+0,0,;
|
|CC,1,3,1,1;|CP,1,16,1,4,7,32,0,0,1,0;|Cb,1,40,1,0,1,1,0,16,0,16,1,0.000000000000E+0,0,;
|
||||||
|CR,1,11,0,0,0,1,1,V;|CN,1,20,0,0,0,9,E06_6_121,0,;|CC,1,3,2,1;|CP,1,16,2,4,5,32,0,0,1,0;
|
|CR,1,11,0,0,0,1,1,V;|CN,1,20,0,0,0,9,E06_6_121,0,;|CC,1,3,2,1;|CP,1,16,2,4,5,32,0,0,1,0;
|
||||||
|
Reference in New Issue
Block a user