openc3-cosmos-demo 5.18.0 → 5.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/plugin.txt +0 -1
- data/targets/INST/cmd_tlm/_ccsds_cmd.txt +1 -1
- data/targets/INST/cmd_tlm/inst_cmds.txt +13 -0
- data/targets/INST/cmd_tlm/inst_tlm.txt +1 -0
- data/targets/INST/lib/example_limits_response.rb +3 -3
- data/targets/INST/lib/inst_cmd_validator.rb +47 -0
- data/targets/INST/lib/sim_inst.rb +39 -28
- data/targets/INST/procedures/calendar.rb +2 -2
- data/targets/INST/procedures/checks.rb +4 -0
- data/targets/INST/procedures/metadata.rb +1 -3
- data/targets/INST/screens/commanding.txt +1 -1
- data/targets/INST/screens/ground.txt +1 -1
- data/targets/INST/tables/config/TLMMonitoringTable_def.txt +3 -3
- data/targets/INST2/cmd_tlm/_ccsds_cmd.txt +1 -1
- data/targets/INST2/cmd_tlm/inst_cmds.txt +18 -0
- data/targets/INST2/cmd_tlm/inst_tlm.txt +13 -5
- data/targets/INST2/lib/example_limits_response.py +8 -5
- data/targets/INST2/lib/inst2_cmd_validator.py +44 -0
- data/targets/INST2/lib/sim_inst.py +24 -10
- data/targets/INST2/procedures/calendar.py +1 -1
- data/targets/INST2/procedures/checks.py +4 -0
- data/targets/INST2/procedures/metadata.py +2 -4
- data/targets/INST2/screens/commanding.txt +1 -1
- data/targets/INST2/screens/ground.txt +1 -1
- data/targets/INST2/tables/config/TLMMonitoringTable_def.txt +3 -3
- data/tools/widgets/BigWidget/BigWidget.umd.min.js +1 -1
- data/tools/widgets/BigWidget/BigWidget.umd.min.js.map +1 -1
- data/tools/widgets/DataviewerquaternionWidget/DataviewerquaternionWidget.umd.min.js +2 -2
- data/tools/widgets/DataviewerquaternionWidget/DataviewerquaternionWidget.umd.min.js.map +1 -1
- data/tools/widgets/HelloworldWidget/HelloworldWidget.umd.min.js +1 -1
- data/tools/widgets/HelloworldWidget/HelloworldWidget.umd.min.js.map +1 -1
- metadata +4 -3
- data/targets/EXAMPLE/lib/my_reject_protocol.rb +0 -21
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2024 OpenC3, Inc.
|
2
2
|
# All Rights Reserved.
|
3
3
|
#
|
4
4
|
# This program is free software; you can modify and/or redistribute it
|
@@ -165,29 +165,27 @@ class SimInst(SimulatedTarget):
|
|
165
165
|
|
166
166
|
match name:
|
167
167
|
case "COLLECT":
|
168
|
+
hs_packet.write("cmd_acpt_cnt", hs_packet.read("cmd_acpt_cnt") + 1)
|
168
169
|
hs_packet.write("collects", hs_packet.read("collects") + 1)
|
169
170
|
hs_packet.write("duration", packet.read("duration"))
|
170
171
|
hs_packet.write("collect_type", packet.read("type"))
|
172
|
+
case "ABORT" | "FLTCMD" | "ARYCMD":
|
173
|
+
hs_packet.write("cmd_acpt_cnt", hs_packet.read("cmd_acpt_cnt") + 1)
|
171
174
|
case "CLEAR":
|
175
|
+
hs_packet.write("cmd_acpt_cnt", 0)
|
172
176
|
hs_packet.write("collects", 0)
|
173
|
-
case "MEMLOAD":
|
174
|
-
hs_packet.write("blocktest", packet.read("data"))
|
175
|
-
case "QUIET":
|
176
|
-
if packet.read("state") == "TRUE":
|
177
|
-
self.quiet = True
|
178
|
-
else:
|
179
|
-
self.quiet = False
|
180
|
-
case "TIME_OFFSET":
|
181
|
-
self.time_offset = packet.read("seconds")
|
182
177
|
case "SETPARAMS":
|
178
|
+
hs_packet.write("cmd_acpt_cnt", hs_packet.read("cmd_acpt_cnt") + 1)
|
183
179
|
params_packet.write("value1", packet.read("value1"))
|
184
180
|
params_packet.write("value2", packet.read("value2"))
|
185
181
|
params_packet.write("value3", packet.read("value3"))
|
186
182
|
params_packet.write("value4", packet.read("value4"))
|
187
183
|
params_packet.write("value5", packet.read("value5"))
|
188
184
|
case "ASCIICMD":
|
185
|
+
hs_packet.write("cmd_acpt_cnt", hs_packet.read("cmd_acpt_cnt") + 1)
|
189
186
|
hs_packet.write("asciicmd", packet.read("string"))
|
190
187
|
case "SLRPNLDEPLOY":
|
188
|
+
hs_packet.write("cmd_acpt_cnt", hs_packet.read("cmd_acpt_cnt") + 1)
|
191
189
|
if self.solar_panel_thread and self.solar_panel_thread.is_alive():
|
192
190
|
return
|
193
191
|
self.solar_panel_thread = threading.Thread(
|
@@ -195,8 +193,24 @@ class SimInst(SimulatedTarget):
|
|
195
193
|
)
|
196
194
|
self.solar_panel_thread.start()
|
197
195
|
case "SLRPNLRESET":
|
196
|
+
hs_packet.write("cmd_acpt_cnt", hs_packet.read("cmd_acpt_cnt") + 1)
|
198
197
|
kill_thread(self, self.solar_panel_thread)
|
199
198
|
self.solar_panel_positions = SimInst.SOLAR_PANEL_DFLTS[:]
|
199
|
+
case "MEMLOAD":
|
200
|
+
hs_packet.write("cmd_acpt_cnt", hs_packet.read("cmd_acpt_cnt") + 1)
|
201
|
+
hs_packet.write("blocktest", packet.read("data"))
|
202
|
+
case "QUIET":
|
203
|
+
hs_packet.write("cmd_acpt_cnt", hs_packet.read("cmd_acpt_cnt") + 1)
|
204
|
+
if packet.read("state") == "TRUE":
|
205
|
+
self.quiet = True
|
206
|
+
else:
|
207
|
+
self.quiet = False
|
208
|
+
case "TIME_OFFSET":
|
209
|
+
hs_packet.write("cmd_acpt_cnt", hs_packet.read("cmd_acpt_cnt") + 1)
|
210
|
+
self.time_offset = packet.read("seconds")
|
211
|
+
case "HIDDEN":
|
212
|
+
# Deliberately do not increment cmd_acpt_cnt
|
213
|
+
self.tlm_packets["HIDDEN"].count = packet.read("count")
|
200
214
|
|
201
215
|
def solar_panel_thread_method(self):
|
202
216
|
self.solar_panel_thread_cancel = False
|
@@ -43,7 +43,7 @@ stop = start + timedelta(minutes=30)
|
|
43
43
|
act = create_timeline_activity("Mine", kind="reserve", start=start, stop=stop)
|
44
44
|
tlas = get_timeline_activities("Mine")
|
45
45
|
check_expression(f"{len(tlas)} == 2")
|
46
|
-
delete_timeline_activity("Mine", act["start"])
|
46
|
+
delete_timeline_activity("Mine", act["start"], act["uuid"])
|
47
47
|
tlas = get_timeline_activities("Mine")
|
48
48
|
check_expression(f"{len(tlas)} == 1")
|
49
49
|
|
@@ -3,6 +3,10 @@ import os
|
|
3
3
|
# Display the environment variables
|
4
4
|
print(os.environ.items())
|
5
5
|
|
6
|
+
# Test some of the various keyword arguments
|
7
|
+
cmd("<%= target_name %> ABORT", timeout=30)
|
8
|
+
cmd("<%= target_name %> ABORT", log_message=False)
|
9
|
+
cmd("<%= target_name %> ABORT", validate=False)
|
6
10
|
collect_cnt = tlm("<%= target_name %> HEALTH_STATUS COLLECTS")
|
7
11
|
cmd("<%= target_name %> COLLECT with DURATION 11, TYPE NORMAL")
|
8
12
|
cmd_no_range_check("<%= target_name %> COLLECT with DURATION 11, TYPE NORMAL")
|
@@ -12,12 +12,10 @@ print(metadata_update({"setkey": 4})) # Ensure updatekey stays
|
|
12
12
|
check_expression(f"{metadata_get()['metadata']['setkey']} == 4")
|
13
13
|
check_expression(f"{metadata_get()['metadata']['updatekey']} == 3")
|
14
14
|
check_expression(f"{len(metadata_all())} >= 1")
|
15
|
-
|
15
|
+
metadata_input() # Creates a new entry
|
16
16
|
metadata_set({"input": 5}) # Simulate metadat_input for now
|
17
17
|
check_expression(f"{len(metadata_all())} >= 2")
|
18
18
|
wait(2) # Allow time to advance or it's an error
|
19
19
|
metadata_set({"new": 5}) # Another new entry
|
20
20
|
check_expression(f"{len(metadata_all())} >= 3")
|
21
|
-
|
22
|
-
print(metadata_all)
|
23
|
-
check_expression(f"{metadata_all()[0]['metadata']} == {{'new':5}}")
|
21
|
+
print(metadata_all())
|
@@ -18,7 +18,7 @@ VERTICAL
|
|
18
18
|
LABEL " Duration: "
|
19
19
|
NAMED_WIDGET DURATION TEXTFIELD 12 "10.0"
|
20
20
|
END
|
21
|
-
# This is an example of using a
|
21
|
+
# This is an example of using a variable named 'type'. You can operate on variables with Javascript code.
|
22
22
|
# All OpenC3 commands (api.cmd) must be separated by double semicolons ';;'. All code separated by semicolons is evaluated together.
|
23
23
|
# Note: you can also request and use telemetry in screens using Javascript Promises, e.g.
|
24
24
|
# api.tlm('INST2 PARAMS VALUE3', 'RAW').then(dur => api.cmd('INST2 COLLECT with TYPE '+type+', DURATION '+dur))"
|
@@ -20,7 +20,7 @@ VERTICAL
|
|
20
20
|
CANVASIMAGE "satellite.png" 90 130 200 200
|
21
21
|
# If the image is clicked the "<%= target_name %> ADCS" screen will popup
|
22
22
|
SETTING SCREEN <%= target_name %> ADCS
|
23
|
-
# We're using the converted value and
|
23
|
+
# We're using the converted value and specifying a default of "ground_error.png"
|
24
24
|
# if none of the IMAGE settings match the value
|
25
25
|
CANVASIMAGEVALUE <%= target_name %> HEALTH_STATUS GROUND1STATUS CONVERTED "ground_error.png" 400 100 180 180
|
26
26
|
SETTING IMAGE CONNECTED "ground_on.png" 400 100
|
@@ -1,19 +1,19 @@
|
|
1
1
|
TABLE "TLM_Monitoring" BIG_ENDIAN ROW_COLUMN 100 "Telemetry Monitoring Table"
|
2
|
-
APPEND_PARAMETER "Threshold" 32 UINT MIN MAX 0 "Telemetry item threshold at which point
|
2
|
+
APPEND_PARAMETER "Threshold" 32 UINT MIN MAX 0 "Telemetry item threshold at which point persistence is incremented"
|
3
3
|
APPEND_PARAMETER "Offset" 32 UINT MIN MAX 0 "Offset into the telemetry packet to monitor"
|
4
4
|
APPEND_PARAMETER "Data_Size" 32 UINT 0 3 0 "Amount of data to monitor (bytes)"
|
5
5
|
STATE BITS 0
|
6
6
|
STATE BYTE 1
|
7
7
|
STATE WORD 2
|
8
8
|
STATE LONGWORD 3
|
9
|
-
APPEND_PARAMETER "Bit_Mask" 32 UINT MIN MAX 0 "Bit Mask to apply to the Data Size before the value is compared
|
9
|
+
APPEND_PARAMETER "Bit_Mask" 32 UINT MIN MAX 0 "Bit Mask to apply to the Data Size before the value is compared to the Threshold"
|
10
10
|
APPEND_PARAMETER "Persistence" 32 UINT MIN MAX 0 "Number of times the Threshold must be exceeded before Action is triggered"
|
11
11
|
APPEND_PARAMETER "Type" 32 UINT 0 3 0 "How the Threshold is compared against"
|
12
12
|
STATE LESS_THAN 0
|
13
13
|
STATE GREATER_THAN 1
|
14
14
|
STATE EQUAL_TO 2
|
15
15
|
STATE NOT_EQUAL_TO 3
|
16
|
-
APPEND_PARAMETER "Action" 32 UINT 0 4 0 "Action to take when
|
16
|
+
APPEND_PARAMETER "Action" 32 UINT 0 4 0 "Action to take when Persistence is met"
|
17
17
|
STATE NO_ACTION_REQUIRED 0
|
18
18
|
STATE INITIATE_RESET 1
|
19
19
|
STATE CHANGE_MODE_SAFE 2
|