Merge remote-tracking branch 'origin/main' into irini
This commit is contained in:
commit
22c57bd0ed
@ -1,5 +1,5 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Ping Command" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
<configuration default="false" name="Ping Command" type="PythonConfigurationType" factoryName="Python">
|
||||||
<module name="tmtc" />
|
<module name="tmtc" />
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
<option name="PARENT_ENVS" value="true" />
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
|
||||||
<configuration default="false" name="Python tests in tmtccmd" type="tests" factoryName="Autodetect">
|
|
||||||
<module name="tmtc" />
|
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
|
||||||
<option name="PARENT_ENVS" value="true" />
|
|
||||||
<option name="SDK_HOME" value="" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/deps/tmtccmd/tests" />
|
|
||||||
<option name="IS_MODULE_SDK" value="true" />
|
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
|
||||||
<option name="_new_additionalArguments" value="""" />
|
|
||||||
<option name="_new_target" value=""$PROJECT_DIR$/deps/tmtccmd/tests"" />
|
|
||||||
<option name="_new_targetType" value=""PATH"" />
|
|
||||||
<method v="2" />
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
@ -1,5 +1,5 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="tmtccmd Listener Mode" type="PythonConfigurationType" factoryName="Python">
|
<configuration default="false" name="tmtc listener" type="PythonConfigurationType" factoryName="Python">
|
||||||
<module name="tmtc" />
|
<module name="tmtc" />
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
<option name="PARENT_ENVS" value="true" />
|
<option name="PARENT_ENVS" value="true" />
|
||||||
@ -13,7 +13,7 @@
|
|||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-m listener --hk" />
|
<option name="PARAMETERS" value="-l" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="false" />
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
@ -16,6 +16,7 @@ class CustomServiceList(enum.Enum):
|
|||||||
P60DOCK = "p60dock"
|
P60DOCK = "p60dock"
|
||||||
PDU1 = "pdu1"
|
PDU1 = "pdu1"
|
||||||
PDU2 = "pdu2"
|
PDU2 = "pdu2"
|
||||||
|
POWER = "power"
|
||||||
ACU = "acu"
|
ACU = "acu"
|
||||||
ACS = "acs"
|
ACS = "acs"
|
||||||
BPX_BATTERY = "bpx"
|
BPX_BATTERY = "bpx"
|
||||||
@ -44,6 +45,7 @@ class CustomServiceList(enum.Enum):
|
|||||||
SYRLINKS = "syrlinks"
|
SYRLINKS = "syrlinks"
|
||||||
ACS_ASS = "acs-ass"
|
ACS_ASS = "acs-ass"
|
||||||
SUS_ASS = "sus-ass"
|
SUS_ASS = "sus-ass"
|
||||||
|
TCS = "tcs"
|
||||||
TCS_ASS = "tcs-ass"
|
TCS_ASS = "tcs-ass"
|
||||||
TIME = "time"
|
TIME = "time"
|
||||||
PROCEDURE = "proc"
|
PROCEDURE = "proc"
|
||||||
|
@ -78,7 +78,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
8901;0x22c5;CLOCK_SET_FAILURE;LOW;;fsfw/src/fsfw/pus/Service9TimeManagement.h
|
8901;0x22c5;CLOCK_SET_FAILURE;LOW;;fsfw/src/fsfw/pus/Service9TimeManagement.h
|
||||||
9100;0x238c;TC_DELETION_FAILED;MEDIUM;Deletion of a TC from the map failed. P1: First 32 bit of request ID, P2. Last 32 bit of Request ID;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
9100;0x238c;TC_DELETION_FAILED;MEDIUM;Deletion of a TC from the map failed. P1: First 32 bit of request ID, P2. Last 32 bit of Request ID;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||||
9700;0x25e4;TEST;INFO;;fsfw/src/fsfw/pus/Service17Test.h
|
9700;0x25e4;TEST;INFO;;fsfw/src/fsfw/pus/Service17Test.h
|
||||||
10600;0x2968;CHANGE_OF_SETUP_PARAMETER;LOW;;fsfw/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h
|
10600;0x2968;CHANGE_OF_SETUP_PARAMETER;LOW;;fsfw/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h
|
||||||
11300;0x2c24;SWITCH_CMD_SENT;INFO;Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index;mission/devices/devicedefinitions/powerDefinitions.h
|
11300;0x2c24;SWITCH_CMD_SENT;INFO;Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index;mission/devices/devicedefinitions/powerDefinitions.h
|
||||||
11301;0x2c25;SWITCH_HAS_CHANGED;INFO;Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index;mission/devices/devicedefinitions/powerDefinitions.h
|
11301;0x2c25;SWITCH_HAS_CHANGED;INFO;Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index;mission/devices/devicedefinitions/powerDefinitions.h
|
||||||
11302;0x2c26;SWITCHING_Q7S_DENIED;MEDIUM;;mission/devices/devicedefinitions/powerDefinitions.h
|
11302;0x2c26;SWITCHING_Q7S_DENIED;MEDIUM;;mission/devices/devicedefinitions/powerDefinitions.h
|
||||||
|
|
@ -3,7 +3,7 @@ from typing import Optional
|
|||||||
from config.definitions import SPACE_PACKET_IDS
|
from config.definitions import SPACE_PACKET_IDS
|
||||||
from tmtccmd import TmTcCfgHookBase, CcsdsTmtcBackend
|
from tmtccmd import TmTcCfgHookBase, CcsdsTmtcBackend
|
||||||
from tmtccmd.com_if import ComInterface
|
from tmtccmd.com_if import ComInterface
|
||||||
from tmtccmd.config import TmTcDefWrapper
|
from tmtccmd.config import TmtcDefinitionWrapper
|
||||||
|
|
||||||
from config.retvals import get_retval_dict
|
from config.retvals import get_retval_dict
|
||||||
from pus_tc.cmd_definitions import get_eive_service_op_code_dict
|
from pus_tc.cmd_definitions import get_eive_service_op_code_dict
|
||||||
@ -14,7 +14,7 @@ class EiveHookObject(TmTcCfgHookBase):
|
|||||||
def __init__(self, json_cfg_path: str):
|
def __init__(self, json_cfg_path: str):
|
||||||
super().__init__(json_cfg_path=json_cfg_path)
|
super().__init__(json_cfg_path=json_cfg_path)
|
||||||
|
|
||||||
def get_tmtc_definitions(self) -> TmTcDefWrapper:
|
def get_tmtc_definitions(self) -> TmtcDefinitionWrapper:
|
||||||
return get_eive_service_op_code_dict()
|
return get_eive_service_op_code_dict()
|
||||||
|
|
||||||
def assign_communication_interface(self, com_if_key: str) -> Optional[ComInterface]:
|
def assign_communication_interface(self, com_if_key: str) -> Optional[ComInterface]:
|
||||||
|
@ -15,7 +15,6 @@ __OBJECT_ID_DICT = None
|
|||||||
|
|
||||||
|
|
||||||
# Core Object IDs
|
# Core Object IDs
|
||||||
CORE_CONTROLLER_ID = bytes([0x43, 0x00, 0x00, 0x03])
|
|
||||||
SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x41, 0x00, 0xA2])
|
SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x41, 0x00, 0xA2])
|
||||||
|
|
||||||
# Power Object IDs
|
# Power Object IDs
|
||||||
@ -128,6 +127,11 @@ SUS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x02])
|
|||||||
TCS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x03])
|
TCS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x03])
|
||||||
RW_ASSEMBLY = bytes([0x73, 0x00, 0x00, 0x04])
|
RW_ASSEMBLY = bytes([0x73, 0x00, 0x00, 0x04])
|
||||||
|
|
||||||
|
# Controllers
|
||||||
|
TCS_CONTROLLER = bytes([0x43, 0x40, 0x00, 0x01])
|
||||||
|
ACS_CONTROLLER = bytes([0x43, 0x40, 0x00, 0x02])
|
||||||
|
CORE_CONTROLLER_ID = bytes([0x43, 0x00, 0x00, 0x03])
|
||||||
|
|
||||||
|
|
||||||
def get_object_ids() -> ObjectIdDictT:
|
def get_object_ids() -> ObjectIdDictT:
|
||||||
global __OBJECT_ID_DICT
|
global __OBJECT_ID_DICT
|
||||||
|
@ -1,74 +1,55 @@
|
|||||||
Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||||
0x0000;OK;System-wide code for ok.;0;HasReturnvaluesIF;fsfw/returnvalues/HasReturnvaluesIF.h
|
0x0000;OK;System-wide code for ok.;0;HasReturnvaluesIF;fsfw/returnvalues/HasReturnvaluesIF.h
|
||||||
0x0001;Failed;Unspecified system-wide code for failed.;1;HasReturnvaluesIF;fsfw/returnvalues/HasReturnvaluesIF.h
|
0x0001;Failed;Unspecified system-wide code for failed.;1;HasReturnvaluesIF;fsfw/returnvalues/HasReturnvaluesIF.h
|
||||||
0x64a0;CCSDS_CommandNotImplemented;Received action message with unknown action id;160;CCSDS_HANDLER;mission/tmtc/CCSDSHandler.h
|
0x5fa0;CCSDS_CommandNotImplemented;Received action message with unknown action id;160;CCSDS_HANDLER;mission/tmtc/CCSDSHandler.h
|
||||||
0x6100;GOMS_PacketTooLong;;0;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
0x5c00;GOMS_PacketTooLong;;0;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||||
0x6101;GOMS_InvalidTableId;;1;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
0x5c01;GOMS_InvalidTableId;;1;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||||
0x6102;GOMS_InvalidAddress;;2;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
0x5c02;GOMS_InvalidAddress;;2;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||||
0x6103;GOMS_InvalidParamSize;;3;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
0x5c03;GOMS_InvalidParamSize;;3;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||||
0x6104;GOMS_InvalidPayloadSize;;4;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
0x5c04;GOMS_InvalidPayloadSize;;4;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||||
0x6105;GOMS_UnknownReplyId;;5;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
0x5c05;GOMS_UnknownReplyId;;5;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||||
0x56b0;RWHA_SpiWriteFailure;;176;RW_HANDLER;mission/devices/RwHandler.h
|
0x51b0;RWHA_SpiWriteFailure;;176;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56b1;RWHA_SpiReadFailure;Used by the spi send function to tell a failing read call;177;RW_HANDLER;mission/devices/RwHandler.h
|
0x51b1;RWHA_SpiReadFailure;Used by the spi send function to tell a failing read call;177;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56b2;RWHA_MissingStartSign;Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E;178;RW_HANDLER;mission/devices/RwHandler.h
|
0x51b2;RWHA_MissingStartSign;Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E;178;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56b3;RWHA_InvalidSubstitute;Can be used by the HDLC decoding mechanism to inform about an invalid substitution combination;179;RW_HANDLER;mission/devices/RwHandler.h
|
0x51b3;RWHA_InvalidSubstitute;Can be used by the HDLC decoding mechanism to inform about an invalid substitution combination;179;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56b4;RWHA_MissingEndSign;HDLC decoding mechanism never receives the end sign 0x7E;180;RW_HANDLER;mission/devices/RwHandler.h
|
0x51b4;RWHA_MissingEndSign;HDLC decoding mechanism never receives the end sign 0x7E;180;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56b5;RWHA_NoReply;Reaction wheel only responds with empty frames.;181;RW_HANDLER;mission/devices/RwHandler.h
|
0x51b5;RWHA_NoReply;Reaction wheel only responds with empty frames.;181;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56b6;RWHA_NoStartMarker;Expected a start marker as first byte;182;RW_HANDLER;mission/devices/RwHandler.h
|
0x51b6;RWHA_NoStartMarker;Expected a start marker as first byte;182;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56a0;RWHA_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;RW_HANDLER;mission/devices/RwHandler.h
|
0x51a0;RWHA_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56a1;RWHA_InvalidRampTime;Action Message with invalid ramp time was received.;161;RW_HANDLER;mission/devices/RwHandler.h
|
0x51a1;RWHA_InvalidRampTime;Action Message with invalid ramp time was received.;161;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56a2;RWHA_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;RW_HANDLER;mission/devices/RwHandler.h
|
0x51a2;RWHA_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56a3;RWHA_ExecutionFailed;Command execution failed;163;RW_HANDLER;mission/devices/RwHandler.h
|
0x51a3;RWHA_ExecutionFailed;Command execution failed;163;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x56a4;RWHA_CrcError;Reaction wheel reply has invalid crc;164;RW_HANDLER;mission/devices/RwHandler.h
|
0x51a4;RWHA_CrcError;Reaction wheel reply has invalid crc;164;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x53a1;HEATER_CommandNotSupported;;161;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
0x4ea1;HEATER_CommandNotSupported;;161;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
||||||
0x53a2;HEATER_InitFailed;;162;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
0x4ea2;HEATER_InitFailed;;162;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
||||||
0x53a3;HEATER_InvalidSwitchNr;;163;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
0x4ea3;HEATER_InvalidSwitchNr;;163;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
||||||
0x53a4;HEATER_MainSwitchSetTimeout;;164;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
0x4ea4;HEATER_MainSwitchSetTimeout;;164;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
||||||
0x53a5;HEATER_CommandAlreadyWaiting;;165;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
0x4ea5;HEATER_CommandAlreadyWaiting;;165;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
||||||
0x5ca0;SUSS_ErrorUnlockMutex;;160;SUS_HANDLER;mission/devices/SusHandler.h
|
0x57a0;SUSS_ErrorUnlockMutex;;160;SUS_HANDLER;mission/devices/SusHandler.h
|
||||||
0x5ca1;SUSS_ErrorLockMutex;;161;SUS_HANDLER;mission/devices/SusHandler.h
|
0x57a1;SUSS_ErrorLockMutex;;161;SUS_HANDLER;mission/devices/SusHandler.h
|
||||||
0x55a0;IMTQ_InvalidCommandCode;;160;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
0x50a0;IMTQ_InvalidCommandCode;;160;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
||||||
0x55a1;IMTQ_ParameterMissing;;161;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
0x50a1;IMTQ_ParameterMissing;;161;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
||||||
0x55a2;IMTQ_ParameterInvalid;;162;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
0x50a2;IMTQ_ParameterInvalid;;162;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
||||||
0x55a3;IMTQ_CcUnavailable;;163;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
0x50a3;IMTQ_CcUnavailable;;163;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
||||||
0x55a4;IMTQ_InternalProcessingError;;164;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
0x50a4;IMTQ_InternalProcessingError;;164;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
||||||
0x55a5;IMTQ_RejectedWithoutReason;;165;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
0x50a5;IMTQ_RejectedWithoutReason;;165;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
||||||
0x55a6;IMTQ_CmdErrUnknown;;166;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
0x50a6;IMTQ_CmdErrUnknown;;166;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
||||||
0x55a7;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;167;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
0x50a7;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;167;IMTQ_HANDLER;mission/devices/IMTQHandler.h
|
||||||
0x54a0;SYRLINKS_CrcFailure;;160;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x4fa0;SYRLINKS_CrcFailure;;160;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x54a1;SYRLINKS_UartFraminOrParityErrorAck;;161;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x4fa1;SYRLINKS_UartFraminOrParityErrorAck;;161;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x54a2;SYRLINKS_BadCharacterAck;;162;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x4fa2;SYRLINKS_BadCharacterAck;;162;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x54a3;SYRLINKS_BadParameterValueAck;;163;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x4fa3;SYRLINKS_BadParameterValueAck;;163;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x54a4;SYRLINKS_BadEndOfFrameAck;;164;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x4fa4;SYRLINKS_BadEndOfFrameAck;;164;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x54a5;SYRLINKS_UnknownCommandIdAck;;165;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x4fa5;SYRLINKS_UnknownCommandIdAck;;165;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x54a6;SYRLINKS_BadCrcAck;;166;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x4fa6;SYRLINKS_BadCrcAck;;166;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x54a7;SYRLINKS_ReplyWrongSize;;167;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x4fa7;SYRLINKS_ReplyWrongSize;;167;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x54a8;SYRLINKS_MissingStartFrameCharacter;;168;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x4fa8;SYRLINKS_MissingStartFrameCharacter;;168;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x6aa0;SADPL_CommandNotSupported;;160;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
0x65a0;SADPL_CommandNotSupported;;160;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
0x6aa1;SADPL_DeploymentAlreadyExecuting;;161;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
0x65a1;SADPL_DeploymentAlreadyExecuting;;161;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
0x6aa2;SADPL_MainSwitchTimeoutFailure;;162;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
0x65a2;SADPL_MainSwitchTimeoutFailure;;162;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
0x6aa3;SADPL_SwitchingDeplSa1Failed;;163;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
0x65a3;SADPL_SwitchingDeplSa1Failed;;163;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
0x6aa4;SADPL_SwitchingDeplSa2Failed;;164;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
0x65a4;SADPL_SwitchingDeplSa2Failed;;164;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
0x67a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NVMParameterBase.h
|
0x62a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NVMParameterBase.h
|
||||||
0x4400;HSPI_HalTimeoutRetval;;0;HAL_SPI;fsfw/hal/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
|
||||||
0x4401;HSPI_HalBusyRetval;;1;HAL_SPI;fsfw/hal/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
|
||||||
0x4402;HSPI_HalErrorRetval;;2;HAL_SPI;fsfw/hal/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
|
||||||
0x4501;HURT_UartReadFailure;;1;HAL_UART;fsfw/hal/src/fsfw_hal/linux/uart/UartComIF.h
|
|
||||||
0x4502;HURT_UartReadSizeMissmatch;;2;HAL_UART;fsfw/hal/src/fsfw_hal/linux/uart/UartComIF.h
|
|
||||||
0x4503;HURT_UartRxBufferTooSmall;;3;HAL_UART;fsfw/hal/src/fsfw_hal/linux/uart/UartComIF.h
|
|
||||||
0x4701;HGIO_UnknownGpioId;;1;HAL_GPIO;fsfw/hal/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
|
||||||
0x4702;HGIO_DriveGpioFailure;;2;HAL_GPIO;fsfw/hal/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
|
||||||
0x4703;HGIO_GpioTypeFailure;;3;HAL_GPIO;fsfw/hal/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
|
||||||
0x4704;HGIO_GpioInvalidInstance;;4;HAL_GPIO;fsfw/hal/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
|
||||||
0x4705;HGIO_GpioDuplicateDetected;;5;HAL_GPIO;fsfw/hal/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
|
||||||
0x4706;HGIO_GpioInitFailed;;6;HAL_GPIO;fsfw/hal/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
|
||||||
0x4707;HGIO_GpioGetValueFailed;;7;HAL_GPIO;fsfw/hal/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
|
||||||
0x4300;UXOS_ExecutionFinished;Execution of the current command has finished;0;LINUX_OSAL;fsfw/hal/src/fsfw_hal/linux/CommandExecutor.h
|
|
||||||
0x4301;UXOS_CommandPending;Command is pending. This will also be returned if the user tries to load another command but a command is still pending;1;LINUX_OSAL;fsfw/hal/src/fsfw_hal/linux/CommandExecutor.h
|
|
||||||
0x4302;UXOS_BytesRead;Some bytes have been read from the executing process;2;LINUX_OSAL;fsfw/hal/src/fsfw_hal/linux/CommandExecutor.h
|
|
||||||
0x4303;UXOS_CommandError;Command execution failed;3;LINUX_OSAL;fsfw/hal/src/fsfw_hal/linux/CommandExecutor.h
|
|
||||||
0x4304;UXOS_NoCommandLoadedOrPending;;4;LINUX_OSAL;fsfw/hal/src/fsfw_hal/linux/CommandExecutor.h
|
|
||||||
0x4306;UXOS_PcloseCallError;;6;LINUX_OSAL;fsfw/hal/src/fsfw_hal/linux/CommandExecutor.h
|
|
||||||
0x2b01;CCS_BcIsSetVrCommand;;1;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2b01;CCS_BcIsSetVrCommand;;1;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x2b02;CCS_BcIsUnlockCommand;;2;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2b02;CCS_BcIsUnlockCommand;;2;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x2bb0;CCS_BcIllegalCommand;;176;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2bb0;CCS_BcIllegalCommand;;176;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
@ -451,16 +432,35 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x1401;SE_BufferTooShort;;1;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
0x1401;SE_BufferTooShort;;1;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
||||||
0x1402;SE_StreamTooShort;;2;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
0x1402;SE_StreamTooShort;;2;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
||||||
0x1403;SE_TooManyElements;;3;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
0x1403;SE_TooManyElements;;3;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
||||||
0x68a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/memory/FilesystemHelper.h
|
0x4400;HSPI_HalTimeoutRetval;;0;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
||||||
0x68a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/memory/FilesystemHelper.h
|
0x4401;HSPI_HalBusyRetval;;1;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
||||||
0x7300;SDMA_OpOngoing;;0;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x4402;HSPI_HalErrorRetval;;2;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
||||||
0x7301;SDMA_AlreadyOn;;1;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x4501;HURT_UartReadFailure;;1;HAL_UART;fsfw/src/fsfw_hal/linux/uart/UartComIF.h
|
||||||
0x7302;SDMA_AlreadyMounted;;2;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x4502;HURT_UartReadSizeMissmatch;;2;HAL_UART;fsfw/src/fsfw_hal/linux/uart/UartComIF.h
|
||||||
0x7303;SDMA_AlreadyOff;;3;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x4503;HURT_UartRxBufferTooSmall;;3;HAL_UART;fsfw/src/fsfw_hal/linux/uart/UartComIF.h
|
||||||
0x730a;SDMA_StatusFileNexists;;10;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x4701;HGIO_UnknownGpioId;;1;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
0x730b;SDMA_StatusFileFormatInvalid;;11;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x4702;HGIO_DriveGpioFailure;;2;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
0x730c;SDMA_MountError;;12;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x4703;HGIO_GpioTypeFailure;;3;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
0x730d;SDMA_UnmountError;;13;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x4704;HGIO_GpioInvalidInstance;;4;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
0x730e;SDMA_SystemCallError;;14;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x4705;HGIO_GpioDuplicateDetected;;5;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
0x730f;SDMA_PopenCallError;;15;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x4706;HGIO_GpioInitFailed;;6;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
0x7400;SCBU_KeyNotFound;;0;SCRATCH_BUFFER;bsp_q7s/memory/scratchApi.h
|
0x4707;HGIO_GpioGetValueFailed;;7;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
|
0x4300;UXOS_ExecutionFinished;Execution of the current command has finished;0;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||||
|
0x4301;UXOS_CommandPending;Command is pending. This will also be returned if the user tries to load another command but a command is still pending;1;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||||
|
0x4302;UXOS_BytesRead;Some bytes have been read from the executing process;2;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||||
|
0x4303;UXOS_CommandError;Command execution failed;3;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||||
|
0x4304;UXOS_NoCommandLoadedOrPending;;4;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||||
|
0x4306;UXOS_PcloseCallError;;6;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||||
|
0x63a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/memory/FilesystemHelper.h
|
||||||
|
0x63a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/memory/FilesystemHelper.h
|
||||||
|
0x6900;SDMA_OpOngoing;;0;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
||||||
|
0x6901;SDMA_AlreadyOn;;1;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
||||||
|
0x6902;SDMA_AlreadyMounted;;2;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
||||||
|
0x6903;SDMA_AlreadyOff;;3;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
||||||
|
0x690a;SDMA_StatusFileNexists;;10;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
||||||
|
0x690b;SDMA_StatusFileFormatInvalid;;11;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
||||||
|
0x690c;SDMA_MountError;;12;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
||||||
|
0x690d;SDMA_UnmountError;;13;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
||||||
|
0x690e;SDMA_SystemCallError;;14;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
||||||
|
0x690f;SDMA_PopenCallError;;15;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
||||||
|
0x6a00;SCBU_KeyNotFound;;0;SCRATCH_BUFFER;bsp_q7s/memory/scratchApi.h
|
||||||
|
|
2
deps/tmtccmd
vendored
2
deps/tmtccmd
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 43a5e9ef3fa618c5296137dd76b4f25a1732b0f3
|
Subproject commit 92e9b3d05c01c836eadbacd729e375f42d336f95
|
@ -36,9 +36,10 @@ class GomspaceOpCodes:
|
|||||||
SET_PARAM = ["set-param", "133"]
|
SET_PARAM = ["set-param", "133"]
|
||||||
|
|
||||||
|
|
||||||
class Info:
|
class GsInfo:
|
||||||
REQUEST_CORE_HK_ONCE = "Requesting Core HK once"
|
REQUEST_CORE_HK_ONCE = "Requesting Core HK once"
|
||||||
REQUEST_AUX_HK_ONCE = "Requesting Aux HK once"
|
REQUEST_AUX_HK_ONCE = "Requesting Aux HK once"
|
||||||
|
PRINT_SWITCH_V_I = "Print Switch V I Info"
|
||||||
GET_PARAMETER = "Get parameter"
|
GET_PARAMETER = "Get parameter"
|
||||||
SET_PARAMETER = "Set parameter"
|
SET_PARAMETER = "Set parameter"
|
||||||
|
|
||||||
@ -84,7 +85,8 @@ def pack_get_param_command(
|
|||||||
@param object_id: The object id of the gomspace device handler.
|
@param object_id: The object id of the gomspace device handler.
|
||||||
@param table_id: The table id of the gomspace device
|
@param table_id: The table id of the gomspace device
|
||||||
@param memory_address: Address offset within table of the value to read.
|
@param memory_address: Address offset within table of the value to read.
|
||||||
@param parameter_size: Size of the value to read. E.g. temperature is uint16_t and thus parameter_size is 2
|
@param parameter_size: Size of the value to read. E.g. temperature is uint16_t and thus
|
||||||
|
parameter_size is 2
|
||||||
@return: The command as bytearray.
|
@return: The command as bytearray.
|
||||||
"""
|
"""
|
||||||
app_data = struct.pack("!B", table_id)
|
app_data = struct.pack("!B", table_id)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
from gomspace.gomspace_common import TableEntry
|
from gomspace.gomspace_common import TableEntry
|
||||||
|
|
||||||
|
|
||||||
class PDUConfigTable:
|
class PduConfigTable:
|
||||||
out_en_0 = TableEntry(bytearray([0x00, 0x48]), TableEntry.uint8_size)
|
out_en_0 = TableEntry(bytearray([0x00, 0x48]), TableEntry.uint8_size)
|
||||||
out_en_1 = TableEntry(bytearray([0x00, 0x49]), TableEntry.uint8_size)
|
out_en_1 = TableEntry(bytearray([0x00, 0x49]), TableEntry.uint8_size)
|
||||||
out_en_2 = TableEntry(bytearray([0x00, 0x4A]), TableEntry.uint8_size)
|
out_en_2 = TableEntry(bytearray([0x00, 0x4A]), TableEntry.uint8_size)
|
||||||
@ -15,7 +15,20 @@ class PDUConfigTable:
|
|||||||
cur_lu_lim_0 = TableEntry(bytearray([0x00, 0xB8]), TableEntry.uint16_size)
|
cur_lu_lim_0 = TableEntry(bytearray([0x00, 0xB8]), TableEntry.uint16_size)
|
||||||
|
|
||||||
|
|
||||||
class PDUHkTable:
|
PDU_CONFIG_LIST = [
|
||||||
|
PduConfigTable.out_en_0,
|
||||||
|
PduConfigTable.out_en_1,
|
||||||
|
PduConfigTable.out_en_2,
|
||||||
|
PduConfigTable.out_en_3,
|
||||||
|
PduConfigTable.out_en_4,
|
||||||
|
PduConfigTable.out_en_5,
|
||||||
|
PduConfigTable.out_en_6,
|
||||||
|
PduConfigTable.out_en_7,
|
||||||
|
PduConfigTable.out_en_8,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
class PduHkTable:
|
||||||
temperature = TableEntry(bytearray([0x00, 0x28]), TableEntry.uint16_size)
|
temperature = TableEntry(bytearray([0x00, 0x28]), TableEntry.uint16_size)
|
||||||
# Ground WDT value (remaining seconds until reboot)
|
# Ground WDT value (remaining seconds until reboot)
|
||||||
wdt_gnd_left = TableEntry(bytearray([0x00, 0x80]), TableEntry.uint32_size)
|
wdt_gnd_left = TableEntry(bytearray([0x00, 0x80]), TableEntry.uint32_size)
|
||||||
|
@ -1,62 +1,41 @@
|
|||||||
from pus_tc.devs.scex import add_scex_cmds
|
|
||||||
from pus_tc.system.proc import add_proc_cmds
|
|
||||||
|
|
||||||
from pus_tc.devs.gps import add_gps_cmds
|
|
||||||
from pus_tc.devs.pcdu import add_pcdu_cmds
|
|
||||||
from pus_tc.devs.plpcdu import add_pl_pcdu_cmds
|
|
||||||
from pus_tc.devs.rad_sensor import add_rad_sens_cmds
|
|
||||||
from pus_tc.system.core import add_core_controller_definitions
|
|
||||||
from pus_tc.devs.heater import add_heater_cmds
|
|
||||||
from pus_tc.devs.rtd import specify_rtd_cmds
|
|
||||||
from pus_tc.devs.reaction_wheels import add_rw_cmds
|
|
||||||
from pus_tc.devs.bpx_batt import BpxOpCodes
|
from pus_tc.devs.bpx_batt import BpxOpCodes
|
||||||
|
|
||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
from tmtccmd.config import TmTcDefWrapper, OpCodeEntry
|
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||||
|
from tmtccmd.config.tmtc import (
|
||||||
|
tmtc_definitions_provider,
|
||||||
|
call_all_definitions_providers,
|
||||||
|
)
|
||||||
from tmtccmd.config.globals import get_default_tmtc_defs
|
from tmtccmd.config.globals import get_default_tmtc_defs
|
||||||
|
|
||||||
|
|
||||||
def get_eive_service_op_code_dict() -> TmTcDefWrapper:
|
def get_eive_service_op_code_dict() -> TmtcDefinitionWrapper:
|
||||||
|
"""Call all registered TMTC definition providers. They were registered using
|
||||||
|
the :py:func:`tmtc_definitions_provider` decorator.
|
||||||
|
"""
|
||||||
def_wrapper = get_default_tmtc_defs()
|
def_wrapper = get_default_tmtc_defs()
|
||||||
add_bpx_cmd_definitions(defs=def_wrapper)
|
call_all_definitions_providers(def_wrapper)
|
||||||
add_core_controller_definitions(defs=def_wrapper)
|
|
||||||
add_pl_pcdu_cmds(defs=def_wrapper)
|
|
||||||
add_pcdu_cmds(defs=def_wrapper)
|
|
||||||
specify_rtd_cmds(defs=def_wrapper)
|
|
||||||
add_imtq_cmds(defs=def_wrapper)
|
|
||||||
add_rad_sens_cmds(defs=def_wrapper)
|
|
||||||
add_rw_cmds(defs=def_wrapper)
|
|
||||||
add_ploc_mpsoc_cmds(defs=def_wrapper)
|
|
||||||
add_ploc_supv_cmds(defs=def_wrapper)
|
|
||||||
add_system_cmds(defs=def_wrapper)
|
|
||||||
add_time_cmds(defs=def_wrapper)
|
|
||||||
add_syrlinks_cmds(defs=def_wrapper)
|
|
||||||
add_gps_cmds(defs=def_wrapper)
|
|
||||||
add_str_cmds(defs=def_wrapper)
|
|
||||||
add_ccsds_cmds(defs=def_wrapper)
|
|
||||||
add_pdec_cmds(defs=def_wrapper)
|
|
||||||
add_heater_cmds(defs=def_wrapper)
|
|
||||||
add_tmp_sens_cmds(def_wrapper)
|
|
||||||
add_proc_cmds(def_wrapper)
|
|
||||||
add_scex_cmds(def_wrapper)
|
|
||||||
return def_wrapper
|
return def_wrapper
|
||||||
|
|
||||||
|
|
||||||
def add_tmp_sens_cmds(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def add_tmp_sens_cmds(defs: TmtcDefinitionWrapper):
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
oce.add("0", "TMP1075 Tests")
|
oce.add("0", "TMP1075 Tests")
|
||||||
defs.add_service(CustomServiceList.TMP1075_1.value, "TMP1075 1", oce)
|
defs.add_service(CustomServiceList.TMP1075_1.value, "TMP1075 1", oce)
|
||||||
defs.add_service(CustomServiceList.TMP1075_2.value, "TMP1075 2", oce)
|
defs.add_service(CustomServiceList.TMP1075_2.value, "TMP1075 2", oce)
|
||||||
|
|
||||||
|
|
||||||
def add_pdec_cmds(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def add_pdec_cmds(defs: TmtcDefinitionWrapper):
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
oce.add("0", "PDEC Handler: Print CLCW")
|
oce.add("0", "PDEC Handler: Print CLCW")
|
||||||
oce.add("1", "PDEC Handler: Print PDEC monitor")
|
oce.add("1", "PDEC Handler: Print PDEC monitor")
|
||||||
defs.add_service(CustomServiceList.PDEC_HANDLER.value, "PDEC Handler", oce)
|
defs.add_service(CustomServiceList.PDEC_HANDLER.value, "PDEC Handler", oce)
|
||||||
|
|
||||||
|
|
||||||
def add_ccsds_cmds(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def add_ccsds_cmds(defs: TmtcDefinitionWrapper):
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
oce.add("0", "CCSDS Handler: Set low rate")
|
oce.add("0", "CCSDS Handler: Set low rate")
|
||||||
oce.add("1", "CCSDS Handler: Set high rate")
|
oce.add("1", "CCSDS Handler: Set high rate")
|
||||||
@ -70,7 +49,8 @@ def add_ccsds_cmds(defs: TmTcDefWrapper):
|
|||||||
defs.add_service(CustomServiceList.CCSDS_HANDLER.value, "CCSDS Handler", oce)
|
defs.add_service(CustomServiceList.CCSDS_HANDLER.value, "CCSDS Handler", oce)
|
||||||
|
|
||||||
|
|
||||||
def add_str_cmds(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def add_str_cmds(defs: TmtcDefinitionWrapper):
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
oce.add("0", "Star Tracker: Mode On, Submode Bootloader")
|
oce.add("0", "Star Tracker: Mode On, Submode Bootloader")
|
||||||
oce.add("1", "Star Tracker: Mode On, Submode Firmware")
|
oce.add("1", "Star Tracker: Mode On, Submode Firmware")
|
||||||
@ -134,7 +114,8 @@ def add_str_cmds(defs: TmTcDefWrapper):
|
|||||||
defs.add_service(CustomServiceList.STAR_TRACKER.value, "Star Tracker", oce)
|
defs.add_service(CustomServiceList.STAR_TRACKER.value, "Star Tracker", oce)
|
||||||
|
|
||||||
|
|
||||||
def add_syrlinks_cmds(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def add_syrlinks_cmds(defs: TmtcDefinitionWrapper):
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
oce.add("0", "Syrlinks Handler: Set mode off")
|
oce.add("0", "Syrlinks Handler: Set mode off")
|
||||||
oce.add("1", "Syrlinks Handler: Set mode on")
|
oce.add("1", "Syrlinks Handler: Set mode on")
|
||||||
@ -157,7 +138,8 @@ def add_syrlinks_cmds(defs: TmTcDefWrapper):
|
|||||||
defs.add_service(CustomServiceList.SYRLINKS.value, "Syrlinks Handler", oce)
|
defs.add_service(CustomServiceList.SYRLINKS.value, "Syrlinks Handler", oce)
|
||||||
|
|
||||||
|
|
||||||
def add_bpx_cmd_definitions(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def add_bpx_cmd_definitions(defs: TmtcDefinitionWrapper):
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
oce.add(keys=BpxOpCodes.HK, info="Request BPX HK")
|
oce.add(keys=BpxOpCodes.HK, info="Request BPX HK")
|
||||||
oce.add(keys=BpxOpCodes.RST_BOOT_CNT, info="Reset Boot Count")
|
oce.add(keys=BpxOpCodes.RST_BOOT_CNT, info="Reset Boot Count")
|
||||||
@ -173,7 +155,8 @@ def add_bpx_cmd_definitions(defs: TmTcDefWrapper):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def add_time_cmds(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def add_time_cmds(defs: TmtcDefinitionWrapper):
|
||||||
from pus_tc.system.time import OpCodes, Info
|
from pus_tc.system.time import OpCodes, Info
|
||||||
|
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
@ -188,7 +171,8 @@ def add_time_cmds(defs: TmTcDefWrapper):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def add_imtq_cmds(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def add_imtq_cmds(defs: TmtcDefinitionWrapper):
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
oce.add("0", "Mode Off")
|
oce.add("0", "Mode Off")
|
||||||
oce.add("1", "Mode On")
|
oce.add("1", "Mode On")
|
||||||
@ -207,7 +191,8 @@ def add_imtq_cmds(defs: TmTcDefWrapper):
|
|||||||
defs.add_service(CustomServiceList.IMTQ.value, "IMQT Device", oce)
|
defs.add_service(CustomServiceList.IMTQ.value, "IMQT Device", oce)
|
||||||
|
|
||||||
|
|
||||||
def add_ploc_mpsoc_cmds(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def add_ploc_mpsoc_cmds(defs: TmtcDefinitionWrapper):
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
oce.add("0", "Ploc MPSoC: Set mode off")
|
oce.add("0", "Ploc MPSoC: Set mode off")
|
||||||
oce.add("1", "Ploc MPSoC: Set mode on")
|
oce.add("1", "Ploc MPSoC: Set mode on")
|
||||||
@ -231,7 +216,8 @@ def add_ploc_mpsoc_cmds(defs: TmTcDefWrapper):
|
|||||||
defs.add_service(CustomServiceList.PLOC_MPSOC.value, "Ploc MPSoC", oce)
|
defs.add_service(CustomServiceList.PLOC_MPSOC.value, "Ploc MPSoC", oce)
|
||||||
|
|
||||||
|
|
||||||
def add_ploc_supv_cmds(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def add_ploc_supv_cmds(defs: TmtcDefinitionWrapper):
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
oce.add("0", "PLOC Memory Dumper: MRAM dump")
|
oce.add("0", "PLOC Memory Dumper: MRAM dump")
|
||||||
defs.add_service(
|
defs.add_service(
|
||||||
@ -284,7 +270,8 @@ def add_ploc_supv_cmds(defs: TmTcDefWrapper):
|
|||||||
defs.add_service(CustomServiceList.PLOC_SUPV.value, "PLOC Supervisor", oce)
|
defs.add_service(CustomServiceList.PLOC_SUPV.value, "PLOC Supervisor", oce)
|
||||||
|
|
||||||
|
|
||||||
def add_system_cmds(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def add_system_cmds(defs: TmtcDefinitionWrapper):
|
||||||
from pus_tc.system.acs import AcsOpCodes, SusOpCodes
|
from pus_tc.system.acs import AcsOpCodes, SusOpCodes
|
||||||
import pus_tc.system.tcs as tcs
|
import pus_tc.system.tcs as tcs
|
||||||
import pus_tc.system.controllers as controllers
|
import pus_tc.system.controllers as controllers
|
||||||
@ -345,21 +332,6 @@ def add_system_cmds(defs: TmTcDefWrapper):
|
|||||||
op_code_entry=oce,
|
op_code_entry=oce,
|
||||||
)
|
)
|
||||||
|
|
||||||
oce = OpCodeEntry()
|
|
||||||
oce.add(
|
|
||||||
keys=tcs.OpCodes.TCS_BOARD_ASS_NORMAL,
|
|
||||||
info=tcs.Info.TCS_BOARD_ASS_NORMAL,
|
|
||||||
)
|
|
||||||
oce.add(
|
|
||||||
keys=tcs.OpCodes.TCS_BOARD_ASS_OFF,
|
|
||||||
info=tcs.Info.TCS_BOARD_ASS_OFF,
|
|
||||||
)
|
|
||||||
defs.add_service(
|
|
||||||
name=CustomServiceList.TCS_ASS.value,
|
|
||||||
info="TCS Board Assembly",
|
|
||||||
op_code_entry=oce,
|
|
||||||
)
|
|
||||||
|
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
oce.add(
|
oce.add(
|
||||||
keys=controllers.OpCodes.THERMAL_CONTROLLER,
|
keys=controllers.OpCodes.THERMAL_CONTROLLER,
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
import struct
|
import struct
|
||||||
|
|
||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
from tmtccmd.config import TmTcDefWrapper, OpCodeEntry
|
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||||
|
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||||
|
|
||||||
from tmtccmd.tc import DefaultPusQueueHelper
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.tc.pus_3_fsfw_hk import (
|
from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||||
@ -16,7 +17,7 @@ from tmtccmd.tc.pus_3_fsfw_hk import (
|
|||||||
)
|
)
|
||||||
import gomspace.gomspace_common as gs
|
import gomspace.gomspace_common as gs
|
||||||
from gomspace.gomspace_common import GomspaceOpCodes
|
from gomspace.gomspace_common import GomspaceOpCodes
|
||||||
from gomspace.gomspace_common import Info as GsInfo
|
from gomspace.gomspace_common import GsInfo as GsInfo
|
||||||
from config.object_ids import ACU_HANDLER_ID
|
from config.object_ids import ACU_HANDLER_ID
|
||||||
from pus_tc.devs.p60dock import P60DockConfigTable
|
from pus_tc.devs.p60dock import P60DockConfigTable
|
||||||
from tmtccmd.tc.pus_8_funccmd import generate_action_command
|
from tmtccmd.tc.pus_8_funccmd import generate_action_command
|
||||||
@ -48,7 +49,8 @@ class Info:
|
|||||||
TEST = "ACU Test"
|
TEST = "ACU Test"
|
||||||
|
|
||||||
|
|
||||||
def add_acu_cmds(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def add_acu_cmds(defs: TmtcDefinitionWrapper):
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
oce.add(
|
oce.add(
|
||||||
keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE,
|
keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE,
|
||||||
|
461
pus_tc/devs/common_power.py
Normal file
461
pus_tc/devs/common_power.py
Normal file
@ -0,0 +1,461 @@
|
|||||||
|
import enum
|
||||||
|
|
||||||
|
from config.object_ids import PDU_1_HANDLER_ID, PDU_2_HANDLER_ID
|
||||||
|
from gomspace.gomspace_common import (
|
||||||
|
pack_set_param_command,
|
||||||
|
Channel,
|
||||||
|
GomspaceOpCodes,
|
||||||
|
GsInfo,
|
||||||
|
SetIds,
|
||||||
|
)
|
||||||
|
from gomspace.gomspace_pdu_definitions import PDU_CONFIG_LIST
|
||||||
|
from tmtccmd.config import OpCodeEntry
|
||||||
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
|
from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||||
|
make_sid,
|
||||||
|
generate_one_diag_command,
|
||||||
|
generate_one_hk_command,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class Pdu1ChIndex(enum.IntEnum):
|
||||||
|
TCS = 0
|
||||||
|
SYRLINKS = 1
|
||||||
|
STR = 2
|
||||||
|
MGT = 3
|
||||||
|
SUS_N = 4
|
||||||
|
SCEX = 5
|
||||||
|
PLOC = 6
|
||||||
|
ACS_A = 7
|
||||||
|
|
||||||
|
|
||||||
|
class Pdu1InfoBase:
|
||||||
|
TCS = "Switch TCS Board"
|
||||||
|
SYRLINKS = "Switch Syrlinks (COM)"
|
||||||
|
STR = "Switch Startracker"
|
||||||
|
MGT = "Switch Magnetorquer"
|
||||||
|
SUS_N = "Switch Sun Sensor Board Nominal"
|
||||||
|
SCEX = "Switch Solar Cell Experiment"
|
||||||
|
PLOC = "Switch Payload On-Board Computer"
|
||||||
|
ACS_A = "Switch ACS Board A-Side"
|
||||||
|
|
||||||
|
|
||||||
|
class Pdu2InfoBase:
|
||||||
|
PL_PCDU_BAT_NOM = "Switch PL PCDU Nominal Battery Channel"
|
||||||
|
RW = "Switch Reaction Wheel"
|
||||||
|
HEATER = "Switch Heater"
|
||||||
|
SUS_R = "Switch Sun Sensor Board Redundant"
|
||||||
|
SOLAR_ARRAY_DEPL = "Switch Solar Array Deployment"
|
||||||
|
PL_PCDU_BAT_RED = "Switch PL PCDU Redundant Battery Channel"
|
||||||
|
ACS_B = "Switch ACS Board B-Side"
|
||||||
|
PL_CAM = "Switch Payload Camera"
|
||||||
|
|
||||||
|
|
||||||
|
class PowerInfo:
|
||||||
|
INFO_CORE = "Core Information"
|
||||||
|
INFO_AUX = "Auxiliary Information"
|
||||||
|
INFO_ALL = "All Information"
|
||||||
|
|
||||||
|
|
||||||
|
class Pdu2ChIndex(enum.IntEnum):
|
||||||
|
PL_PCDU_BAT_NOM = 1
|
||||||
|
RW = 2
|
||||||
|
HEATER = 3
|
||||||
|
SUS_R = 4
|
||||||
|
SOLAR_ARRAY_DEPL = 5
|
||||||
|
PL_PCDU_BAT_RED = 6
|
||||||
|
ACS_B = 7
|
||||||
|
PL_CAM = 8
|
||||||
|
|
||||||
|
|
||||||
|
class PowerOpCodes:
|
||||||
|
# PDU 1
|
||||||
|
TCS_ON = ["tcs-on"]
|
||||||
|
TCS_OFF = ["tcs-off"]
|
||||||
|
SYRLINKS_ON = ["syrlinks-on"]
|
||||||
|
SYRLINKS_OFF = ["syrlinks-off"]
|
||||||
|
STAR_TRACKER_ON = ["str-on"]
|
||||||
|
STAR_TRACKER_OFF = ["str-off"]
|
||||||
|
MGT_ON = ["mgt-on"]
|
||||||
|
MGT_OFF = ["mgt-off"]
|
||||||
|
SUS_N_ON = ["sus-nom-on"]
|
||||||
|
SUS_N_OFF = ["sus-nom-off"]
|
||||||
|
SCEX_ON = ["scex-on"]
|
||||||
|
SCEX_OFF = ["scex-off"]
|
||||||
|
PLOC_ON = ["ploc-on"]
|
||||||
|
PLOC_OFF = ["ploc-off"]
|
||||||
|
ACS_A_ON = ["acs-a-on"]
|
||||||
|
ACS_A_OFF = ["acs-a-off"]
|
||||||
|
|
||||||
|
# PDU 2
|
||||||
|
PL_PCDU_VBAT_NOM_ON = ["plpcdu-vbat-nom-on"]
|
||||||
|
PL_PCDU_VBAT_NOM_OFF = ["plpcdu-vbat-nom-off"]
|
||||||
|
RW_ON = ["rw-on"]
|
||||||
|
RW_OFF = ["rw-off"]
|
||||||
|
HEATER_ON = ["heater-on"]
|
||||||
|
HEATER_OFF = ["heater-off"]
|
||||||
|
SUS_R_ON = ["sus-red-on"]
|
||||||
|
SUS_R_OFF = ["sus-red-off"]
|
||||||
|
SOLAR_ARRAY_DEPL_ON = ["sa-depl-on"]
|
||||||
|
SOLAR_ARRAY_DEPL_OFF = ["sa-depl-off"]
|
||||||
|
PL_PCDU_VBAT_RED_ON = ["plpcdu-vbat-red-on"]
|
||||||
|
PL_PCDU_VBAT_RED_OFF = ["plpcdu-vbat-red-off"]
|
||||||
|
ACS_B_ON = ["acs-b-on"]
|
||||||
|
ACS_B_OFF = ["acs-b-off"]
|
||||||
|
PL_CAM_ON = ["cam-on"]
|
||||||
|
PL_CAM_OFF = ["cam-off"]
|
||||||
|
|
||||||
|
INFO_CORE = ["info"]
|
||||||
|
INFO_AUX = ["info-aux"]
|
||||||
|
INFO_ALL = ["info-all"]
|
||||||
|
|
||||||
|
|
||||||
|
def info_on_pdu1(base: str) -> str:
|
||||||
|
return "PDU1: " + base + " on"
|
||||||
|
|
||||||
|
|
||||||
|
def info_off_pdu1(base: str) -> str:
|
||||||
|
return "PDU1: " + base + " off"
|
||||||
|
|
||||||
|
|
||||||
|
def info_on_pdu2(base: str) -> str:
|
||||||
|
return "PDU2: " + base + " on"
|
||||||
|
|
||||||
|
|
||||||
|
def info_off_pdu2(base: str) -> str:
|
||||||
|
return "PDU2: " + base + " off"
|
||||||
|
|
||||||
|
|
||||||
|
def add_pdu1_common_defs(oce: OpCodeEntry):
|
||||||
|
oce.add(keys=PowerOpCodes.TCS_ON, info=info_on_pdu1(Pdu1InfoBase.TCS))
|
||||||
|
oce.add(keys=PowerOpCodes.TCS_OFF, info=info_off_pdu1(Pdu1InfoBase.TCS))
|
||||||
|
oce.add(keys=PowerOpCodes.STAR_TRACKER_ON, info=info_on_pdu1(Pdu1InfoBase.STR))
|
||||||
|
oce.add(keys=PowerOpCodes.STAR_TRACKER_OFF, info=info_off_pdu1(Pdu1InfoBase.STR))
|
||||||
|
oce.add(keys=PowerOpCodes.SUS_N_ON, info=info_on_pdu1(Pdu1InfoBase.SUS_N))
|
||||||
|
oce.add(keys=PowerOpCodes.SUS_N_OFF, info=info_off_pdu1(Pdu1InfoBase.SUS_N))
|
||||||
|
oce.add(keys=PowerOpCodes.ACS_A_ON, info=info_on_pdu1(Pdu1InfoBase.ACS_A))
|
||||||
|
oce.add(keys=PowerOpCodes.ACS_A_OFF, info=info_off_pdu1(Pdu1InfoBase.ACS_A))
|
||||||
|
oce.add(keys=PowerOpCodes.SYRLINKS_ON, info=info_on_pdu1(Pdu1InfoBase.SYRLINKS))
|
||||||
|
oce.add(keys=PowerOpCodes.SYRLINKS_OFF, info=info_off_pdu1(Pdu1InfoBase.SYRLINKS))
|
||||||
|
oce.add(keys=PowerOpCodes.MGT_ON, info=info_on_pdu1(Pdu1InfoBase.MGT))
|
||||||
|
oce.add(keys=PowerOpCodes.MGT_OFF, info=info_off_pdu1(Pdu1InfoBase.MGT))
|
||||||
|
oce.add(keys=PowerOpCodes.PLOC_ON, info=info_on_pdu1(Pdu1InfoBase.PLOC))
|
||||||
|
oce.add(keys=PowerOpCodes.PLOC_OFF, info=info_off_pdu1(Pdu1InfoBase.PLOC))
|
||||||
|
oce.add(keys=PowerOpCodes.SCEX_ON, info=info_on_pdu1(Pdu1InfoBase.SCEX))
|
||||||
|
oce.add(keys=PowerOpCodes.SCEX_OFF, info=info_off_pdu1(Pdu1InfoBase.SCEX))
|
||||||
|
|
||||||
|
|
||||||
|
def add_pdu2_common_defs(oce: OpCodeEntry):
|
||||||
|
oce.add(keys=PowerOpCodes.ACS_B_ON, info=info_on_pdu2(Pdu2InfoBase.ACS_B))
|
||||||
|
oce.add(keys=PowerOpCodes.ACS_B_OFF, info=info_off_pdu2(Pdu2InfoBase.ACS_B))
|
||||||
|
oce.add(keys=PowerOpCodes.SUS_R_ON, info=info_on_pdu2(Pdu2InfoBase.SUS_R))
|
||||||
|
oce.add(keys=PowerOpCodes.SUS_R_OFF, info=info_off_pdu2(Pdu2InfoBase.SUS_R))
|
||||||
|
oce.add(keys=PowerOpCodes.RW_ON, info=info_on_pdu2(Pdu2InfoBase.RW))
|
||||||
|
oce.add(keys=PowerOpCodes.RW_OFF, info=info_off_pdu2(Pdu2InfoBase.RW))
|
||||||
|
oce.add(
|
||||||
|
keys=PowerOpCodes.PL_PCDU_VBAT_NOM_ON,
|
||||||
|
info=info_on_pdu2(Pdu2InfoBase.PL_PCDU_BAT_NOM),
|
||||||
|
)
|
||||||
|
oce.add(
|
||||||
|
keys=PowerOpCodes.PL_PCDU_VBAT_NOM_OFF,
|
||||||
|
info=info_off_pdu2(Pdu2InfoBase.PL_PCDU_BAT_NOM),
|
||||||
|
)
|
||||||
|
oce.add(
|
||||||
|
keys=PowerOpCodes.PL_PCDU_VBAT_RED_ON,
|
||||||
|
info=info_on_pdu2(Pdu2InfoBase.PL_PCDU_BAT_RED),
|
||||||
|
)
|
||||||
|
oce.add(
|
||||||
|
keys=PowerOpCodes.PL_PCDU_VBAT_RED_OFF,
|
||||||
|
info=info_off_pdu2(Pdu2InfoBase.PL_PCDU_BAT_RED),
|
||||||
|
)
|
||||||
|
oce.add(keys=PowerOpCodes.HEATER_ON, info=info_on_pdu2(Pdu2InfoBase.HEATER))
|
||||||
|
oce.add(keys=PowerOpCodes.HEATER_OFF, info=info_off_pdu2(Pdu2InfoBase.HEATER))
|
||||||
|
oce.add(
|
||||||
|
keys=PowerOpCodes.SOLAR_ARRAY_DEPL_ON,
|
||||||
|
info=info_on_pdu2(Pdu2InfoBase.SOLAR_ARRAY_DEPL),
|
||||||
|
)
|
||||||
|
oce.add(
|
||||||
|
keys=PowerOpCodes.SOLAR_ARRAY_DEPL_OFF,
|
||||||
|
info=info_off_pdu2(Pdu2InfoBase.SOLAR_ARRAY_DEPL),
|
||||||
|
)
|
||||||
|
oce.add(keys=PowerOpCodes.PL_CAM_ON, info=info_on_pdu2(Pdu2InfoBase.PL_CAM))
|
||||||
|
oce.add(keys=PowerOpCodes.PL_CAM_OFF, info=info_off_pdu2(Pdu2InfoBase.PL_CAM))
|
||||||
|
|
||||||
|
|
||||||
|
def pdu1_cmds(q: DefaultPusQueueHelper, op_code: str):
|
||||||
|
if op_code in PowerOpCodes.TCS_ON:
|
||||||
|
tcs_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.TCS_OFF:
|
||||||
|
tcs_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.SYRLINKS_ON:
|
||||||
|
syrlinks_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.SYRLINKS_OFF:
|
||||||
|
syrlinks_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.STAR_TRACKER_ON:
|
||||||
|
startracker_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.STAR_TRACKER_OFF:
|
||||||
|
startracker_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.MGT_ON:
|
||||||
|
mgt_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.MGT_OFF:
|
||||||
|
mgt_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.SUS_N_ON:
|
||||||
|
sun_sensor_nominal_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.SUS_N_OFF:
|
||||||
|
sun_sensor_nominal_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.SCEX_ON:
|
||||||
|
solar_cell_experiment_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.SCEX_OFF:
|
||||||
|
solar_cell_experiment_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.PLOC_ON:
|
||||||
|
ploc_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.PLOC_OFF:
|
||||||
|
ploc_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.ACS_A_ON:
|
||||||
|
acs_board_a_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.ACS_A_OFF:
|
||||||
|
acs_board_a_off_cmd(q)
|
||||||
|
|
||||||
|
|
||||||
|
def pdu2_cmds(q: DefaultPusQueueHelper, op_code: str):
|
||||||
|
if op_code in PowerOpCodes.PL_PCDU_VBAT_NOM_ON:
|
||||||
|
pl_pcdu_bat_nom_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.PL_PCDU_VBAT_NOM_OFF:
|
||||||
|
pl_pcdu_bat_nom_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.RW_ON:
|
||||||
|
reaction_wheel_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.RW_OFF:
|
||||||
|
reaction_wheel_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.HEATER_ON:
|
||||||
|
heater_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.HEATER_OFF:
|
||||||
|
heater_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.SUS_R_ON:
|
||||||
|
sus_red_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.SUS_R_OFF:
|
||||||
|
sus_red_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.SOLAR_ARRAY_DEPL_ON:
|
||||||
|
solar_array_deployment_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.SOLAR_ARRAY_DEPL_OFF:
|
||||||
|
solar_array_deployment_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.PL_PCDU_VBAT_RED_ON:
|
||||||
|
pl_pcdu_bat_red_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.PL_PCDU_VBAT_RED_OFF:
|
||||||
|
pl_pcdu_bat_nom_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.ACS_B_ON:
|
||||||
|
acs_board_b_side_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.ACS_B_OFF:
|
||||||
|
acs_board_b_side_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.PL_CAM_ON:
|
||||||
|
payload_camera_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.PL_CAM_OFF:
|
||||||
|
payload_camera_off_cmd(q)
|
||||||
|
|
||||||
|
|
||||||
|
def pdu1_req_hk_cmds(q: DefaultPusQueueHelper, op_code: str):
|
||||||
|
if op_code in GomspaceOpCodes.REQUEST_CORE_HK_ONCE:
|
||||||
|
q.add_log_cmd(f"PDU1: {GsInfo.REQUEST_CORE_HK_ONCE}")
|
||||||
|
hk_sid = make_sid(object_id=PDU_1_HANDLER_ID, set_id=SetIds.PDU_1_CORE)
|
||||||
|
q.add_pus_tc(generate_one_diag_command(sid=hk_sid))
|
||||||
|
if op_code in GomspaceOpCodes.REQUEST_AUX_HK_ONCE:
|
||||||
|
q.add_log_cmd(f"PDU1: {GsInfo.REQUEST_AUX_HK_ONCE}")
|
||||||
|
hk_sid = make_sid(object_id=PDU_1_HANDLER_ID, set_id=SetIds.PDU_1_AUX)
|
||||||
|
q.add_pus_tc(generate_one_hk_command(sid=hk_sid))
|
||||||
|
|
||||||
|
|
||||||
|
def pdu2_req_hk_cmds(q: DefaultPusQueueHelper, op_code: str):
|
||||||
|
if op_code in GomspaceOpCodes.REQUEST_CORE_HK_ONCE:
|
||||||
|
q.add_log_cmd(f"PDU2: {GsInfo.REQUEST_CORE_HK_ONCE}")
|
||||||
|
hk_sid = make_sid(object_id=PDU_2_HANDLER_ID, set_id=SetIds.PDU_2_CORE)
|
||||||
|
q.add_pus_tc(generate_one_diag_command(sid=hk_sid))
|
||||||
|
if op_code in GomspaceOpCodes.REQUEST_AUX_HK_ONCE:
|
||||||
|
q.add_log_cmd(f"PDU2: {GsInfo.REQUEST_AUX_HK_ONCE}")
|
||||||
|
hk_sid = make_sid(object_id=PDU_2_HANDLER_ID, set_id=SetIds.PDU_2_AUX)
|
||||||
|
q.add_pus_tc(generate_one_hk_command(sid=hk_sid))
|
||||||
|
|
||||||
|
|
||||||
|
def pack_power_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||||
|
pdu1_cmds(q, op_code)
|
||||||
|
pdu2_cmds(q, op_code)
|
||||||
|
if op_code in PowerOpCodes.INFO_CORE:
|
||||||
|
pdu1_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||||
|
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||||
|
q.add_wait_seconds(3.0)
|
||||||
|
elif op_code in PowerOpCodes.INFO_AUX:
|
||||||
|
pdu1_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||||
|
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||||
|
q.add_wait_seconds(3.0)
|
||||||
|
elif op_code in PowerOpCodes.INFO_ALL:
|
||||||
|
pdu1_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||||
|
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||||
|
pdu1_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||||
|
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||||
|
q.add_wait_seconds(3.0)
|
||||||
|
|
||||||
|
|
||||||
|
def tcs_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.TCS, Pdu1ChIndex.TCS)
|
||||||
|
|
||||||
|
|
||||||
|
def tcs_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.TCS, Pdu1ChIndex.TCS)
|
||||||
|
|
||||||
|
|
||||||
|
def syrlinks_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.SYRLINKS, Pdu1ChIndex.SYRLINKS)
|
||||||
|
|
||||||
|
|
||||||
|
def syrlinks_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.SYRLINKS, Pdu1ChIndex.SYRLINKS)
|
||||||
|
|
||||||
|
|
||||||
|
def startracker_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.STR, Pdu1ChIndex.STR)
|
||||||
|
|
||||||
|
|
||||||
|
def startracker_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.STR, Pdu1ChIndex.STR)
|
||||||
|
|
||||||
|
|
||||||
|
def mgt_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.MGT, Pdu1ChIndex.MGT)
|
||||||
|
|
||||||
|
|
||||||
|
def mgt_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.MGT, Pdu1ChIndex.MGT)
|
||||||
|
|
||||||
|
|
||||||
|
def sun_sensor_nominal_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.SUS_N, Pdu1ChIndex.SUS_N)
|
||||||
|
|
||||||
|
|
||||||
|
def sun_sensor_nominal_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.SUS_N, Pdu1ChIndex.SUS_N)
|
||||||
|
|
||||||
|
|
||||||
|
def solar_cell_experiment_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.SCEX, Pdu1ChIndex.SCEX)
|
||||||
|
|
||||||
|
|
||||||
|
def solar_cell_experiment_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.SCEX, Pdu1ChIndex.SCEX)
|
||||||
|
|
||||||
|
|
||||||
|
def ploc_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.PLOC, Pdu1ChIndex.PLOC)
|
||||||
|
|
||||||
|
|
||||||
|
def ploc_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.PLOC, Pdu1ChIndex.PLOC)
|
||||||
|
|
||||||
|
|
||||||
|
def acs_board_a_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.ACS_A, Pdu1ChIndex.ACS_A)
|
||||||
|
|
||||||
|
|
||||||
|
def acs_board_a_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.ACS_A, Pdu1ChIndex.ACS_A)
|
||||||
|
|
||||||
|
|
||||||
|
def pl_pcdu_bat_nom_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(
|
||||||
|
PDU_2_HANDLER_ID, q, Pdu2InfoBase.PL_PCDU_BAT_NOM, Pdu2ChIndex.PL_PCDU_BAT_NOM
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def pl_pcdu_bat_nom_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(
|
||||||
|
PDU_2_HANDLER_ID, q, Pdu2InfoBase.PL_PCDU_BAT_NOM, Pdu2ChIndex.PL_PCDU_BAT_NOM
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def reaction_wheel_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.RW, Pdu2ChIndex.RW)
|
||||||
|
|
||||||
|
|
||||||
|
def reaction_wheel_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.RW, Pdu2ChIndex.RW)
|
||||||
|
|
||||||
|
|
||||||
|
def heater_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.HEATER, Pdu2ChIndex.HEATER)
|
||||||
|
|
||||||
|
|
||||||
|
def heater_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.HEATER, Pdu2ChIndex.HEATER)
|
||||||
|
|
||||||
|
|
||||||
|
def sus_red_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.SUS_R, Pdu2ChIndex.SUS_R)
|
||||||
|
|
||||||
|
|
||||||
|
def sus_red_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.SUS_R, Pdu2ChIndex.SUS_R)
|
||||||
|
|
||||||
|
|
||||||
|
def solar_array_deployment_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(
|
||||||
|
PDU_2_HANDLER_ID, q, Pdu2InfoBase.SOLAR_ARRAY_DEPL, Pdu2ChIndex.SOLAR_ARRAY_DEPL
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def solar_array_deployment_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(
|
||||||
|
PDU_2_HANDLER_ID, q, Pdu2InfoBase.SOLAR_ARRAY_DEPL, Pdu2ChIndex.SOLAR_ARRAY_DEPL
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def pl_pcdu_bat_red_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(
|
||||||
|
PDU_2_HANDLER_ID, q, Pdu2InfoBase.PL_PCDU_BAT_RED, Pdu2ChIndex.PL_PCDU_BAT_RED
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def pl_pcdu_bat_red_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(
|
||||||
|
PDU_2_HANDLER_ID, q, Pdu2InfoBase.PL_PCDU_BAT_RED, Pdu2ChIndex.PL_PCDU_BAT_RED
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def acs_board_b_side_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.ACS_B, Pdu2ChIndex.ACS_B)
|
||||||
|
|
||||||
|
|
||||||
|
def acs_board_b_side_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.ACS_B, Pdu2ChIndex.ACS_B)
|
||||||
|
|
||||||
|
|
||||||
|
def payload_camera_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.PL_CAM, Pdu2ChIndex.PL_CAM)
|
||||||
|
|
||||||
|
|
||||||
|
def payload_camera_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.PL_CAM, Pdu2ChIndex.PL_CAM)
|
||||||
|
|
||||||
|
|
||||||
|
def generic_on_cmd(
|
||||||
|
object_id: bytes, q: DefaultPusQueueHelper, info_str: str, out_idx: int
|
||||||
|
):
|
||||||
|
q.add_log_cmd(info_str + " on")
|
||||||
|
q.add_pus_tc(
|
||||||
|
pack_set_param_command(
|
||||||
|
object_id,
|
||||||
|
PDU_CONFIG_LIST[out_idx].parameter_address,
|
||||||
|
PDU_CONFIG_LIST[out_idx].parameter_size,
|
||||||
|
Channel.on,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def generic_off_cmd(
|
||||||
|
object_id: bytes, q: DefaultPusQueueHelper, info_str: str, out_idx: int
|
||||||
|
):
|
||||||
|
q.add_log_cmd(info_str + " off")
|
||||||
|
q.add_pus_tc(
|
||||||
|
pack_set_param_command(
|
||||||
|
object_id,
|
||||||
|
PDU_CONFIG_LIST[out_idx].parameter_address,
|
||||||
|
PDU_CONFIG_LIST[out_idx].parameter_size,
|
||||||
|
Channel.off,
|
||||||
|
)
|
||||||
|
)
|
@ -1,7 +1,8 @@
|
|||||||
import enum
|
import enum
|
||||||
|
|
||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
from tmtccmd.config import TmTcDefWrapper, OpCodeEntry
|
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||||
|
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||||
from tmtccmd.tc import DefaultPusQueueHelper
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.tc.pus_3_fsfw_hk import make_sid, generate_one_hk_command
|
from tmtccmd.tc.pus_3_fsfw_hk import make_sid, generate_one_hk_command
|
||||||
from tmtccmd.logging import get_console_logger
|
from tmtccmd.logging import get_console_logger
|
||||||
@ -24,7 +25,8 @@ class SetIds:
|
|||||||
HK = 0
|
HK = 0
|
||||||
|
|
||||||
|
|
||||||
def add_gps_cmds(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def add_gps_cmds(defs: TmtcDefinitionWrapper):
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
oce.add(keys=OpCodes.RESET_GNSS, info=Info.RESET_GNSS)
|
oce.add(keys=OpCodes.RESET_GNSS, info=Info.RESET_GNSS)
|
||||||
oce.add(keys=OpCodes.REQ_OS_HK, info=Info.REQ_OS_HK)
|
oce.add(keys=OpCodes.REQ_OS_HK, info=Info.REQ_OS_HK)
|
||||||
|
@ -7,7 +7,8 @@ import enum
|
|||||||
|
|
||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
from config.object_ids import get_object_ids
|
from config.object_ids import get_object_ids
|
||||||
from tmtccmd.config import TmTcDefWrapper, OpCodeEntry
|
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||||
|
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||||
from tmtccmd.tc import DefaultPusQueueHelper
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.util.obj_id import ObjectIdU32
|
from tmtccmd.util.obj_id import ObjectIdU32
|
||||||
from tmtccmd.tc.pus_201_fsfw_health import (
|
from tmtccmd.tc.pus_201_fsfw_health import (
|
||||||
@ -53,7 +54,8 @@ class ActionIds(enum.IntEnum):
|
|||||||
SWITCH_HEATER = 0
|
SWITCH_HEATER = 0
|
||||||
|
|
||||||
|
|
||||||
def add_heater_cmds(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def add_heater_cmds(defs: TmtcDefinitionWrapper):
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
oce.add(keys=OpCodes.HEATER_CMD, info=Info.HEATER_CMD)
|
oce.add(keys=OpCodes.HEATER_CMD, info=Info.HEATER_CMD)
|
||||||
oce.add(keys=OpCodes.HEATER_HEALTHY_CMD, info=Info.HEATER_HEALTHY_CMD)
|
oce.add(keys=OpCodes.HEATER_HEALTHY_CMD, info=Info.HEATER_HEALTHY_CMD)
|
||||||
|
@ -19,7 +19,7 @@ class P60OpCodes:
|
|||||||
TEST = ["test", "0"]
|
TEST = ["test", "0"]
|
||||||
|
|
||||||
|
|
||||||
class Info:
|
class P60Info:
|
||||||
PREFIX = "P60 Dock"
|
PREFIX = "P60 Dock"
|
||||||
STACK_3V3_ON = f"{PREFIX}: Turn Stack 3V3 on"
|
STACK_3V3_ON = f"{PREFIX}: Turn Stack 3V3 on"
|
||||||
STACK_3V3_OFF = f"{PREFIX}: Turn Stack 3V3 off"
|
STACK_3V3_OFF = f"{PREFIX}: Turn Stack 3V3 off"
|
||||||
@ -85,7 +85,7 @@ class P60DockHkTable:
|
|||||||
def pack_p60dock_cmds(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code: str):
|
def pack_p60dock_cmds(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code: str):
|
||||||
objb = object_id.as_bytes
|
objb = object_id.as_bytes
|
||||||
if op_code in P60OpCodes.STACK_3V3_ON:
|
if op_code in P60OpCodes.STACK_3V3_ON:
|
||||||
q.add_log_cmd(Info.STACK_3V3_ON)
|
q.add_log_cmd(GsInfo.STACK_3V3_ON)
|
||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
pack_set_param_command(
|
pack_set_param_command(
|
||||||
objb,
|
objb,
|
||||||
@ -95,7 +95,7 @@ def pack_p60dock_cmds(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code:
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
if op_code in P60OpCodes.STACK_3V3_OFF:
|
if op_code in P60OpCodes.STACK_3V3_OFF:
|
||||||
q.add_log_cmd(Info.STACK_3V3_OFF)
|
q.add_log_cmd(GsInfo.STACK_3V3_OFF)
|
||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
pack_set_param_command(
|
pack_set_param_command(
|
||||||
objb,
|
objb,
|
||||||
@ -105,7 +105,7 @@ def pack_p60dock_cmds(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code:
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
if op_code in P60OpCodes.STACK_5V_ON:
|
if op_code in P60OpCodes.STACK_5V_ON:
|
||||||
q.add_log_cmd(Info.STACK_5V_ON)
|
q.add_log_cmd(GsInfo.STACK_5V_ON)
|
||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
pack_set_param_command(
|
pack_set_param_command(
|
||||||
objb,
|
objb,
|
||||||
@ -115,7 +115,7 @@ def pack_p60dock_cmds(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code:
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
if op_code in P60OpCodes.STACK_5V_OFF:
|
if op_code in P60OpCodes.STACK_5V_OFF:
|
||||||
q.add_log_cmd(Info.STACK_5V_OFF)
|
q.add_log_cmd(GsInfo.STACK_5V_OFF)
|
||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
pack_set_param_command(
|
pack_set_param_command(
|
||||||
objb,
|
objb,
|
||||||
|
@ -1,144 +0,0 @@
|
|||||||
from config.definitions import CustomServiceList
|
|
||||||
from tmtccmd.config import TmTcDefWrapper, OpCodeEntry
|
|
||||||
|
|
||||||
from pus_tc.devs.p60dock import P60OpCodes, GomspaceOpCodes, Info
|
|
||||||
from pus_tc.devs.pdu1 import Pdu1OpCodes
|
|
||||||
from pus_tc.devs.pdu2 import Pdu2OpCodes
|
|
||||||
from pus_tc.devs.acu import add_acu_cmds
|
|
||||||
from gomspace.gomspace_common import Info as GsInfo
|
|
||||||
|
|
||||||
|
|
||||||
def add_p60_cmds(defs: TmTcDefWrapper):
|
|
||||||
oce = OpCodeEntry()
|
|
||||||
oce.add(keys=P60OpCodes.STACK_3V3_ON, info=Info.STACK_3V3_ON)
|
|
||||||
oce.add(keys=P60OpCodes.STACK_3V3_OFF, info=Info.STACK_3V3_OFF)
|
|
||||||
oce.add(keys=P60OpCodes.STACK_5V_ON, info=Info.STACK_5V_ON)
|
|
||||||
oce.add(keys=P60OpCodes.STACK_5V_OFF, info=Info.STACK_5V_OFF)
|
|
||||||
oce.add(keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE, info=GsInfo.REQUEST_CORE_HK_ONCE)
|
|
||||||
oce.add(keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE, info=GsInfo.REQUEST_AUX_HK_ONCE)
|
|
||||||
oce.add(
|
|
||||||
keys=GomspaceOpCodes.PRINT_SWITCH_V_I,
|
|
||||||
info="P60 Dock: Print Switches, Voltages, Currents",
|
|
||||||
)
|
|
||||||
oce.add(keys=GomspaceOpCodes.PRINT_LATCHUPS, info="P60 Dock: Print Latchups")
|
|
||||||
oce.add(keys=P60OpCodes.TEST, info="P60 Tests")
|
|
||||||
defs.add_service(
|
|
||||||
name=CustomServiceList.P60DOCK.value, info="P60 Device", op_code_entry=oce
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def add_pdu1_cmds(defs: TmTcDefWrapper):
|
|
||||||
oce = OpCodeEntry()
|
|
||||||
oce.add(keys=Pdu1OpCodes.TCS_BOARD_OFF.value, info="PDU1: Turn TCS board off")
|
|
||||||
oce.add(keys=Pdu1OpCodes.STAR_TRACKER_ON.value, info="PDU1: Turn star tracker on")
|
|
||||||
oce.add(keys=Pdu1OpCodes.STAR_TRACKER_OFF.value, info="PDU1: Turn star tracker off")
|
|
||||||
oce.add(keys=Pdu1OpCodes.SUS_NOMINAL_ON.value, info="PDU1: Turn SUS nominal on")
|
|
||||||
oce.add(keys=Pdu1OpCodes.SUS_NOMINAL_OFF.value, info="PDU1: Turn SUS nominal off")
|
|
||||||
oce.add(keys=Pdu1OpCodes.ACS_A_SIDE_ON.value, info="PDU1: Turn ACS A side on")
|
|
||||||
oce.add(keys=Pdu1OpCodes.ACS_A_SIDE_OFF.value, info="PDU1: Turn ACS A side off")
|
|
||||||
oce.add(keys=Pdu1OpCodes.SYRLINKS_ON.value, info="PDU1: Turn Syrlinks on")
|
|
||||||
oce.add(keys=Pdu1OpCodes.SYRLINKS_OFF.value, info="PDU1: Turn Syrlinks off")
|
|
||||||
oce.add(keys=Pdu1OpCodes.MGT_ON.value, info="PDU1: Turn MGT on")
|
|
||||||
oce.add(keys=Pdu1OpCodes.MGT_OFF.value, info="PDU1: Turn MGT off")
|
|
||||||
oce.add(keys=Pdu1OpCodes.PLOC_ON.value, info="PDU1: Turn PLOC on")
|
|
||||||
oce.add(keys=Pdu1OpCodes.PLOC_OFF.value, info="PDU1: Turn PLOC off")
|
|
||||||
oce.add(keys=Pdu1OpCodes.SCEX_ON.value, info="PDU1: Turn Solar Cell Experiment on")
|
|
||||||
oce.add(
|
|
||||||
keys=Pdu1OpCodes.SCEX_OFF.value, info="PDU1: Turn Solar Cell Experiment off"
|
|
||||||
)
|
|
||||||
oce.add(keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE, info=GsInfo.REQUEST_CORE_HK_ONCE)
|
|
||||||
oce.add(keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE, info=GsInfo.REQUEST_AUX_HK_ONCE)
|
|
||||||
oce.add(
|
|
||||||
keys=GomspaceOpCodes.PRINT_SWITCH_V_I,
|
|
||||||
info="PDU1: Print Switches, Voltages, Currents",
|
|
||||||
)
|
|
||||||
oce.add(keys=Pdu1OpCodes.TCS_BOARD_ON.value, info="PDU1: Turn TCS board on")
|
|
||||||
oce.add(keys=GomspaceOpCodes.PRINT_LATCHUPS, info="PDU1: Print Latchups")
|
|
||||||
oce.add(keys=Pdu1OpCodes.TESTS.value, info="PDU1 Tests")
|
|
||||||
oce.add(keys=GomspaceOpCodes.SET_PARAM, info="Set parameter")
|
|
||||||
defs.add_service(
|
|
||||||
name=CustomServiceList.PDU1.value,
|
|
||||||
info="PDU1 Device",
|
|
||||||
op_code_entry=oce,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def add_pdu2_cmds(defs: TmTcDefWrapper):
|
|
||||||
oce = OpCodeEntry()
|
|
||||||
oce.add(keys="0", info="PDU2 Tests")
|
|
||||||
oce.add(keys=Pdu2OpCodes.ACS_SIDE_B_ON.value, info="PDU2: Turn ACS Side B on")
|
|
||||||
oce.add(keys=Pdu2OpCodes.ACS_SIDE_B_OFF.value, info="PDU2: Turn ACS Side B off")
|
|
||||||
oce.add(keys=Pdu2OpCodes.SUS_REDUNDANT_ON.value, info="PDU2: Turn SUS redundant on")
|
|
||||||
oce.add(
|
|
||||||
keys=Pdu2OpCodes.SUS_REDUNDANT_OFF.value, info="PDU2: Turn SUS redundant off"
|
|
||||||
)
|
|
||||||
oce.add(keys=Pdu2OpCodes.RW_ON.value, info="PDU2: Turn reaction wheels on")
|
|
||||||
oce.add(keys=Pdu2OpCodes.RW_OFF.value, info="PDU2: Turn reaction wheels off")
|
|
||||||
oce.add(
|
|
||||||
keys=Pdu2OpCodes.PL_PCDU_VBAT_NOM_ON.value,
|
|
||||||
info="PDU2: PL PCDU Switch Channel Nominal (1) on",
|
|
||||||
)
|
|
||||||
oce.add(
|
|
||||||
keys=Pdu2OpCodes.PL_PCDU_VBAT_NOM_OFF.value,
|
|
||||||
info="PDU2: PL PCDU Switch Channel Nominal (1) off",
|
|
||||||
)
|
|
||||||
oce.add(
|
|
||||||
keys=Pdu2OpCodes.PL_PCDU_VBAT_RED_ON.value,
|
|
||||||
info="PDU2: PL PCDU Switch Channel Redundant (1) on",
|
|
||||||
)
|
|
||||||
oce.add(
|
|
||||||
keys=Pdu2OpCodes.PL_PCDU_VBAT_RED_OFF.value,
|
|
||||||
info="PDU2: PL PCDU Switch Channel Redundant (1) off",
|
|
||||||
)
|
|
||||||
oce.add(
|
|
||||||
keys=Pdu2OpCodes.TCS_HEATER_IN_ON.value,
|
|
||||||
info="PDU2: Switch TCS Heater Input on",
|
|
||||||
)
|
|
||||||
oce.add(
|
|
||||||
keys=Pdu2OpCodes.TCS_HEATER_IN_OFF.value,
|
|
||||||
info="PDU2: Switch TCS Heater Input off",
|
|
||||||
)
|
|
||||||
oce.add(
|
|
||||||
keys=Pdu2OpCodes.SOLAR_ARRAY_DEPL_ON.value,
|
|
||||||
info="PDU2: Switch Solar Array Deployment On",
|
|
||||||
)
|
|
||||||
oce.add(
|
|
||||||
keys=Pdu2OpCodes.SOLAR_ARRAY_DEPL_OFF.value,
|
|
||||||
info="PDU2: Switch Solar Array Deployment Off",
|
|
||||||
)
|
|
||||||
oce.add(
|
|
||||||
keys=Pdu2OpCodes.PL_CAMERA_ON.value,
|
|
||||||
info="PDU2: Turn payload camera on",
|
|
||||||
)
|
|
||||||
oce.add(
|
|
||||||
keys=Pdu2OpCodes.PL_CAMERA_OFF.value,
|
|
||||||
info="PDU2: Turn payload camera off",
|
|
||||||
)
|
|
||||||
oce.add(
|
|
||||||
keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE,
|
|
||||||
info=GsInfo.REQUEST_CORE_HK_ONCE,
|
|
||||||
)
|
|
||||||
oce.add(
|
|
||||||
keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE,
|
|
||||||
info=GsInfo.REQUEST_AUX_HK_ONCE,
|
|
||||||
)
|
|
||||||
oce.add(
|
|
||||||
keys=GomspaceOpCodes.PRINT_SWITCH_V_I,
|
|
||||||
info="PDU2: Print Switches, Voltages, Currents",
|
|
||||||
)
|
|
||||||
oce.add(
|
|
||||||
keys=GomspaceOpCodes.PRINT_LATCHUPS,
|
|
||||||
info="PDU2: Print Latchups",
|
|
||||||
)
|
|
||||||
defs.add_service(
|
|
||||||
name="pdu2",
|
|
||||||
info="PDU2 Device",
|
|
||||||
op_code_entry=oce,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def add_pcdu_cmds(defs: TmTcDefWrapper):
|
|
||||||
add_p60_cmds(defs)
|
|
||||||
add_pdu1_cmds(defs)
|
|
||||||
add_pdu2_cmds(defs)
|
|
||||||
add_acu_cmds(defs)
|
|
@ -4,6 +4,7 @@
|
|||||||
@date 17.12.2020
|
@date 17.12.2020
|
||||||
"""
|
"""
|
||||||
import gomspace.gomspace_common as gs
|
import gomspace.gomspace_common as gs
|
||||||
|
from pus_tc.devs.common_power import pdu1_cmds, pdu1_req_hk_cmds
|
||||||
|
|
||||||
from tmtccmd.tc import DefaultPusQueueHelper
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.tc.pus_3_fsfw_hk import (
|
from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||||
@ -16,28 +17,6 @@ from gomspace.gomspace_pdu_definitions import *
|
|||||||
from config.object_ids import PDU_1_HANDLER_ID
|
from config.object_ids import PDU_1_HANDLER_ID
|
||||||
|
|
||||||
|
|
||||||
class Pdu1OpCodes(enum.Enum):
|
|
||||||
TCS_BOARD_ON = "0"
|
|
||||||
TCS_BOARD_OFF = "1"
|
|
||||||
STAR_TRACKER_ON = "2"
|
|
||||||
STAR_TRACKER_OFF = "3"
|
|
||||||
SUS_NOMINAL_ON = "4"
|
|
||||||
SUS_NOMINAL_OFF = "5"
|
|
||||||
ACS_A_SIDE_ON = "6"
|
|
||||||
ACS_A_SIDE_OFF = "7"
|
|
||||||
SYRLINKS_ON = "8"
|
|
||||||
SYRLINKS_OFF = "9"
|
|
||||||
MGT_ON = "10"
|
|
||||||
MGT_OFF = "11"
|
|
||||||
# Solar Cell Experiment
|
|
||||||
SCEX_ON = "12"
|
|
||||||
SCEX_OFF = "13"
|
|
||||||
PLOC_ON = "14"
|
|
||||||
PLOC_OFF = "15"
|
|
||||||
|
|
||||||
TESTS = "32"
|
|
||||||
|
|
||||||
|
|
||||||
class PDU1TestProcedure:
|
class PDU1TestProcedure:
|
||||||
"""
|
"""
|
||||||
@brief Use this class to define the tests to perform for the PDU2.
|
@brief Use this class to define the tests to perform for the PDU2.
|
||||||
@ -58,184 +37,8 @@ class PDU1TestProcedure:
|
|||||||
def pack_pdu1_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code: str):
|
def pack_pdu1_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code: str):
|
||||||
q.add_log_cmd("Commanding PDU1")
|
q.add_log_cmd("Commanding PDU1")
|
||||||
objb = object_id.as_bytes
|
objb = object_id.as_bytes
|
||||||
if op_code == Pdu1OpCodes.TCS_BOARD_ON.value:
|
pdu1_cmds(q, op_code)
|
||||||
q.add_log_cmd("PDU1: Turn TCS board on")
|
pdu1_req_hk_cmds(q, op_code)
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_0.parameter_address,
|
|
||||||
PDUConfigTable.out_en_0.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu1OpCodes.TCS_BOARD_OFF.value:
|
|
||||||
q.add_log_cmd("PDU1: Turn TCS board off")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_0.parameter_address,
|
|
||||||
PDUConfigTable.out_en_0.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu1OpCodes.STAR_TRACKER_ON.value:
|
|
||||||
q.add_log_cmd("PDU1: Turn star tracker on")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_2.parameter_address,
|
|
||||||
PDUConfigTable.out_en_2.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu1OpCodes.STAR_TRACKER_OFF.value:
|
|
||||||
q.add_log_cmd("PDU1: Turn star tracker off")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_2.parameter_address,
|
|
||||||
PDUConfigTable.out_en_2.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu1OpCodes.SUS_NOMINAL_ON.value:
|
|
||||||
q.add_log_cmd("PDU1: Turn SUS nominal on")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_4.parameter_address,
|
|
||||||
PDUConfigTable.out_en_4.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu1OpCodes.SUS_NOMINAL_OFF.value:
|
|
||||||
q.add_log_cmd("PDU1: Turn SUS nominal off")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_4.parameter_address,
|
|
||||||
PDUConfigTable.out_en_4.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu1OpCodes.ACS_A_SIDE_ON.value:
|
|
||||||
q.add_log_cmd("PDU1: Turn ACS Side A on")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_7.parameter_address,
|
|
||||||
PDUConfigTable.out_en_7.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu1OpCodes.ACS_A_SIDE_OFF.value:
|
|
||||||
q.add_log_cmd("PDU1: Turn ACS Side A off")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_7.parameter_address,
|
|
||||||
PDUConfigTable.out_en_7.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu1OpCodes.SUS_NOMINAL_OFF.value:
|
|
||||||
q.add_log_cmd("PDU1: Turn SUS nominal off")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_4.parameter_address,
|
|
||||||
PDUConfigTable.out_en_4.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu1OpCodes.SCEX_ON.value:
|
|
||||||
q.add_log_cmd("PDU1: Turn Solar Cell Experiment on")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_5.parameter_address,
|
|
||||||
PDUConfigTable.out_en_5.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu1OpCodes.SCEX_OFF.value:
|
|
||||||
q.add_log_cmd("PDU1: Turn Solar Cell Experiment off")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_5.parameter_address,
|
|
||||||
PDUConfigTable.out_en_5.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu1OpCodes.SYRLINKS_ON.value:
|
|
||||||
q.add_log_cmd("PDU1: Turn Syrlinks on")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_1.parameter_address,
|
|
||||||
PDUConfigTable.out_en_1.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu1OpCodes.SYRLINKS_OFF.value:
|
|
||||||
q.add_log_cmd("PDU1: Turn Syrlinks off")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_1.parameter_address,
|
|
||||||
PDUConfigTable.out_en_1.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu1OpCodes.MGT_ON.value:
|
|
||||||
q.add_log_cmd("PDU1: Turn MGT on")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_3.parameter_address,
|
|
||||||
PDUConfigTable.out_en_3.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu1OpCodes.MGT_OFF.value:
|
|
||||||
q.add_log_cmd("PDU1: Turn MGT off")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_3.parameter_address,
|
|
||||||
PDUConfigTable.out_en_3.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu1OpCodes.PLOC_ON.value:
|
|
||||||
q.add_log_cmd("PDU1: Turn PLOC on")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_6.parameter_address,
|
|
||||||
PDUConfigTable.out_en_6.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu1OpCodes.PLOC_OFF.value:
|
|
||||||
q.add_log_cmd("PDU1: Turn PLOC off")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_6.parameter_address,
|
|
||||||
PDUConfigTable.out_en_6.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code in GomspaceOpCodes.REQUEST_CORE_HK_ONCE:
|
|
||||||
q.add_log_cmd(f"PDU1: {Info.REQUEST_CORE_HK_ONCE}")
|
|
||||||
hk_sid = make_sid(object_id=PDU_1_HANDLER_ID, set_id=SetIds.PDU_1_CORE)
|
|
||||||
q.add_pus_tc(generate_one_diag_command(sid=hk_sid))
|
|
||||||
if op_code in GomspaceOpCodes.REQUEST_AUX_HK_ONCE:
|
|
||||||
q.add_log_cmd(f"PDU1: {Info.REQUEST_AUX_HK_ONCE}")
|
|
||||||
hk_sid = make_sid(object_id=PDU_1_HANDLER_ID, set_id=SetIds.PDU_1_AUX)
|
|
||||||
q.add_pus_tc(generate_one_hk_command(sid=hk_sid))
|
|
||||||
if op_code in GomspaceOpCodes.PRINT_SWITCH_V_I:
|
if op_code in GomspaceOpCodes.PRINT_SWITCH_V_I:
|
||||||
q.add_log_cmd("PDU1: Print Switches, Voltages, Currents")
|
q.add_log_cmd("PDU1: Print Switches, Voltages, Currents")
|
||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
@ -260,8 +63,8 @@ def pack_pdu1_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code
|
|||||||
pack_get_param_command(
|
pack_get_param_command(
|
||||||
objb,
|
objb,
|
||||||
TableIds.hk,
|
TableIds.hk,
|
||||||
PDUHkTable.temperature.parameter_address,
|
PduHkTable.temperature.parameter_address,
|
||||||
PDUHkTable.temperature.parameter_size,
|
PduHkTable.temperature.parameter_size,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_2_on:
|
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_2_on:
|
||||||
@ -269,8 +72,8 @@ def pack_pdu1_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code
|
|||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
pack_set_param_command(
|
pack_set_param_command(
|
||||||
objb,
|
objb,
|
||||||
PDUConfigTable.out_en_2.parameter_address,
|
PduConfigTable.out_en_2.parameter_address,
|
||||||
PDUConfigTable.out_en_2.parameter_size,
|
PduConfigTable.out_en_2.parameter_size,
|
||||||
Channel.on,
|
Channel.on,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -279,8 +82,8 @@ def pack_pdu1_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code
|
|||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
pack_set_param_command(
|
pack_set_param_command(
|
||||||
objb,
|
objb,
|
||||||
PDUConfigTable.out_en_2.parameter_address,
|
PduConfigTable.out_en_2.parameter_address,
|
||||||
PDUConfigTable.out_en_2.parameter_size,
|
PduConfigTable.out_en_2.parameter_size,
|
||||||
Channel.off,
|
Channel.off,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -289,8 +92,8 @@ def pack_pdu1_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code
|
|||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
pack_set_param_command(
|
pack_set_param_command(
|
||||||
objb,
|
objb,
|
||||||
PDUConfigTable.out_en_3.parameter_address,
|
PduConfigTable.out_en_3.parameter_address,
|
||||||
PDUConfigTable.out_en_3.parameter_size,
|
PduConfigTable.out_en_3.parameter_size,
|
||||||
Channel.on,
|
Channel.on,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -299,13 +102,13 @@ def pack_pdu1_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code
|
|||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
pack_set_param_command(
|
pack_set_param_command(
|
||||||
objb,
|
objb,
|
||||||
PDUConfigTable.out_en_3.parameter_address,
|
PduConfigTable.out_en_3.parameter_address,
|
||||||
PDUConfigTable.out_en_3.parameter_size,
|
PduConfigTable.out_en_3.parameter_size,
|
||||||
Channel.off,
|
Channel.off,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if op_code in GomspaceOpCodes.SET_PARAM:
|
if op_code in GomspaceOpCodes.SET_PARAM:
|
||||||
q.add_log_cmd(f"PDU1: {Info.SET_PARAMETER}")
|
q.add_log_cmd(f"PDU1: {GsInfo.SET_PARAMETER}")
|
||||||
memory_address = int(input("Specify memory address: 0x"), 16)
|
memory_address = int(input("Specify memory address: 0x"), 16)
|
||||||
memory_address = struct.pack("!H", memory_address)
|
memory_address = struct.pack("!H", memory_address)
|
||||||
parameter_size = int(input("Specify parameter size: "))
|
parameter_size = int(input("Specify parameter size: "))
|
||||||
|
@ -12,32 +12,12 @@ from tmtccmd.tc.pus_3_fsfw_hk import (
|
|||||||
generate_one_diag_command,
|
generate_one_diag_command,
|
||||||
make_sid,
|
make_sid,
|
||||||
)
|
)
|
||||||
|
from pus_tc.devs.common_power import pdu2_cmds, pdu2_req_hk_cmds
|
||||||
from gomspace.gomspace_common import *
|
from gomspace.gomspace_common import *
|
||||||
from gomspace.gomspace_pdu_definitions import *
|
from gomspace.gomspace_pdu_definitions import *
|
||||||
from config.object_ids import PDU_2_HANDLER_ID
|
from config.object_ids import PDU_2_HANDLER_ID
|
||||||
|
|
||||||
|
|
||||||
class Pdu2OpCodes(enum.Enum):
|
|
||||||
ACS_SIDE_B_ON = "1"
|
|
||||||
ACS_SIDE_B_OFF = "2"
|
|
||||||
SUS_REDUNDANT_ON = "3"
|
|
||||||
SUS_REDUNDANT_OFF = "4"
|
|
||||||
RW_ON = "5"
|
|
||||||
RW_OFF = "6"
|
|
||||||
PL_PCDU_VBAT_NOM_ON = "7"
|
|
||||||
PL_PCDU_VBAT_NOM_OFF = "8"
|
|
||||||
PL_PCDU_VBAT_RED_ON = "9"
|
|
||||||
PL_PCDU_VBAT_RED_OFF = "10"
|
|
||||||
TCS_HEATER_IN_ON = "11"
|
|
||||||
TCS_HEATER_IN_OFF = "12"
|
|
||||||
SOLAR_ARRAY_DEPL_ON = "13"
|
|
||||||
SOLAR_ARRAY_DEPL_OFF = "14"
|
|
||||||
PL_CAMERA_ON = "15"
|
|
||||||
PL_CAMERA_OFF = "16"
|
|
||||||
# There is not really a point of the on command, the SW can not be commanded if the OBC is off
|
|
||||||
Q7S_OFF = "32"
|
|
||||||
|
|
||||||
|
|
||||||
class PDU2TestProcedure:
|
class PDU2TestProcedure:
|
||||||
"""
|
"""
|
||||||
@brief Use this class to define the tests to perform for the PDU2.
|
@brief Use this class to define the tests to perform for the PDU2.
|
||||||
@ -68,186 +48,10 @@ class PDU2TestProcedure:
|
|||||||
def pack_pdu2_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code: str):
|
def pack_pdu2_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code: str):
|
||||||
q.add_log_cmd("Testing PDU2")
|
q.add_log_cmd("Testing PDU2")
|
||||||
objb = object_id.as_bytes
|
objb = object_id.as_bytes
|
||||||
if op_code == Pdu2OpCodes.ACS_SIDE_B_ON.value:
|
pdu2_cmds(q, op_code)
|
||||||
q.add_log_cmd("PDU2: Turn ACS Side B on")
|
pdu2_req_hk_cmds(q, op_code)
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_7.parameter_address,
|
|
||||||
PDUConfigTable.out_en_7.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu2OpCodes.ACS_SIDE_B_OFF.value:
|
|
||||||
q.add_log_cmd("PDU2: Turn ACS Side B off")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_7.parameter_address,
|
|
||||||
PDUConfigTable.out_en_7.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu2OpCodes.Q7S_OFF.value:
|
|
||||||
q.add_log_cmd("Turning off Q7S OBC")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_0.parameter_address,
|
|
||||||
PDUConfigTable.out_en_0.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu2OpCodes.SUS_REDUNDANT_ON.value:
|
|
||||||
q.add_log_cmd("PDU2: Turn SUS redundant on")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_4.parameter_address,
|
|
||||||
PDUConfigTable.out_en_4.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu2OpCodes.SUS_REDUNDANT_OFF.value:
|
|
||||||
q.add_log_cmd("PDU2: Turn SUS redundant off")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_4.parameter_address,
|
|
||||||
PDUConfigTable.out_en_4.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu2OpCodes.RW_ON.value:
|
|
||||||
q.add_log_cmd("PDU2: Turn reaction wheels on")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_2.parameter_address,
|
|
||||||
PDUConfigTable.out_en_2.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu2OpCodes.RW_OFF.value:
|
|
||||||
q.add_log_cmd("PDU2: Turn reaction wheels off")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_2.parameter_address,
|
|
||||||
PDUConfigTable.out_en_2.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu2OpCodes.PL_PCDU_VBAT_NOM_ON.value:
|
|
||||||
q.add_log_cmd("PDU2: Turn PDU2 PL PCDU Channel 1 on")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_1.parameter_address,
|
|
||||||
PDUConfigTable.out_en_1.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu2OpCodes.PL_PCDU_VBAT_NOM_OFF.value:
|
|
||||||
q.add_log_cmd("PDU2: Turn PDU2 PL PCDU Channel 1 off")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_1.parameter_address,
|
|
||||||
PDUConfigTable.out_en_1.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu2OpCodes.PL_PCDU_VBAT_RED_ON.value:
|
|
||||||
q.add_log_cmd("PDU2: Turn PDU2 PL PCDU Channel 6 on")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_6.parameter_address,
|
|
||||||
PDUConfigTable.out_en_6.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu2OpCodes.PL_PCDU_VBAT_RED_OFF.value:
|
|
||||||
q.add_log_cmd("PDU2: Turn PDU2 PL PCDU Channel 6 off")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_6.parameter_address,
|
|
||||||
PDUConfigTable.out_en_6.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu2OpCodes.TCS_HEATER_IN_ON.value:
|
|
||||||
q.add_log_cmd("PDU2: Turn TCS Heater Input on")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_3.parameter_address,
|
|
||||||
PDUConfigTable.out_en_3.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu2OpCodes.TCS_HEATER_IN_OFF.value:
|
|
||||||
q.add_log_cmd("PDU2: Turn TCS Heater Input off")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_3.parameter_address,
|
|
||||||
PDUConfigTable.out_en_3.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu2OpCodes.SOLAR_ARRAY_DEPL_ON.value:
|
|
||||||
q.add_log_cmd("PDU2: Turn Solar Array Deployment On")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_5.parameter_address,
|
|
||||||
PDUConfigTable.out_en_5.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu2OpCodes.SOLAR_ARRAY_DEPL_OFF.value:
|
|
||||||
q.add_log_cmd("PDU2: Turn Solar Array Deployment Off")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_5.parameter_address,
|
|
||||||
PDUConfigTable.out_en_5.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu2OpCodes.PL_CAMERA_ON.value:
|
|
||||||
q.add_log_cmd("PDU2: Turn payload camera on")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_8.parameter_address,
|
|
||||||
PDUConfigTable.out_en_8.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == Pdu2OpCodes.PL_CAMERA_OFF.value:
|
|
||||||
q.add_log_cmd("PDU2: Turn payload camera off")
|
|
||||||
q.add_pus_tc(
|
|
||||||
pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_8.parameter_address,
|
|
||||||
PDUConfigTable.out_en_8.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code in GomspaceOpCodes.REQUEST_CORE_HK_ONCE:
|
|
||||||
q.add_log_cmd(f"PDU2: {Info.REQUEST_CORE_HK_ONCE}")
|
|
||||||
hk_sid = make_sid(object_id=PDU_2_HANDLER_ID, set_id=SetIds.PDU_2_CORE)
|
|
||||||
q.add_pus_tc(generate_one_diag_command(sid=hk_sid))
|
|
||||||
if op_code in GomspaceOpCodes.REQUEST_AUX_HK_ONCE:
|
|
||||||
q.add_log_cmd(f"PDU2: {Info.REQUEST_AUX_HK_ONCE}")
|
|
||||||
hk_sid = make_sid(object_id=PDU_2_HANDLER_ID, set_id=SetIds.PDU_2_AUX)
|
|
||||||
q.add_pus_tc(generate_one_hk_command(sid=hk_sid))
|
|
||||||
if op_code in GomspaceOpCodes.PRINT_SWITCH_V_I:
|
if op_code in GomspaceOpCodes.PRINT_SWITCH_V_I:
|
||||||
q.add_log_cmd("PDU2: Print Switches, Currents, Voltahes")
|
q.add_log_cmd(f"PDU2: {GsInfo.PRINT_SWITCH_V_I}")
|
||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
generate_action_command(
|
generate_action_command(
|
||||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||||
@ -269,8 +73,8 @@ def pack_pdu2_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code
|
|||||||
pack_get_param_command(
|
pack_get_param_command(
|
||||||
objb,
|
objb,
|
||||||
TableIds.hk,
|
TableIds.hk,
|
||||||
PDUHkTable.wdt_gnd_left.parameter_address,
|
PduHkTable.wdt_gnd_left.parameter_address,
|
||||||
PDUHkTable.wdt_gnd_left.parameter_size,
|
PduHkTable.wdt_gnd_left.parameter_size,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if PDU2TestProcedure.all or PDU2TestProcedure.gnd_wdt_reset:
|
if PDU2TestProcedure.all or PDU2TestProcedure.gnd_wdt_reset:
|
||||||
@ -285,8 +89,8 @@ def pack_pdu2_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code
|
|||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
pack_set_param_command(
|
pack_set_param_command(
|
||||||
objb,
|
objb,
|
||||||
PDUConfigTable.out_en_2.parameter_address,
|
PduConfigTable.out_en_2.parameter_address,
|
||||||
PDUConfigTable.out_en_2.parameter_size,
|
PduConfigTable.out_en_2.parameter_size,
|
||||||
Channel.on,
|
Channel.on,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -296,8 +100,8 @@ def pack_pdu2_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code
|
|||||||
pack_get_param_command(
|
pack_get_param_command(
|
||||||
objb,
|
objb,
|
||||||
TableIds.hk,
|
TableIds.hk,
|
||||||
PDUHkTable.temperature.parameter_address,
|
PduHkTable.temperature.parameter_address,
|
||||||
PDUHkTable.temperature.parameter_size,
|
PduHkTable.temperature.parameter_size,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if PDU2TestProcedure.all or PDU2TestProcedure.read_channel_2_state:
|
if PDU2TestProcedure.all or PDU2TestProcedure.read_channel_2_state:
|
||||||
@ -306,8 +110,8 @@ def pack_pdu2_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code
|
|||||||
pack_get_param_command(
|
pack_get_param_command(
|
||||||
objb,
|
objb,
|
||||||
TableIds.config,
|
TableIds.config,
|
||||||
PDUConfigTable.out_en_2.parameter_address,
|
PduConfigTable.out_en_2.parameter_address,
|
||||||
PDUConfigTable.out_en_2.parameter_size,
|
PduConfigTable.out_en_2.parameter_size,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if PDU2TestProcedure.all or PDU2TestProcedure.read_cur_lu_lim_0:
|
if PDU2TestProcedure.all or PDU2TestProcedure.read_cur_lu_lim_0:
|
||||||
@ -316,8 +120,8 @@ def pack_pdu2_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code
|
|||||||
pack_get_param_command(
|
pack_get_param_command(
|
||||||
objb,
|
objb,
|
||||||
TableIds.config,
|
TableIds.config,
|
||||||
PDUConfigTable.cur_lu_lim_0.parameter_address,
|
PduConfigTable.cur_lu_lim_0.parameter_address,
|
||||||
PDUConfigTable.cur_lu_lim_0.parameter_size,
|
PduConfigTable.cur_lu_lim_0.parameter_size,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if PDU2TestProcedure.all or PDU2TestProcedure.channel_2_off:
|
if PDU2TestProcedure.all or PDU2TestProcedure.channel_2_off:
|
||||||
@ -325,8 +129,8 @@ def pack_pdu2_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code
|
|||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
pack_set_param_command(
|
pack_set_param_command(
|
||||||
objb,
|
objb,
|
||||||
PDUConfigTable.out_en_2.parameter_address,
|
PduConfigTable.out_en_2.parameter_address,
|
||||||
PDUConfigTable.out_en_2.parameter_size,
|
PduConfigTable.out_en_2.parameter_size,
|
||||||
Channel.off,
|
Channel.off,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -4,9 +4,9 @@ import time
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
from tmtccmd.config import TmTcDefWrapper
|
from tmtccmd.config import TmtcDefinitionWrapper
|
||||||
|
|
||||||
from tmtccmd.config.tmtc import OpCodeEntry
|
from tmtccmd.config.tmtc import OpCodeEntry, tmtc_definitions_provider
|
||||||
from tmtccmd.tc import DefaultPusQueueHelper
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.tc.pus_3_fsfw_hk import (
|
from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||||
make_sid,
|
make_sid,
|
||||||
@ -52,6 +52,7 @@ class OpCodes:
|
|||||||
|
|
||||||
class Info:
|
class Info:
|
||||||
NORMAL = "PL PCDU ADC modules normal"
|
NORMAL = "PL PCDU ADC modules normal"
|
||||||
|
SWITCH_HPA_ON_PROC = "Switch HPA on procedure"
|
||||||
SWITCH_ON = "Switching PL PCDU on"
|
SWITCH_ON = "Switching PL PCDU on"
|
||||||
SWITCH_OFF = "Switching PL PCDU off"
|
SWITCH_OFF = "Switching PL PCDU off"
|
||||||
NORMAL_SSR = f"{NORMAL}, SSR on"
|
NORMAL_SSR = f"{NORMAL}, SSR on"
|
||||||
@ -114,8 +115,10 @@ class ParamIds(enum.IntEnum):
|
|||||||
INJECT_ALL_ON_FAILURE = 35
|
INJECT_ALL_ON_FAILURE = 35
|
||||||
|
|
||||||
|
|
||||||
def add_pl_pcdu_cmds(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def add_pl_pcdu_cmds(defs: TmtcDefinitionWrapper):
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
|
oce.add(keys=OpCodes.SWITCH_HPA_ON_PROC, info=Info.SWITCH_HPA_ON_PROC)
|
||||||
oce.add(keys=OpCodes.SWITCH_ON, info=Info.SWITCH_ON)
|
oce.add(keys=OpCodes.SWITCH_ON, info=Info.SWITCH_ON)
|
||||||
oce.add(keys=OpCodes.SWITCH_OFF, info=Info.SWITCH_OFF)
|
oce.add(keys=OpCodes.SWITCH_OFF, info=Info.SWITCH_OFF)
|
||||||
oce.add(keys=OpCodes.NORMAL_SSR, info=Info.NORMAL_SSR)
|
oce.add(keys=OpCodes.NORMAL_SSR, info=Info.NORMAL_SSR)
|
||||||
@ -288,7 +291,7 @@ def hpa_on_procedure(q: DefaultPusQueueHelper):
|
|||||||
|
|
||||||
enb_sched = generate_enable_tc_sched_cmd()
|
enb_sched = generate_enable_tc_sched_cmd()
|
||||||
|
|
||||||
sched_time = current_time + 10
|
sched_time = int(round(current_time + 10))
|
||||||
q.add_pus_tc(enb_sched)
|
q.add_pus_tc(enb_sched)
|
||||||
tagged_on_cmd = generate_time_tagged_cmd(
|
tagged_on_cmd = generate_time_tagged_cmd(
|
||||||
release_time=struct.pack("!I", sched_time),
|
release_time=struct.pack("!I", sched_time),
|
||||||
@ -310,6 +313,7 @@ def hpa_on_procedure(q: DefaultPusQueueHelper):
|
|||||||
q.add_pus_tc(tagged_dro_cmd)
|
q.add_pus_tc(tagged_dro_cmd)
|
||||||
|
|
||||||
sched_time += delay_dro_to_x8
|
sched_time += delay_dro_to_x8
|
||||||
|
sched_time = int(round(sched_time))
|
||||||
tagged_x8_cmd = generate_time_tagged_cmd(
|
tagged_x8_cmd = generate_time_tagged_cmd(
|
||||||
release_time=struct.pack("!I", sched_time), tc_to_insert=x8_on
|
release_time=struct.pack("!I", sched_time), tc_to_insert=x8_on
|
||||||
)
|
)
|
||||||
|
103
pus_tc/devs/power.py
Normal file
103
pus_tc/devs/power.py
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
from gomspace.gomspace_common import GsInfo
|
||||||
|
from pus_tc.devs.common_power import (
|
||||||
|
PowerOpCodes,
|
||||||
|
Pdu1InfoBase,
|
||||||
|
Pdu2InfoBase,
|
||||||
|
add_pdu1_common_defs,
|
||||||
|
add_pdu2_common_defs,
|
||||||
|
PowerInfo,
|
||||||
|
)
|
||||||
|
from config.definitions import CustomServiceList
|
||||||
|
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||||
|
|
||||||
|
from pus_tc.devs.p60dock import P60OpCodes, GomspaceOpCodes, P60Info
|
||||||
|
from pus_tc.devs.acu import add_acu_cmds
|
||||||
|
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||||
|
|
||||||
|
|
||||||
|
@tmtc_definitions_provider
|
||||||
|
def add_p60_cmds(defs: TmtcDefinitionWrapper):
|
||||||
|
oce = OpCodeEntry()
|
||||||
|
oce.add(keys=P60OpCodes.STACK_3V3_ON, info=P60Info.STACK_3V3_ON)
|
||||||
|
oce.add(keys=P60OpCodes.STACK_3V3_OFF, info=P60Info.STACK_3V3_OFF)
|
||||||
|
oce.add(keys=P60OpCodes.STACK_5V_ON, info=P60Info.STACK_5V_ON)
|
||||||
|
oce.add(keys=P60OpCodes.STACK_5V_OFF, info=P60Info.STACK_5V_OFF)
|
||||||
|
oce.add(keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE, info=GsInfo.REQUEST_CORE_HK_ONCE)
|
||||||
|
oce.add(keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE, info=GsInfo.REQUEST_AUX_HK_ONCE)
|
||||||
|
oce.add(
|
||||||
|
keys=GomspaceOpCodes.PRINT_SWITCH_V_I,
|
||||||
|
info="P60 Dock: Print Switches, Voltages, Currents",
|
||||||
|
)
|
||||||
|
oce.add(keys=GomspaceOpCodes.PRINT_LATCHUPS, info="P60 Dock: Print Latchups")
|
||||||
|
oce.add(keys=P60OpCodes.TEST, info="P60 Tests")
|
||||||
|
defs.add_service(
|
||||||
|
name=CustomServiceList.P60DOCK.value, info="P60 Device", op_code_entry=oce
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@tmtc_definitions_provider
|
||||||
|
def add_power_cmd_defs(defs: TmtcDefinitionWrapper):
|
||||||
|
oce = OpCodeEntry()
|
||||||
|
add_pdu1_common_defs(oce)
|
||||||
|
add_pdu2_common_defs(oce)
|
||||||
|
oce.add(keys=PowerOpCodes.INFO_ALL, info=PowerInfo.INFO_ALL)
|
||||||
|
oce.add(keys=PowerOpCodes.INFO_CORE, info=PowerInfo.INFO_CORE)
|
||||||
|
oce.add(keys=PowerOpCodes.INFO_AUX, info=PowerInfo.INFO_AUX)
|
||||||
|
defs.add_service(
|
||||||
|
name=CustomServiceList.POWER.value,
|
||||||
|
info="Power Subsystem",
|
||||||
|
op_code_entry=oce,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@tmtc_definitions_provider
|
||||||
|
def add_pdu1_cmds(defs: TmtcDefinitionWrapper):
|
||||||
|
oce = OpCodeEntry()
|
||||||
|
add_pdu1_common_defs(oce)
|
||||||
|
oce.add(keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE, info=GsInfo.REQUEST_CORE_HK_ONCE)
|
||||||
|
oce.add(keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE, info=GsInfo.REQUEST_AUX_HK_ONCE)
|
||||||
|
oce.add(
|
||||||
|
keys=GomspaceOpCodes.PRINT_SWITCH_V_I,
|
||||||
|
info="PDU1: Print Switches, Voltages, Currents",
|
||||||
|
)
|
||||||
|
oce.add(keys=GomspaceOpCodes.PRINT_LATCHUPS, info="PDU1: Print Latchups")
|
||||||
|
oce.add(keys=GomspaceOpCodes.SET_PARAM, info="Set parameter")
|
||||||
|
defs.add_service(
|
||||||
|
name=CustomServiceList.PDU1.value,
|
||||||
|
info="PDU1 Device",
|
||||||
|
op_code_entry=oce,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@tmtc_definitions_provider
|
||||||
|
def add_pdu2_cmds(defs: TmtcDefinitionWrapper):
|
||||||
|
oce = OpCodeEntry()
|
||||||
|
add_pdu2_common_defs(oce)
|
||||||
|
oce.add(
|
||||||
|
keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE,
|
||||||
|
info=GsInfo.REQUEST_CORE_HK_ONCE,
|
||||||
|
)
|
||||||
|
oce.add(
|
||||||
|
keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE,
|
||||||
|
info=GsInfo.REQUEST_AUX_HK_ONCE,
|
||||||
|
)
|
||||||
|
oce.add(
|
||||||
|
keys=GomspaceOpCodes.PRINT_SWITCH_V_I,
|
||||||
|
info="PDU2: Print Switches, Voltages, Currents",
|
||||||
|
)
|
||||||
|
oce.add(
|
||||||
|
keys=GomspaceOpCodes.PRINT_LATCHUPS,
|
||||||
|
info="PDU2: Print Latchups",
|
||||||
|
)
|
||||||
|
defs.add_service(
|
||||||
|
name="pdu2",
|
||||||
|
info="PDU2 Device",
|
||||||
|
op_code_entry=oce,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def add_pcdu_cmds(defs: TmtcDefinitionWrapper):
|
||||||
|
add_p60_cmds(defs)
|
||||||
|
add_pdu1_cmds(defs)
|
||||||
|
add_pdu2_cmds(defs)
|
||||||
|
add_acu_cmds(defs)
|
@ -11,7 +11,8 @@ from config.definitions import CustomServiceList
|
|||||||
|
|
||||||
from spacepackets.ecss.tc import PusTelecommand
|
from spacepackets.ecss.tc import PusTelecommand
|
||||||
from pus_tc.service_200_mode import pack_mode_data, Modes
|
from pus_tc.service_200_mode import pack_mode_data, Modes
|
||||||
from tmtccmd.config import TmTcDefWrapper, OpCodeEntry
|
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||||
|
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||||
from tmtccmd.tc import DefaultPusQueueHelper
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.tc.pus_3_fsfw_hk import generate_one_hk_command, make_sid
|
from tmtccmd.tc.pus_3_fsfw_hk import generate_one_hk_command, make_sid
|
||||||
from tmtccmd.util import ObjectIdU32
|
from tmtccmd.util import ObjectIdU32
|
||||||
@ -46,7 +47,8 @@ class CommandIds:
|
|||||||
DISABLE_DEBUG_OUTPUT = 5
|
DISABLE_DEBUG_OUTPUT = 5
|
||||||
|
|
||||||
|
|
||||||
def add_rad_sens_cmds(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def add_rad_sens_cmds(defs: TmtcDefinitionWrapper):
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
oce.add(info=Info.ON, keys=OpCodes.ON)
|
oce.add(info=Info.ON, keys=OpCodes.ON)
|
||||||
oce.add(info=Info.OFF, keys=OpCodes.OFF)
|
oce.add(info=Info.OFF, keys=OpCodes.OFF)
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
"""
|
"""
|
||||||
import struct
|
import struct
|
||||||
|
|
||||||
from tmtccmd.config import TmTcDefWrapper, OpCodeEntry
|
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||||
|
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||||
from tmtccmd.tc import DefaultPusQueueHelper
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.tc.pus_3_fsfw_hk import (
|
from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||||
generate_one_hk_command,
|
generate_one_hk_command,
|
||||||
@ -75,7 +76,8 @@ class RampTime:
|
|||||||
MS_1000 = 1000
|
MS_1000 = 1000
|
||||||
|
|
||||||
|
|
||||||
def add_rw_cmds(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def add_rw_cmds(defs: TmtcDefinitionWrapper):
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
oce.add(info=InfoDevs.SPEED, keys=OpCodesDevs.SPEED)
|
oce.add(info=InfoDevs.SPEED, keys=OpCodesDevs.SPEED)
|
||||||
oce.add(info=InfoDevs.ON, keys=OpCodesDevs.ON)
|
oce.add(info=InfoDevs.ON, keys=OpCodesDevs.ON)
|
||||||
|
@ -3,7 +3,8 @@ from typing import Optional
|
|||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
from pus_tc.devs.pdec_handler import CommandIds
|
from pus_tc.devs.pdec_handler import CommandIds
|
||||||
from spacepackets.ecss import PusTelecommand
|
from spacepackets.ecss import PusTelecommand
|
||||||
from tmtccmd.config import TmTcDefWrapper, OpCodeEntry
|
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||||
|
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||||
|
|
||||||
from tmtccmd.tc import DefaultPusQueueHelper
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.util import ObjectIdU32
|
from tmtccmd.util import ObjectIdU32
|
||||||
@ -45,7 +46,8 @@ class Info:
|
|||||||
WIRTE_CONFIG = "Write config"
|
WIRTE_CONFIG = "Write config"
|
||||||
|
|
||||||
|
|
||||||
def specify_rtd_cmds(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def specify_rtd_cmds(defs: TmtcDefinitionWrapper):
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
oce.add(keys=OpCodes.ON, info=Info.ON)
|
oce.add(keys=OpCodes.ON, info=Info.ON)
|
||||||
oce.add(keys=OpCodes.NORMAL, info=Info.NORMAL)
|
oce.add(keys=OpCodes.NORMAL, info=Info.NORMAL)
|
||||||
|
@ -2,9 +2,10 @@ import enum
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
|
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||||
from tmtccmd.tc import DefaultPusQueueHelper
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.tc.pus_8_funccmd import generate_action_command
|
from tmtccmd.tc.pus_8_funccmd import generate_action_command
|
||||||
from tmtccmd.config import OpCodeEntry, TmTcDefWrapper
|
from tmtccmd.config import OpCodeEntry, TmtcDefinitionWrapper
|
||||||
from config.object_ids import SCEX_HANDLER_ID
|
from config.object_ids import SCEX_HANDLER_ID
|
||||||
|
|
||||||
|
|
||||||
@ -44,7 +45,8 @@ class Info:
|
|||||||
FRAM = "Read FRAM"
|
FRAM = "Read FRAM"
|
||||||
|
|
||||||
|
|
||||||
def add_scex_cmds(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def add_scex_cmds(defs: TmtcDefinitionWrapper):
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
oce.add(keys=OpCodes.PING, info=Info.PING)
|
oce.add(keys=OpCodes.PING, info=Info.PING)
|
||||||
oce.add(keys=OpCodes.ION_CMD, info=Info.ION_CMD)
|
oce.add(keys=OpCodes.ION_CMD, info=Info.ION_CMD)
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
"""
|
"""
|
||||||
from typing import cast
|
from typing import cast
|
||||||
|
|
||||||
|
from pus_tc.devs.common_power import pack_power_commands
|
||||||
|
from pus_tc.devs.power import add_power_cmd_defs
|
||||||
from pus_tc.devs.rtd import pack_rtd_commands
|
from pus_tc.devs.rtd import pack_rtd_commands
|
||||||
from pus_tc.devs.scex import pack_scex_cmds
|
from pus_tc.devs.scex import pack_scex_cmds
|
||||||
from pus_tc.system.controllers import (
|
from pus_tc.system.controllers import (
|
||||||
@ -104,6 +106,8 @@ def handle_default_procedure(
|
|||||||
return pack_acu_commands(object_id=object_id, q=queue_helper, op_code=op_code)
|
return pack_acu_commands(object_id=object_id, q=queue_helper, op_code=op_code)
|
||||||
if service == CustomServiceList.BPX_BATTERY.value:
|
if service == CustomServiceList.BPX_BATTERY.value:
|
||||||
return pack_bpx_commands(q=queue_helper, op_code=op_code)
|
return pack_bpx_commands(q=queue_helper, op_code=op_code)
|
||||||
|
if service == CustomServiceList.TCS.value:
|
||||||
|
return pack_tcs_sys_commands(q=queue_helper, op_code=op_code)
|
||||||
if service == CustomServiceList.TMP1075_1.value:
|
if service == CustomServiceList.TMP1075_1.value:
|
||||||
object_id = cast(ObjectIdU32, obj_id_man.get(TMP_1075_1_HANDLER_ID))
|
object_id = cast(ObjectIdU32, obj_id_man.get(TMP_1075_1_HANDLER_ID))
|
||||||
return pack_tmp1075_test_into(
|
return pack_tmp1075_test_into(
|
||||||
@ -168,6 +172,8 @@ def handle_default_procedure(
|
|||||||
return pack_ploc_memory_dumper_cmd(
|
return pack_ploc_memory_dumper_cmd(
|
||||||
object_id=object_id, q=queue_helper, op_code=op_code
|
object_id=object_id, q=queue_helper, op_code=op_code
|
||||||
)
|
)
|
||||||
|
if service == CustomServiceList.POWER.value:
|
||||||
|
return pack_power_commands(queue_helper, op_code)
|
||||||
if service == CustomServiceList.ACS.value:
|
if service == CustomServiceList.ACS.value:
|
||||||
return pack_acs_command(q=queue_helper, op_code=op_code)
|
return pack_acs_command(q=queue_helper, op_code=op_code)
|
||||||
if service == CustomServiceList.GPS_CTRL.value:
|
if service == CustomServiceList.GPS_CTRL.value:
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
|
from typing import Union
|
||||||
|
|
||||||
from tmtccmd.tc import DefaultPusQueueHelper
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.tc.pus_200_fsfw_modes import Modes
|
from tmtccmd.tc.pus_200_fsfw_modes import Modes
|
||||||
from tmtccmd.util import ObjectIdU32
|
from tmtccmd.util import ObjectIdU32, ObjectIdBase
|
||||||
|
|
||||||
from .common import command_mode
|
from .common import command_mode
|
||||||
import config.object_ids as obj_ids
|
import config.object_ids as obj_ids
|
||||||
@ -43,7 +45,9 @@ def pack_cmd_ctrl_to_prompted_mode(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def pack_cmd_ctrl_to_off(q: DefaultPusQueueHelper, object_id: ObjectIdU32):
|
def pack_cmd_ctrl_to_off(
|
||||||
|
q: DefaultPusQueueHelper, object_id: Union[ObjectIdBase, ObjectIdU32]
|
||||||
|
):
|
||||||
command_mode(
|
command_mode(
|
||||||
object_id=object_id.as_bytes,
|
object_id=object_id.as_bytes,
|
||||||
mode=Modes.OFF,
|
mode=Modes.OFF,
|
||||||
@ -63,7 +67,9 @@ def pack_cmd_ctrl_to_on(q: DefaultPusQueueHelper, object_id: ObjectIdU32):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def pack_cmd_ctrl_to_nml(q: DefaultPusQueueHelper, object_id: ObjectIdU32):
|
def pack_cmd_ctrl_to_nml(
|
||||||
|
q: DefaultPusQueueHelper, object_id: Union[ObjectIdBase, ObjectIdU32]
|
||||||
|
):
|
||||||
command_mode(
|
command_mode(
|
||||||
object_id=object_id.as_bytes,
|
object_id=object_id.as_bytes,
|
||||||
mode=Modes.NORMAL,
|
mode=Modes.NORMAL,
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import enum
|
import enum
|
||||||
|
|
||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
from tmtccmd.config import TmTcDefWrapper
|
from tmtccmd.config import TmtcDefinitionWrapper
|
||||||
|
|
||||||
from tmtccmd.tc import DefaultPusQueueHelper
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.tc.pus_8_funccmd import generate_action_command
|
from tmtccmd.tc.pus_8_funccmd import generate_action_command
|
||||||
from tmtccmd.logging import get_console_logger
|
from tmtccmd.logging import get_console_logger
|
||||||
from tmtccmd.tc.pus_3_fsfw_hk import make_sid, generate_one_hk_command
|
from tmtccmd.tc.pus_3_fsfw_hk import make_sid, generate_one_hk_command
|
||||||
from tmtccmd.config.tmtc import OpCodeEntry
|
from tmtccmd.config.tmtc import OpCodeEntry, tmtc_definitions_provider
|
||||||
from config.object_ids import CORE_CONTROLLER_ID
|
from config.object_ids import CORE_CONTROLLER_ID
|
||||||
|
|
||||||
|
|
||||||
@ -67,7 +67,8 @@ class Copy(enum.IntEnum):
|
|||||||
NONE = 2
|
NONE = 2
|
||||||
|
|
||||||
|
|
||||||
def add_core_controller_definitions(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def add_core_controller_definitions(defs: TmtcDefinitionWrapper):
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
oce.add(keys=OpCodes.REBOOT_XSC, info=Info.REBOOT_XSC)
|
oce.add(keys=OpCodes.REBOOT_XSC, info=Info.REBOOT_XSC)
|
||||||
oce.add(keys=OpCodes.REBOOT_XSC, info=Info.REBOOT_XSC)
|
oce.add(keys=OpCodes.REBOOT_XSC, info=Info.REBOOT_XSC)
|
||||||
|
@ -7,7 +7,8 @@ from typing import List
|
|||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
from config.object_ids import get_object_ids
|
from config.object_ids import get_object_ids
|
||||||
from pus_tc.system.tcs import pack_tcs_sys_commands
|
from pus_tc.system.tcs import pack_tcs_sys_commands
|
||||||
from tmtccmd.config import TmTcDefWrapper, OpCodeEntry
|
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||||
|
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||||
|
|
||||||
from tmtccmd.tc import DefaultPusQueueHelper
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.tc.pus_11_tc_sched import (
|
from tmtccmd.tc.pus_11_tc_sched import (
|
||||||
@ -40,6 +41,7 @@ from pus_tc.devs.reaction_wheels import pack_rw_ass_cmds, pack_set_speed_command
|
|||||||
|
|
||||||
|
|
||||||
class OpCodes:
|
class OpCodes:
|
||||||
|
"""FT: Functional Test"""
|
||||||
TV_SETUP_TCS_FT_ON = ["s", "tcs-ft-on"]
|
TV_SETUP_TCS_FT_ON = ["s", "tcs-ft-on"]
|
||||||
RESET_SCHED = ["reset-sched", "rs"]
|
RESET_SCHED = ["reset-sched", "rs"]
|
||||||
HEATER = ["heater"]
|
HEATER = ["heater"]
|
||||||
@ -126,7 +128,8 @@ def generic_print(q: DefaultPusQueueHelper, info: dict):
|
|||||||
q.add_log_cmd(f"Executing {info[1]} Procedure (OpCodes: {info[0]})")
|
q.add_log_cmd(f"Executing {info[1]} Procedure (OpCodes: {info[0]})")
|
||||||
|
|
||||||
|
|
||||||
def add_proc_cmds(defs: TmTcDefWrapper):
|
@tmtc_definitions_provider
|
||||||
|
def add_proc_cmds(defs: TmtcDefinitionWrapper):
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
for proc_entry in PROC_INFO_DICT.values():
|
for proc_entry in PROC_INFO_DICT.values():
|
||||||
oce.add(keys=proc_entry[0], info=proc_entry[1])
|
oce.add(keys=proc_entry[0], info=proc_entry[1])
|
||||||
@ -707,6 +710,10 @@ def enable_listen_to_hk_for_x_seconds(
|
|||||||
)
|
)
|
||||||
for cmd in cmd_tuple:
|
for cmd in cmd_tuple:
|
||||||
q.add_pus_tc(cmd)
|
q.add_pus_tc(cmd)
|
||||||
|
generate_time_tagged_cmd(
|
||||||
|
struct.pack("!I", int(round(time.time() + interval_seconds))),
|
||||||
|
gen_disable_listen_to_hk_for_x_seconds(q, diag, device, sid)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def gen_disable_listen_to_hk_for_x_seconds(
|
def gen_disable_listen_to_hk_for_x_seconds(
|
||||||
|
@ -1,21 +1,66 @@
|
|||||||
|
import enum
|
||||||
|
|
||||||
|
from config.definitions import CustomServiceList
|
||||||
|
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||||
|
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||||
from tmtccmd.tc import DefaultPusQueueHelper
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.tc.pus_200_fsfw_modes import Modes
|
from tmtccmd.tc.pus_200_fsfw_modes import Modes
|
||||||
|
from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||||
|
make_sid,
|
||||||
|
generate_one_diag_command,
|
||||||
|
generate_one_hk_command,
|
||||||
|
)
|
||||||
|
|
||||||
from .common import command_mode
|
from .common import command_mode
|
||||||
from config.object_ids import TCS_BOARD_ASS_ID
|
from config.object_ids import TCS_BOARD_ASS_ID, TCS_CONTROLLER
|
||||||
|
|
||||||
|
|
||||||
class OpCodes:
|
class OpCodes:
|
||||||
TCS_BOARD_ASS_NORMAL = ["0", "tcs-normal"]
|
TCS_BOARD_ASS_NORMAL = ["0", "tcs-normal"]
|
||||||
TCS_BOARD_ASS_OFF = ["1", "tcs-off"]
|
TCS_BOARD_ASS_OFF = ["1", "tcs-off"]
|
||||||
|
REQUEST_SENSOR_TEMP_SET = ["2", "temp-hk"]
|
||||||
|
|
||||||
|
|
||||||
class Info:
|
class Info:
|
||||||
|
REQUEST_SENSOR_TEMP_SET = "Request HK set of primary sensor temperatures"
|
||||||
TCS_BOARD_ASS_NORMAL = "Switching TCS board assembly on"
|
TCS_BOARD_ASS_NORMAL = "Switching TCS board assembly on"
|
||||||
TCS_BOARD_ASS_OFF = "Switching TCS board assembly off"
|
TCS_BOARD_ASS_OFF = "Switching TCS board assembly off"
|
||||||
|
|
||||||
|
|
||||||
|
class SetIds(enum.IntEnum):
|
||||||
|
PRIMARY_SENSORS = 0
|
||||||
|
DEVICE_SENSORS = 1
|
||||||
|
SUS_TEMP_SENSORS = 2
|
||||||
|
|
||||||
|
|
||||||
|
@tmtc_definitions_provider
|
||||||
|
def add_tcs_cmds(defs: TmtcDefinitionWrapper):
|
||||||
|
oce = OpCodeEntry()
|
||||||
|
oce.add(
|
||||||
|
keys=OpCodes.TCS_BOARD_ASS_NORMAL,
|
||||||
|
info=Info.TCS_BOARD_ASS_NORMAL,
|
||||||
|
)
|
||||||
|
oce.add(
|
||||||
|
keys=OpCodes.TCS_BOARD_ASS_OFF,
|
||||||
|
info=Info.TCS_BOARD_ASS_OFF,
|
||||||
|
)
|
||||||
|
oce.add(keys=OpCodes.REQUEST_SENSOR_TEMP_SET, info=Info.REQUEST_SENSOR_TEMP_SET)
|
||||||
|
defs.add_service(
|
||||||
|
name=CustomServiceList.TCS.value,
|
||||||
|
info="TCS Board Assembly",
|
||||||
|
op_code_entry=oce,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def pack_tcs_sys_commands(q: DefaultPusQueueHelper, op_code: str):
|
def pack_tcs_sys_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||||
|
if op_code in OpCodes.REQUEST_SENSOR_TEMP_SET:
|
||||||
|
sensor_set_sid = make_sid(TCS_CONTROLLER, SetIds.PRIMARY_SENSORS)
|
||||||
|
q.add_log_cmd(Info.REQUEST_SENSOR_TEMP_SET)
|
||||||
|
q.add_pus_tc(generate_one_hk_command(sensor_set_sid))
|
||||||
|
pack_tcs_ass_cmds(q, op_code)
|
||||||
|
|
||||||
|
|
||||||
|
def pack_tcs_ass_cmds(q: DefaultPusQueueHelper, op_code: str):
|
||||||
if op_code in OpCodes.TCS_BOARD_ASS_NORMAL:
|
if op_code in OpCodes.TCS_BOARD_ASS_NORMAL:
|
||||||
command_mode(
|
command_mode(
|
||||||
object_id=TCS_BOARD_ASS_ID,
|
object_id=TCS_BOARD_ASS_ID,
|
||||||
|
@ -21,14 +21,13 @@ from pus_tm.devs.imtq_mgt import (
|
|||||||
handle_calibrated_mtm_measurement,
|
handle_calibrated_mtm_measurement,
|
||||||
handle_raw_mtm_measurement,
|
handle_raw_mtm_measurement,
|
||||||
)
|
)
|
||||||
from pus_tm.devs.pcdu import handle_pdu_data, handle_p60_hk_data, handle_acu_hk_data
|
from pus_tm.system.power import handle_pdu_data, handle_p60_hk_data, handle_acu_hk_data
|
||||||
from pus_tm.devs.syrlinks import handle_syrlinks_hk_data
|
from pus_tm.devs.syrlinks import handle_syrlinks_hk_data
|
||||||
from pus_tc.devs.imtq import ImtqSetIds
|
from pus_tc.devs.imtq import ImtqSetIds
|
||||||
from pus_tm.devs.reaction_wheels import handle_rw_hk_data
|
from pus_tm.devs.reaction_wheels import handle_rw_hk_data
|
||||||
from pus_tm.defs import FsfwTmTcPrinter
|
from pus_tm.defs import FsfwTmTcPrinter
|
||||||
from pus_tm.system.core import handle_core_hk_data
|
from pus_tm.system.core import handle_core_hk_data
|
||||||
from pus_tm.devs.mgms import handle_mgm_hk_data
|
from pus_tm.devs.mgms import handle_mgm_hk_data
|
||||||
from pus_tm.tcp_server_objects import tcp_server_sensor_temperatures
|
|
||||||
import config.object_ids as obj_ids
|
import config.object_ids as obj_ids
|
||||||
|
|
||||||
|
|
||||||
@ -46,9 +45,9 @@ def handle_hk_packet(
|
|||||||
named_obj_id = tm_packet.object_id
|
named_obj_id = tm_packet.object_id
|
||||||
if tm_packet.subservice == 25 or tm_packet.subservice == 26:
|
if tm_packet.subservice == 25 or tm_packet.subservice == 26:
|
||||||
hk_data = tm_packet.tm_data[8:]
|
hk_data = tm_packet.tm_data[8:]
|
||||||
tcp_server_sensor_temperatures.report_raw_hk_data(
|
# tcp_server_sensor_temperatures.report_raw_hk_data(
|
||||||
object_id=named_obj_id, set_id=tm_packet.set_id, hk_data=hk_data
|
# object_id=named_obj_id, set_id=tm_packet.set_id, hk_data=hk_data
|
||||||
)
|
# )
|
||||||
printer.generic_hk_tm_print(
|
printer.generic_hk_tm_print(
|
||||||
content_type=HkContentType.HK,
|
content_type=HkContentType.HK,
|
||||||
object_id=named_obj_id,
|
object_id=named_obj_id,
|
||||||
|
7
tmtcc.py
7
tmtcc.py
@ -217,9 +217,12 @@ def main():
|
|||||||
LOGGER.info("TMTC Client in IDLE mode")
|
LOGGER.info("TMTC Client in IDLE mode")
|
||||||
time.sleep(3.0)
|
time.sleep(3.0)
|
||||||
elif state.request == BackendRequest.DELAY_LISTENER:
|
elif state.request == BackendRequest.DELAY_LISTENER:
|
||||||
time.sleep(0.8)
|
time.sleep(0.5)
|
||||||
elif state.request == BackendRequest.DELAY_CUSTOM:
|
elif state.request == BackendRequest.DELAY_CUSTOM:
|
||||||
time.sleep(state.next_delay.total_seconds())
|
if state.next_delay.total_seconds() < 0.5:
|
||||||
|
time.sleep(state.next_delay.total_seconds())
|
||||||
|
else:
|
||||||
|
time.sleep(0.5)
|
||||||
elif state.request == BackendRequest.CALL_NEXT:
|
elif state.request == BackendRequest.CALL_NEXT:
|
||||||
pass
|
pass
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
|
Loading…
Reference in New Issue
Block a user