core hk request
This commit is contained in:
@ -4,6 +4,7 @@ from tmtccmd.config.definitions import QueueCommands
|
||||
from tmtccmd.tc.definitions import TcQueueT
|
||||
from tmtccmd.tc.service_8_functional_cmd import generate_action_command
|
||||
from tmtccmd.utility.logger import get_console_logger
|
||||
from tmtccmd.tc.service_3_housekeeping import make_sid, generate_one_hk_command
|
||||
from config.object_ids import CORE_CONTROLLER_ID
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
@ -21,6 +22,10 @@ class ActionIds(enum.IntEnum):
|
||||
REBOOT = 32
|
||||
|
||||
|
||||
class SetIds(enum.IntEnum):
|
||||
HK = 5
|
||||
|
||||
|
||||
class OpCodes:
|
||||
REBOOT = ["0", "reboot"]
|
||||
REBOOT_SELF = ["1", "reboot_self"]
|
||||
@ -36,6 +41,7 @@ class OpCodes:
|
||||
RESET_REBOOT_COUNTER_10 = ["11", "rbh-reset-10"]
|
||||
RESET_REBOOT_COUNTER_11 = ["12", "rbh-reset-11"]
|
||||
SET_MAX_REBOOT_CNT = ["13", "rbh-max-cnt"]
|
||||
GET_HK = ["14", "get-hk"]
|
||||
|
||||
|
||||
class Chip(enum.IntEnum):
|
||||
@ -124,6 +130,11 @@ def pack_core_commands(tc_queue: TcQueueT, op_code: str):
|
||||
generate_action_command(
|
||||
object_id=CORE_CONTROLLER_ID, action_id=ActionIds.RESET_REBOOT_COUNTER_11
|
||||
)
|
||||
elif op_code in OpCodes.GET_HK:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Requesting housekeeping set"))
|
||||
sid = make_sid(object_id=CORE_CONTROLLER_ID, set_id=SetIds.HK)
|
||||
command = generate_one_hk_command(sid, 201)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
|
||||
def determine_reboot_params() -> (bool, Chip, Copy):
|
||||
|
Reference in New Issue
Block a user