Initial commit
This commit is contained in:
28
globalConfigs.py
Normal file
28
globalConfigs.py
Normal file
@@ -0,0 +1,28 @@
|
||||
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.42.1:4840"
|
||||
OPC_UA_USER = "hmi"
|
||||
OPC_UA_PW = "hmi"
|
||||
#OPC_UA_URL = "opc.tcp://192.168.56.101:4840"
|
||||
#OPC_UA_USER = "twincat"
|
||||
#OPC_UA_PW = "twincat"
|
||||
NAMESPACE = "urn:BeckhoffAutomation:Ua:PLC1"
|
||||
NS_IDX = 0
|
||||
|
||||
CHECK_INTERVAL = 1.0 # seconds
|
||||
RECONNECT_INTERVAL = 5.0 # seconds
|
||||
|
||||
# Publishing interval to the clients (rate limiting)
|
||||
PUBLISH_INTERVAL = 0.1 # 200 ms
|
||||
|
||||
# Path to the nodes list
|
||||
NODE_IDS_FILE_PATH = Path(CERT_BASE / f"nodeList.txt")
|
||||
Reference in New Issue
Block a user