merge origin development
This commit is contained in:
parent
b4dcf2296c
commit
16ec4a1914
@ -16,6 +16,7 @@ TMP_1075_2_HANDLER_ID = bytes([0x44, 0x00, 0x00, 0x6])
|
||||
HEATER_ID = bytes([0x54, 0x00, 0x00, 0x1])
|
||||
PCDU_HANDLER_ID = bytes([0x44, 0x00, 0x10, 0x00])
|
||||
SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x00, 0x10, 0x01])
|
||||
SYRLINKS_HANDLER = bytes([0x44, 0x00, 0x10, 0x02])
|
||||
|
||||
|
||||
def get_object_ids() -> Dict[bytes, list]:
|
||||
|
@ -1,20 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file tmtcc_tc_solar_array_deployment.py
|
||||
@file solar_array_deployment.py
|
||||
@brief The test function in this file simply returns a command which triggers the solar array deployment.
|
||||
@author J. Meier
|
||||
@date 15.02.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.config.definitions import QueueCommands
|
||||
from tmtccmd.pus_tc.definitions import TcQueueT
|
||||
from tmtccmd.pus_tc.packer import PusTelecommand
|
||||
|
||||
|
||||
class ActionIds:
|
||||
DEPLOY_SOLAR_ARRAYS = bytearray([0x0, 0x0, 0x0, 0x5])
|
||||
|
||||
|
||||
def pack_solar_array_deployment_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
|
||||
def pack_solar_array_deployment_test_into(object_id: bytearray, tc_queue: TcQueueT):
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Testing S/A Deployment"))
|
||||
|
||||
command = object_id + ActionIds.DEPLOY_SOLAR_ARRAYS
|
@ -1,15 +1,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file tmtcc_tc_syrlinks_hk_handler.py
|
||||
@file syrlinks_hk_handler.py
|
||||
@brief Syrlinks Hk Handler tests
|
||||
@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 tmtc_core.pus_tc.tmtcc_tc_service_3_housekeeping import *
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
from tmtccmd.pus_tc.definitions import TcQueueT
|
||||
from tmtccmd.pus_tc.service_3_housekeeping import make_sid, generate_one_hk_command
|
||||
|
||||
|
||||
class SetIds:
|
||||
@ -17,7 +16,7 @@ class SetIds:
|
||||
TX_REGISTERS_DATASET = 2
|
||||
|
||||
|
||||
def pack_syrlinks_hk_handler_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
|
||||
def pack_syrlinks_hk_handler_test_into(object_id: bytearray, tc_queue: TcQueueT):
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Get RX Registers"))
|
||||
sid = make_sid(object_id, SetIds.RX_REGISTERS_DATASET)
|
||||
command = generate_one_hk_command(sid, 200)
|
||||
@ -27,5 +26,3 @@ def pack_syrlinks_hk_handler_test_into(object_id: bytearray, tc_queue: TcQueueT)
|
||||
sid = make_sid(object_id, SetIds.TX_REGISTERS_DATASET)
|
||||
command = generate_one_hk_command(sid, 201)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
return tc_queue
|
@ -7,16 +7,14 @@
|
||||
import struct
|
||||
from typing import Tuple
|
||||
|
||||
from config.tmtcc_object_ids import ObjectIds
|
||||
from tmtc_core.pus_tm.tmtcc_tm_service3_base import Service3Base
|
||||
from tmtc_core.utility.tmtcc_logger import get_logger
|
||||
from config.tmtcc_object_ids import ObjectIds
|
||||
from pus_tc.tmtcc_tc_syrlinks_hk_handler import SetIds
|
||||
|
||||
from tmtccmd.pus_tm.service_3_housekeeping import Service3Base
|
||||
from tmtccmd.utility.logger import get_logger
|
||||
from pus_tc.syrlinks_hk_handler import SetIds
|
||||
from config.object_ids import SYRLINKS_HANDLER
|
||||
LOGGER = get_logger()
|
||||
|
||||
|
||||
def handle_user_hk_packet(object_id: ObjectIds, set_id: int, hk_data: bytearray,
|
||||
def handle_user_hk_packet(object_id: bytes, set_id: int, hk_data: bytearray,
|
||||
service3_packet: Service3Base) -> Tuple[list, list, bytearray, int]:
|
||||
"""
|
||||
This function is called when a Service 3 Housekeeping packet is received.
|
||||
@ -37,7 +35,7 @@ def handle_user_hk_packet(object_id: ObjectIds, set_id: int, hk_data: bytearray,
|
||||
the corresponding values. The bytearray is the validity buffer, which is usually appended
|
||||
at the end of the housekeeping packet. The last value is the number of parameters.
|
||||
"""
|
||||
if object_id == ObjectIds.SYRLINKS_HK_HANDLER:
|
||||
if object_id == SYRLINKS_HANDLER:
|
||||
if set_id == SetIds.RX_REGISTERS_DATASET:
|
||||
return handle_syrlinks_rx_registers_dataset(hk_data)
|
||||
elif set_id == SetIds.TX_REGISTERS_DATASET:
|
Loading…
Reference in New Issue
Block a user