diff --git a/config/obsw_config.py b/config/obsw_config.py index f1421d65989d0fb74a4395919ef27ece1d64ae5d..e703586eed6d5560c1e3c9de539e14a23b59c4e4 100644 --- a/config/obsw_config.py +++ b/config/obsw_config.py @@ -17,72 +17,40 @@ from config.obsw_definitions import ModeList, ComIF Mission/Device specific information. """ -# TODO: Automate / Autofill this file with the MIB parser - # Object IDs -GPS0_DEVICE_ID = bytearray([0x44, 0x10, 0x1F, 0x00]) -GPS1_DEVICE_ID = bytearray([0x44, 0x20, 0x20, 0x00]) -DUMMY_DEVICE_ID = bytearray([0x44, 0x00, 0xAF, 0xFE]) -THERMAL_SENSOR_DEVICE_ID = bytearray([0x44, 0x11, 0x54, 0x00]) -GYRO_DEVICE_ID = bytearray([0x44, 0x11, 0x55, 0x00]) -TEST_TASK_ID = bytearray([0x42, 0x69, 0x42, 0x69]) -SD_CARD_HANDLER_ID = bytearray([0x4D, 0x00, 0x73, 0xAD]) -INTERNAL_ERROR_REPORTER_ID = bytearray([0x53, 0x04, 0x00, 0x00]) # Commands -DUMMY_COMMAND_1 = struct.pack(">I", 666) -DUMMY_COMMAND_2 = bytearray([0xC0, 0xC0, 0xBA, 0xBE]) -DUMMY_COMMAND_2_PARAM_1 = bytearray([0xBA, 0xB0]) -DUMMY_COMMAND_2_PARAM_2 = bytearray([0x00, 0x00, 0x00, 0x52, 0x4F, 0x42, 0x49, 0x4E]) -DUMMY_COMMAND_3 = bytearray([0xBA, 0xDE, 0xAF, 0xFE]) - -# SIDs (obsolete..) -GPS0_SID = bytearray([0x00, 0x00, 0x1f, 0x00]) -GPS1_SID = bytearray([0x00, 0x00, 0x2f, 0x00]) -TEST_SID = bytearray([0x00, 0x00, 0x43, 0x00]) -CUSTOM_SID = bytearray([0x00, 0x00, 0x44, 0x00]) -# Pool IDs -TEST_ID_1 = bytearray([0x01, 0x01, 0x01, 0x02]) -TEST_ID_2 = bytearray([0x02, 0x02, 0x02, 0x04]) -TEST_ID_3 = bytearray([0x03, 0x03, 0x03, 0x06]) -TEST_ID_4 = bytearray([0x04, 0x04, 0x04, 0x08]) -TEST_ID_5 = bytearray([0x05, 0x05, 0x05, 0x10]) """ -All global variables, set in main program with arg parser +Other global variables """ # TMTC Client G_TMTC_LOGGER_NAME = "TMTC Logger" G_ERROR_LOG_FILE_NAME = "tmtc_error.log" -G_PP = pprint.PrettyPrinter() -LOGGER = logging.getLogger(G_TMTC_LOGGER_NAME) -# General Settings -G_SCRIPT_MODE = 1 -G_MODE_ID = 0 -G_SERVICE = 17 -G_DISPLAY_MODE = "long" # General TMTC Settings -G_APID = 0x73 +G_APID = 0x65 # Global APID for EIVE + +# Print Settings +G_PRINT_TO_FILE = True +G_PRINT_HK_DATA = False +G_PRINT_RAW_TM = False +G_PRINT_TM = True +G_RESEND_TC = False -# Binary Upload Settings -G_MAX_BINARY_FRAME_LENGTH = 1500 +# Time related +G_TM_TIMEOUT = 6 +G_TC_SEND_TIMEOUT_FACTOR = 2.0 -G_COM_IF = 2 -# COM Port for serial communication -G_COM_PORT = 'COM0' +# Serial communication G_SERIAL_TIMEOUT = 0.01 G_SERIAL_BAUDRATE = 230400 G_SERIAL_FRAME_SIZE = 256 - G_SERIAL_DLE_MAX_QUEUE_LEN = 25 G_SERIAL_DLE_MAX_FRAME_SIZE = 1024 -# Time related -G_TM_TIMEOUT = 6 -G_TC_SEND_TIMEOUT_FACTOR = 2.0 - +# Ethernet communication # Ethernet connection settings # Bind to localhost, change accordingly! G_ETHERNET_SEND_ADDRESS_IP = '127.0.0.1' @@ -94,13 +62,16 @@ G_ETHERNET_RECV_PORT = 7302 G_ETHERNET_RECV_ADDRESS = (G_ETHERNET_RECV_ADDRESS_IP, G_ETHERNET_RECV_PORT) G_ETHERNET_SEND_ADDRESS = (G_ETHERNET_SEND_ADDRESS_IP, G_ETHERNET_SEND_PORT) -# Print Settings -G_PRINT_TO_FILE = True -G_PRINT_HK_DATA = False -G_PRINT_RAW_TM = False -G_PRINT_TM = True -G_RESEND_TC = False - +G_PP = pprint.PrettyPrinter() +LOGGER = logging.getLogger(G_TMTC_LOGGER_NAME) +# General Settings +G_SCRIPT_MODE = 1 +G_MODE_ID = 0 +G_SERVICE = 17 +G_DISPLAY_MODE = "long" +G_COM_IF = 2 +# COM Port for serial communication +G_COM_PORT = 'COM0' """ These objects are set for the Unit Test, no better solution found yet """