start adding raw TM DB
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2023-11-13 11:37:57 +01:00
parent d9e4ff6973
commit 57a225f926
Signed by: muellerr
GPG Key ID: A649FB78196E3849
2 changed files with 8 additions and 3 deletions

View File

@ -11,7 +11,9 @@ from spacepackets.ccsds import PacketId
from spacepackets.util import UnsignedByteField
DB_PATH = "tm.db"
TM_DB_PATH = "tm.db"
RAW_TM_PATH = "raw_tm.db"
PUS_APID = 0x65
CFDP_APID = 0x66
PUS_PACKET_ID = PacketId(PacketType.TM, True, PUS_APID)

View File

@ -17,7 +17,7 @@ from tmtccmd.pus.s20_fsfw_param_defs import CustomSubservice as ParamSubservice
from tmtccmd.pus.s200_fsfw_mode import Service200FsfwTm
from tmtccmd.pus.s200_fsfw_mode import Subservice as ModeSubservice
from tmtccmd.tmtc import GenericApidHandlerBase, SpecificApidHandlerBase
from eive_tmtc.config.definitions import DB_PATH, PUS_APID
from eive_tmtc.config.definitions import TM_DB_PATH, PUS_APID, RAW_TM_PATH
from eive_tmtc.config.object_ids import get_object_ids
@ -58,6 +58,9 @@ class PusHandler(SpecificApidHandlerBase):
packet: bytes,
):
packet_uuid = uuid.uuid4()
db_con = sqlite3.connect(TM_DB_PATH)
raw_tm_db_con = sqlite3.connect(RAW_TM_PATH)
raw_tm_db_con.execute("INSERT ")
if len(packet) < 8:
_LOGGER.warning("Detected packet shorter than 8 bytes!")
return
@ -75,7 +78,7 @@ class PusHandler(SpecificApidHandlerBase):
handle_service_1_fsfw_packet(wrapper=self.verif_wrapper, raw_tm=packet)
elif service == 3:
handle_hk_packet(
db_con=sqlite3.connect(DB_PATH),
db_con=db_con,
packet_uuid=packet_uuid,
printer=self.printer,
raw_tm=packet,