Module: Roby::Distributed::Test::RemotePeerSupport
- Defined in:
- lib/roby/test/distributed.rb
Instance Attribute Summary collapse
-
#testcase ⇒ Object
Returns the value of attribute testcase.
Instance Method Summary collapse
- #cleanup ⇒ Object
- #console_logger=(value) ⇒ Object
- #disable_communication ⇒ Object
- #enable_communication ⇒ Object
- #flush ⇒ Object
- #local_peer ⇒ Object
- #log_level=(value) ⇒ Object
- #process_events ⇒ Object
- #reset_local_peer ⇒ Object
- #send_local_peer(*args) ⇒ Object
- #wait_one_cycle ⇒ Object
Instance Attribute Details
#testcase ⇒ Object
Returns the value of attribute testcase.
63 64 65 |
# File 'lib/roby/test/distributed.rb', line 63 def testcase @testcase end |
Instance Method Details
#cleanup ⇒ Object
85 86 87 88 |
# File 'lib/roby/test/distributed.rb', line 85 def cleanup Roby.control.quit Roby.control.join end |
#console_logger=(value) ⇒ Object
83 |
# File 'lib/roby/test/distributed.rb', line 83 def console_logger=(value); testcase.console_logger = value end |
#disable_communication ⇒ Object
72 73 74 |
# File 'lib/roby/test/distributed.rb', line 72 def disable_communication local_peer.disable_rx end |
#enable_communication ⇒ Object
65 66 67 68 69 70 71 |
# File 'lib/roby/test/distributed.rb', line 65 def enable_communication Roby::Distributed.state.synchronize do local_peer.enable_rx # make sure we wake up the communication thread Roby::Distributed.state.finished_discovery.broadcast end end |
#flush ⇒ Object
75 |
# File 'lib/roby/test/distributed.rb', line 75 def flush; local_peer.flush end |
#local_peer ⇒ Object
77 78 79 |
# File 'lib/roby/test/distributed.rb', line 77 def local_peer @local_peer ||= Distributed.peers.find { true }.last end |
#log_level=(value) ⇒ Object
84 |
# File 'lib/roby/test/distributed.rb', line 84 def log_level=(value); Roby.logger.level = value end |
#process_events ⇒ Object
76 |
# File 'lib/roby/test/distributed.rb', line 76 def process_events; Roby.control.process_events end |
#reset_local_peer ⇒ Object
80 |
# File 'lib/roby/test/distributed.rb', line 80 def reset_local_peer; @local_peer = nil end |
#send_local_peer(*args) ⇒ Object
81 |
# File 'lib/roby/test/distributed.rb', line 81 def send_local_peer(*args); local_peer.send(*args) end |
#wait_one_cycle ⇒ Object
82 |
# File 'lib/roby/test/distributed.rb', line 82 def wait_one_cycle; Roby.control.wait_one_cycle end |