FogLAMP OPC/UA South plugin: an asynchronous OPC UA plugin that registers for change events on OPC UA objects and injects data from the OPC/UA server into FogLAMP
Note: Simulation is a objectNode name under "Objects", with NameSpaceIndex = 5
Sinusoid1 is a variable under 5:Simulation
MyLevel is a Variable in MyObjects objectNode name under "Objects"
Variable names and objects name were be found by browsing "Object" in "Address Space" tab of ProSys Simulator GUI
Simulation has 7 variables, number of registered variables is 8
Stderr log:
[2019-06-07 03:08:35.220] [UaClient] [debug] subscription | calling DataChange user callback: 2 and node: Node(srv=0;ns=2;s=MyLevel;)
[2019-06-07 03:08:35.221] [UaClient] [debug] subscription | calling DataChange user callback: 3 and node: Node(srv=0;ns=5;s=Counter1;)
[2019-06-07 03:08:35.221] [UaClient] [debug] subscription | calling DataChange user callback: 4 and node: Node(srv=0;ns=5;s=Expression1;)
[2019-06-07 03:08:35.222] [UaClient] [debug] subscription | calling DataChange user callback: 5 and node: Node(srv=0;ns=5;s=Random1;)
[2019-06-07 03:08:35.222] [UaClient] [debug] subscription | calling DataChange user callback: 6 and node: Node(srv=0;ns=5;s=Sawtooth1;)
[2019-06-07 03:08:35.222] [UaClient] [debug] subscription | calling DataChange user callback: 7 and node: Node(srv=0;ns=5;s=Sinusoid1;)
[2019-06-07 03:08:35.222] [UaClient] [debug] subscription | calling DataChange user callback: 8 and node: Node(srv=0;ns=5;s=Square1;)
[2019-06-07 03:08:35.222] [UaClient] [debug] subscription | calling DataChange user callback: 9 and node: Node(srv=0;ns=5;s=Triangle1;)
FogLAMP log
Jun 7 03:05:36 centos76 A[21128]: DEBUG: Adding subscription variable (2:MyLevel) to the map, key (2:MyDevice:MyLevel)
Jun 7 03:05:36 centos76 A[21128]: DEBUG: Subscribing to individual variable (2:MyDevice:MyLevel)
Jun 7 03:05:41 centos76 A[21128]: DEBUG: Subscribing to variable (Counter1), belonging to (5:Simulation)
Jun 7 03:05:41 centos76 A[21128]: DEBUG: Subscribing to variable (Expression1), belonging to (5:Simulation)
Jun 7 03:05:41 centos76 A[21128]: DEBUG: Subscribing to variable (Random1), belonging to (5:Simulation)
Jun 7 03:05:41 centos76 A[21128]: DEBUG: Subscribing to variable (Sawtooth1), belonging to (5:Simulation)
Jun 7 03:05:41 centos76 A[21128]: DEBUG: Adding subscription variable (5:Sinusoid1) to the map, key (5:Simulation:Sinusoid1)
Jun 7 03:05:41 centos76 A[21128]: DEBUG: Subscribing to individual variable (5:Simulation:Sinusoid1)
Jun 7 03:05:41 centos76 A[21128]: DEBUG: Subscribing to variable (Sinusoid1), belonging to (5:Simulation)
Jun 7 03:05:41 centos76 A[21128]: DEBUG: Subscribing to variable (Square1), belonging to (5:Simulation)
Jun 7 03:05:41 centos76 A[21128]: DEBUG: Subscribing to variable (Triangle1), belonging to (5:Simulation)
Jun 7 03:05:53 centos76 A[21128]: INFO: Added 8 variable subscriptions.
FOGL-2863: subscribe a variable once
Configuration tested with ProSys OPCUA Simulator:
{"subscriptions":["5:Simulation","5:Sinusoid1","2:MyLevel"]}
Note: Simulation is a objectNode name under "Objects", with NameSpaceIndex = 5
Sinusoid1 is a variable under 5:Simulation MyLevel is a Variable in MyObjects objectNode name under "Objects"
Variable names and objects name were be found by browsing "Object" in "Address Space" tab of ProSys Simulator GUI
Simulation has 7 variables, number of registered variables is 8
Stderr log:
[2019-06-07 03:08:35.220] [UaClient] [debug] subscription | calling DataChange user callback: 2 and node: Node(srv=0;ns=2;s=MyLevel;) [2019-06-07 03:08:35.221] [UaClient] [debug] subscription | calling DataChange user callback: 3 and node: Node(srv=0;ns=5;s=Counter1;) [2019-06-07 03:08:35.221] [UaClient] [debug] subscription | calling DataChange user callback: 4 and node: Node(srv=0;ns=5;s=Expression1;) [2019-06-07 03:08:35.222] [UaClient] [debug] subscription | calling DataChange user callback: 5 and node: Node(srv=0;ns=5;s=Random1;) [2019-06-07 03:08:35.222] [UaClient] [debug] subscription | calling DataChange user callback: 6 and node: Node(srv=0;ns=5;s=Sawtooth1;) [2019-06-07 03:08:35.222] [UaClient] [debug] subscription | calling DataChange user callback: 7 and node: Node(srv=0;ns=5;s=Sinusoid1;) [2019-06-07 03:08:35.222] [UaClient] [debug] subscription | calling DataChange user callback: 8 and node: Node(srv=0;ns=5;s=Square1;) [2019-06-07 03:08:35.222] [UaClient] [debug] subscription | calling DataChange user callback: 9 and node: Node(srv=0;ns=5;s=Triangle1;)
FogLAMP log
Jun 7 03:05:36 centos76 A[21128]: DEBUG: Adding subscription variable (2:MyLevel) to the map, key (2:MyDevice:MyLevel) Jun 7 03:05:36 centos76 A[21128]: DEBUG: Subscribing to individual variable (2:MyDevice:MyLevel) Jun 7 03:05:41 centos76 A[21128]: DEBUG: Subscribing to variable (Counter1), belonging to (5:Simulation) Jun 7 03:05:41 centos76 A[21128]: DEBUG: Subscribing to variable (Expression1), belonging to (5:Simulation) Jun 7 03:05:41 centos76 A[21128]: DEBUG: Subscribing to variable (Random1), belonging to (5:Simulation) Jun 7 03:05:41 centos76 A[21128]: DEBUG: Subscribing to variable (Sawtooth1), belonging to (5:Simulation) Jun 7 03:05:41 centos76 A[21128]: DEBUG: Adding subscription variable (5:Sinusoid1) to the map, key (5:Simulation:Sinusoid1) Jun 7 03:05:41 centos76 A[21128]: DEBUG: Subscribing to individual variable (5:Simulation:Sinusoid1) Jun 7 03:05:41 centos76 A[21128]: DEBUG: Subscribing to variable (Sinusoid1), belonging to (5:Simulation) Jun 7 03:05:41 centos76 A[21128]: DEBUG: Subscribing to variable (Square1), belonging to (5:Simulation) Jun 7 03:05:41 centos76 A[21128]: DEBUG: Subscribing to variable (Triangle1), belonging to (5:Simulation)
Jun 7 03:05:53 centos76 A[21128]: INFO: Added 8 variable subscriptions.