SXXXXXXX_PyUCC/baseline/target_simulator__20251126T112144_local/files/config.py

40 lines
1.3 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": True,
"io_trace_sent_filename": "sent_positions.csv",
"io_trace_received_filename": "received_positions.csv",
# Enable performance profiling of packet processing
# When enabled, logs detailed timing statistics every 5 seconds and saves to archive
"enable_performance_profiling": True,
}
PROTOCOL_CONFIG = {
"json_float_precision": 4, # Number of decimal places for floats in JSON payloads
}