Skip to content

Commit

Permalink
add interrex environment data logger parser
Browse files Browse the repository at this point in the history
  • Loading branch information
nicokant committed Mar 18, 2024
1 parent 9b79018 commit 9601e19
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
3 changes: 3 additions & 0 deletions wizard/parsers/other_sensor/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .interrex import PARSERS as INTERREX

PARSERS = INTERREX
21 changes: 21 additions & 0 deletions wizard/parsers/other_sensor/interrex.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from parsers.parser_base import CSVParser


class InterrexEnvironmentParser(CSVParser):
'''
Parser for Interrex Environment Data Logger
'''
DATATYPE = "other_sensor"
FIELDS = [
"UUID",
"Transmitting time",
"Collecting time",
"Temperature",
"Light intensity",
"Voltage",
"Data Source"
]

PARSERS = [
InterrexEnvironmentParser,
]
10 changes: 3 additions & 7 deletions wizard/parsers/parser.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
import traceback
import logging
from chardet.universaldetector import UniversalDetector

from .parser_base import Parser, ParserNotSupported, Parsable
from .parser_base import ParserNotSupported, Parsable
from .gps import PARSERS as GPS_PARSERS
from .accelerometer import PARSERS as ACCELEROMETER_PARSERS
from .tdr import PARSERS as TDR_PARSERS
# from .parser_excel import GPSUnknownFormatExcelParser
from .other_sensor import PARSERS as OTHER_SENSOR_PARSERS

available_parsers = GPS_PARSERS + ACCELEROMETER_PARSERS + TDR_PARSERS
available_parsers = GPS_PARSERS + ACCELEROMETER_PARSERS + TDR_PARSERS + OTHER_SENSOR_PARSERS

binary_parsers = [
# GPSUnknownFormatExcelParser,
]

def detect_file(path):
parsable = Parsable(file_path=path)
Expand Down

0 comments on commit 9601e19

Please sign in to comment.