openc3 5.5.1 → 5.5.2.pre.beta0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of openc3 might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/data/config/_canvas_values.yaml +1 -0
- data/data/config/command.yaml +8 -3
- data/data/config/command_modifiers.yaml +26 -21
- data/data/config/graph_settings.yaml +2 -0
- data/data/config/interface_modifiers.yaml +4 -2
- data/data/config/item_modifiers.yaml +2 -2
- data/data/config/microservice.yaml +3 -0
- data/data/config/plugins.yaml +1 -0
- data/data/config/screen.yaml +1 -0
- data/data/config/target.yaml +4 -0
- data/data/config/telemetry.yaml +15 -13
- data/data/config/telemetry_modifiers.yaml +9 -4
- data/data/config/tool.yaml +1 -0
- data/data/config/widgets.yaml +1 -0
- data/lib/openc3/api/settings_api.rb +12 -18
- data/lib/openc3/models/scope_model.rb +5 -3
- data/lib/openc3/models/{settings_model.rb → setting_model.rb} +1 -1
- data/lib/openc3/models/tool_config_model.rb +6 -2
- data/lib/openc3/script/api_shared.rb +4 -0
- data/lib/openc3/utilities/authentication.rb +1 -1
- data/lib/openc3/utilities/aws_bucket.rb +6 -6
- data/lib/openc3/utilities/bucket.rb +1 -1
- data/lib/openc3/utilities/local_mode.rb +62 -7
- data/lib/openc3/version.rb +6 -6
- data/templates/target/targets/TARGET/lib/target.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9afdd0579f3b0663d3cd0d378483b372c2f3c34faa5856d1c5ef5b4a1e582af3
|
4
|
+
data.tar.gz: 9224b37cda9d56d8e867a0ead73d815b3140979355a85d408824377e628fec10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c3e6009efea9ee0b7669634ba9dd0c45dd81fa9f47405ddd44ec375993e7d85b8f4b51547cb943c3229e2bfd7e5aa5ddfc5ad1de8963a6d05e8220c029e3baf
|
7
|
+
data.tar.gz: 4cbe48f762771ad19429e19102f5fe427607814b1eb2149a06ed713a972d807481b767b023031fe21c21465a67108e39ceb0fef003d0ffea533b3db223960764
|
data/data/config/command.yaml
CHANGED
@@ -5,7 +5,6 @@ COMMAND:
|
|
5
5
|
modifiers:
|
6
6
|
<%= MetaConfigParser.load('command_modifiers.yaml').to_meta_config_yaml(4) %>
|
7
7
|
summary: Defines a new command packet
|
8
|
-
example: COMMAND INST COLLECT BIG_ENDIAN "Start collect"
|
9
8
|
parameters:
|
10
9
|
- name: Target
|
11
10
|
required: true
|
@@ -24,6 +23,7 @@ COMMAND:
|
|
24
23
|
required: false
|
25
24
|
description: Description of this command which must be enclosed with quotes
|
26
25
|
values: '[''"].*[''"]'
|
26
|
+
example: COMMAND INST COLLECT BIG_ENDIAN "Start collect"
|
27
27
|
SELECT_COMMAND:
|
28
28
|
# prettier-ignore
|
29
29
|
modifiers:
|
@@ -31,8 +31,8 @@ SELECT_COMMAND:
|
|
31
31
|
summary: Selects an existing command packet for editing
|
32
32
|
description:
|
33
33
|
Typically used in a separate configuration file from where the original
|
34
|
-
command is defined to override or add to the existing command definition
|
35
|
-
|
34
|
+
command is defined to override or add to the existing command definition.
|
35
|
+
Must be used in conjunction with SELECT_PARAMETER to change an individual parameter.
|
36
36
|
parameters:
|
37
37
|
- name: Target Name
|
38
38
|
required: true
|
@@ -42,3 +42,8 @@ SELECT_COMMAND:
|
|
42
42
|
required: true
|
43
43
|
description: Name of the command to select
|
44
44
|
values: .*
|
45
|
+
example: |
|
46
|
+
SELECT_COMMAND INST COLLECT
|
47
|
+
SELECT_PARAMETER DURATION
|
48
|
+
# Add units
|
49
|
+
UNITS Seconds S
|
@@ -3,12 +3,6 @@ PARAMETER:
|
|
3
3
|
modifiers:
|
4
4
|
<%= MetaConfigParser.load('parameter_modifiers.yaml').to_meta_config_yaml(4) %>
|
5
5
|
summary: Defines a command parameter in the current command packet
|
6
|
-
example: |
|
7
|
-
PARAMETER SYNC 0 32 UINT 0xDEADBEEF 0xDEADBEEF 0xDEADBEEF "Sync pattern"
|
8
|
-
PARAMETER DATA 32 32 INT MIN MAX 0 "Data value"
|
9
|
-
PARAMETER VALUE 64 32 FLOAT 0 10.5 2.5
|
10
|
-
PARAMETER LABEL 96 96 STRING "OPENC3" "The label to apply"
|
11
|
-
PARAMETER BLOCK 192 0 BLOCK 0x0 "Block of binary data"
|
12
6
|
parameters:
|
13
7
|
- name: Name
|
14
8
|
required: true
|
@@ -21,20 +15,26 @@ PARAMETER:
|
|
21
15
|
Always use a bit offset of 0 for derived parameters.
|
22
16
|
values: '[-]?\d+'
|
23
17
|
<%= MetaConfigParser.load('_params.yaml').to_meta_config_yaml(4) %>
|
18
|
+
example: |
|
19
|
+
PARAMETER SYNC 0 32 UINT 0xDEADBEEF 0xDEADBEEF 0xDEADBEEF "Sync pattern"
|
20
|
+
PARAMETER DATA 32 32 INT MIN MAX 0 "Data value"
|
21
|
+
PARAMETER VALUE 64 32 FLOAT 0 10.5 2.5
|
22
|
+
PARAMETER LABEL 96 96 STRING "OPENC3" "The label to apply"
|
23
|
+
PARAMETER BLOCK 192 0 BLOCK 0x0 "Block of binary data"
|
24
24
|
APPEND_PARAMETER:
|
25
25
|
modifiers:
|
26
26
|
<%= MetaConfigParser.load('parameter_modifiers.yaml').to_meta_config_yaml(4) %>
|
27
27
|
summary: Defines a command parameter in the current command packet
|
28
|
-
example: |
|
29
|
-
APPEND_PARAMETER SYNC 32 UINT 0xDEADBEEF 0xDEADBEEF 0xDEADBEEF "Sync pattern"
|
30
|
-
APPEND_PARAMETER VALUE 32 FLOAT 0 10.5 2.5
|
31
|
-
APPEND_PARAMETER LABEL 0 STRING "OPENC3" "The label to apply"
|
32
28
|
parameters:
|
33
29
|
- name: Name
|
34
30
|
required: true
|
35
31
|
description: Name of the parameter. Must be unique within the command.
|
36
32
|
values: .+
|
37
33
|
<%= MetaConfigParser.load('_params.yaml').to_meta_config_yaml(4) %>
|
34
|
+
example: |
|
35
|
+
APPEND_PARAMETER SYNC 32 UINT 0xDEADBEEF 0xDEADBEEF 0xDEADBEEF "Sync pattern"
|
36
|
+
APPEND_PARAMETER VALUE 32 FLOAT 0 10.5 2.5
|
37
|
+
APPEND_PARAMETER LABEL 0 STRING "OPENC3" "The label to apply"
|
38
38
|
ID_PARAMETER:
|
39
39
|
modifiers:
|
40
40
|
<%= MetaConfigParser.load('parameter_modifiers.yaml').to_meta_config_yaml(4) %>
|
@@ -42,7 +42,6 @@ ID_PARAMETER:
|
|
42
42
|
description: ID parameters are used to identify the binary block of data as a
|
43
43
|
particular command. A command packet may have one or more ID_PARAMETERs and all
|
44
44
|
must match the binary data for the command to be identified.
|
45
|
-
example: ID_PARAMETER OPCODE 32 32 UINT 2 2 2 "Opcode identifier"
|
46
45
|
parameters:
|
47
46
|
- name: Name
|
48
47
|
required: true
|
@@ -55,6 +54,7 @@ ID_PARAMETER:
|
|
55
54
|
Always use a bit offset of 0 for derived parameters.
|
56
55
|
values: '[-]?\d+'
|
57
56
|
<%= MetaConfigParser.load('_id_params.yaml').to_meta_config_yaml(4) %>
|
57
|
+
example: ID_PARAMETER OPCODE 32 32 UINT 2 2 2 "Opcode identifier"
|
58
58
|
APPEND_ID_PARAMETER:
|
59
59
|
modifiers:
|
60
60
|
<%= MetaConfigParser.load('parameter_modifiers.yaml').to_meta_config_yaml(4) %>
|
@@ -62,18 +62,17 @@ APPEND_ID_PARAMETER:
|
|
62
62
|
description: ID parameters are used to identify the binary block of data as a
|
63
63
|
particular command. A command packet may have one or more ID_PARAMETERs and all
|
64
64
|
must match the binary data for the command to be identified.
|
65
|
-
example: APPEND_ID_PARAMETER OPCODE 32 UINT 2 2 2 "Opcode identifier"
|
66
65
|
parameters:
|
67
66
|
- name: Name
|
68
67
|
required: true
|
69
68
|
description: Name of the parameter. Must be unique within the command.
|
70
69
|
values: .+
|
71
70
|
<%= MetaConfigParser.load('_id_params.yaml').to_meta_config_yaml(4) %>
|
71
|
+
example: APPEND_ID_PARAMETER OPCODE 32 UINT 2 2 2 "Opcode identifier"
|
72
72
|
ARRAY_PARAMETER:
|
73
73
|
modifiers:
|
74
74
|
<%= MetaConfigParser.load('parameter_modifiers.yaml').to_meta_config_yaml(4) %>
|
75
75
|
summary: Defines a command parameter in the current command packet that is an array
|
76
|
-
example: ARRAY_PARAMETER ARRAY 64 64 FLOAT 640 "Array of 10 64bit floats"
|
77
76
|
parameters:
|
78
77
|
- name: Name
|
79
78
|
required: true
|
@@ -86,44 +85,50 @@ ARRAY_PARAMETER:
|
|
86
85
|
Always use a bit offset of 0 for derived parameters.
|
87
86
|
values: '[-]?\d+'
|
88
87
|
<%= MetaConfigParser.load('_array_params.yaml').to_meta_config_yaml(4) %>
|
88
|
+
example: ARRAY_PARAMETER ARRAY 64 64 FLOAT 640 "Array of 10 64bit floats"
|
89
89
|
APPEND_ARRAY_PARAMETER:
|
90
90
|
modifiers:
|
91
91
|
<%= MetaConfigParser.load('parameter_modifiers.yaml').to_meta_config_yaml(4) %>
|
92
92
|
summary: Defines a command parameter in the current command packet that is an array
|
93
|
-
example: APPEND_ARRAY_PARAMETER ARRAY 64 FLOAT 640 "Array of 10 64bit floats"
|
94
93
|
parameters:
|
95
94
|
- name: Name
|
96
95
|
required: true
|
97
96
|
description: Name of the parameter. Must be unique within the command.
|
98
97
|
values: .*
|
99
98
|
<%= MetaConfigParser.load('_array_params.yaml').to_meta_config_yaml(4) %>
|
99
|
+
example: APPEND_ARRAY_PARAMETER ARRAY 64 FLOAT 640 "Array of 10 64bit floats"
|
100
100
|
SELECT_PARAMETER:
|
101
101
|
modifiers:
|
102
102
|
<%= MetaConfigParser.load('parameter_modifiers.yaml').to_meta_config_yaml(4) %>
|
103
103
|
summary: Selects an existing command parameter for editing
|
104
|
-
|
105
|
-
|
106
|
-
|
104
|
+
description: Must be used in conjunction with SELECT_COMMAND to first select
|
105
|
+
the packet. Typically used to override generated values or make specific changes
|
106
|
+
to commands that only affect a particular instance of a target used multiple times.
|
107
107
|
parameters:
|
108
108
|
- name: Parameter
|
109
109
|
required: true
|
110
110
|
description: Name of the parameter to select for modification
|
111
111
|
values: .+
|
112
|
+
example: |
|
113
|
+
SELECT_COMMAND INST COLLECT
|
114
|
+
SELECT_PARAMETER DURATION
|
115
|
+
# Add units
|
116
|
+
UNITS Seconds S
|
112
117
|
DELETE_PARAMETER:
|
113
118
|
summary: Deletes an existing command parameter from the packet definition
|
114
119
|
description: Deleting a parameter from the command definition does not remove the
|
115
120
|
defined space for that parameter. Thus unless you redefine a new parameter, there
|
116
121
|
will be a "hole" in the packet where the data is not accessible. You can
|
117
122
|
use SELECT_COMMAND and then PARAMETER to define a new parameter.
|
118
|
-
example: |
|
119
|
-
SELECT_COMMAND INST COLLECT
|
120
|
-
DELETE_PARAMETER DURATION
|
121
123
|
since: 4.4.1
|
122
124
|
parameters:
|
123
125
|
- name: Parameter
|
124
126
|
required: true
|
125
127
|
description: Name of the parameter to delete
|
126
128
|
values: .+
|
129
|
+
example: |
|
130
|
+
SELECT_COMMAND INST COLLECT
|
131
|
+
DELETE_PARAMETER DURATION
|
127
132
|
HIDDEN:
|
128
133
|
summary: Hides this command from all OpenC3 tools such as Command Sender and Handbook Creator
|
129
134
|
description: Hidden commands do not appear in the Script Runner popup helper when writing scripts.
|
@@ -139,7 +144,6 @@ META:
|
|
139
144
|
description: Meta data is user specific data that can be used by custom tools
|
140
145
|
for various purposes. One example is to store additional information needed
|
141
146
|
to generate source code header files.
|
142
|
-
example: META FSW_TYPE "struct command"
|
143
147
|
parameters:
|
144
148
|
- name: Meta Name
|
145
149
|
required: true
|
@@ -149,6 +153,7 @@ META:
|
|
149
153
|
required: false
|
150
154
|
description: One or more values to be stored for this Meta Name
|
151
155
|
values: .*
|
156
|
+
example: META FSW_TYPE "struct command"
|
152
157
|
HAZARDOUS:
|
153
158
|
summary: Designates the current command as hazardous
|
154
159
|
description: Sending a hazardous command causes a dialog asking for confirmation
|
@@ -6,6 +6,7 @@ ITEM:
|
|
6
6
|
<%= MetaConfigParser.load('_graph_params.yaml').to_meta_config_yaml(4) %>
|
7
7
|
STARTTIME:
|
8
8
|
summary: Start the graph history at the designated Time
|
9
|
+
since: 5.5.1
|
9
10
|
parameters:
|
10
11
|
- name: Start Time
|
11
12
|
required: true
|
@@ -13,6 +14,7 @@ STARTTIME:
|
|
13
14
|
values: .+
|
14
15
|
HISTORY:
|
15
16
|
summary: Display an initial history of data
|
17
|
+
since: 5.5.1
|
16
18
|
parameters:
|
17
19
|
- name: Value
|
18
20
|
required: true
|
@@ -8,6 +8,7 @@ MAP_TARGET:
|
|
8
8
|
values: .+
|
9
9
|
MAP_CMD_TARGET:
|
10
10
|
summary: Maps a target name to an interface for commands only
|
11
|
+
since: 5.2.0
|
11
12
|
parameters:
|
12
13
|
- name: Target Name
|
13
14
|
required: true
|
@@ -15,6 +16,7 @@ MAP_CMD_TARGET:
|
|
15
16
|
values: .+
|
16
17
|
MAP_TLM_TARGET:
|
17
18
|
summary: Maps a target name to an interface for telemetry only
|
19
|
+
since: 5.2.0
|
18
20
|
parameters:
|
19
21
|
- name: Target Name
|
20
22
|
required: true
|
@@ -82,8 +84,7 @@ OPTION:
|
|
82
84
|
interfaces. The SerialInterface defines FLOW_CONTROL which can be NONE (default) or RTSCTS
|
83
85
|
and DATA_BITS which changes the data bits of the serial interface.
|
84
86
|
The TcpipServerInterface defines LISTEN_ADDRESS which is the IP address to accept
|
85
|
-
connections on (default 0.0.0.0)
|
86
|
-
SYSTEM META when the interface connects (default false).
|
87
|
+
connections on (default 0.0.0.0).
|
87
88
|
values: .*
|
88
89
|
- name: Parameters
|
89
90
|
required: false
|
@@ -92,6 +93,7 @@ OPTION:
|
|
92
93
|
SECRET:
|
93
94
|
summary: Define a secret needed by this interface
|
94
95
|
description: Defines a secret for this interface and optionally assigns its value to an option
|
96
|
+
since: 5.3.0
|
95
97
|
parameters:
|
96
98
|
- name: Type
|
97
99
|
required: true
|
@@ -224,10 +224,10 @@ LIMITS_RESPONSE:
|
|
224
224
|
KEY:
|
225
225
|
summary: Defines the key used to access this raw value in the packet.
|
226
226
|
description: Keys are often JsonPath or XPath strings
|
227
|
-
|
227
|
+
since: 5.0.10
|
228
228
|
parameters:
|
229
229
|
- name: Key string
|
230
230
|
required: true
|
231
231
|
description: The key to access this item
|
232
232
|
values: .+
|
233
|
-
|
233
|
+
example: KEY $.book.title
|
@@ -35,6 +35,7 @@ MICROSERVICE:
|
|
35
35
|
PORT:
|
36
36
|
summary: Open port for the microservice
|
37
37
|
description: Kubernetes needs a Service to be applied to open a port so this is required for Kubernetes support
|
38
|
+
since: 5.0.10
|
38
39
|
parameters:
|
39
40
|
- name: Number
|
40
41
|
required: true
|
@@ -91,6 +92,7 @@ MICROSERVICE:
|
|
91
92
|
SECRET:
|
92
93
|
summary: Define a secret needed by this microservice
|
93
94
|
description: Defines a secret for this microservice
|
95
|
+
since: 5.3.0
|
94
96
|
parameters:
|
95
97
|
- name: Type
|
96
98
|
required: true
|
@@ -113,6 +115,7 @@ MICROSERVICE:
|
|
113
115
|
ROUTE_PREFIX:
|
114
116
|
summary: Prefix of route
|
115
117
|
description: Prefix of route to the microservice to expose externally with Traefik
|
118
|
+
since: 5.5.0
|
116
119
|
parameters:
|
117
120
|
- name: Route Prefix
|
118
121
|
required: true
|
data/data/config/plugins.yaml
CHANGED
@@ -18,6 +18,7 @@ NEEDS_DEPENDENCIES:
|
|
18
18
|
description: If the plugin has a top level lib folder or lists runtime dependencies in the gemspec,
|
19
19
|
NEEDS_DEPENDENCIES is effectively already set. Note that in Enterprise Edition, having
|
20
20
|
NEEDS_DEPENDENCIES adds the NFS volume mount to the Kuberentes pod.
|
21
|
+
since: 5.5.0
|
21
22
|
INTERFACE:
|
22
23
|
modifiers:
|
23
24
|
<%= MetaConfigParser.load('interface_modifiers.yaml').to_meta_config_yaml(4) %>
|
data/data/config/screen.yaml
CHANGED
data/data/config/target.yaml
CHANGED
@@ -16,6 +16,7 @@ TARGET:
|
|
16
16
|
modifiers:
|
17
17
|
CMD_BUFFER_DEPTH:
|
18
18
|
summary: Number of commands to buffer to ensure logged in order
|
19
|
+
since: 5.2.0
|
19
20
|
parameters:
|
20
21
|
- name: Buffer Depth
|
21
22
|
required: true
|
@@ -65,6 +66,7 @@ TARGET:
|
|
65
66
|
values: \d+
|
66
67
|
TLM_BUFFER_DEPTH:
|
67
68
|
summary: Number of telemetry packets to buffer to ensure logged in order
|
69
|
+
since: 5.2.0
|
68
70
|
parameters:
|
69
71
|
- name: Buffer Depth
|
70
72
|
required: true
|
@@ -160,6 +162,7 @@ TARGET:
|
|
160
162
|
Can be used to give more resources to processing that is falling behind.
|
161
163
|
If defined multiple times for the same type, will create multiple processes.
|
162
164
|
Each process can be given specific packets to process with the PACKET keyword.
|
165
|
+
since: 5.2.0
|
163
166
|
parameters:
|
164
167
|
- name: Type
|
165
168
|
required: true
|
@@ -168,6 +171,7 @@ TARGET:
|
|
168
171
|
values: .*
|
169
172
|
PACKET:
|
170
173
|
summary: Packet Name to allocate to the current TARGET_MICROSERVICE.
|
174
|
+
since: 5.2.0
|
171
175
|
parameters:
|
172
176
|
- name: Packet Name
|
173
177
|
required: true
|
data/data/config/telemetry.yaml
CHANGED
@@ -5,7 +5,6 @@ TELEMETRY:
|
|
5
5
|
modifiers:
|
6
6
|
<%= MetaConfigParser.load('telemetry_modifiers.yaml').to_meta_config_yaml(4) %>
|
7
7
|
summary: Defines a new telemetry packet
|
8
|
-
example: TELEMETRY SYSTEM LIMITS_CHANGE BIG_ENDIAN "OpenC3 limits change"
|
9
8
|
parameters:
|
10
9
|
- name: Target
|
11
10
|
required: true
|
@@ -25,6 +24,7 @@ TELEMETRY:
|
|
25
24
|
required: false
|
26
25
|
description: Description of this telemetry packet which must be enclosed with quotes
|
27
26
|
values: '[''"].*[''"]'
|
27
|
+
example: TELEMETRY INST HEALTH_STATUS BIG_ENDIAN "Instrument health and status"
|
28
28
|
SELECT_TELEMETRY:
|
29
29
|
# prettier-ignore
|
30
30
|
modifiers:
|
@@ -32,17 +32,22 @@ SELECT_TELEMETRY:
|
|
32
32
|
summary: Selects an existing telemetry packet for editing
|
33
33
|
description:
|
34
34
|
Typically used in a separate configuration file from where the original
|
35
|
-
telemetry is defined to override or add to the existing telemetry definition
|
36
|
-
|
35
|
+
telemetry is defined to override or add to the existing telemetry definition.
|
36
|
+
Must be used in conjunction with SELECT_ITEM to change an individual item.
|
37
37
|
parameters:
|
38
38
|
- name: Target Name
|
39
39
|
required: true
|
40
40
|
description: Name of the target this telemetry packet is associated with
|
41
41
|
values: .+
|
42
|
-
- name:
|
42
|
+
- name: Packet Name
|
43
43
|
required: true
|
44
44
|
description: Name of the telemetry packet to select
|
45
45
|
values: .+
|
46
|
+
example: |
|
47
|
+
SELECT_TELEMETRY INST HEALTH_STATUS
|
48
|
+
SELECT_ITEM TEMP1
|
49
|
+
# Define limits for this item, overrides or replaces any existing
|
50
|
+
LIMITS DEFAULT 3 ENABLED -90.0 -80.0 80.0 90.0 -20.0 20.0
|
46
51
|
LIMITS_GROUP:
|
47
52
|
summary: Defines a group of related limits Items
|
48
53
|
description:
|
@@ -63,15 +68,7 @@ LIMITS_GROUP_ITEM:
|
|
63
68
|
summary: Adds the specified telemetry item to the last defined LIMITS_GROUP
|
64
69
|
description:
|
65
70
|
Limits group information is typically kept in a separate configuration
|
66
|
-
file in the config/TARGET/cmd_tlm folder named limits_groups.txt.
|
67
|
-
configure multiple target items in a particular group you should put this information
|
68
|
-
in the config/SYSTEM/cmd_tlm/limits_groups.txt file. The SYSTEM target is processed
|
69
|
-
last and contains information that crosses target boundaries.
|
70
|
-
example: |
|
71
|
-
LIMITS_GROUP SUBSYSTEM
|
72
|
-
LIMITS_GROUP_ITEM INST HEALTH_STATUS TEMP1
|
73
|
-
LIMITS_GROUP_ITEM INST HEALTH_STATUS TEMP2
|
74
|
-
LIMITS_GROUP_ITEM INST HEALTH_STATUS TEMP3
|
71
|
+
file in the config/TARGET/cmd_tlm folder named limits_groups.txt.
|
75
72
|
parameters:
|
76
73
|
- name: Target Name
|
77
74
|
required: true
|
@@ -85,3 +82,8 @@ LIMITS_GROUP_ITEM:
|
|
85
82
|
required: true
|
86
83
|
description: Name of the telemetry item to add to the group
|
87
84
|
values: .+
|
85
|
+
example: |
|
86
|
+
LIMITS_GROUP SUBSYSTEM
|
87
|
+
LIMITS_GROUP_ITEM INST HEALTH_STATUS TEMP1
|
88
|
+
LIMITS_GROUP_ITEM INST HEALTH_STATUS TEMP2
|
89
|
+
LIMITS_GROUP_ITEM INST HEALTH_STATUS TEMP3
|
@@ -91,9 +91,14 @@ SELECT_ITEM:
|
|
91
91
|
modifiers:
|
92
92
|
<%= MetaConfigParser.load('item_modifiers.yaml').to_meta_config_yaml(4) %>
|
93
93
|
summary: Selects an existing telemetry item for editing
|
94
|
+
description: Must be used in conjunction with SELECT_TELEMETRY to first select
|
95
|
+
the packet. Typically used to override generated values or make specific changes
|
96
|
+
to telemetry that only affect a particular instance of a target used multiple times.
|
94
97
|
example: |
|
95
|
-
SELECT_TELEMETRY
|
96
|
-
SELECT_ITEM
|
98
|
+
SELECT_TELEMETRY INST HEALTH_STATUS
|
99
|
+
SELECT_ITEM TEMP1
|
100
|
+
# Define limits for this item, overrides or replaces any existing
|
101
|
+
LIMITS DEFAULT 3 ENABLED -90.0 -80.0 80.0 90.0 -20.0 20.0
|
97
102
|
parameters:
|
98
103
|
- name: Item
|
99
104
|
required: true
|
@@ -106,8 +111,8 @@ DELETE_ITEM:
|
|
106
111
|
will be a "hole" in the packet where the data is not accessible. You can
|
107
112
|
use SELECT_TELEMETRY and then ITEM to define a new item.
|
108
113
|
example: |
|
109
|
-
SELECT_TELEMETRY
|
110
|
-
DELETE_ITEM
|
114
|
+
SELECT_TELEMETRY INST HEALTH_STATUS
|
115
|
+
DELETE_ITEM TEMP4
|
111
116
|
since: 4.4.1
|
112
117
|
parameters:
|
113
118
|
- name: Item
|
data/data/config/tool.yaml
CHANGED
@@ -64,6 +64,7 @@ TOOL:
|
|
64
64
|
POSITION:
|
65
65
|
summary: Position of the tool in the nav bar
|
66
66
|
description: Position of the tool as an integer starting at 1. Tools without a position are appended to the end as they are installed.
|
67
|
+
since: 5.0.8
|
67
68
|
parameters:
|
68
69
|
- name: Position
|
69
70
|
required: true
|
data/data/config/widgets.yaml
CHANGED
@@ -20,7 +20,7 @@
|
|
20
20
|
# This file may also be used under the terms of a commercial license
|
21
21
|
# if purchased from OpenC3, Inc.
|
22
22
|
|
23
|
-
require 'openc3/models/
|
23
|
+
require 'openc3/models/setting_model'
|
24
24
|
|
25
25
|
module OpenC3
|
26
26
|
module Api
|
@@ -35,41 +35,35 @@ module OpenC3
|
|
35
35
|
|
36
36
|
def list_settings(scope: $openc3_scope, token: $openc3_token)
|
37
37
|
authorize(permission: 'system', scope: scope, token: token)
|
38
|
-
|
38
|
+
SettingModel.names(scope: scope)
|
39
39
|
end
|
40
40
|
|
41
41
|
def get_all_settings(scope: $openc3_scope, token: $openc3_token)
|
42
42
|
authorize(permission: 'system', scope: scope, token: token)
|
43
|
-
|
43
|
+
SettingModel.all(scope: scope)
|
44
44
|
end
|
45
45
|
|
46
46
|
def get_setting(name, scope: $openc3_scope, token: $openc3_token)
|
47
47
|
authorize(permission: 'system', scope: scope, token: token)
|
48
|
-
setting =
|
48
|
+
setting = SettingModel.get(name: name, scope: scope)
|
49
49
|
if setting
|
50
|
-
|
50
|
+
setting['data']
|
51
51
|
else
|
52
|
-
|
52
|
+
nil
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
-
def get_settings(*
|
56
|
+
def get_settings(*settings, scope: $openc3_scope, token: $openc3_token)
|
57
57
|
authorize(permission: 'system', scope: scope, token: token)
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
if setting
|
62
|
-
ret << setting["data"]
|
63
|
-
else
|
64
|
-
ret << nil
|
65
|
-
end
|
66
|
-
end
|
67
|
-
return ret
|
58
|
+
result = []
|
59
|
+
settings.each { |name| result << get_setting(name, scope: scope, token: token) }
|
60
|
+
result
|
68
61
|
end
|
69
62
|
|
70
63
|
def save_setting(name, data, scope: $openc3_scope, token: $openc3_token)
|
71
64
|
authorize(permission: 'admin', scope: scope, token: token)
|
72
|
-
|
65
|
+
SettingModel.set({ name: name, data: data }, scope: scope)
|
66
|
+
LocalMode.save_setting(scope, name, data)
|
73
67
|
end
|
74
68
|
end
|
75
69
|
end
|
@@ -24,7 +24,7 @@ require 'openc3/version'
|
|
24
24
|
require 'openc3/models/model'
|
25
25
|
require 'openc3/models/plugin_model'
|
26
26
|
require 'openc3/models/microservice_model'
|
27
|
-
require 'openc3/models/
|
27
|
+
require 'openc3/models/setting_model'
|
28
28
|
|
29
29
|
module OpenC3
|
30
30
|
class ScopeModel < Model
|
@@ -261,8 +261,10 @@ module OpenC3
|
|
261
261
|
end
|
262
262
|
|
263
263
|
def seed_database
|
264
|
-
setting =
|
265
|
-
|
264
|
+
setting = SettingModel.get(name: 'source_url')
|
265
|
+
SettingModel.set({ name: 'source_url', data: 'https://github.com/OpenC3/cosmos' }, scope: @scope) unless setting
|
266
|
+
setting = SettingModel.get(name: 'rubygems_url')
|
267
|
+
SettingModel.set({ name: 'rubygems_url', data: 'https://rubygems.org' }, scope: @scope) unless setting
|
266
268
|
end
|
267
269
|
end
|
268
270
|
end
|
@@ -17,9 +17,11 @@
|
|
17
17
|
# All changes Copyright 2022, OpenC3, Inc.
|
18
18
|
# All Rights Reserved
|
19
19
|
#
|
20
|
-
# This file may also be used under the terms of a commercial license
|
20
|
+
# This file may also be used under the terms of a commercial license
|
21
21
|
# if purchased from OpenC3, Inc.
|
22
22
|
|
23
|
+
require 'openc3/utilities/local_mode'
|
24
|
+
|
23
25
|
module OpenC3
|
24
26
|
class ToolConfigModel
|
25
27
|
def self.list_configs(tool, scope: $openc3_scope)
|
@@ -30,12 +32,14 @@ module OpenC3
|
|
30
32
|
Store.hget("#{scope}__config__#{tool}", name)
|
31
33
|
end
|
32
34
|
|
33
|
-
def self.save_config(tool, name, data, scope: $openc3_scope)
|
35
|
+
def self.save_config(tool, name, data, scope: $openc3_scope, local_mode: true)
|
34
36
|
Store.hset("#{scope}__config__#{tool}", name, data)
|
37
|
+
LocalMode.save_tool_config(scope, tool, name, data) if local_mode
|
35
38
|
end
|
36
39
|
|
37
40
|
def self.delete_config(tool, name, scope: $openc3_scope)
|
38
41
|
Store.hdel("#{scope}__config__#{tool}", name)
|
42
|
+
LocalMode.delete_tool_config(scope, tool, name)
|
39
43
|
end
|
40
44
|
end
|
41
45
|
end
|
@@ -501,6 +501,10 @@ module OpenC3
|
|
501
501
|
return start(procedure_name)
|
502
502
|
end
|
503
503
|
def require_utility(procedure_name)
|
504
|
+
# Ensure require_utility works like require where you don't need the .rb extension
|
505
|
+
if File.extname(procedure_name) != '.rb'
|
506
|
+
procedure_name += '.rb'
|
507
|
+
end
|
504
508
|
@require_utility_cache ||= {}
|
505
509
|
if @require_utility_cache[procedure_name]
|
506
510
|
return false
|
@@ -144,7 +144,7 @@ module OpenC3
|
|
144
144
|
|
145
145
|
# Make the post request to keycloak
|
146
146
|
def _make_request(headers, data)
|
147
|
-
uri = URI("#{@url}/
|
147
|
+
uri = URI("#{@url}/realms/openc3/protocol/openid-connect/token")
|
148
148
|
@log[0] = "request uri: #{uri.to_s} header: #{headers.to_s} body: #{data.to_s}"
|
149
149
|
STDOUT.puts @log[0] if JsonDRb.debug?
|
150
150
|
saved_verbose = $VERBOSE; $VERBOSE = nil
|
@@ -129,7 +129,7 @@ module OpenC3
|
|
129
129
|
end
|
130
130
|
|
131
131
|
# Lists the files under a specified path
|
132
|
-
def list_files(bucket:, path:, only_directories: false,
|
132
|
+
def list_files(bucket:, path:, only_directories: false, metadata: false)
|
133
133
|
# Trailing slash is important in AWS S3 when listing files
|
134
134
|
# See https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Types/ListObjectsV2Output.html#common_prefixes-instance_method
|
135
135
|
if path[-1] != '/'
|
@@ -163,8 +163,8 @@ module OpenC3
|
|
163
163
|
item['name'] = aws_item.key.split('/')[-1]
|
164
164
|
item['modified'] = aws_item.last_modified
|
165
165
|
item['size'] = aws_item.size
|
166
|
-
if
|
167
|
-
item['
|
166
|
+
if metadata
|
167
|
+
item['metadata'] = head_object(bucket: bucket, key: aws_item.key)
|
168
168
|
end
|
169
169
|
files << item
|
170
170
|
end
|
@@ -180,12 +180,12 @@ module OpenC3
|
|
180
180
|
|
181
181
|
# get metadata for a specific object
|
182
182
|
def head_object(bucket:, key:)
|
183
|
-
|
183
|
+
@client.head_object({
|
184
184
|
bucket: bucket,
|
185
185
|
key: key
|
186
186
|
})
|
187
|
-
rescue Aws::S3::Errors::NotFound
|
188
|
-
raise NotFound, "Object
|
187
|
+
rescue Aws::S3::Errors::NotFound
|
188
|
+
raise NotFound, "Object '#{bucket}/#{key}' does not exist."
|
189
189
|
end
|
190
190
|
|
191
191
|
# put_object fires off the request to store but does not confirm
|
@@ -61,7 +61,7 @@ module OpenC3
|
|
61
61
|
raise NotImplementedError, "#{self.class} has not implemented method '#{__method__}'"
|
62
62
|
end
|
63
63
|
|
64
|
-
def list_files(bucket:, path:, only_directories: false)
|
64
|
+
def list_files(bucket:, path:, only_directories: false, metadata: false)
|
65
65
|
raise NotImplementedError, "#{self.class} has not implemented method '#{__method__}'"
|
66
66
|
end
|
67
67
|
|
@@ -58,7 +58,10 @@ module OpenC3
|
|
58
58
|
puts "Local init found scope: #{scope_dir}"
|
59
59
|
Dir.each_child("#{OPENC3_LOCAL_MODE_PATH}/#{scope_dir}") do |plugin_dir|
|
60
60
|
full_folder_path = "#{OPENC3_LOCAL_MODE_PATH}/#{scope_dir}/#{plugin_dir}"
|
61
|
-
|
61
|
+
if plugin_dir == "targets_modified" || plugin_dir == "tool_config" ||
|
62
|
+
plugin_dir == "settings" || !File.directory?(full_folder_path)
|
63
|
+
next
|
64
|
+
end
|
62
65
|
puts "Local init found plugin_dir: #{full_folder_path}"
|
63
66
|
gems, plugin_instance = scan_plugin_dir(full_folder_path)
|
64
67
|
|
@@ -79,6 +82,8 @@ module OpenC3
|
|
79
82
|
end
|
80
83
|
end
|
81
84
|
sync_targets_modified()
|
85
|
+
sync_tool_config()
|
86
|
+
sync_settings()
|
82
87
|
puts "Local init complete"
|
83
88
|
else
|
84
89
|
puts "Local init canceled: Local mode not enabled or #{OPENC3_LOCAL_MODE_PATH} does not exist"
|
@@ -322,12 +327,10 @@ module OpenC3
|
|
322
327
|
end
|
323
328
|
|
324
329
|
def self.sync_targets_modified
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
sync_with_bucket(bucket, scope: scope)
|
330
|
-
end
|
330
|
+
bucket = Bucket.getClient()
|
331
|
+
scopes = ScopeModel.names()
|
332
|
+
scopes.each do |scope|
|
333
|
+
sync_with_bucket(bucket, scope: scope)
|
331
334
|
end
|
332
335
|
end
|
333
336
|
|
@@ -417,6 +420,58 @@ module OpenC3
|
|
417
420
|
return files.sort
|
418
421
|
end
|
419
422
|
|
423
|
+
def self.sync_tool_config()
|
424
|
+
scopes = ScopeModel.names()
|
425
|
+
scopes.each do |scope|
|
426
|
+
Dir["#{OPENC3_LOCAL_MODE_PATH}/#{scope}/tool_config/**/*.json"].each do |config|
|
427
|
+
parts = config.split('/')
|
428
|
+
puts "Syncing tool_config #{parts[-2]} #{File.basename(config)}"
|
429
|
+
data = File.read(config)
|
430
|
+
begin
|
431
|
+
# Parse just to ensure we have valid JSON
|
432
|
+
JSON.parse(data, :allow_nan => true, :create_additions => true)
|
433
|
+
# Only save if the parse was successful
|
434
|
+
ToolConfigModel.save_config(parts[-2], File.basename(config), data, scope: scope, local_mode: false)
|
435
|
+
rescue JSON::ParserError => error
|
436
|
+
puts "Unable to initialize tool config due to #{error.message}"
|
437
|
+
end
|
438
|
+
end
|
439
|
+
end
|
440
|
+
end
|
441
|
+
|
442
|
+
def self.save_tool_config(scope, tool, name, data)
|
443
|
+
json = JSON.parse(data, :allow_nan => true, :create_additions => true)
|
444
|
+
config_path = "#{OPENC3_LOCAL_MODE_PATH}/#{scope}/tool_config/#{tool}/#{name}.json"
|
445
|
+
FileUtils.mkdir_p(File.dirname(config_path))
|
446
|
+
File.open(config_path, 'w') do |file|
|
447
|
+
file.write(JSON.pretty_generate(json, :allow_nan => true))
|
448
|
+
end
|
449
|
+
end
|
450
|
+
|
451
|
+
def self.delete_tool_config(scope, tool, name)
|
452
|
+
FileUtils.rm_f("#{OPENC3_LOCAL_MODE_PATH}/#{scope}/tool_config/#{tool}/#{name}.json")
|
453
|
+
end
|
454
|
+
|
455
|
+
def self.sync_settings()
|
456
|
+
scopes = ScopeModel.names()
|
457
|
+
scopes.each do |scope|
|
458
|
+
Dir["#{OPENC3_LOCAL_MODE_PATH}/#{scope}/settings/*.json"].each do |config|
|
459
|
+
name = File.basename(config, ".json")
|
460
|
+
puts "Syncing setting #{name}"
|
461
|
+
# Anything can be stored in settings so read and set directly
|
462
|
+
data = File.read(config)
|
463
|
+
SettingModel.set({ name: name, data: data }, scope: scope)
|
464
|
+
end
|
465
|
+
end
|
466
|
+
end
|
467
|
+
|
468
|
+
def self.save_setting(scope, name, data)
|
469
|
+
config_path = "#{OPENC3_LOCAL_MODE_PATH}/#{scope}/settings/#{name}.json"
|
470
|
+
FileUtils.mkdir_p(File.dirname(config_path))
|
471
|
+
# Anything can be stored as a setting so write it out directly
|
472
|
+
File.write(config_path, data)
|
473
|
+
end
|
474
|
+
|
420
475
|
# Helper methods
|
421
476
|
|
422
477
|
def self.sync_remote_to_local(bucket, key)
|
data/lib/openc3/version.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# encoding: ascii-8bit
|
2
2
|
|
3
|
-
OPENC3_VERSION = '5.5.
|
3
|
+
OPENC3_VERSION = '5.5.2-beta0'
|
4
4
|
module OpenC3
|
5
5
|
module Version
|
6
6
|
MAJOR = '5'
|
7
7
|
MINOR = '5'
|
8
|
-
PATCH = '
|
9
|
-
OTHER = ''
|
10
|
-
BUILD = '
|
8
|
+
PATCH = '2'
|
9
|
+
OTHER = 'pre.beta0'
|
10
|
+
BUILD = '417d0e4ab762ecc0ada17fd8e230b394721f9cd4'
|
11
11
|
end
|
12
|
-
VERSION = '5.5.
|
13
|
-
GEM_VERSION = '5.5.
|
12
|
+
VERSION = '5.5.2-beta0'
|
13
|
+
GEM_VERSION = '5.5.2.pre.beta0'
|
14
14
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# This class can be used in your scripts like so:
|
2
|
-
#
|
2
|
+
# require_utility '<%= target_class.upcase %>/lib/<%= target_lib_filename %>'
|
3
3
|
# <%= target_object %> = <%= target_class %>.new
|
4
4
|
# <%= target_object %>.utility
|
5
5
|
# For more information see the OpenC3 scripting guide
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openc3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.5.
|
4
|
+
version: 5.5.2.pre.beta0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Melton
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-03-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -896,7 +896,7 @@ files:
|
|
896
896
|
- lib/openc3/models/router_status_model.rb
|
897
897
|
- lib/openc3/models/scope_model.rb
|
898
898
|
- lib/openc3/models/secret_model.rb
|
899
|
-
- lib/openc3/models/
|
899
|
+
- lib/openc3/models/setting_model.rb
|
900
900
|
- lib/openc3/models/sorted_model.rb
|
901
901
|
- lib/openc3/models/stash_model.rb
|
902
902
|
- lib/openc3/models/target_model.rb
|
@@ -1048,9 +1048,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1048
1048
|
version: '2.7'
|
1049
1049
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1050
1050
|
requirements:
|
1051
|
-
- - "
|
1051
|
+
- - ">"
|
1052
1052
|
- !ruby/object:Gem::Version
|
1053
|
-
version:
|
1053
|
+
version: 1.3.1
|
1054
1054
|
requirements: []
|
1055
1055
|
rubygems_version: 3.3.14
|
1056
1056
|
signing_key:
|