Commit 97a0c3ff authored by olivier R-D's avatar olivier R-D

set default port to 4840. This is standard OPC-UA port.

parent 7d99e8bd
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
Python OPC-UA Documentation Python OPC-UA Documentation
========================================= =========================================
Directory structure:
Contents: Contents:
.. toctree:: .. toctree::
......
...@@ -23,7 +23,7 @@ if __name__ == "__main__": ...@@ -23,7 +23,7 @@ if __name__ == "__main__":
#from IPython import embed #from IPython import embed
logging.basicConfig(level=logging.WARN) logging.basicConfig(level=logging.WARN)
client = Client("opc.tcp://192.168.56.100:49320/OPCUA/SimulationServer/") client = Client("opc.tcp://192.168.56.100:49320/OPCUA/SimulationServer/")
#client = Client("opc.tcp://192.168.56.100:4841/OPCUA/SimulationServer/") #client = Client("opc.tcp://192.168.56.100:4840/OPCUA/SimulationServer/")
#client = Client("opc.tcp://olivier:olivierpass@localhost:53530/OPCUA/SimulationServer/") #client = Client("opc.tcp://olivier:olivierpass@localhost:53530/OPCUA/SimulationServer/")
try: try:
client.connect() client.connect()
......
...@@ -40,8 +40,8 @@ if __name__ == "__main__": ...@@ -40,8 +40,8 @@ if __name__ == "__main__":
#logger = logging.getLogger("KeepAlive") #logger = logging.getLogger("KeepAlive")
#logger.setLevel(logging.DEBUG) #logger.setLevel(logging.DEBUG)
client = Client("opc.tcp://localhost:4841/freeopcua/server/") client = Client("opc.tcp://localhost:4840/freeopcua/server/")
# client = Client("opc.tcp://admin@localhost:4841/freeopcua/server/") #connect using a user # client = Client("opc.tcp://admin@localhost:4840/freeopcua/server/") #connect using a user
try: try:
client.connect() client.connect()
......
...@@ -50,8 +50,8 @@ if __name__ == "__main__": ...@@ -50,8 +50,8 @@ if __name__ == "__main__":
# now setup our server # now setup our server
server = Server() server = Server()
#server.set_endpoint("opc.tcp://localhost:4841/freeopcua/server/") #server.set_endpoint("opc.tcp://localhost:4840/freeopcua/server/")
server.set_endpoint("opc.tcp://0.0.0.0:4841/freeopcua/server/") server.set_endpoint("opc.tcp://0.0.0.0:4840/freeopcua/server/")
server.set_server_name("FreeOpcUa Example Server") server.set_server_name("FreeOpcUa Example Server")
# setup our own namespace # setup our own namespace
......
...@@ -65,8 +65,8 @@ if __name__ == "__main__": ...@@ -65,8 +65,8 @@ if __name__ == "__main__":
# now setup our server # now setup our server
server = Server() server = Server()
#server.disable_clock() #server.disable_clock()
#server.set_endpoint("opc.tcp://localhost:4841/freeopcua/server/") #server.set_endpoint("opc.tcp://localhost:4840/freeopcua/server/")
server.set_endpoint("opc.tcp://0.0.0.0:4841/freeopcua/server/") server.set_endpoint("opc.tcp://0.0.0.0:4840/freeopcua/server/")
server.set_server_name("FreeOpcUa Example Server") server.set_server_name("FreeOpcUa Example Server")
# setup our own namespace # setup our own namespace
......
...@@ -7,8 +7,8 @@ from opcua import Client ...@@ -7,8 +7,8 @@ from opcua import Client
if __name__ == "__main__": if __name__ == "__main__":
client = Client("opc.tcp://localhost:4841/freeopcua/server/") client = Client("opc.tcp://localhost:4840/freeopcua/server/")
# client = Client("opc.tcp://admin@localhost:4841/freeopcua/server/") #connect using a user # client = Client("opc.tcp://admin@localhost:4840/freeopcua/server/") #connect using a user
try: try:
client.connect() client.connect()
......
...@@ -10,7 +10,7 @@ if __name__ == "__main__": ...@@ -10,7 +10,7 @@ if __name__ == "__main__":
# setup our server # setup our server
server = Server() server = Server()
server.set_endpoint("opc.tcp://0.0.0.0:4841/freeopcua/server/") server.set_endpoint("opc.tcp://0.0.0.0:4840/freeopcua/server/")
# load server certificate and private key. This enables endpoints # load server certificate and private key. This enables endpoints
# with signing and encryption. # with signing and encryption.
......
...@@ -10,7 +10,7 @@ if __name__ == "__main__": ...@@ -10,7 +10,7 @@ if __name__ == "__main__":
# setup our server # setup our server
server = Server() server = Server()
server.set_endpoint("opc.tcp://0.0.0.0:4841/freeopcua/server/") server.set_endpoint("opc.tcp://0.0.0.0:4840/freeopcua/server/")
# setup our own namespace, not really necessary but should as spec # setup our own namespace, not really necessary but should as spec
uri = "http://examples.freeopcua.github.io" uri = "http://examples.freeopcua.github.io"
......
...@@ -57,7 +57,7 @@ class Server(object): ...@@ -57,7 +57,7 @@ class Server(object):
def __init__(self): def __init__(self):
self.logger = logging.getLogger(__name__) self.logger = logging.getLogger(__name__)
self.endpoint = urlparse("opc.tcp://0.0.0.0:4841/freeopcua/server/") self.endpoint = urlparse("opc.tcp://0.0.0.0:4840/freeopcua/server/")
self.application_uri = "urn:freeopcua:python:server" self.application_uri = "urn:freeopcua:python:server"
self.product_uri = "urn:freeopcua.github.no:python:server" self.product_uri = "urn:freeopcua.github.no:python:server"
self.name = "FreeOpcUa Python Server" self.name = "FreeOpcUa Python Server"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment