Method: OpenC3::InterfaceTopic.shutdown

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

.shutdown(interface, scope:) ⇒ Object



74
75
76
77
78
# File 'lib/openc3/topics/interface_topic.rb', line 74

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