eive-tmtc/pus_tc/syrlinks_hk_handler.py

29 lines
946 B
Python
Raw Normal View History

2021-02-27 13:09:55 +01:00
# -*- coding: utf-8 -*-
"""
2021-05-17 18:08:43 +02:00
@file syrlinks_hk_handler.py
2021-02-27 13:42:41 +01:00
@brief Syrlinks Hk Handler tests
2021-02-27 13:09:55 +01:00
@author J. Meier
@date 13.12.2020
"""
2021-05-17 18:08:43 +02:00
from tmtccmd.config.definitions import QueueCommands
from tmtccmd.tc.definitions import TcQueueT
from tmtccmd.tc.service_3_housekeeping import make_sid, generate_one_hk_command
2021-02-27 13:09:55 +01:00
class SetIds:
2021-03-01 12:14:04 +01:00
RX_REGISTERS_DATASET = 1
TX_REGISTERS_DATASET = 2
2021-02-27 13:09:55 +01:00
2021-05-17 18:08:43 +02:00
def pack_syrlinks_hk_handler_test_into(object_id: bytearray, tc_queue: TcQueueT):
2021-02-27 13:09:55 +01:00
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)
tc_queue.appendleft(command.pack_command_tuple())
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Get TX Registers"))
sid = make_sid(object_id, SetIds.TX_REGISTERS_DATASET)
command = generate_one_hk_command(sid, 201)
tc_queue.appendleft(command.pack_command_tuple())