Skip to content

Commit

Permalink
Update OpenOPCService.py
Browse files Browse the repository at this point in the history
  • Loading branch information
joseamaita authored Jul 17, 2020
1 parent c609215 commit 787585d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/OpenOPCService.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
#Pyro4.config.SERIALIZER='marshal'

opc_class = OpenOPC.OPC_CLASS
opc_gate_host = "localhost"
opc_gate_port = 7766
opc_gate_host = os.environ['OPC_GATE_HOST']
opc_gate_port = int(os.environ['OPC_GATE_PORT'])

def getvar(env_var):
"""Read system environment variable from registry"""
Expand All @@ -49,9 +49,9 @@ def getvar(env_var):
# Get env vars directly from the Registry since a reboot is normally required
# for the Local System account to inherit these.

if getvar('OPC_CLASS'): opc_class = getvar('OPC_CLASS')
if getvar('OPC_GATE_HOST'): opc_gate_host = getvar('OPC_GATE_HOST')
if getvar('OPC_GATE_PORT'): opc_gate_port = int(getvar('OPC_GATE_PORT'))
#if getvar('OPC_CLASS'): opc_class = getvar('OPC_CLASS')
#if getvar('OPC_GATE_HOST'): opc_gate_host = getvar('OPC_GATE_HOST')
#if getvar('OPC_GATE_PORT'): opc_gate_port = int(getvar('OPC_GATE_PORT'))

@Pyro4.expose # needed for version 4.55+
class opc(object):
Expand Down

0 comments on commit 787585d

Please sign in to comment.