cosmosc2-demo 5.0.2.pre.beta2 → 5.0.4

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: 6a2ed9c1ae715c41df4b75ae5a217926e93c97361775965df7b7aab4f3151624
4
- data.tar.gz: df27d506ad3300c85d9910982540c4d724f3325beb6c32ba415f7e60c4aae588
3
+ metadata.gz: e47fe0a3d90facf6376309b78db533448f1a0d2d6311b214c56699bf9f850a65
4
+ data.tar.gz: cfac84e3cb50511138f9073d8e589f43a978019dcd5d90c721a3f55389e3860d
5
5
  SHA512:
6
- metadata.gz: 3deaaeaacce1eecc22db1ccf1cb256e0fcf8ef2b89b8ba3c5e474505f8199a92c1cb431eafea3147d813038f621665654b3d6abb07d7ba1e01ab94b2859d2f89
7
- data.tar.gz: b7b143f682137d13e2d8d62a7bb0428758552b550f1eaf7a67eb998c2c84a9cf13fa7dfff4491651ffc2951e26d9704680109a4992105e15576eead4f55daddf
6
+ metadata.gz: 9ba4d8df7704d219be0f9b0c7a121ee118089caa7fdf1687fcd61fdaaa8c4c3b9ae99dc44699c579f85804273640bb1ba67df4129384be478c836d81cf71f5b9
7
+ data.tar.gz: 5a275e4a89934618bdcd075c8851fca3b8b17903754469a8372c39a64775e95a3b246c58a63012d58c57c4c5ce0a628b7ebbfd5e9cd23d833faa3b7a57f13e4c
data/README.md CHANGED
@@ -8,7 +8,7 @@ This plugin provides a simple demo configuration for COSMOS that shows off a lot
8
8
 
9
9
  1. At the COSMOS Admin - Plugins, upload the cosmosc2-demo.gem file
10
10
 
11
- 2. To build widgets run: yard && yard install
11
+ 2. To build widgets run: yarn && yarn build
12
12
 
13
13
  ## Contributing
14
14
 
data/plugin.txt CHANGED
@@ -17,6 +17,8 @@ VARIABLE example_microservice_name cosmos-example
17
17
  VARIABLE templated_microservice_name cosmos-templated
18
18
  VARIABLE example_port 9999
19
19
  VARIABLE templated_port 5025
20
+ VARIABLE log_retain_time 172800
21
+ VARIABLE reduced_log_retain_time 2592000
20
22
 
21
23
  <% include_inst = (inst_target_name.strip.length > 0) %>
22
24
  <% include_inst2 = (inst2_target_name.strip.length > 0) %>
@@ -33,24 +35,34 @@ VARIABLE templated_port 5025
33
35
 
34
36
  <% if include_inst %>
35
37
  TARGET INST <%= inst_target_name %>
38
+ LOG_RETAIN_TIME <%= log_retain_time %>
39
+ REDUCED_LOG_RETAIN_TIME <%= reduced_log_retain_time %>
36
40
  TLM_LOG_CYCLE_TIME 300
37
41
  <% end %>
38
42
 
39
43
  <% if include_inst2 %>
40
44
  TARGET INST <%= inst2_target_name %>
45
+ LOG_RETAIN_TIME <%= log_retain_time %>
46
+ REDUCED_LOG_RETAIN_TIME <%= reduced_log_retain_time %>
41
47
  TLM_LOG_CYCLE_TIME 600
42
48
  <% end %>
43
49
 
44
50
  <% if include_example %>
45
51
  TARGET EXAMPLE <%= example_target_name %>
52
+ LOG_RETAIN_TIME <%= log_retain_time %>
53
+ REDUCED_LOG_RETAIN_TIME <%= reduced_log_retain_time %>
46
54
  <% end %>
47
55
 
48
56
  <% if include_templated %>
49
57
  TARGET TEMPLATED <%= templated_target_name %>
58
+ LOG_RETAIN_TIME <%= log_retain_time %>
59
+ REDUCED_LOG_RETAIN_TIME <%= reduced_log_retain_time %>
50
60
  <% end %>
51
61
 
52
62
  <% if include_system %>
53
63
  TARGET SYSTEM <%= system_target_name %>
64
+ LOG_RETAIN_TIME <%= log_retain_time %>
65
+ REDUCED_LOG_RETAIN_TIME <%= reduced_log_retain_time %>
54
66
  <% end %>
55
67
 
56
68
  <% if include_inst and include_inst_int %>
@@ -0,0 +1,13 @@
1
+ # Specify the title and message and filter to txt files
2
+ file = open_file_dialog("Open a single file", "Choose something interesting", filter: ".txt")
3
+ puts file # Ruby File object
4
+ puts file.read
5
+ file.delete
6
+
7
+ files = open_files_dialog("Open multiple files") # message is optional
8
+ puts files # Array of File objects (even if you select only one)
9
+ files.each do |file|
10
+ puts file
11
+ puts file.read
12
+ file.delete
13
+ end
@@ -1,21 +1,21 @@
1
1
  put_target_file("INST/test.txt", "this is a string test")
2
2
  file = get_target_file("INST/test.txt")
3
3
  puts file.read
4
- file.unlink
4
+ file.delete
5
5
  delete_target_file("INST/test.txt")
6
6
 
7
7
  save_file = Tempfile.new('test')
8
8
  save_file.write("this is a Io test")
9
9
  save_file.rewind
10
10
  put_target_file("INST/test.txt", save_file)
11
- save_file.unlink
11
+ save_file.delete
12
12
  file = get_target_file("INST/test.txt")
13
13
  puts file.read
14
- file.unlink
14
+ file.delete
15
15
  delete_target_file("INST/test.txt")
16
16
 
17
17
  put_target_file("INST/test.bin", "\x00\x01\x02\x03\xFF\xEE\xDD\xCC")
18
18
  file = get_target_file("INST/test.bin")
19
19
  puts file.read.formatted
20
- file.unlink
20
+ file.delete
21
21
  delete_target_file("INST/test.bin")
@@ -17,7 +17,9 @@ VERTICAL
17
17
  LABEL " Duration: "
18
18
  NAMED_WIDGET DURATION TEXTFIELD 12 "10.0"
19
19
  END
20
- BUTTON 'Start Collect' "api.cmd('<%= target_name %> COLLECT with TYPE '+screen.get_named_widget('COLLECT_TYPE').text()+', DURATION '+screen.get_named_widget('DURATION').text())"
20
+ # This is an example of using a varible named 'type'. You can operate on variables with Javascript code.
21
+ # All COSMOS commands (api.cmd) must be separated by newlines '\n'. All code separated by semicolons is evaluated together.
22
+ 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())"
21
23
  END
22
24
  SETTING BACKCOLOR 163 185 163
23
25