openc3-demo 5.0.8 → 5.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c126becc6f120379958038e8427d826dd24ac492e17accc24b6c31136dadd357
4
- data.tar.gz: e46d4180d9fa5bf46ab90517492ca34c25e7cde41557e2b7b6e1cd51f6194067
3
+ metadata.gz: c8c41e135d9c87d5a114051dfe52fe5132609edcd9dafd0c700c3987cdad5543
4
+ data.tar.gz: debce68eef521deea54e12f91c6adcd31855e3015628b2b5e1bddf6ef42aa5b5
5
5
  SHA512:
6
- metadata.gz: ba3460864cd3cb3c54c3b17457ef61432feaf55177d6f492a946068c8665d5304fd519f4d4469c85f3c3acecdb424c6282b4542503a3d8f6fdb3dff01b5fa55a
7
- data.tar.gz: 7eeeee7b32eb785b0967beb040f92ee7cf996cc78b4eb996408c12d04fe7f9972472d2adc329300e29be1f332642122d6d0c5872661d8fa6d6ff78b98a43d935
6
+ metadata.gz: 998596f7f6c83fe0d8f27cfda7ce402344d77e4511953b2add4c6909c20a76bcbe1ab628a77d966673101e877618fd8f8e69855d3c1ca7c7ac37ad1b0cc9afad
7
+ data.tar.gz: 78b37fa192573a8c03812440510602b7d450ccd4cf472ce736136c593adc6013731832e71fda73d9e45f14a9af349766202f12600bdcbd696bbe5528d8914a5a
data/plugin.txt CHANGED
@@ -15,8 +15,11 @@ VARIABLE templated_int_name TEMPLATED_INT
15
15
  VARIABLE demo_tool_name Demo
16
16
  VARIABLE example_microservice_name openc3-example
17
17
  VARIABLE templated_microservice_name openc3-templated
18
+ VARIABLE example_host openc3-operator
18
19
  VARIABLE example_port 9999
20
+ VARIABLE templated_host openc3-operator
19
21
  VARIABLE templated_port 5025
22
+ VARIABLE inst_router_port 7779
20
23
  VARIABLE log_retain_time 172800
21
24
  VARIABLE reduced_log_retain_time 2592000
22
25
 
@@ -79,32 +82,34 @@ VARIABLE reduced_log_retain_time 2592000
79
82
  <% end %>
80
83
 
81
84
  <% if include_example and include_example_int %>
82
- INTERFACE <%= example_int_name %> example_interface.rb openc3-operator <%= example_port %>
85
+ INTERFACE <%= example_int_name %> example_interface.rb <%= example_host %> <%= example_port %>
83
86
  MAP_TARGET <%= example_target_name %>
84
87
  DONT_CONNECT
85
88
  LOG_RAW
86
89
  <% end %>
87
90
 
88
91
  <% if include_templated and include_templated_int %>
89
- INTERFACE <%= templated_int_name %> templated_interface.rb openc3-operator <%= templated_port %> <%= templated_port %> 5.0 nil TEMPLATE 0xA 0xA
92
+ INTERFACE <%= templated_int_name %> templated_interface.rb <%= templated_host %> <%= templated_port %> <%= templated_port %> 5.0 nil TEMPLATE 0xA 0xA
90
93
  MAP_TARGET <%= templated_target_name %>
91
94
  DONT_CONNECT
92
95
  <% end %>
93
96
 
94
97
  <% if include_inst and include_inst_router %>
95
- ROUTER <%= inst_router_name %> tcpip_server_interface.rb 7779 7779 nil 10.0 PREIDENTIFIED
98
+ ROUTER <%= inst_router_name %> tcpip_server_interface.rb <%= inst_router_port %> <%= inst_router_port %> nil 10.0 PREIDENTIFIED
96
99
  MAP_TARGET <%= inst_target_name %>
97
100
  <% end %>
98
101
 
99
102
  <% if include_example_microservice %>
100
103
  MICROSERVICE EXAMPLE <%= example_microservice_name %>
101
104
  WORK_DIR .
105
+ PORT <%= example_port %>
102
106
  CMD ruby example_target.rb <%= example_target_name %> <%= example_port %>
103
107
  <% end %>
104
108
 
105
109
  <% if include_templated_microservice %>
106
110
  MICROSERVICE TEMPLATED <%= templated_microservice_name %>
107
111
  WORK_DIR .
112
+ PORT <%= templated_port %>
108
113
  CMD ruby scpi_target.rb <%= templated_target_name %> <%= templated_port %>
109
114
  <% end %>
110
115
 
@@ -1,6 +1,6 @@
1
1
  COMMAND <%= target_name %> COLLECT BIG_ENDIAN "Starts a collect on the <%= target_name %> target"
2
2
  <%= render "_ccsds_cmd.txt", locals: {id: 1} %>
3
- PARAMETER TYPE 64 16 UINT MIN MAX 0 "Collect type"
3
+ PARAMETER TYPE 64 16 UINT MIN MAX 0 "Collect type which can be normal or special. Note the special collects are hazarous and require user confirmation."
4
4
  REQUIRED
5
5
  STATE NORMAL 0
6
6
  STATE SPECIAL 1 HAZARDOUS
@@ -30,9 +30,9 @@ class ExampleLimitsResponse < OpenC3::LimitsResponse
30
30
  def call(packet, item, old_limits_state)
31
31
  case item.limits.state
32
32
  when :RED_HIGH
33
- cmd('<%= target_name %>', 'COLLECT', 'TYPE' => 'NORMAL', 'DURATION' => 5, scope: 'DEFAULT')
33
+ cmd('<%= target_name %>', 'COLLECT', 'TYPE' => 'NORMAL', 'DURATION' => 5)
34
34
  when :RED_LOW
35
- cmd_no_hazardous_check('<%= target_name %>', 'CLEAR', scope: 'DEFAULT')
35
+ cmd_no_hazardous_check('<%= target_name %>', 'CLEAR')
36
36
  end
37
37
  end
38
38
 
@@ -1,13 +1,15 @@
1
1
  # Specify the title and message and filter to txt files
2
2
  file = open_file_dialog("Open a single file", "Choose something interesting", filter: ".txt")
3
3
  puts file # Ruby File object
4
+ puts file.path # Path of the tempfile (generally not used)
5
+ puts file.filename # Filename that was selected in the dialog
4
6
  puts file.read
5
7
  file.delete
6
8
 
7
9
  files = open_files_dialog("Open multiple files") # message is optional
8
10
  puts files # Array of File objects (even if you select only one)
9
11
  files.each do |file|
10
- puts file
12
+ puts file.filename
11
13
  puts file.read
12
14
  file.delete
13
15
  end
@@ -18,7 +18,10 @@ VERTICAL
18
18
  NAMED_WIDGET DURATION TEXTFIELD 12 "10.0"
19
19
  END
20
20
  # This is an example of using a varible named 'type'. You can operate on variables with Javascript code.
21
- # All OpenC3 commands (api.cmd) must be separated by newlines '\n'. All code separated by semicolons is evaluated together.
21
+ # All OpenC3 commands (api.cmd) must be separated by double semicolons ';;'. All code separated by semicolons is evaluated together.
22
+ # Note: you can also request and use telemetry in screens using Javascript Promises, e.g.
23
+ # api.tlm('INST PARAMS VALUE3', 'RAW').then(dur => api.cmd('INST COLLECT with TYPE '+type+', DURATION '+dur))"
24
+ # The tlm() function returns a Promise which is resolved with then() at which point we send the command with the parameter
22
25
  BUTTON 'Start Collect' "var type=screen.get_named_widget('COLLECT_TYPE').text(); api.cmd('<%= target_name %> COLLECT with TYPE '+type+', DURATION '+screen.get_named_widget('DURATION').text())"
23
26
  END
24
27
  SETTING BACKCOLOR 163 185 163