Skip to content
Snippets Groups Projects
Commit 579ac81d authored by Robin Mueller's avatar Robin Mueller
Browse files

Merge branch 'master' into mueller_branch

parents 4c1b8501 e849f5e5
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,7 @@ Mission/Device specific information.
# Object IDs
GPS0_ObjectId = bytearray([0x44, 0x10, 0x1F, 0x00])
GPS1_ObjectId = bytearray([0x44, 0x20, 0x20, 0x00])
DUMMY_DEVICE_ID = bytearray([0x44, 0x00, 0xAF, 0xFE])
# SIDs
GPS0_SID = bytearray([0x00, 0x00, 0x1f, 0x00])
......
......@@ -111,7 +111,7 @@ def main():
sender_and_receiver = SingleCommandSenderReceiver(
comInterface=communication_interface, tmtcPrinter=tmtc_printer, tmListener=tm_listener,
pusPacketTuple=pus_packet_tuple, tmTimeout=g.G_TM_TIMEOUT,
tcTimeoutFactor=g.G_TC_SEND_TIMEOUT_FACTOR, doPrintToFile=g.G_PRINT_TO_FILE)
tcTimeoutFactor=g.G_TC_SEND_TIMEOUT_FACTOR)
sender_and_receiver.send_single_tc_and_receive_tm()
elif g.G_MODE_ID == g.ModeList.ServiceTestMode:
......
......@@ -22,8 +22,7 @@ class SingleCommandSenderReceiver(CommandSenderReceiver):
This object can be used by instantiating it and calling sendSingleTcAndReceiveTm()
"""
def __init__(self, comInterface: ComIF_T, tmtcPrinter: TmTcPrinterT, tmListener: TmListenerT,
pusPacketTuple: tuple, tmTimeout: float, tcTimeoutFactor: float,
doPrintToFile: bool):
pusPacketTuple: tuple, tmTimeout: float, tcTimeoutFactor: float):
"""
:param comInterface: CommunicationInterface object, passed on to CommandSenderReceiver
:param tmListener: TmListener object which runs in the background and receives all TM
......@@ -35,8 +34,8 @@ class SingleCommandSenderReceiver(CommandSenderReceiver):
:param doPrintToFile: Specify whether output is also printed to a file
"""
super().__init__(comInterface=comInterface, tmListener=tmListener, tmtcPrinter=tmtcPrinter,
tmTimeout=tmTimeout, tcSendTimeoutFactor=tcTimeoutFactor,
doPrintToFile=doPrintToFile)
tmTimeout=tmTimeout, tcSendTimeoutFactor=tcTimeoutFactor)
self.faulty_input = False
try:
self.pus_packet, self.pus_packet_info = pusPacketTuple
except TypeError:
......
......@@ -13,13 +13,14 @@ Run script with -s <Service or Device> -m 3 with optional -p parameter for file
"""
from tc.OBSW_TcPacket import PUSTelecommand
from tc.OBSW_TcPacker import tcQueueT
import config.OBSW_Config as g
import struct
def packService200TestInto(tcQueue: tcQueueT) -> tcQueueT:
tcQueue.appendleft(("print", "Testing Service 200"))
# Object ID: Dummy Device
objectId = bytearray([0x44, 0x00, 0xAF, 0xFE])
objectId = g.DUMMY_DEVICE_ID
# Set On Mode
tcQueue.appendleft(("print", "\r\nTesting Service 200: Set Mode On"))
modeData = packModeData(objectId, 1, 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment