cpee-handlerwrapper-opcua 0.7 → 0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cpee-handlerwrapper-opcua.gemspec +1 -1
- data/lib/cpee-handlerwrapper-opcua.rb +9 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a352e4ef2e00edcbbe1fdb1b9c0315631ed1f507f2e4c3d427dfd9b0a82e3a24
|
4
|
+
data.tar.gz: 9eda6cf84e69203d0d7e019dfe726d5c97b0ecdaf56295273d3689efc3a19813
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84b81740c9cf68c1b9b300ab756c923370511ae160bb3a483952b70ac1eb6daf318fd4b5b23cd6b9bf1d30cf32865e1b4e8dac6ba2a47ce49d32d84d29ccdbcf
|
7
|
+
data.tar.gz: d121a4fd0bf9d32c429126e38e55a78a5fe1ada093317a786a97f315459a2ae33124fd0ffe3c05d9059bdc2922311c2a0e4c55e88b1b6baeb76d41648d99f55f
|
@@ -45,6 +45,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
45
45
|
@handler_passthrough = nil
|
46
46
|
@handler_returnValue = nil
|
47
47
|
@handler_returnOptions = nil
|
48
|
+
@handler_activity_uuid = Digest::MD5.hexdigest(Kernel::rand().to_s)
|
48
49
|
@label = ''
|
49
50
|
end # }}}
|
50
51
|
|
@@ -198,7 +199,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
198
199
|
@sensors = parameters.dig(:stream,:sensors)
|
199
200
|
@aggregators = parameters.dig(:stream,:aggregators)
|
200
201
|
@costs = parameters.dig(:stream,:costs)
|
201
|
-
@controller.notify("activity/calling", :instance => @controller.instance, :instance_uuid => @controller.uuid, :label => @label, :instance_name => @controller.info, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
202
|
+
@controller.notify("activity/calling", :activity_uuid => @handler_activity_uuid, :instance => @controller.instance, :instance_uuid => @controller.uuid, :label => @label, :instance_name => @controller.info, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
202
203
|
if passthrough.to_s.empty?
|
203
204
|
if @handler_endpoint.start_with?('opc.tcp')
|
204
205
|
proto_opcua parameters
|
@@ -235,15 +236,15 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
235
236
|
end # }}}
|
236
237
|
|
237
238
|
def inform_activity_done # {{{
|
238
|
-
@controller.notify("activity/done", :endpoint => @handler_endpoint, :instance => @controller.instance, :label => @label, :instance_name => @controller.info, :instance_uuid => @controller.uuid, :activity => @handler_position, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
239
|
+
@controller.notify("activity/done", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :instance => @controller.instance, :label => @label, :instance_name => @controller.info, :instance_uuid => @controller.uuid, :activity => @handler_position, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
239
240
|
end # }}}
|
240
241
|
def inform_activity_manipulate # {{{
|
241
|
-
@controller.notify("activity/manipulating", :endpoint => @handler_endpoint, :instance => @controller.instance, :label => @label, :instance_name => @controller.info, :instance_uuid => @controller.uuid, :activity => @handler_position, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
242
|
+
@controller.notify("activity/manipulating", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :instance => @controller.instance, :label => @label, :instance_name => @controller.info, :instance_uuid => @controller.uuid, :activity => @handler_position, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
242
243
|
end # }}}
|
243
244
|
def inform_activity_failed(err) # {{{
|
244
245
|
puts err.message
|
245
246
|
puts err.backtrace
|
246
|
-
@controller.notify("activity/failed", :endpoint => @handler_endpoint, :label => @label, :instance_name => @controller.info, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :message => err.message, :line => err.backtrace[0].match(/(.*?):(\d+):/)[2], :where => err.backtrace[0].match(/(.*?):(\d+):/)[1], :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
247
|
+
@controller.notify("activity/failed", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :instance_name => @controller.info, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :message => err.message, :line => err.backtrace[0].match(/(.*?):(\d+):/)[2], :where => err.backtrace[0].match(/(.*?):(\d+):/)[1], :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
247
248
|
end # }}}
|
248
249
|
def inform_manipulate_change(status,changed_dataelements,changed_endpoints,dataelements,endpoints) # {{{
|
249
250
|
unless status.nil?
|
@@ -261,10 +262,10 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
261
262
|
end # }}}
|
262
263
|
|
263
264
|
def vote_sync_after # {{{
|
264
|
-
@controller.call_vote("activity/syncing_after", :endpoint => @handler_endpoint, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"))
|
265
|
+
@controller.call_vote("activity/syncing_after", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"))
|
265
266
|
end # }}}
|
266
267
|
def vote_sync_before(parameters=nil) # {{{
|
267
|
-
@controller.call_vote("activity/syncing_before", :endpoint => @handler_endpoint, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :parameters => parameters, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"))
|
268
|
+
@controller.call_vote("activity/syncing_before", :activity_uuid => @handler_activity_uuid, :endpoint => @handler_endpoint, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :parameters => parameters, :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"))
|
268
269
|
end # }}}
|
269
270
|
|
270
271
|
def simplify_result(result)
|
@@ -323,13 +324,13 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
323
324
|
end
|
324
325
|
|
325
326
|
def callback(result=nil,options={})
|
326
|
-
@controller.notify("activity/receiving", :instance => @controller.instance, :label => @label, :instance_name => @controller.info, :instance_uuid => @controller.uuid, :activity => @handler_position, :endpoint => @handler_endpoint, :received => structurize_result(result), :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated, :sensors => @sensors, :aggregators => @aggregators, :costs => @costs)
|
327
|
+
@controller.notify("activity/receiving", :activity_uuid => @handler_activity_uuid, :instance => @controller.instance, :label => @label, :instance_name => @controller.info, :instance_uuid => @controller.uuid, :activity => @handler_position, :endpoint => @handler_endpoint, :received => structurize_result(result), :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated, :sensors => @sensors, :aggregators => @aggregators, :costs => @costs)
|
327
328
|
result = simplify_result(result)
|
328
329
|
@handler_returnValue = result
|
329
330
|
@handler_returnOptions = options
|
330
331
|
if options['CPEE_UPDATE']
|
331
332
|
if options['CPEE_UPDATE_STATUS']
|
332
|
-
@controller.notify("activity/status", :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :endpoint => @handler_endpoint, :status => options['CPEE_UPDATE_STATUS'], :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
333
|
+
@controller.notify("activity/status", :activity_uuid => @handler_activity_uuid, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :endpoint => @handler_endpoint, :status => options['CPEE_UPDATE_STATUS'], :timestamp => Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%:z"), :attributes => @controller.attributes_translated)
|
333
334
|
end
|
334
335
|
@handler_continue.continue WEEL::Signal::Again
|
335
336
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cpee-handlerwrapper-opcua
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.8'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juergen eTM Mangler
|
8
8
|
autorequire:
|
9
9
|
bindir: tools
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cpee
|