diff --git a/test/Client.py b/test/Client.py old mode 100644 new mode 100755 index ffa8885443ce025d7893b668439b2664be00cf30..3b3fc046c02bb0a83d0de544c2cee1fe5e34797c --- a/test/Client.py +++ b/test/Client.py @@ -1,6 +1,12 @@ +#! /usr/bin/env python3 + import sys import time import logging + +host = "localhost" +port = 62000 + sys.path.insert(0, "..") Temp_only = True @@ -57,7 +63,7 @@ if __name__ == "__main__": # logger.setLevel(logging.DEBUG) # client = Client("opc.tcp://LAPTOP-N0VQ3UDT:4840/") - client = Client("opc.tcp://192.168.137.102:4840/") + client = Client("opc.tcp://{}:{}/".format(host, port)) # client = Client("opc.tcp://169.254.91.66:4840/") # I hope this is secure, because I have zero clue about security # client.set_security_string("Basic256Sha256,SignAndEncrypt,certificate-example.der,private-key-example.pem") diff --git a/test/MCU_debug_access.py b/test/MCU_debug_access.py old mode 100644 new mode 100755 index 60a47c47ded25514f98692c106900464e7d32862..ae31e39eaf5e84dd8442b3fb3dcf3877d36470e0 --- a/test/MCU_debug_access.py +++ b/test/MCU_debug_access.py @@ -1,3 +1,5 @@ +#! /usr/bin/env python3 + # this script connects to a server (specified in this file) and prints any debug messages the server has # The server stores its most recent degug messages in a buffer. This client polls that buffer every 2 seconds # The client checks for duplicates and prints any new debug messages. @@ -6,6 +8,10 @@ import sys import time import logging + +host = "localhost" +port = 62000 + sys.path.insert(0, "..") from opcua import Client @@ -14,7 +20,7 @@ if __name__ == "__main__": logging.basicConfig(level=logging.WARNING) #INFO ERROR WARNING NOTSET DEBUG # for now, just connect to this client - client = Client("opc.tcp://192.168.137.102:4840/") + client = Client("opc.tcp://{}:{}/".format(host, port)) try: # connect to client diff --git a/test/M&C_client.py b/test/MnC_client.py old mode 100644 new mode 100755 similarity index 97% rename from test/M&C_client.py rename to test/MnC_client.py index 10b145ceef6e2d04e2099de53e419aefb59d6099..7c54ae3c61899badceae6001a20b58dcc907817a --- a/test/M&C_client.py +++ b/test/MnC_client.py @@ -1,10 +1,14 @@ - +#! /usr/bin/env python3 import signal import sys import time import datetime import logging + +host = "localhost" +port = 62000 + sys.path.insert(0, "..") @@ -101,9 +105,7 @@ if __name__ == "__main__": # logger = logging.getLogger("KeepAlive") # logger.setLevel(logging.DEBUG) - # client = Client("opc.tcp://LAPTOP-N0VQ3UDT:4840/") - client = Client("opc.tcp://192.168.137.102:4840/") - # client = Client("opc.tcp://169.254.91.66:4840/") + client = Client("opc.tcp://{}:{}/".format(host, port)) # I hope this is secure, because I have zero clue about security # client.set_security_string("Basic256Sha256,SignAndEncrypt,certificate-example.der,private-key-example.pem") @@ -185,4 +187,3 @@ if __name__ == "__main__": finally: print(" disconnect") client.disconnect() -