Method: OpenC3::InterfaceTopic.shutdown

Defined in:
lib/openc3/topics/interface_topic.rb

.shutdown(interface, scope:) ⇒ Object



67
68
69
70
71
# File 'lib/openc3/topics/interface_topic.rb', line 67

def self.shutdown(interface, scope:)
  Topic.write_topic("{#{scope}__CMD}INTERFACE__#{interface.name}", { 'shutdown' => 'true' }, '*', 100)
  sleep 1 # Give some time for the interface to shutdown
  InterfaceTopic.clear_topics(InterfaceTopic.topics(interface, scope: scope))
end