Skip to main content

Read and convert Mechbase files (.dr) to known file formats

Project description

DR Files

Read and convert MECHBASE files (.dr) to known file formats

MECHBASE

MECHBASE® is a complete preventive solution that was developed by Arpedon, P.C., in order to help you store and trend your equipment status.

MECHBASE files format

MECHBASE files have the following structure:

  • 2 bytes - the size of the header in bytes, in little-endian short integer format
  • next N bytes - the header, in this protobuf format
  • remaining bytes - the values of the signals, with each value represented in 2 bytes, like below (signal has 3 channels in this example):
    • next 2 bytes - first value of the first channel, in little-endian short integer format
    • next 2 bytes - first value of the second channel, in little-endian short integer format
    • next 2 bytes - first value of the third channel, in little-endian short integer format
    • next 2 bytes - second value of the first channel, in little-endian short integer format
    • next 2 bytes - second value of the second channel, in little-endian short integer format
    • next 2 bytes - second value of the third channel, in little-endian short integer format
    • ...

Converting values to actual measured values

  • divide the value by the maximum short value (32767)
  • multiply the value with the channel reference value
  • add the channel offset to the value
  • multiply the value with 1000 and divide by the channel sensitivity value
  • if channel db_reference exists and is positive
    • multiply the log10 of the absolute value divided by the db_reference with 20 - 20 * log10(abs(value) / db_reference)
    • add the channel pregain to the value

Reference code can be found in the value_converter function.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dr_files-0.1.5.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

dr_files-0.1.5-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file dr_files-0.1.5.tar.gz.

File metadata

  • Download URL: dr_files-0.1.5.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.5 Linux/5.4.0-1047-azure

File hashes

Hashes for dr_files-0.1.5.tar.gz
Algorithm Hash digest
SHA256 93cac8c1f5106dc2b696ef7cc592eaa7263953dc754d4a0cfd0f54bb768a12f4
MD5 a72f834b36c1370efbf89f88620d5149
BLAKE2b-256 3daef52f7bc476ec738495db50979c8a14f2c27fc0cb320646bcda7d824cc0ff

See more details on using hashes here.

File details

Details for the file dr_files-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: dr_files-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.5 Linux/5.4.0-1047-azure

File hashes

Hashes for dr_files-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 86183fbda489533c116890dae757bf622d562b4358e18a7a9a9e978f06a81dc7
MD5 1b7b0eceb7ed3ca956b31acfc9e62fb9
BLAKE2b-256 7dc368e23c5ad93043542708b6fa9e5dead7e82eaf92d3a9eceb80e1a1fb3fc5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page