Update to v1.5.0 #4

Merged
muellerr merged 9 commits from develop into master 2021-05-17 18:16:41 +02:00
4 changed files with 17 additions and 21 deletions
Showing only changes of commit 16ec4a1914 - Show all commits

View File

@ -16,6 +16,7 @@ TMP_1075_2_HANDLER_ID = bytes([0x44, 0x00, 0x00, 0x6])
HEATER_ID = bytes([0x54, 0x00, 0x00, 0x1]) HEATER_ID = bytes([0x54, 0x00, 0x00, 0x1])
PCDU_HANDLER_ID = bytes([0x44, 0x00, 0x10, 0x00]) PCDU_HANDLER_ID = bytes([0x44, 0x00, 0x10, 0x00])
SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x00, 0x10, 0x01]) SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x00, 0x10, 0x01])
SYRLINKS_HANDLER = bytes([0x44, 0x00, 0x10, 0x02])
def get_object_ids() -> Dict[bytes, list]: def get_object_ids() -> Dict[bytes, list]:

View File

@ -1,20 +1,20 @@
# -*- coding: utf-8 -*- # -*- 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. @brief The test function in this file simply returns a command which triggers the solar array deployment.
@author J. Meier @author J. Meier
@date 15.02.2021 @date 15.02.2021
""" """
from tmtc_core.core.tmtc_core_definitions import QueueCommands from tmtccmd.config.definitions import QueueCommands
from tmtc_core.pus_tc.tmtcc_pus_tc_packer import TcQueueT from tmtccmd.pus_tc.definitions import TcQueueT
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTelecommand from tmtccmd.pus_tc.packer import PusTelecommand
class ActionIds: class ActionIds:
DEPLOY_SOLAR_ARRAYS = bytearray([0x0, 0x0, 0x0, 0x5]) 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")) tc_queue.appendleft((QueueCommands.PRINT, "Testing S/A Deployment"))
command = object_id + ActionIds.DEPLOY_SOLAR_ARRAYS command = object_id + ActionIds.DEPLOY_SOLAR_ARRAYS

View File

@ -1,15 +1,14 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
@file tmtcc_tc_syrlinks_hk_handler.py @file syrlinks_hk_handler.py
@brief Syrlinks Hk Handler tests @brief Syrlinks Hk Handler tests
@author J. Meier @author J. Meier
@date 13.12.2020 @date 13.12.2020
""" """
from tmtc_core.core.tmtc_core_definitions import QueueCommands from tmtccmd.config.definitions import QueueCommands
from tmtc_core.pus_tc.tmtcc_pus_tc_packer import TcQueueT from tmtccmd.pus_tc.definitions import TcQueueT
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTelecommand from tmtccmd.pus_tc.service_3_housekeeping import make_sid, generate_one_hk_command
from tmtc_core.pus_tc.tmtcc_tc_service_3_housekeeping import *
class SetIds: class SetIds:
@ -17,7 +16,7 @@ class SetIds:
TX_REGISTERS_DATASET = 2 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")) tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Get RX Registers"))
sid = make_sid(object_id, SetIds.RX_REGISTERS_DATASET) sid = make_sid(object_id, SetIds.RX_REGISTERS_DATASET)
command = generate_one_hk_command(sid, 200) 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) sid = make_sid(object_id, SetIds.TX_REGISTERS_DATASET)
command = generate_one_hk_command(sid, 201) command = generate_one_hk_command(sid, 201)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
return tc_queue

View File

@ -7,16 +7,14 @@
import struct import struct
from typing import Tuple from typing import Tuple
from config.tmtcc_object_ids import ObjectIds from tmtccmd.pus_tm.service_3_housekeeping import Service3Base
from tmtc_core.pus_tm.tmtcc_tm_service3_base import Service3Base from tmtccmd.utility.logger import get_logger
from tmtc_core.utility.tmtcc_logger import get_logger from pus_tc.syrlinks_hk_handler import SetIds
from config.tmtcc_object_ids import ObjectIds from config.object_ids import SYRLINKS_HANDLER
from pus_tc.tmtcc_tc_syrlinks_hk_handler import SetIds
LOGGER = get_logger() 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]: service3_packet: Service3Base) -> Tuple[list, list, bytearray, int]:
""" """
This function is called when a Service 3 Housekeeping packet is received. 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 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. 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: if set_id == SetIds.RX_REGISTERS_DATASET:
return handle_syrlinks_rx_registers_dataset(hk_data) return handle_syrlinks_rx_registers_dataset(hk_data)
elif set_id == SetIds.TX_REGISTERS_DATASET: elif set_id == SetIds.TX_REGISTERS_DATASET: