moved EIVE to new tmtc commander

This commit is contained in:
2021-03-19 17:39:52 +01:00
parent 4d9df1ba87
commit 27c1da4f77
39 changed files with 317 additions and 466 deletions

View File

@ -6,13 +6,13 @@
@date 21.12.2020
"""
from tmtc_core.pus_tc.tmtcc_pus_tc_packer import TcQueueT
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTelecommand
from tmtc_core.core.tmtc_core_definitions import QueueCommands
from tmtccmd.pus_tc.packer import TcQueueT
from tmtccmd.pus_tc.base import PusTelecommand
from tmtccmd.core.definitions import QueueCommands
from gomspace.gomspace_common import *
from pus_tc.tmtcc_tc_p60dock import P60DockConfigTable
from config.tmtcc_object_ids import ObjectIds
from tmtc_core.core.tmtcc_object_id_manager import get_object_id
from pus_tc.p60dock import P60DockConfigTable
from config.object_ids import ObjectIds
from tmtccmd.core.object_id_manager import get_object_id
class ACUTestProcedure:

View File

@ -5,9 +5,9 @@
@author J. Meier
@date 30.01.2021
"""
from tmtc_core.core.tmtc_core_definitions import QueueCommands
from tmtc_core.pus_tc.tmtcc_pus_tc_packer import TcQueueT
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTelecommand
from tmtccmd.core.definitions import QueueCommands
from tmtccmd.pus_tc.packer import TcQueueT
from tmtccmd.pus_tc.base import PusTelecommand
class SwitchNumbers:
@ -26,7 +26,7 @@ class ActionIds:
SWITCH_HEATER = bytearray([0x0, 0x0, 0x0, 0x0])
def pack_heater_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
def pack_heater_test_into(object_id: bytearray, tc_queue: TcQueueT):
tc_queue.appendleft((QueueCommands.PRINT, "Testing Heater Switching"))
heater_number = int(input("Type number of heater to switch: "))

View File

@ -5,9 +5,9 @@
@author J. Meier
@date 13.12.2020
"""
from tmtc_core.core.tmtc_core_definitions import QueueCommands
from tmtc_core.pus_tc.tmtcc_pus_tc_packer import TcQueueT
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTelecommand
from tmtccmd.core.definitions import QueueCommands
from tmtccmd.pus_tc.packer import TcQueueT
from tmtccmd.pus_tc.base import PusTelecommand
from gomspace.gomspace_common import *

View File

@ -6,10 +6,10 @@
@date 17.12.2020
"""
from tmtc_core.pus_tc.tmtcc_pus_tc_packer import TcQueueT
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTelecommand
from tmtccmd.pus_tc.packer import TcQueueT
from tmtccmd.pus_tc.base import PusTelecommand
from gomspace.gomspace_common import *
from pus_tc.tmtcc_tc_p60dock import P60DockConfigTable
from pus_tc.p60dock import P60DockConfigTable
from gomspace.gomspace_pdu_definitions import *

View File

@ -5,12 +5,12 @@
@author J. Meier
@date 17.12.2020
"""
from tmtc_core.core.tmtc_core_definitions import QueueCommands
from tmtc_core.pus_tc.tmtcc_pus_tc_packer import TcQueueT
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTelecommand
from tmtccmd.core.definitions import QueueCommands
from tmtccmd.pus_tc.packer import TcQueueT
from tmtccmd.pus_tc.base import PusTelecommand
from gomspace.gomspace_common import *
from gomspace.gomspace_pdu_definitions import *
from pus_tc.tmtcc_tc_p60dock import P60DockConfigTable
from pus_tc.p60dock import P60DockConfigTable
class PDU2TestProcedure:

View File

@ -5,11 +5,12 @@
@author R. Mueller
@date 02.05.2020
"""
from tmtc_core.core.tmtc_core_definitions import QueueCommands
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTelecommand
from tmtc_core.pus_tc.tmtcc_pus_tc_packer import TcQueueT
from tmtc_core.core.tmtcc_object_id_manager import get_object_id
from config.tmtcc_object_ids import ObjectIds
from tmtccmd.core.definitions import QueueCommands
from tmtccmd.pus_tc.base import PusTelecommand
from tmtccmd.pus_tc.packer import TcQueueT
from tmtccmd.core.object_id_manager import get_object_id
from tmtccmd.pus_tc.service_200_mode import pack_mode_data
from config.object_ids import ObjectIds
import struct
TEST_DEVICE_ID = get_object_id(ObjectIds.TEST_DEVICE)
@ -41,13 +42,3 @@ def pack_service200_test_into(tc_queue: TcQueueT) -> TcQueueT:
tc_queue.appendleft(command.pack_command_tuple())
tc_queue.appendleft((QueueCommands.EXPORT_LOG, "log/tmtc_log_service200.txt"))
return tc_queue
# Mode 0: Off, Mode 1: Mode On, Mode 2: Mode Normal, Mode 3: Mode Raw
def pack_mode_data(object_id: bytearray, mode_: int, submode_: int) -> bytearray:
# Normal mode
mode = struct.pack(">I", mode_)
# Submode default
submode = struct.pack('B', submode_)
mode_data = object_id + mode + submode
return mode_data

View File

@ -6,50 +6,53 @@
import os
from collections import deque
from typing import Union
from tmtccmd.utility.tmtcc_logger import get_logger
from tmtccmd.pus_tc.base import TcQueueT
from tmtccmd.pus_tc.service_5_event import pack_generic_service5_test_into
from tmtccmd.pus_tc.service_17_test import pack_service17_ping_command
from tmtccmd.core.object_id_manager import get_object_id
from pus_tc.p60dock import pack_p60dock_test_into
from pus_tc.pdu2 import pack_pdu2_test_into
from pus_tc.pdu1 import pack_pdu1_test_into
from pus_tc.acu import pack_acu_test_into
from pus_tc.tmp1075 import pack_tmp1075_test_into
from pus_tc.heater import pack_heater_test_into
from config.definitions import CustomServiceList
from config.object_ids import ObjectIds
from config.tmtcc_definitions import ServiceList
from tmtc_core.utility.tmtcc_logger import get_logger
from tmtc_core.pus_tc.tmtcc_pus_tc_base import TcQueueT
from tmtc_core.pus_tc.tmtcc_tc_service_5_event import pack_generic_service5_test_into
from tmtc_core.pus_tc.tmtcc_tc_service_17_test import pack_service17_ping_command
from pus_tc.tmtcc_tc_p60dock import pack_p60dock_test_into
from pus_tc.tmtcc_tc_pdu2 import pack_pdu2_test_into
from pus_tc.tmtcc_tc_pdu1 import pack_pdu1_test_into
from pus_tc.tmtcc_tc_acu import pack_acu_test_into
from tmtc_core.core.tmtcc_object_id_manager import get_object_id
from config.tmtcc_object_ids import ObjectIds
from pus_tc.tmtcc_tc_tmp1075 import pack_tmp1075_test_into
from pus_tc.tmtcc_tc_heater import pack_heater_test_into
LOGGER = get_logger()
def pack_service_queue_user(service: ServiceList, op_code: str, service_queue: TcQueueT):
if service == ServiceList.SERVICE_5:
def pack_service_queue_user(service: Union[str, int], op_code: str, service_queue: TcQueueT):
if service == CustomServiceList.SERVICE_5:
return pack_generic_service5_test_into(service_queue)
if service == ServiceList.SERVICE_17:
if service == CustomServiceList.SERVICE_17:
return service_queue.appendleft(pack_service17_ping_command(ssc=1700).pack_command_tuple())
if service == ServiceList.P60DOCK:
if service == CustomServiceList.P60DOCK.value:
object_id = get_object_id(ObjectIds.P60DOCK_HANDLER_ID)
return pack_p60dock_test_into(object_id, service_queue)
if service == ServiceList.PDU1:
if service == CustomServiceList.PDU1.value:
pdu1_object_id = get_object_id(ObjectIds.PDU1_HANDLER_ID)
p60dock_object_id = get_object_id(ObjectIds.P60DOCK_HANDLER_ID)
return pack_pdu1_test_into(pdu1_object_id, p60dock_object_id, service_queue)
if service == ServiceList.PDU2:
if service == CustomServiceList.PDU2.value:
pdu2_object_id = get_object_id(ObjectIds.PDU2_HANDLER_ID)
p60dock_object_id = get_object_id(ObjectIds.P60DOCK_HANDLER_ID)
return pack_pdu2_test_into(pdu2_object_id, p60dock_object_id, service_queue)
if service == ServiceList.ACU:
if service == CustomServiceList.ACU.value:
object_id = get_object_id(ObjectIds.ACU_HANDLER_ID)
return pack_acu_test_into(object_id, service_queue)
if service == ServiceList.TMP1075_1:
if service == CustomServiceList.TMP1075_1.value:
object_id = get_object_id(ObjectIds.TMP1075_1_HANDLER_ID)
return pack_tmp1075_test_into(object_id, service_queue)
if service == ServiceList.TMP1075_2:
if service == CustomServiceList.TMP1075_2.value:
object_id = get_object_id(ObjectIds.TMP1075_2_HANDLER_ID)
return pack_tmp1075_test_into(object_id, service_queue)
if service == ServiceList.HEATER:
if service == CustomServiceList.HEATER.value:
object_id = get_object_id(ObjectIds.HEATER)
return pack_heater_test_into(object_id, service_queue)
LOGGER.warning("Invalid Service !")

View File

@ -6,9 +6,9 @@
@date 06.01.2021
"""
from tmtc_core.pus_tc.tmtcc_pus_tc_packer import TcQueueT
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTelecommand
from pus_tc.tmtcc_tc_service200_mode import pack_mode_data
from tmtccmd.pus_tc.packer import TcQueueT
from tmtccmd.pus_tc.base import PusTelecommand
from pus_tc.service_200_mode import pack_mode_data
class Tmp1075TestProcedure: