Method: OpenC3::InterfaceTopic.topics

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

.topics(interface, scope:) ⇒ Object

Generate a list of topics for this interface. This includes the interface itself and all the targets which are assigned to this interface.



29
30
31
32
33
34
35
36
37
# File 'lib/openc3/topics/interface_topic.rb', line 29

def self.topics(interface, scope:)
  topics = []
  topics << "{#{scope}__CMD}INTERFACE__#{interface.name}"
  interface.cmd_target_names.each do |target_name|
    topics << "{#{scope}__CMD}TARGET__#{target_name}"
  end
  topics << "OPENC3__SYSTEM__EVENTS" # Add System Events
  topics
end