37 lines
1.1 KiB
Python
37 lines
1.1 KiB
Python
# target_simulator/config.py
|
|
|
|
"""
|
|
Global configuration settings for the Target Simulator application.
|
|
"""
|
|
|
|
# Basic configuration for the logger
|
|
LOGGING_CONFIG = {
|
|
"format": "%(asctime)s [%(levelname)-8s] %(name)-25s : %(message)s",
|
|
"date_format": "%H:%M:%S",
|
|
"default_root_level": "DEBUG",
|
|
"enable_console": True,
|
|
"colors": {
|
|
"DEBUG": "gray",
|
|
"INFO": "black",
|
|
"WARNING": "orange",
|
|
"ERROR": "red",
|
|
"CRITICAL": "red",
|
|
},
|
|
}
|
|
|
|
# --- Debug Configuration ---
|
|
DEBUG_CONFIG = {
|
|
"save_tftp_scripts": False, # Set to False to disable
|
|
"save_sfp_json_payloads": False, # Set to False to disable saving JSON payloads
|
|
"temp_folder_name": "Temp",
|
|
# Enable saving of IO traces (sent/received positions) to CSV files in Temp/
|
|
# Set to True during debugging to collect logs.
|
|
"enable_io_trace": False,
|
|
"io_trace_sent_filename": "sent_positions.csv",
|
|
"io_trace_received_filename": "received_positions.csv",
|
|
}
|
|
|
|
PROTOCOL_CONFIG = {
|
|
"json_float_precision": 4, # Number of decimal places for floats in JSON payloads
|
|
}
|