Class: OpenC3::NotebookTopic

Inherits:
Topic show all
Defined in:
lib/openc3/topics/notebook_topic.rb

Constant Summary collapse

PRIMARY_KEY =
"__openc3_notebook"

Class Method Summary collapse

Methods inherited from Topic

clear_topics, get_cnt, method_missing

Class Method Details

.write_entry(entry, scope:) ⇒ Object

Write a notebook event to the topic

“‘json

"type" => "notebook",
"kind" => "saved",  # saved, deleted, started, completed
"data" => {
  "target" => "INST",
  "notebook" => "EXAMPLE",
  "id" => "12345",
  "updated_at" => 1621875570000000000,
  "username" => "admin"
}

“‘



28
29
30
# File 'lib/openc3/topics/notebook_topic.rb', line 28

def self.write_entry(entry, scope:)
  Topic.write_topic("#{scope}#{PRIMARY_KEY}", entry, '*', 1000)
end