Compare commits
20 Commits
9005ccab3a
...
1af59ea7a5
Author | SHA1 | Date | |
---|---|---|---|
1af59ea7a5 | |||
![]() |
cf61dfac0d | ||
![]() |
92e43418c2 | ||
![]() |
091bf8fbc0 | ||
07b76dc39c | |||
e29ef29328 | |||
85ccf4082c | |||
36b53098c0 | |||
6e14e1b268 | |||
![]() |
d188b10f64 | ||
![]() |
20fc1ab392 | ||
![]() |
2251c8cbf4 | ||
60e938a896 | |||
fd0afdbd4d | |||
7898dc2c16 | |||
3f1ee29d1f | |||
b6360b9c5c | |||
ce26794812 | |||
![]() |
eedb45e4f3 | ||
![]() |
de68ad9341 |
2
.idea/runConfigurations/Heater_Test.xml
generated
2
.idea/runConfigurations/Heater_Test.xml
generated
@@ -13,7 +13,7 @@
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
||||
<option name="PARAMETERS" value="-m 3 -c 2 -s HEATER -l" />
|
||||
<option name="PARAMETERS" value="-s heater -o 0 -l" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="true" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="PLOC Test UDP Flatsat" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<configuration default="false" name="PLOC MPSoC" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
@@ -13,7 +13,7 @@
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
||||
<option name="PARAMETERS" value="-m 1 -c 2 -s PLOC -l" />
|
||||
<option name="PARAMETERS" value="-s ploc_mpsoc -l -t 6" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="true" />
|
||||
<option name="MODULE_MODE" value="false" />
|
4
.idea/runConfigurations/PLOC_SUPV_Test.xml
generated
4
.idea/runConfigurations/PLOC_SUPV_Test.xml
generated
@@ -13,9 +13,9 @@
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
||||
<option name="PARAMETERS" value="-s ploc_supv -l -t 6 --hk" />
|
||||
<option name="PARAMETERS" value="-s ploc_supv -l -t 6" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="true" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
<option name="REDIRECT_INPUT" value="false" />
|
||||
<option name="INPUT_FILE" value="" />
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="PLOC Test UDP Local" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<configuration default="false" name="S/A Deployment Test" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
@@ -13,7 +13,7 @@
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
||||
<option name="PARAMETERS" value="-m 1 -c 2 -s PLOC -l" />
|
||||
<option name="PARAMETERS" value="-s sa_depl -o 0 -l" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="true" />
|
||||
<option name="MODULE_MODE" value="false" />
|
24
.idea/runConfigurations/S_A_Deployment_Test_UDP.xml
generated
24
.idea/runConfigurations/S_A_Deployment_Test_UDP.xml
generated
@@ -1,24 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="S/A Deployment Test UDP" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<envs>
|
||||
<env name="PYTHONUNBUFFERED" value="1" />
|
||||
</envs>
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<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="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
||||
<option name="PARAMETERS" value="-m 3 -c 2 -s SA_DEPL -l" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="true" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
<option name="REDIRECT_INPUT" value="false" />
|
||||
<option name="INPUT_FILE" value="" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
@@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient CLI" type="PythonConfigurationType" factoryName="Python">
|
||||
<configuration default="false" name="tmtccli" type="PythonConfigurationType" factoryName="Python">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
@@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient GUI" type="PythonConfigurationType" factoryName="Python">
|
||||
<configuration default="false" name="tmtcgui" type="PythonConfigurationType" factoryName="Python">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
@@ -22,7 +22,8 @@ class CustomServiceList(enum.Enum):
|
||||
TMP1075_2 = "tmp1075_2"
|
||||
HEATER = "heater"
|
||||
IMTQ = "imtq"
|
||||
PLOC = "ploc"
|
||||
PLOC_SUPV = "ploc_supv"
|
||||
PLOC_MPSOC = "ploc_mpsoc"
|
||||
PCDU = "pcdu"
|
||||
PL_PCDU = "plpcdu"
|
||||
SA_DEPLYOMENT = "sa_depl"
|
||||
@@ -31,7 +32,6 @@ class CustomServiceList(enum.Enum):
|
||||
REACTION_WHEEL_3 = "reaction_wheel_3"
|
||||
REACTION_WHEEL_4 = "reaction_wheel_4"
|
||||
RAD_SENSOR = "rad_sensor"
|
||||
PLOC_SUPV = "ploc_supv"
|
||||
PLOC_UPDATER = "ploc_updater"
|
||||
GPS_0 = "gps0"
|
||||
GPS_1 = "gps1"
|
||||
|
@@ -124,7 +124,8 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
|
||||
add_imtq_cmds,
|
||||
add_rw_cmds,
|
||||
add_rad_sens_cmds,
|
||||
add_ploc_cmds,
|
||||
add_ploc_mpsoc_cmds,
|
||||
add_ploc_supv_cmds,
|
||||
add_system_cmds,
|
||||
)
|
||||
from pus_tc.devs.gps import GpsOpCodes
|
||||
@@ -136,7 +137,8 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
|
||||
add_imtq_cmds(cmd_dict=service_op_code_dict)
|
||||
add_rad_sens_cmds(cmd_dict=service_op_code_dict)
|
||||
add_rw_cmds(cmd_dict=service_op_code_dict)
|
||||
add_ploc_cmds(cmd_dict=service_op_code_dict)
|
||||
add_ploc_mpsoc_cmds(cmd_dict=service_op_code_dict)
|
||||
add_ploc_supv_cmds(cmd_dict=service_op_code_dict)
|
||||
add_system_cmds(cmd_dict=service_op_code_dict)
|
||||
|
||||
op_code_dict = {
|
||||
|
@@ -15,7 +15,7 @@ __OBJECT_ID_DICT = None
|
||||
|
||||
# Core Object IDs
|
||||
CORE_CONTROLLER_ID = bytes([0x43, 0x00, 0x00, 0x03])
|
||||
SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x41, 0x10, 0xA2])
|
||||
SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x41, 0x00, 0xA2])
|
||||
|
||||
# Power Object IDs
|
||||
PCDU_HANDLER_ID = bytes([0x44, 0x20, 0x00, 0xA1])
|
||||
@@ -70,11 +70,6 @@ PL_PCDU_ID = bytes([0x44, 0x30, 0x00, 0x00])
|
||||
ACS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x01])
|
||||
|
||||
|
||||
class ObjectInfo:
|
||||
id: int = 0
|
||||
name: str = ""
|
||||
|
||||
|
||||
def get_object_ids() -> ObjectIdDictT:
|
||||
global __OBJECT_ID_DICT
|
||||
if not os.path.exists(DEFAULT_OBJECTS_CSV_PATH):
|
||||
|
@@ -43,6 +43,7 @@
|
||||
0x44330003;PLOC_MPSOC_HELPER
|
||||
0x44330015;PLOC_MPSOC_HANDLER
|
||||
0x44330016;PLOC_SUPERVISOR_HANDLER
|
||||
0x44330017;PLOC_SUPERVISOR_HELPER
|
||||
0x444100A2;SOLAR_ARRAY_DEPL_HANDLER
|
||||
0x444100A4;HEATER_HANDLER
|
||||
0x44420004;TMP1075_HANDLER_1
|
||||
|
|
@@ -444,36 +444,6 @@
|
||||
0x1f07; CSB_InvalidReply;;7;fsfw\src\fsfw\tmtcservices\CommandingServiceBase.h;COMMAND_SERVICE_BASE
|
||||
0x4a00; SPPA_NoPacketFound;;0x00;fsfw\src\fsfw\tmtcservices\SpacePacketParser.h;SPACE_PACKET_PARSER
|
||||
0x4a01; SPPA_SplitPacket;;0x01;fsfw\src\fsfw\tmtcservices\SpacePacketParser.h;SPACE_PACKET_PARSER
|
||||
0x58c0;MPCMD_InvalidLength;Received command with invalid length;0xC0;bsp_q7s\devices\devicedefinitions\PlocMPSoCDefinitions.h;MPSOC_CMD
|
||||
0x58a0;MPCMD_CrcFailure;CRC check of received packet failed;0xA0;bsp_q7s\devices\devicedefinitions\PlocMPSoCDefinitions.h;MPSOC_CMD
|
||||
0x61a0;PLMEMDUMP_MramAddressTooHigh;The capacity of the MRAM amounts to 512 kB. Thus the maximum address must not be higher than 0x7d000.;0xA0;bsp_q7s\devices\ploc\PlocMemoryDumper.h;PLOC_MEMORY_DUMPER
|
||||
0x61a1;PLMEMDUMP_MramInvalidAddressCombination;The specified end address is lower than the start address;0xA1;bsp_q7s\devices\ploc\PlocMemoryDumper.h;PLOC_MEMORY_DUMPER
|
||||
0x57a0;PLMP_CrcFailure;Space Packet received from PLOC has invalid CRC;0xA0;bsp_q7s\devices\ploc\PlocMPSoCHandler.h;PLOC_MPSOC_HANDLER
|
||||
0x57a1;PLMP_ReceivedAckFailure;Received ACK failure reply from PLOC;0xA1;bsp_q7s\devices\ploc\PlocMPSoCHandler.h;PLOC_MPSOC_HANDLER
|
||||
0x57a2;PLMP_ReceivedExeFailure;Received execution failure reply from PLOC;0xA2;bsp_q7s\devices\ploc\PlocMPSoCHandler.h;PLOC_MPSOC_HANDLER
|
||||
0x57a3;PLMP_InvalidApid;Received space packet with invalid APID from PLOC;0xA3;bsp_q7s\devices\ploc\PlocMPSoCHandler.h;PLOC_MPSOC_HANDLER
|
||||
0x57a4;PLMP_InvalidLength;Received command with invalid length;0xA4;bsp_q7s\devices\ploc\PlocMPSoCHandler.h;PLOC_MPSOC_HANDLER
|
||||
0x57a5;PLMP_FilenameTooLong;Received command with invalid filename;0xA5;bsp_q7s\devices\ploc\PlocMPSoCHandler.h;PLOC_MPSOC_HANDLER
|
||||
0x57a6;PLMP_MpsocHelperExecuting;MPSoC helper is currently executing a command;0xA6;bsp_q7s\devices\ploc\PlocMPSoCHandler.h;PLOC_MPSOC_HANDLER
|
||||
0x5aa0;PLSV_CrcFailure;Space Packet received from PLOC supervisor has invalid CRC;0xA0;bsp_q7s\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aa1;PLSV_ReceivedAckFailure;Received ACK failure reply from PLOC supervisor;0xA1;bsp_q7s\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aa2;PLSV_ReceivedExeFailure;Received execution failure reply from PLOC supervisor;0xA2;bsp_q7s\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aa3;PLSV_InvalidApid;Received space packet with invalid APID from PLOC supervisor;0xA3;bsp_q7s\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aa4;PLSV_GetTimeFailure;Failed to read current system time;0xA4;bsp_q7s\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aa5;PLSV_InvalidWatchdog;Received command with invalid watchdog parameter. Valid watchdogs are 0 for PS, 1 for PL and 2 for INT;0xA5;bsp_q7s\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aa6;PLSV_InvalidWatchdogTimeout;Received watchdog timeout config command with invalid timeout. Valid timeouts must be in the range between 1000 and 360000 ms.;0xA6;bsp_q7s\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aa7;PLSV_InvalidLatchupId;Received latchup config command with invalid latchup ID;0xA7;bsp_q7s\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aa8;PLSV_SweepPeriodTooSmall;Received set adc sweep period command with invalid sweep period. Must be larger than 21.;0xA8;bsp_q7s\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aa9;PLSV_InvalidTestParam;Receive auto EM test command with invalid test param. Valid params are 1 and 2.;0xA9;bsp_q7s\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aaa;PLSV_MramPacketParsingFailure;Returned when scanning for MRAM dump packets failed.;0xAA;bsp_q7s\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aab;PLSV_InvalidMramAddresses;Returned when the start and stop addresses of the MRAM dump or MRAM wipe commands are invalid (e.g. start address bigger than stop address);0xAB;bsp_q7s\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aac;PLSV_NoMramPacket;Expect reception of an MRAM dump packet but received space packet with other apid.;0xAC;bsp_q7s\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aad;PLSV_PathDoesNotExist;Path to PLOC directory on SD card does not exist;0xAD;bsp_q7s\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aae;PLSV_MramFileNotExists;MRAM dump file does not exists. The file should actually already have been created with the reception of the first dump packet.;0xAE;bsp_q7s\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5ea0;PLUD_UpdaterBusy;Updater is already performing an update;0xA0;bsp_q7s\devices\ploc\PlocUpdater.h;PLOC_UPDATER
|
||||
0x5ea1;PLUD_NameTooLong;Received update command with invalid path string (too long).;0xA1;bsp_q7s\devices\ploc\PlocUpdater.h;PLOC_UPDATER
|
||||
0x5ea2;PLUD_SdNotMounted;Received command to initiate update but SD card with update image not mounted.;0xA2;bsp_q7s\devices\ploc\PlocUpdater.h;PLOC_UPDATER
|
||||
0x5ea3;PLUD_FileNotExists;Update file received with update command does not exist.;0xA3;bsp_q7s\devices\ploc\PlocUpdater.h;PLOC_UPDATER
|
||||
0x67a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;0xA0;bsp_q7s\memory\FilesystemHelper.h;FILE_SYSTEM_HELPER
|
||||
0x67a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;0xA1;bsp_q7s\memory\FilesystemHelper.h;FILE_SYSTEM_HELPER
|
||||
0x7100; SCBU_KeyNotFound;;0;bsp_q7s\memory\scratchApi.h;SCRATCH_BUFFER
|
||||
@@ -487,6 +457,36 @@
|
||||
0x700d; SDMA_UnmountError;;13;bsp_q7s\memory\SdCardManager.h;SD_CARD_MANAGER
|
||||
0x700e; SDMA_SystemCallError;;14;bsp_q7s\memory\SdCardManager.h;SD_CARD_MANAGER
|
||||
0x700f; SDMA_PopenCallError;;15;bsp_q7s\memory\SdCardManager.h;SD_CARD_MANAGER
|
||||
0x58c0;MPCMD_InvalidLength;Received command with invalid length;0xC0;linux\devices\devicedefinitions\PlocMPSoCDefinitions.h;MPSOC_CMD
|
||||
0x58a0;MPCMD_CrcFailure;CRC check of received packet failed;0xA0;linux\devices\devicedefinitions\PlocMPSoCDefinitions.h;MPSOC_CMD
|
||||
0x61a0;PLMEMDUMP_MramAddressTooHigh;The capacity of the MRAM amounts to 512 kB. Thus the maximum address must not be higher than 0x7d000.;0xA0;linux\devices\ploc\PlocMemoryDumper.h;PLOC_MEMORY_DUMPER
|
||||
0x61a1;PLMEMDUMP_MramInvalidAddressCombination;The specified end address is lower than the start address;0xA1;linux\devices\ploc\PlocMemoryDumper.h;PLOC_MEMORY_DUMPER
|
||||
0x57a0;PLMP_CrcFailure;Space Packet received from PLOC has invalid CRC;0xA0;linux\devices\ploc\PlocMPSoCHandler.h;PLOC_MPSOC_HANDLER
|
||||
0x57a1;PLMP_ReceivedAckFailure;Received ACK failure reply from PLOC;0xA1;linux\devices\ploc\PlocMPSoCHandler.h;PLOC_MPSOC_HANDLER
|
||||
0x57a2;PLMP_ReceivedExeFailure;Received execution failure reply from PLOC;0xA2;linux\devices\ploc\PlocMPSoCHandler.h;PLOC_MPSOC_HANDLER
|
||||
0x57a3;PLMP_InvalidApid;Received space packet with invalid APID from PLOC;0xA3;linux\devices\ploc\PlocMPSoCHandler.h;PLOC_MPSOC_HANDLER
|
||||
0x57a4;PLMP_InvalidLength;Received command with invalid length;0xA4;linux\devices\ploc\PlocMPSoCHandler.h;PLOC_MPSOC_HANDLER
|
||||
0x57a5;PLMP_FilenameTooLong;Received command with invalid filename;0xA5;linux\devices\ploc\PlocMPSoCHandler.h;PLOC_MPSOC_HANDLER
|
||||
0x57a6;PLMP_MpsocHelperExecuting;MPSoC helper is currently executing a command;0xA6;linux\devices\ploc\PlocMPSoCHandler.h;PLOC_MPSOC_HANDLER
|
||||
0x5aa0;PLSV_CrcFailure;Space Packet received from PLOC supervisor has invalid CRC;0xA0;linux\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aa1;PLSV_ReceivedAckFailure;Received ACK failure reply from PLOC supervisor;0xA1;linux\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aa2;PLSV_ReceivedExeFailure;Received execution failure reply from PLOC supervisor;0xA2;linux\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aa3;PLSV_InvalidApid;Received space packet with invalid APID from PLOC supervisor;0xA3;linux\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aa4;PLSV_GetTimeFailure;Failed to read current system time;0xA4;linux\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aa5;PLSV_InvalidWatchdog;Received command with invalid watchdog parameter. Valid watchdogs are 0 for PS, 1 for PL and 2 for INT;0xA5;linux\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aa6;PLSV_InvalidWatchdogTimeout;Received watchdog timeout config command with invalid timeout. Valid timeouts must be in the range between 1000 and 360000 ms.;0xA6;linux\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aa7;PLSV_InvalidLatchupId;Received latchup config command with invalid latchup ID;0xA7;linux\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aa8;PLSV_SweepPeriodTooSmall;Received set adc sweep period command with invalid sweep period. Must be larger than 21.;0xA8;linux\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aa9;PLSV_InvalidTestParam;Receive auto EM test command with invalid test param. Valid params are 1 and 2.;0xA9;linux\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aaa;PLSV_MramPacketParsingFailure;Returned when scanning for MRAM dump packets failed.;0xAA;linux\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aab;PLSV_InvalidMramAddresses;Returned when the start and stop addresses of the MRAM dump or MRAM wipe commands are invalid (e.g. start address bigger than stop address);0xAB;linux\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aac;PLSV_NoMramPacket;Expect reception of an MRAM dump packet but received space packet with other apid.;0xAC;linux\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aad;PLSV_PathDoesNotExist;Path to PLOC directory on SD card does not exist;0xAD;linux\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5aae;PLSV_MramFileNotExists;MRAM dump file does not exists. The file should actually already have been created with the reception of the first dump packet.;0xAE;linux\devices\ploc\PlocSupervisorHandler.h;PLOC_SUPERVISOR_HANDLER
|
||||
0x5ea0;PLUD_UpdaterBusy;Updater is already performing an update;0xA0;linux\devices\ploc\PlocUpdater.h;PLOC_UPDATER
|
||||
0x5ea1;PLUD_NameTooLong;Received update command with invalid path string (too long).;0xA1;linux\devices\ploc\PlocUpdater.h;PLOC_UPDATER
|
||||
0x5ea2;PLUD_SdNotMounted;Received command to initiate update but SD card with update image not mounted.;0xA2;linux\devices\ploc\PlocUpdater.h;PLOC_UPDATER
|
||||
0x5ea3;PLUD_FileNotExists;Update file received with update command does not exist.;0xA3;linux\devices\ploc\PlocUpdater.h;PLOC_UPDATER
|
||||
0x56a0;STRH_TemperatureReqFailed;Status in temperature reply signals error;0xA0;linux\devices\startracker\StarTrackerHandler.h;STR_HANDLER
|
||||
0x56a1;STRH_PingFailed;Ping command failed;0xA1;linux\devices\startracker\StarTrackerHandler.h;STR_HANDLER
|
||||
0x56a2;STRH_VersionReqFailed;Status in version reply signals error;0xA2;linux\devices\startracker\StarTrackerHandler.h;STR_HANDLER
|
||||
|
Can't render this file because it has a wrong number of fields in line 29.
|
@@ -20,10 +20,21 @@ class GomspaceDeviceActionIds(enum.IntEnum):
|
||||
WDT_RESET = 9
|
||||
REQUEST_HK_TABLE = 16
|
||||
PRINT_SWITCH_V_I = 32
|
||||
PRINT_LATCHUPS = 33
|
||||
|
||||
|
||||
class GomspaceOpCodes(enum.Enum):
|
||||
PRINT_SWITCH_V_I = "32"
|
||||
# Request HK
|
||||
REQUEST_HK_ONCE = "128"
|
||||
PRINT_SWITCH_V_I = "129"
|
||||
PRINT_LATCHUPS = "130"
|
||||
|
||||
|
||||
class SetIds:
|
||||
PDU_1 = 0x01
|
||||
PDU_2 = 0x02
|
||||
P60_DOCK = 0x03
|
||||
ACU = 0x04
|
||||
|
||||
|
||||
class TableIds:
|
||||
|
@@ -187,11 +187,21 @@ def add_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
keys=P60OpCodes.STACK_5V_OFF.value,
|
||||
info="P60 Dock: Turn stack 5V off",
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=GomspaceOpCodes.REQUEST_HK_ONCE.value,
|
||||
info="P60 Dock: Request HK once",
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=GomspaceOpCodes.PRINT_SWITCH_V_I.value,
|
||||
info="P60 Dock: Print Switches, Voltages, Currents",
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=GomspaceOpCodes.PRINT_LATCHUPS.value,
|
||||
info="P60 Dock: Print Latchups",
|
||||
)
|
||||
add_service_op_code_entry(
|
||||
srv_op_code_dict=cmd_dict,
|
||||
name=CustomServiceList.P60DOCK.value,
|
||||
@@ -200,7 +210,6 @@ def add_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
)
|
||||
|
||||
op_code_dict = dict()
|
||||
add_op_code_entry(op_code_dict=op_code_dict, keys="0", info="PDU1 Tests")
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=Pdu1OpCodes.TCS_BOARD_ON.value,
|
||||
@@ -259,7 +268,17 @@ def add_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=Pdu1OpCodes.MGT_OFF.value,
|
||||
info="PDU1: Turn MGT on",
|
||||
info="PDU1: Turn MGT off",
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=Pdu1OpCodes.PLOC_ON.value,
|
||||
info="PDU1: Turn PLOC on",
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=Pdu1OpCodes.PLOC_OFF.value,
|
||||
info="PDU1: Turn PLOC off",
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
@@ -271,11 +290,24 @@ def add_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
keys=Pdu1OpCodes.SCEX_OFF.value,
|
||||
info="PDU1: Turn Solar Cell Experiment off",
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=GomspaceOpCodes.REQUEST_HK_ONCE.value,
|
||||
info="PDU1: Request HK once",
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=GomspaceOpCodes.PRINT_SWITCH_V_I.value,
|
||||
info="PDU1: Print Switches, Voltages, Currents",
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=GomspaceOpCodes.PRINT_LATCHUPS.value,
|
||||
info="PDU1: Print Latchups",
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict, keys=Pdu1OpCodes.TESTS.value, info="PDU1 Tests"
|
||||
)
|
||||
add_service_op_code_entry(
|
||||
srv_op_code_dict=cmd_dict,
|
||||
name=CustomServiceList.PDU1.value,
|
||||
@@ -284,53 +316,81 @@ def add_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
)
|
||||
|
||||
op_code_dict = dict()
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys="0",
|
||||
info="PDU2 Tests",
|
||||
options={OpCodeDictKeys.TIMEOUT: 2.0},
|
||||
)
|
||||
add_op_code_entry(op_code_dict=op_code_dict, keys="0", info="PDU2 Tests")
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=Pdu2OpCodes.ACS_SIDE_B_ON.value,
|
||||
info="PDU2: Turn ACS Side B on",
|
||||
options={OpCodeDictKeys.TIMEOUT: 2.0},
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=Pdu2OpCodes.ACS_SIDE_B_OFF.value,
|
||||
info="PDU2: Turn ACS Side B off",
|
||||
options={OpCodeDictKeys.TIMEOUT: 2.0},
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=Pdu2OpCodes.SUS_REDUNDANT_ON.value,
|
||||
info="PDU2: Turn SUS redundant on",
|
||||
options={OpCodeDictKeys.TIMEOUT: 2.0},
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=Pdu2OpCodes.SUS_REDUNDANT_OFF.value,
|
||||
info="PDU2: Turn SUS redundant off",
|
||||
options={OpCodeDictKeys.TIMEOUT: 2.0},
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=Pdu2OpCodes.RW_ON.value,
|
||||
info="PDU2: Turn reaction wheels on",
|
||||
options={OpCodeDictKeys.TIMEOUT: 2.0},
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=Pdu2OpCodes.RW_OFF.value,
|
||||
info="PDU2: Turn reaction wheels off",
|
||||
options={OpCodeDictKeys.TIMEOUT: 2.0},
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=Pdu2OpCodes.Q7S_OFF.value,
|
||||
info="Q7S Off",
|
||||
options={OpCodeDictKeys.TIMEOUT: 2.0},
|
||||
keys=Pdu2OpCodes.PL_PCDU_VBAT_NOM_ON.value,
|
||||
info="PDU2: PL PCDU Switch Channel Nominal (1) on",
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=Pdu2OpCodes.PL_PCDU_VBAT_NOM_OFF.value,
|
||||
info="PDU2: PL PCDU Switch Channel Nominal (1) off",
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=Pdu2OpCodes.PL_PCDU_VBAT_RED_ON.value,
|
||||
info="PDU2: PL PCDU Switch Channel Redundant (1) on",
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=Pdu2OpCodes.PL_PCDU_VBAT_RED_OFF.value,
|
||||
info="PDU2: PL PCDU Switch Channel Redundant (1) off",
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=Pdu2OpCodes.TCS_HEATER_IN_ON.value,
|
||||
info="PDU2: Switch TCS Heater Input on",
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=Pdu2OpCodes.TCS_HEATER_IN_OFF.value,
|
||||
info="PDU2: Switch TCS Heater Input off",
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=Pdu2OpCodes.SOLAR_ARRAY_DEPL_ON.value,
|
||||
info="PDU2: Switch Solar Array Deployment On",
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=Pdu2OpCodes.SOLAR_ARRAY_DEPL_OFF.value,
|
||||
info="PDU2: Switch Solar Array Deployment Off",
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=GomspaceOpCodes.REQUEST_HK_ONCE.value,
|
||||
info="PDU2: Request HK once",
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
@@ -338,7 +398,11 @@ def add_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
info="PDU2: Print Switches, Voltages, Currents",
|
||||
options={OpCodeDictKeys.TIMEOUT: 2.0},
|
||||
)
|
||||
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=GomspaceOpCodes.PRINT_LATCHUPS.value,
|
||||
info="PDU2: Print Latchups",
|
||||
)
|
||||
add_service_op_code_entry(
|
||||
srv_op_code_dict=cmd_dict,
|
||||
name="pdu2",
|
||||
@@ -392,7 +456,17 @@ def add_rad_sens_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
cmd_dict[CustomServiceList.RAD_SENSOR.value] = service_rad_sensor_tuple
|
||||
|
||||
|
||||
def add_ploc_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
def add_ploc_mpsoc_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
op_code_dict_srv_ploc_mpsoc = {
|
||||
"0": ("Ploc MPSoC: Memory write", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"1": ("Ploc MPSoC: Memory read", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"2": ("Ploc MPSoC: Flash write", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
}
|
||||
service_ploc_mpsoc_tuple = ("Ploc MPSoC", op_code_dict_srv_ploc_mpsoc)
|
||||
cmd_dict[CustomServiceList.PLOC_MPSOC.value] = service_ploc_mpsoc_tuple
|
||||
|
||||
|
||||
def add_ploc_supv_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
op_code_dict_ploc_mem_dumper = {
|
||||
"0": ("PLOC Memory Dumper: MRAM dump", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
}
|
||||
@@ -520,49 +594,52 @@ def add_ploc_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
|
||||
def add_system_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
from pus_tc.system.acs import AcsOpCodes
|
||||
default_opts = generate_op_code_options(enter_listener_mode=False, custom_timeout=8.0)
|
||||
|
||||
default_opts = generate_op_code_options(
|
||||
enter_listener_mode=False, custom_timeout=8.0
|
||||
)
|
||||
op_code_dict = dict()
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=AcsOpCodes.ACS_ASS_A_SIDE,
|
||||
info="Switch to ACS board A side",
|
||||
options=default_opts
|
||||
options=default_opts,
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=AcsOpCodes.ACS_ASS_B_SIDE,
|
||||
info="Switch to ACS board B side",
|
||||
options=default_opts
|
||||
options=default_opts,
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=AcsOpCodes.ACS_ASS_DUAL_MODE,
|
||||
info="Switch to ACS board dual mode",
|
||||
options=default_opts
|
||||
options=default_opts,
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=AcsOpCodes.ACS_ASS_A_ON,
|
||||
info="Switch ACS board A side on",
|
||||
options=default_opts
|
||||
options=default_opts,
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=AcsOpCodes.ACS_ASS_B_ON,
|
||||
info="Switch ACS board B side on",
|
||||
options=default_opts
|
||||
options=default_opts,
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=AcsOpCodes.ACS_ASS_DUAL_ON,
|
||||
info="Switch ACS board dual mode on",
|
||||
options=default_opts
|
||||
options=default_opts,
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
keys=AcsOpCodes.ACS_ASS_OFF,
|
||||
info="Switch off ACS board",
|
||||
options=default_opts
|
||||
options=default_opts,
|
||||
)
|
||||
add_service_op_code_entry(
|
||||
srv_op_code_dict=cmd_dict,
|
||||
|
@@ -29,8 +29,8 @@ class ActionIds:
|
||||
def pack_heater_test_into(object_id: bytearray, tc_queue: TcQueueT):
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Testing Heater Switching"))
|
||||
|
||||
heater_number = int(input("Type number of heater to switch: "))
|
||||
if heater_number >= SwitchNumbers.NUMBER_OF_SWITCHES:
|
||||
heater_number = int(input("Type number of heater to switch [0-7]: "))
|
||||
if heater_number >= SwitchNumbers.NUMBER_OF_SWITCHES or heater_number < 0:
|
||||
print("Invalid heater switch number")
|
||||
return
|
||||
action = int(input("Turn switch on or off? (0 - off, 1 - on): "))
|
||||
@@ -52,7 +52,8 @@ def pack_switch_heater_command(
|
||||
@param switch_action Action to perform. 0 - Sets switch off, 1 - Sets switch on.
|
||||
"""
|
||||
action_id = ActionIds.SWITCH_HEATER
|
||||
command = object_id + action_id
|
||||
command = bytearray()
|
||||
command += object_id + action_id
|
||||
command.append(switch_nr)
|
||||
command.append(switch_action)
|
||||
return command
|
||||
|
@@ -7,7 +7,9 @@
|
||||
"""
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.tc.service_3_housekeeping import generate_one_hk_command, make_sid
|
||||
from gomspace.gomspace_common import *
|
||||
from config.object_ids import P60_DOCK_HANDLER
|
||||
|
||||
|
||||
class P60OpCodes(enum.Enum):
|
||||
@@ -110,6 +112,11 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: st
|
||||
Channel.off,
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == GomspaceOpCodes.REQUEST_HK_ONCE.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Requesting HK Table Once"))
|
||||
hk_sid = make_sid(object_id=P60_DOCK_HANDLER, set_id=SetIds.P60_DOCK)
|
||||
command = generate_one_hk_command(sid=hk_sid, ssc=0)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "P60 Dock: Print Switches, Voltages, Currents")
|
||||
@@ -118,7 +125,12 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: st
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
return
|
||||
if op_code == GomspaceOpCodes.PRINT_LATCHUPS.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Print Latchups"))
|
||||
command = generate_action_command(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if P60DockTestProcedure.all or P60DockTestProcedure.reboot:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Reboot"))
|
||||
command = pack_reboot_command(object_id)
|
||||
|
@@ -5,27 +5,32 @@
|
||||
"""
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.tc.service_3_housekeeping import generate_one_hk_command, make_sid
|
||||
from gomspace.gomspace_common import *
|
||||
from gomspace.gomspace_pdu_definitions import *
|
||||
from config.object_ids import PDU_1_HANDLER_ID
|
||||
|
||||
|
||||
class Pdu1OpCodes(enum.Enum):
|
||||
TESTS = "0"
|
||||
TCS_BOARD_ON = "1"
|
||||
TCS_BOARD_OFF = "2"
|
||||
STAR_TRACKER_ON = "3"
|
||||
STAR_TRACKER_OFF = "4"
|
||||
SUS_NOMINAL_ON = "5"
|
||||
SUS_NOMINAL_OFF = "6"
|
||||
ACS_A_SIDE_ON = "7"
|
||||
ACS_A_SIDE_OFF = "8"
|
||||
SYRLINKS_ON = "9"
|
||||
SYRLINKS_OFF = "10"
|
||||
MGT_ON = "11"
|
||||
MGT_OFF = "12"
|
||||
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 = "13"
|
||||
SCEX_OFF = "14"
|
||||
SCEX_ON = "12"
|
||||
SCEX_OFF = "13"
|
||||
PLOC_ON = "14"
|
||||
PLOC_OFF = "15"
|
||||
|
||||
TESTS = "32"
|
||||
|
||||
|
||||
class PDU1TestProcedure:
|
||||
@@ -53,7 +58,7 @@ def pack_pdu1_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
command = pack_set_param_command(
|
||||
object_id,
|
||||
PDUConfigTable.out_en_0.parameter_address,
|
||||
PDUConfigTable.out_en_2.parameter_size,
|
||||
PDUConfigTable.out_en_0.parameter_size,
|
||||
Channel.on,
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
@@ -62,7 +67,7 @@ def pack_pdu1_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
command = pack_set_param_command(
|
||||
object_id,
|
||||
PDUConfigTable.out_en_0.parameter_address,
|
||||
PDUConfigTable.out_en_2.parameter_size,
|
||||
PDUConfigTable.out_en_0.parameter_size,
|
||||
Channel.off,
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
@@ -151,14 +156,6 @@ def pack_pdu1_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
Channel.off,
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "PDU1: Print Switches, Voltages, Currents")
|
||||
)
|
||||
command = generate_action_command(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu1OpCodes.SYRLINKS_ON.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn Syrlinks on"))
|
||||
command = pack_set_param_command(
|
||||
@@ -195,6 +192,43 @@ def pack_pdu1_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
Channel.off,
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu1OpCodes.PLOC_ON.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn PLOC on"))
|
||||
command = pack_set_param_command(
|
||||
object_id,
|
||||
PDUConfigTable.out_en_6.parameter_address,
|
||||
PDUConfigTable.out_en_6.parameter_size,
|
||||
Channel.on,
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu1OpCodes.PLOC_OFF.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn PLOC off"))
|
||||
command = pack_set_param_command(
|
||||
object_id,
|
||||
PDUConfigTable.out_en_6.parameter_address,
|
||||
PDUConfigTable.out_en_6.parameter_size,
|
||||
Channel.off,
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == GomspaceOpCodes.REQUEST_HK_ONCE.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Requesting HK Table Once"))
|
||||
hk_sid = make_sid(object_id=PDU_1_HANDLER_ID, set_id=SetIds.PDU_1)
|
||||
command = generate_one_hk_command(sid=hk_sid, ssc=0)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "PDU1: Print Switches, Voltages, Currents")
|
||||
)
|
||||
command = generate_action_command(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == GomspaceOpCodes.PRINT_LATCHUPS.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Print Latchups"))
|
||||
command = generate_action_command(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if PDU1TestProcedure.all or PDU1TestProcedure.ping:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Ping Test"))
|
||||
ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
|
||||
|
@@ -8,8 +8,10 @@
|
||||
"""
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.tc.service_3_housekeeping import generate_one_hk_command, make_sid
|
||||
from gomspace.gomspace_common import *
|
||||
from gomspace.gomspace_pdu_definitions import *
|
||||
from config.object_ids import PDU_2_HANDLER_ID
|
||||
|
||||
|
||||
class Pdu2OpCodes(enum.Enum):
|
||||
@@ -19,8 +21,16 @@ class Pdu2OpCodes(enum.Enum):
|
||||
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"
|
||||
# There is not really a point of the on command, the SW can not be commanded if the OBC is off
|
||||
Q7S_OFF = "7"
|
||||
Q7S_OFF = "32"
|
||||
|
||||
|
||||
class PDU2TestProcedure:
|
||||
@@ -118,6 +128,95 @@ def pack_pdu2_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
Channel.off,
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu2OpCodes.PL_PCDU_VBAT_NOM_ON.value:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "PDU2: Turn PDU2 PL PCDU Channel 1 on")
|
||||
)
|
||||
command = pack_set_param_command(
|
||||
object_id,
|
||||
PDUConfigTable.out_en_1.parameter_address,
|
||||
PDUConfigTable.out_en_1.parameter_size,
|
||||
Channel.on,
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu2OpCodes.PL_PCDU_VBAT_NOM_OFF.value:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "PDU2: Turn PDU2 PL PCDU Channel 1 off")
|
||||
)
|
||||
command = pack_set_param_command(
|
||||
object_id,
|
||||
PDUConfigTable.out_en_1.parameter_address,
|
||||
PDUConfigTable.out_en_1.parameter_size,
|
||||
Channel.off,
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu2OpCodes.PL_PCDU_VBAT_RED_ON.value:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "PDU2: Turn PDU2 PL PCDU Channel 6 on")
|
||||
)
|
||||
command = pack_set_param_command(
|
||||
object_id,
|
||||
PDUConfigTable.out_en_6.parameter_address,
|
||||
PDUConfigTable.out_en_6.parameter_size,
|
||||
Channel.off,
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu2OpCodes.PL_PCDU_VBAT_RED_OFF.value:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "PDU2: Turn PDU2 PL PCDU Channel 6 off")
|
||||
)
|
||||
command = pack_set_param_command(
|
||||
object_id,
|
||||
PDUConfigTable.out_en_6.parameter_address,
|
||||
PDUConfigTable.out_en_6.parameter_size,
|
||||
Channel.off,
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu2OpCodes.TCS_HEATER_IN_ON.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn TCS Heater Input on"))
|
||||
command = pack_set_param_command(
|
||||
object_id,
|
||||
PDUConfigTable.out_en_3.parameter_address,
|
||||
PDUConfigTable.out_en_3.parameter_size,
|
||||
Channel.on,
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu2OpCodes.TCS_HEATER_IN_OFF.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn TCS Heater Input off"))
|
||||
command = pack_set_param_command(
|
||||
object_id,
|
||||
PDUConfigTable.out_en_3.parameter_address,
|
||||
PDUConfigTable.out_en_3.parameter_size,
|
||||
Channel.off,
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu2OpCodes.SOLAR_ARRAY_DEPL_ON.value:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "PDU2: Turn Solar Array Deployment On")
|
||||
)
|
||||
command = pack_set_param_command(
|
||||
object_id,
|
||||
PDUConfigTable.out_en_5.parameter_address,
|
||||
PDUConfigTable.out_en_5.parameter_size,
|
||||
Channel.on,
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu2OpCodes.SOLAR_ARRAY_DEPL_OFF.value:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "PDU2: Turn Solar Array Deployment Off")
|
||||
)
|
||||
command = pack_set_param_command(
|
||||
object_id,
|
||||
PDUConfigTable.out_en_5.parameter_address,
|
||||
PDUConfigTable.out_en_5.parameter_size,
|
||||
Channel.off,
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == GomspaceOpCodes.REQUEST_HK_ONCE.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Requesting HK Table Once"))
|
||||
hk_sid = make_sid(object_id=PDU_2_HANDLER_ID, set_id=SetIds.PDU_2)
|
||||
command = generate_one_hk_command(sid=hk_sid, ssc=0)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "PDU2: Print Switches, Currents, Voltahes")
|
||||
@@ -126,7 +225,12 @@ def pack_pdu2_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == GomspaceOpCodes.PRINT_LATCHUPS.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Latchups"))
|
||||
command = generate_action_command(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if PDU2TestProcedure.all or PDU2TestProcedure.reboot:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Reboot"))
|
||||
command = pack_reboot_command(object_id)
|
||||
|
@@ -9,61 +9,68 @@
|
||||
import struct
|
||||
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
|
||||
from tmtccmd.utility.logger import get_console_logger
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
class PlocTestProcedure:
|
||||
"""
|
||||
@brief Use this class to define the tests to perform for the PLOC.
|
||||
@details Setting all to True will run all tests.
|
||||
Setting all to False will only run the tests set to True.
|
||||
"""
|
||||
MANUAL_INPUT = "3"
|
||||
|
||||
all = False
|
||||
test_tc_mem_write = False
|
||||
test_tc_mem_read = True
|
||||
flash_write_dict = {
|
||||
"1": ["q7s test file", "/mnt/sd0/ploc-mpsoc/flashwrite.bin"],
|
||||
"2": ["te0720-1cfa test file", "/mnt/sd0/ploc-mpsoc/flashwrite.bin"],
|
||||
MANUAL_INPUT: ["manual input", ""],
|
||||
}
|
||||
|
||||
|
||||
class PlocActionIds:
|
||||
tc_mem_write = bytearray([0x0, 0x0, 0x0, 0x1])
|
||||
tc_mem_read = bytearray([0x0, 0x0, 0x0, 0x2])
|
||||
class CommandIds:
|
||||
tc_mem_write = 1
|
||||
tc_mem_read = 2
|
||||
flash_write = 3
|
||||
|
||||
|
||||
class PlocReplyIds:
|
||||
tm_mem_read_report = 6
|
||||
|
||||
|
||||
def pack_ploc_mpsoc_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
|
||||
def pack_ploc_mpsoc_commands(
|
||||
object_id: bytearray, tc_queue: TcQueueT, op_code: str
|
||||
) -> TcQueueT:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "Testing PLOC MPSoC with object id: 0x" + object_id.hex())
|
||||
(
|
||||
QueueCommands.PRINT,
|
||||
"Generate command for PLOC MPSoC with object id: 0x" + object_id.hex(),
|
||||
)
|
||||
)
|
||||
|
||||
if PlocTestProcedure.all or PlocTestProcedure.test_tc_mem_write:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC: TC Mem Write Test"))
|
||||
memory_address = int(input("PLOC Tc Mem Write: Type memory address: 0x"), 16)
|
||||
memory_data = int(input("PLOC Tc Mem Write: Type memory data: 0x"), 16)
|
||||
if op_code == "0":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: TC mem write test"))
|
||||
memory_address = int(input("PLOC MPSoC: Tc Mem Write: Type memory address: 0x"), 16)
|
||||
memory_data = int(input("PLOC MPSoC: Tc Mem Write: Type memory data: 0x"), 16)
|
||||
# TODO: implement variable length mem write command
|
||||
mem_len = 1 # 1 32-bit word
|
||||
command = generate_write_mem_command(
|
||||
object_id, struct.pack("!I", memory_address), memory_data
|
||||
object_id, memory_address, memory_data, mem_len
|
||||
)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if PlocTestProcedure.all or PlocTestProcedure.test_tc_mem_read:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC: TC Mem Read Test"))
|
||||
memory_address = int(input("PLOC Tc Mem Read: Type memory address: 0x"), 16)
|
||||
command = (
|
||||
object_id + PlocActionIds.tc_mem_read + struct.pack("!I", memory_address)
|
||||
)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
||||
elif op_code == "1":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: TC mem read test"))
|
||||
command = prepare_mem_read_command(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=21, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "2":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Flash write"))
|
||||
command = prepare_flash_write_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
return tc_queue
|
||||
|
||||
|
||||
def generate_write_mem_command(
|
||||
object_id: bytearray, memory_address: bytes, memory_data: int
|
||||
object_id: bytearray, memory_address: int, memory_data: int, mem_len: int
|
||||
) -> bytearray:
|
||||
"""This function generates the command to write to a memory address within the PLOC
|
||||
@param object_id The object id of the PlocHandler
|
||||
@@ -71,9 +78,37 @@ def generate_write_mem_command(
|
||||
@param memory_data The data to write to the memory address specified by the bytearray memory_address.
|
||||
"""
|
||||
command = (
|
||||
object_id
|
||||
+ PlocActionIds.tc_mem_write
|
||||
+ memory_address
|
||||
+ struct.pack("!I", memory_data)
|
||||
object_id
|
||||
+ struct.pack('!I', CommandIds.tc_mem_write)
|
||||
+ struct.pack('!I', memory_address)
|
||||
+ struct.pack('!H', mem_len)
|
||||
+ struct.pack("!I", memory_data)
|
||||
)
|
||||
return command
|
||||
|
||||
|
||||
def prepare_mem_read_command(object_id: bytearray) -> bytearray:
|
||||
memory_address = int(input("PLOC MPSoC Tc Mem Read: Type memory address: 0x"), 16)
|
||||
num_words = int(input("PLOC MPSoC specify number of words (32-bit) to read: "))
|
||||
command = (
|
||||
object_id + struct.pack('!I', CommandIds.tc_mem_read) + struct.pack("!I", memory_address) + struct.pack(
|
||||
'!H', num_words)
|
||||
)
|
||||
return command
|
||||
|
||||
|
||||
def prepare_flash_write_cmd(object_id: bytearray) -> bytearray:
|
||||
file = get_flash_write_file()
|
||||
command = object_id + struct.pack('I', CommandIds.flash_write) + bytearray(file, 'utf-8')
|
||||
return command
|
||||
|
||||
|
||||
def get_flash_write_file() -> str:
|
||||
LOGGER.info("Specify json file")
|
||||
input_helper = InputHelper(json_dict)
|
||||
key = input_helper.get_key()
|
||||
if key == MANUAL_INPUT:
|
||||
file = input("Ploc MPSoC: Specify absolute name of flash write file: ")
|
||||
else:
|
||||
file = json_dict[key][1]
|
||||
return file
|
||||
|
@@ -75,7 +75,7 @@ class SupvHkIds:
|
||||
BOOT_STATUS_REPORT = 53
|
||||
|
||||
|
||||
def pack_ploc_supv_test_into(
|
||||
def pack_ploc_supv_commands(
|
||||
object_id: bytearray, tc_queue: TcQueueT, op_code: str
|
||||
) -> TcQueueT:
|
||||
tc_queue.appendleft(
|
||||
|
@@ -82,14 +82,14 @@ def pack_pl_pcdu_commands(tc_queue: TcQueueT, op_code: str):
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Switching PL PCDU on"))
|
||||
mode_data = pack_mode_data(object_id=PL_PCDU_ID, mode=Modes.ON, submode=0)
|
||||
mode_cmd = PusTelecommand(
|
||||
service=200, subservice=Subservices.SWITCH_MODE, app_data=mode_data
|
||||
service=200, subservice=Subservices.COMMAND_MODE_COMMAND, app_data=mode_data
|
||||
)
|
||||
tc_queue.appendleft(mode_cmd.pack_command_tuple())
|
||||
if op_code in OpCodes.SWITCH_OFF:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Switching PL PCDU off"))
|
||||
mode_data = pack_mode_data(object_id=PL_PCDU_ID, mode=Modes.OFF, submode=0)
|
||||
mode_cmd = PusTelecommand(
|
||||
service=200, subservice=Subservices.SWITCH_MODE, app_data=mode_data
|
||||
service=200, subservice=Subservices.COMMAND_MODE_COMMAND, app_data=mode_data
|
||||
)
|
||||
tc_queue.appendleft(mode_cmd.pack_command_tuple())
|
||||
if op_code in OpCodes.SWITCH_ADC_NORMAL:
|
||||
@@ -100,7 +100,7 @@ def pack_pl_pcdu_commands(tc_queue: TcQueueT, op_code: str):
|
||||
object_id=PL_PCDU_ID, mode=Modes.NORMAL, submode=Submodes.ADC_ON
|
||||
)
|
||||
mode_cmd = PusTelecommand(
|
||||
service=200, subservice=Subservices.SWITCH_MODE, app_data=mode_data
|
||||
service=200, subservice=Subservices.COMMAND_MODE_COMMAND, app_data=mode_data
|
||||
)
|
||||
tc_queue.appendleft(mode_cmd.pack_command_tuple())
|
||||
if op_code in OpCodes.SWITCH_ALL_NORMAL:
|
||||
@@ -114,7 +114,7 @@ def pack_pl_pcdu_commands(tc_queue: TcQueueT, op_code: str):
|
||||
object_id=PL_PCDU_ID, mode=Modes.NORMAL, submode=Submodes.ALL_ON
|
||||
)
|
||||
mode_cmd = PusTelecommand(
|
||||
service=200, subservice=Subservices.SWITCH_MODE, app_data=mode_data
|
||||
service=200, subservice=Subservices.COMMAND_MODE_COMMAND, app_data=mode_data
|
||||
)
|
||||
tc_queue.appendleft(mode_cmd.pack_command_tuple())
|
||||
if op_code in OpCodes.UPDATE_DRO_TO_X8_WAIT:
|
||||
|
@@ -15,6 +15,7 @@ from tmtccmd.tc.service_200_mode import pack_mode_data, Modes
|
||||
from tmtccmd.utility.logger import get_console_logger
|
||||
from utility.input_helper import InputHelper
|
||||
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
|
||||
|
@@ -26,32 +26,44 @@ def pack_acs_command(tc_queue: TcQueueT, op_code: str):
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "Switching to ACS board assembly A side")
|
||||
)
|
||||
command_acs_board(mode=Modes.NORMAL, submode=AcsBoardSubmodes.A_SIDE, tc_queue=tc_queue)
|
||||
command_acs_board(
|
||||
mode=Modes.NORMAL, submode=AcsBoardSubmodes.A_SIDE, tc_queue=tc_queue
|
||||
)
|
||||
if op_code in AcsOpCodes.ACS_ASS_B_SIDE:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "Switching to ACS board assembly B side")
|
||||
)
|
||||
command_acs_board(mode=Modes.NORMAL, submode=AcsBoardSubmodes.B_SIDE, tc_queue=tc_queue)
|
||||
command_acs_board(
|
||||
mode=Modes.NORMAL, submode=AcsBoardSubmodes.B_SIDE, tc_queue=tc_queue
|
||||
)
|
||||
if op_code in AcsOpCodes.ACS_ASS_DUAL_MODE:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "Switching to ACS board assembly dual mode")
|
||||
)
|
||||
command_acs_board(mode=Modes.NORMAL, submode=AcsBoardSubmodes.DUAL_SIDE, tc_queue=tc_queue)
|
||||
command_acs_board(
|
||||
mode=Modes.NORMAL, submode=AcsBoardSubmodes.DUAL_SIDE, tc_queue=tc_queue
|
||||
)
|
||||
if op_code in AcsOpCodes.ACS_ASS_A_ON:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "Switching ACS board assembly A side on")
|
||||
)
|
||||
command_acs_board(mode=Modes.ON, submode=AcsBoardSubmodes.A_SIDE, tc_queue=tc_queue)
|
||||
command_acs_board(
|
||||
mode=Modes.ON, submode=AcsBoardSubmodes.A_SIDE, tc_queue=tc_queue
|
||||
)
|
||||
if op_code in AcsOpCodes.ACS_ASS_B_ON:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "Switching ACS board assembly B side on")
|
||||
)
|
||||
command_acs_board(mode=Modes.ON, submode=AcsBoardSubmodes.B_SIDE, tc_queue=tc_queue)
|
||||
command_acs_board(
|
||||
mode=Modes.ON, submode=AcsBoardSubmodes.B_SIDE, tc_queue=tc_queue
|
||||
)
|
||||
if op_code in AcsOpCodes.ACS_ASS_DUAL_ON:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "Switching ACS board assembly dual side on")
|
||||
)
|
||||
command_acs_board(mode=Modes.ON, submode=AcsBoardSubmodes.B_SIDE, tc_queue=tc_queue)
|
||||
command_acs_board(
|
||||
mode=Modes.ON, submode=AcsBoardSubmodes.B_SIDE, tc_queue=tc_queue
|
||||
)
|
||||
if op_code in AcsOpCodes.ACS_ASS_OFF:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "Switching to ACS board assembly off")
|
||||
|
@@ -23,7 +23,7 @@ class ActionIds(enum.IntEnum):
|
||||
|
||||
|
||||
class SetIds(enum.IntEnum):
|
||||
HK = 5
|
||||
HK = 5
|
||||
|
||||
|
||||
class OpCodes:
|
||||
|
@@ -16,10 +16,11 @@ from pus_tc.devs.pdu2 import pack_pdu2_commands
|
||||
from pus_tc.devs.pdu1 import pack_pdu1_commands
|
||||
from pus_tc.devs.bpx_batt import pack_bpx_commands
|
||||
from pus_tc.devs.acu import pack_acu_test_into
|
||||
from pus_tc.devs.solar_array_deployment import pack_solar_array_deployment_test_into
|
||||
from pus_tc.devs.imtq import pack_imtq_test_into
|
||||
from pus_tc.devs.tmp1075 import pack_tmp1075_test_into
|
||||
from pus_tc.devs.ploc_mpsoc import pack_ploc_mpsoc_test_into
|
||||
from pus_tc.devs.ploc_supervisor import pack_ploc_supv_test_into
|
||||
from pus_tc.devs.ploc_mpsoc import pack_ploc_mpsoc_commands
|
||||
from pus_tc.devs.ploc_supervisor import pack_ploc_supv_commands
|
||||
from pus_tc.devs.heater import pack_heater_test_into
|
||||
from pus_tc.devs.reaction_wheels import pack_single_rw_test_into
|
||||
from pus_tc.devs.rad_sensor import pack_rad_sensor_test_into
|
||||
@@ -59,6 +60,7 @@ from config.object_ids import (
|
||||
PDEC_HANDLER_ID,
|
||||
STR_IMG_HELPER_ID,
|
||||
SYRLINKS_HANDLER_ID,
|
||||
SOLAR_ARRAY_DEPLOYMENT_ID,
|
||||
)
|
||||
|
||||
|
||||
@@ -116,9 +118,9 @@ def pack_service_queue_user(
|
||||
return pack_imtq_test_into(
|
||||
object_id=object_id, tc_queue=service_queue, op_code=op_code
|
||||
)
|
||||
if service == CustomServiceList.PLOC.value:
|
||||
if service == CustomServiceList.PLOC_MPSOC.value:
|
||||
object_id = PLOC_MPSOC_ID
|
||||
return pack_ploc_mpsoc_test_into(object_id=object_id, tc_queue=service_queue)
|
||||
return pack_ploc_mpsoc_commands(object_id=object_id, tc_queue=service_queue, op_code=op_code)
|
||||
if service == CustomServiceList.REACTION_WHEEL_1.value:
|
||||
object_id = RW1_ID
|
||||
return pack_single_rw_test_into(
|
||||
@@ -146,7 +148,7 @@ def pack_service_queue_user(
|
||||
)
|
||||
if service == CustomServiceList.PLOC_SUPV.value:
|
||||
object_id = PLOC_SUPV_ID
|
||||
return pack_ploc_supv_test_into(
|
||||
return pack_ploc_supv_commands(
|
||||
object_id=object_id, tc_queue=service_queue, op_code=op_code
|
||||
)
|
||||
if service == CustomServiceList.PLOC_UPDATER.value:
|
||||
@@ -193,6 +195,10 @@ def pack_service_queue_user(
|
||||
return pack_syrlinks_command(
|
||||
object_id=SYRLINKS_HANDLER_ID, tc_queue=service_queue, op_code=op_code
|
||||
)
|
||||
if service == CustomServiceList.SA_DEPLYOMENT.value:
|
||||
return pack_solar_array_deployment_test_into(
|
||||
object_id=SOLAR_ARRAY_DEPLOYMENT_ID, tc_queue=service_queue
|
||||
)
|
||||
if service == CustomServiceList.PL_PCDU.value:
|
||||
return pack_pl_pcdu_commands(tc_queue=service_queue, op_code=op_code)
|
||||
if service == CustomServiceList.ACS_ASS.value:
|
||||
|
@@ -15,7 +15,7 @@ from config.object_ids import (
|
||||
GPS_HANDLER_0_ID,
|
||||
GPS_HANDLER_1_ID,
|
||||
BPX_HANDLER_ID,
|
||||
CORE_CONTROLLER_ID
|
||||
CORE_CONTROLLER_ID,
|
||||
)
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
|
@@ -69,7 +69,8 @@ def handle_ploc_replies(action_id: int, custom_data: bytearray) -> DataReplyUnpa
|
||||
"PLOC Mem Len",
|
||||
"PLOC Read Memory Data",
|
||||
]
|
||||
reply.content_list = [custom_data[:4], custom_data[4:6], custom_data[6:10]]
|
||||
reply.content_list = ["0x" + custom_data[:4].hex(), struct.unpack('!H', custom_data[4:6])[0],
|
||||
"0x" + custom_data[6:10].hex()]
|
||||
return reply
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user