Class: OpenC3::Topic
Direct Known Subclasses
AutonomicTopic, CalendarTopic, CommandDecomTopic, CommandTopic, ConfigTopic, DecomInterfaceTopic, InterfaceTopic, LimitsEventTopic, NotebookTopic, QueueTopic, RouterTopic, SystemEventsTopic, TelemetryDecomTopic, TelemetryTopic, TimelineTopic
Class Method Summary collapse
- .clear_topics(topics, maxlen = 0) ⇒ Object
- .get_cnt(topic) ⇒ Object
-
.method_missing(message, *args, **kwargs, &block) ⇒ Object
Delegate all unknown class methods to delegate to the EphemeralStore.
Class Method Details
.clear_topics(topics, maxlen = 0) ⇒ Object
27 28 29 |
# File 'lib/openc3/topics/topic.rb', line 27 def self.clear_topics(topics, maxlen = 0) topics.each { |topic| EphemeralStore.xtrim(topic, maxlen) } end |
.get_cnt(topic) ⇒ Object
31 32 33 34 |
# File 'lib/openc3/topics/topic.rb', line 31 def self.get_cnt(topic) _, packet = EphemeralStore.(topic) packet ? packet["received_count"].to_i : 0 end |
.method_missing(message, *args, **kwargs, &block) ⇒ Object
Delegate all unknown class methods to delegate to the EphemeralStore
23 24 25 |
# File 'lib/openc3/topics/topic.rb', line 23 def self.method_missing(, *args, **kwargs, &block) EphemeralStore.public_send(, *args, **kwargs, &block) end |