openc3-cosmos-demo 5.5.0.pre.beta0.20230217010435 → 5.5.0

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: 25e7b018ee3218db7470c473fbfa478e499ccb7fea02feb4894ce150240749bf
4
- data.tar.gz: df9620b6b1e3031feb2a0719e66c994b765089d8b2cdc9eaf131b8e3124a4028
3
+ metadata.gz: fa57472a26d8bb68c57270d8ffc5664aae5e332cd9599fb61d59b5ff1d2e3312
4
+ data.tar.gz: aede6a97cea27c5471546e7ef2e9dce7f4112f6125a936ad52f3fd88c1759b6f
5
5
  SHA512:
6
- metadata.gz: 8ffafefc810f0ac537011e8c359389c0c76ad6272fb136a87e0b34040650b7b0158500414bffb671872d5071e4b6e8c6a5bc77d1fa9dc0320ad16553aed8160c
7
- data.tar.gz: 5eec9a7aa5522ed86bc4113801b1458bbe0e7acd77497a6b59dc710ff8d2ba7da10ea4b02ff3f5f16e61b34d7ce6988bc642a256aa15e90c3df4571e2e9913ed
6
+ metadata.gz: 59f94a1c99266e310955517f7436d5adf1cce7cb8a968201e9ecb63d4498eaa2f4e336ab5ae1e103622c00f2fb149a150927e3ea397545b847dd93cb4ccf9a94
7
+ data.tar.gz: ebfb8148bc912313a799566276ec15100d9faee0f71b926c804c6034d76800e0a69a66108cc4eb63334010253b7ea3da5df35224aef406ff5474d2feeafe966f
data/plugin.txt CHANGED
@@ -79,6 +79,7 @@ VARIABLE reduced_log_retain_time 2592000
79
79
 
80
80
  <% if include_example and include_example_int %>
81
81
  INTERFACE <%= example_int_name %> example_interface.rb <%= example_host %> <%= example_port %>
82
+ PROTOCOL WRITE MyRejectProtocol
82
83
  MAP_TARGET <%= example_target_name %>
83
84
  DONT_CONNECT
84
85
  LOG_RAW
@@ -0,0 +1,21 @@
1
+ require 'openc3/interfaces/interface'
2
+ require 'openc3/interfaces/protocols/protocol'
3
+ require 'openc3/api/api'
4
+
5
+ module OpenC3
6
+ class MyRejectProtocol < Protocol
7
+ include Api
8
+
9
+ def write_packet(packet)
10
+ if packet.packet_name == 'START'
11
+ temp = tlm("INST HEALTH_STATUS TEMP1")
12
+ if temp > 50
13
+ raise WriteRejectError, "TEMP1 too high for command"
14
+ elsif temp < -50
15
+ raise WriteRejectError, "TEMP1 too low for command"
16
+ end
17
+ end
18
+ return packet
19
+ end
20
+ end
21
+ end
@@ -6,18 +6,22 @@ VERTICAL
6
6
  MATRIXBYCOLUMNS 2
7
7
  SPARKLINE <%= target_name %> HEALTH_STATUS TEMP1
8
8
  SETTING SIZE 400 50
9
+ SETTING HISTORY 30s
9
10
  SPARKLINE <%= target_name %> HEALTH_STATUS TEMP2
10
11
  SETTING SIZE 400 50
12
+ SETTING HISTORY 30s
11
13
  LABELSPARKLINE <%= target_name %> HEALTH_STATUS TEMP3
12
14
  LABELSPARKLINE <%= target_name %> HEALTH_STATUS TEMP4
13
15
  LINEGRAPH <%= target_name %> HEALTH_STATUS TEMP1
14
16
  SETTING ITEM <%= target_name %> ADCS Q1
15
- LINEGRAPH <%= target_name %> HEALTH_STATUS TEMP2
17
+ LINEGRAPH <%= target_name %> HEALTH_STATUS TEMP2 RAW
16
18
  SETTING SECONDSGRAPHED 60
17
19
  SETTING POINTSSAVED 600
18
20
  SETTING POINTSGRAPHED 60
19
- LINEGRAPH <%= target_name %> HEALTH_STATUS TEMP3
21
+ LINEGRAPH <%= target_name %> HEALTH_STATUS TEMP3 CONVERTED REDUCED_MINUTE MIN
20
22
  SETTING SIZE 600 500 # width height
23
+ SETTING HISTORY 1h
21
24
  LINEGRAPH <%= target_name %> HEALTH_STATUS TEMP4
25
+ SETTING HISTORY 30m
22
26
  END
23
27
  END