Class: CPEE::Frames::Handler
- Inherits:
-
Riddl::Implementation
- Object
- Riddl::Implementation
- CPEE::Frames::Handler
- Defined in:
- lib/cpee-frames/implementation.rb
Overview
}}}
Instance Method Summary collapse
Instance Method Details
#response ⇒ Object
378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 |
# File 'lib/cpee-frames/implementation.rb', line 378 def response topic = @p[1].value event_name = @p[2].value notification = JSON.parse(@p[3].value.read) instancenr = notification['instance'] content = notification['content'] activity = content['activity'] parameters = content['parameters'] receiving = content['received'] #puts instancenr #puts activity puts content['values'] if content['values']&.any? #puts alldata['ausfuehrungen'] puts "writing file" path = File.join('data',@r[0],'dataelements.json') File.write(path, JSON.dump(content['values'])) end @a[0].send(@r[0]) nil end |