eive-tmtc/pus_tm/event_handler.py

19 lines
511 B
Python
Raw Normal View History

2022-03-04 11:02:10 +01:00
import csv
import os.path
import config.object_ids as obj_ids
2022-03-04 11:02:10 +01:00
DEFAULT_EVENTS_CSV_PATH = "config/events.csv"
RETURNVALUE_DICT = None
def handle_event_packet(
2022-03-04 10:44:55 +01:00
object_id: bytes, event_id: int, param_1: int, param_2: int
) -> str:
2022-03-04 11:02:10 +01:00
if os.path.exists(DEFAULT_EVENTS_CSV_PATH) and RETURNVALUE_DICT is None:
with open(DEFAULT_EVENTS_CSV_PATH) as csvfile:
csv_reader = csv.reader(csvfile, delimiter=";")
for row in csv_reader:
print(row)
return ""