Initial commit

This commit is contained in:
2025-11-17 08:44:00 +01:00
parent 5ef0bca588
commit 6b384d43ff
46 changed files with 7876 additions and 0 deletions

24
backend/globalConfigs.py Normal file
View File

@@ -0,0 +1,24 @@
from pathlib import Path
import socket
# Certificate settings
CERT_BASE = Path(__file__).parent
CERT = Path(CERT_BASE / f"certificates/peer-certificate.der")
PRIVATE_KEY = Path(CERT_BASE / f"certificates/peer-private-key.pem")
HOST_NAME = socket.gethostname()
CLIENT_APP_URI = f"urn:{HOST_NAME}:client:hmi"
# OPC UA settings
OPC_UA_URL = "opc.tcp://192.168.0.148:4840"
OPC_UA_USER = "Administrator"
OPC_UA_PW = "11sep8819"
NAMESPACE = "urn:BeckhoffAutomation:Ua:PLC1"
EVENT_LOGGER_NODE_ID = "ns=8;s=eventlogger"
TC_EVENT_DATATYPE_NODE_ID = "ns=5;i=4000"
CHECK_INTERVAL = 1.0 # seconds
RECONNECT_INTERVAL = 5.0 # seconds
# Publishing interval to the clients (rate limiting)
PUBLISH_INTERVAL = 0.2 # 200 ms