Skip to content

Commit

Permalink
update script
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-du-car committed Jul 2, 2024
1 parent cdb6875 commit 2626ccb
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@


class Column(Enum):
'''
Column The column name of the output csv file.
'''
UNIT_ID= "Unit ID"
TOPIC= "Topic"
PAYLOAD_TS= "Payload Timestamp"
Expand All @@ -15,6 +18,9 @@ class Column(Enum):
UNIT_TYPE= "Unit Type"

class LogKey(Enum):
'''
The key of telematic message in JSON format in v2xhub log file.
'''
UNIT_ID= "unit_id"
TOPIC= "topic_name"
PAYLOAD_TS= "timestamp"
Expand All @@ -23,7 +29,12 @@ class LogKey(Enum):
EVENT_NAME= "event_name"
UNIT_TYPE= "unit_type"

class TelematicMessageConvertor:
class TelematicMessageConvertor:
"""
The `TelematicMessageConvertor` class is responsible for parsing and converting v2xhub telematic bridge log files into a CSV format.
The CSV is then further process by the get_message_drop.py.
"""

def __init__(self):
self.published_msg : dict= {
Column.UNIT_ID.value:[],
Expand Down

0 comments on commit 2626ccb

Please sign in to comment.