Update PL PCDU Commands #50

Merged
meierj merged 6 commits from mueller/new-pl-pcdu-cmds into develop 2022-04-07 11:36:02 +02:00
3 changed files with 72 additions and 9 deletions
Showing only changes of commit 38b21e4fc8 - Show all commits

View File

@ -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$/tmtccli.py" /> <option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
<option name="PARAMETERS" value="-s pdu1 -l -t 6" /> <option name="PARAMETERS" value="-s pdu1 -t 6" />
<option name="SHOW_COMMAND_LINE" value="false" /> <option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" /> <option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" /> <option name="MODULE_MODE" value="false" />

View File

@ -362,6 +362,26 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
"Syrlinks Handler: Read LCL config register", "Syrlinks Handler: Read LCL config register",
{OpCodeDictKeys.TIMEOUT: 2.0}, {OpCodeDictKeys.TIMEOUT: 2.0},
), ),
"15": (
"Syrlinks Handler: Set waveform OQPSK",
{OpCodeDictKeys.TIMEOUT: 2.0},
),
"16": (
"Syrlinks Handler: Set waveform BPSK",
{OpCodeDictKeys.TIMEOUT: 2.0},
),
"17": (
"Syrlinks Handler: Set second config",
{OpCodeDictKeys.TIMEOUT: 2.0},
),
"18": (
"Syrlinks Handler: Enable debug output",
{OpCodeDictKeys.TIMEOUT: 2.0},
),
"19": (
"Syrlinks Handler: Disable debug output",
{OpCodeDictKeys.TIMEOUT: 2.0},
),
} }
service_syrlinks_handler_tuple = ( service_syrlinks_handler_tuple = (
"Syrlinks Handler", "Syrlinks Handler",

View File

@ -20,16 +20,21 @@ class SetIds:
class CommandIds: class CommandIds:
SET_TX_MODE_STANDBY = bytearray([0x0, 0x0, 0x0, 0x3]) READ_RX_STATUS_REGISTERS = 2
SET_TX_MODE_MODULATION = bytearray([0x0, 0x0, 0x0, 0x4]) SET_TX_MODE_STANDBY = 3
SET_TX_MODE_CW = bytearray([0x0, 0x0, 0x0, 0x5]) SET_TX_MODE_MODULATION = 4
READ_TX_STATUS = bytearray([0x0, 0x0, 0x0, 0x7]) SET_TX_MODE_CW = 5
READ_TX_WAVEFORM = bytearray([0x0, 0x0, 0x0, 0x8]) READ_TX_STATUS = 7
READ_TX_AGC_VALUE_HIGH_BYTE = bytearray([0x0, 0x0, 0x0, 0x9]) READ_TX_WAVEFORM = 8
READ_TX_AGC_VALUE_LOW_BYTE = bytearray([0x0, 0x0, 0x0, 0x9]) READ_TX_AGC_VALUE_HIGH_BYTE = 9
READ_TX_AGC_VALUE_LOW_BYTE = 10
WRITE_LCL_CONFIG = 11 WRITE_LCL_CONFIG = 11
READ_LCL_CONFIG_REGISTER = 12 READ_LCL_CONFIG_REGISTER = 12
READ_RX_STATUS_REGISTERS = 2 SET_WAVEFORM_OQPSK = 17
SET_WAVEFORM_BPSK = 18
SET_SECOND_CONFIG = 19
ENABLE_DEBUG = 20
DISABLE_DEBUG = 21
def pack_syrlinks_command( def pack_syrlinks_command(
@ -131,3 +136,41 @@ def pack_syrlinks_command(
command = object_id + struct.pack('!I', CommandIds.READ_LCL_CONFIG_REGISTER) command = object_id + struct.pack('!I', CommandIds.READ_LCL_CONFIG_REGISTER)
command = PusTelecommand(service=8, subservice=128, ssc=19, app_data=command) command = PusTelecommand(service=8, subservice=128, ssc=19, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
<<<<<<< HEAD
if op_code == "15":
tc_queue.appendleft(
(QueueCommands.PRINT, "Syrlinks: Set waveform OQPSK")
)
command = object_id + struct.pack('!I', CommandIds.SET_WAVEFORM_OQPSK)
command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "16":
tc_queue.appendleft(
(QueueCommands.PRINT, "Syrlinks: Set waveform BPSK")
)
command = object_id + struct.pack('!I', CommandIds.SET_WAVEFORM_BPSK)
command = PusTelecommand(service=8, subservice=128, ssc=21, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "17":
tc_queue.appendleft(
(QueueCommands.PRINT, "Syrlinks: Set second config")
)
command = object_id + struct.pack('!I', CommandIds.SET_SECOND_CONFIG)
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "18":
tc_queue.appendleft(
(QueueCommands.PRINT, "Syrlinks: Enable debug printout")
)
command = object_id + struct.pack('!I', CommandIds.ENABLE_DEBUG)
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == "19":
tc_queue.appendleft(
(QueueCommands.PRINT, "Syrlinks: Disable debug printout")
)
command = object_id + struct.pack('!I', CommandIds.DISABLE_DEBUG)
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
=======
>>>>>>> develop