openc3 5.17.0 → 5.18.0

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.

Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/bin/openc3cli +1 -1
  3. data/data/config/_interfaces.yaml +4 -4
  4. data/data/config/command_modifiers.yaml +4 -0
  5. data/data/config/interface_modifiers.yaml +18 -8
  6. data/data/config/item_modifiers.yaml +34 -26
  7. data/data/config/microservice.yaml +4 -1
  8. data/data/config/param_item_modifiers.yaml +16 -0
  9. data/data/config/parameter_modifiers.yaml +29 -12
  10. data/data/config/plugins.yaml +3 -3
  11. data/data/config/screen.yaml +7 -7
  12. data/data/config/telemetry_modifiers.yaml +9 -4
  13. data/data/config/widgets.yaml +41 -14
  14. data/ext/openc3/ext/packet/packet.c +6 -0
  15. data/lib/openc3/accessors/accessor.rb +1 -0
  16. data/lib/openc3/accessors/binary_accessor.rb +170 -11
  17. data/lib/openc3/api/cmd_api.rb +39 -35
  18. data/lib/openc3/api/config_api.rb +10 -10
  19. data/lib/openc3/api/interface_api.rb +28 -21
  20. data/lib/openc3/api/limits_api.rb +29 -29
  21. data/lib/openc3/api/metrics_api.rb +3 -3
  22. data/lib/openc3/api/offline_access_api.rb +5 -5
  23. data/lib/openc3/api/router_api.rb +25 -19
  24. data/lib/openc3/api/settings_api.rb +10 -10
  25. data/lib/openc3/api/stash_api.rb +10 -10
  26. data/lib/openc3/api/target_api.rb +10 -10
  27. data/lib/openc3/api/tlm_api.rb +44 -44
  28. data/lib/openc3/conversions/bit_reverse_conversion.rb +60 -0
  29. data/lib/openc3/conversions/ip_read_conversion.rb +59 -0
  30. data/lib/openc3/conversions/ip_write_conversion.rb +61 -0
  31. data/lib/openc3/conversions/object_read_conversion.rb +88 -0
  32. data/lib/openc3/conversions/object_write_conversion.rb +38 -0
  33. data/lib/openc3/conversions.rb +6 -1
  34. data/lib/openc3/io/json_drb.rb +19 -21
  35. data/lib/openc3/io/json_rpc.rb +14 -13
  36. data/lib/openc3/microservices/microservice.rb +11 -11
  37. data/lib/openc3/microservices/scope_cleanup_microservice.rb +1 -1
  38. data/lib/openc3/microservices/timeline_microservice.rb +76 -51
  39. data/lib/openc3/models/activity_model.rb +25 -21
  40. data/lib/openc3/models/scope_model.rb +44 -13
  41. data/lib/openc3/models/sorted_model.rb +1 -1
  42. data/lib/openc3/models/target_model.rb +4 -1
  43. data/lib/openc3/operators/microservice_operator.rb +2 -2
  44. data/lib/openc3/operators/operator.rb +9 -9
  45. data/lib/openc3/packets/packet.rb +18 -1
  46. data/lib/openc3/packets/packet_config.rb +37 -16
  47. data/lib/openc3/packets/packet_item.rb +5 -0
  48. data/lib/openc3/packets/structure.rb +67 -3
  49. data/lib/openc3/packets/structure_item.rb +49 -12
  50. data/lib/openc3/script/calendar.rb +2 -2
  51. data/lib/openc3/script/extract.rb +5 -3
  52. data/lib/openc3/script/web_socket_api.rb +11 -0
  53. data/lib/openc3/topics/decom_interface_topic.rb +2 -1
  54. data/lib/openc3/topics/system_events_topic.rb +40 -0
  55. data/lib/openc3/utilities/authentication.rb +2 -1
  56. data/lib/openc3/utilities/authorization.rb +2 -2
  57. data/lib/openc3/version.rb +5 -5
  58. data/templates/tool_angular/package.json +5 -5
  59. data/templates/tool_react/package.json +8 -8
  60. data/templates/tool_svelte/package.json +10 -10
  61. data/templates/tool_vue/package.json +10 -10
  62. data/templates/widget/package.json +10 -10
  63. data/templates/widget/src/Widget.vue +0 -1
  64. metadata +22 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38d414a88623d811f51dc74da1f49169ca0b0c3ca3ba740e5f70b854e9524824
4
- data.tar.gz: ad24c61fe6f733ae07777f3fa4dbe7b2cfd013adf8e22bc8cec63d4c1a3b1684
3
+ metadata.gz: e6ba1e299807bdcbb67ae8b2e678d37152286d3061a8127fe982d0d9efe39fac
4
+ data.tar.gz: 9b76aea8554d86a633ec2b2b35c250a2481550c2069a64e083d74d0cbb89d156
5
5
  SHA512:
6
- metadata.gz: 8faed944b2e064ecf2a4d55f434dfeb91bf09f5a383aa30bc370f550fc7bc5dccfa9c1d8cf7efdda601887359dc6a44bad84e1eef27dc811341208062b038f23
7
- data.tar.gz: 7c50c7428cac1a2c35a5b62121fc5791f90a3d1a6d3c2f00c61b24b2e7ebfa24990bd08c74b0af47a41979b55c41e1cd582d76cf8392260947e7578f47a9eeb2
6
+ metadata.gz: 34df5327bcfbcdff0c21e5856d7dcc11ee88a8f83e3e83f1a8fc9e70b37b37e36360e54f0f9ad8df8f505f9e7b6ed2cf253d0d4a8efaaec072cced50a0e104d7
7
+ data.tar.gz: c78d41c4ed5b18ae17450c1e50889d169c714dbc2975cc710158de682f7012be9c8f39e1a0230aaa3d67c57c26fbdeaa82bfa8617658d3ab22ac709828248209
data/bin/openc3cli CHANGED
@@ -425,7 +425,7 @@ def load_plugin(plugin_file_path, scope:, plugin_hash_file: nil, force: false)
425
425
  unless OpenC3::ScopeModel.names.include?(scope)
426
426
  begin
427
427
  puts "Creating scope: #{scope}"
428
- scope_model = OpenC3::ScopeModel.new(name: scope, scope: scope)
428
+ scope_model = OpenC3::ScopeModel.new(name: scope)
429
429
  scope_model.create
430
430
  scope_model.deploy(".", {})
431
431
  rescue => e
@@ -1,5 +1,5 @@
1
1
  ---
2
- tcpip_client_interface.rb:
2
+ tcpip_client_interface:
3
3
  parameters:
4
4
  - name: Host
5
5
  required: true
@@ -29,7 +29,7 @@ tcpip_client_interface.rb:
29
29
  # prettier-ignore
30
30
  values:
31
31
  <%= MetaConfigParser.load('protocols.yaml').to_meta_config_yaml(8) %>
32
- tcpip_server_interface.rb:
32
+ tcpip_server_interface:
33
33
  parameters:
34
34
  - name: Write Port
35
35
  required: true
@@ -54,7 +54,7 @@ tcpip_server_interface.rb:
54
54
  # prettier-ignore
55
55
  values:
56
56
  <%= MetaConfigParser.load('protocols.yaml').to_meta_config_yaml(8) %>
57
- udp_interface.rb:
57
+ udp_interface:
58
58
  description: The UDP interface uses UDP packets to send and receive telemetry
59
59
  from the target
60
60
  parameters:
@@ -100,7 +100,7 @@ udp_interface.rb:
100
100
  required: false
101
101
  description: Address to bind UDP ports to
102
102
  values: .+
103
- serial_interface.rb:
103
+ serial_interface:
104
104
  description: Connects to a target over a serial port. OpenC3 provides drivers
105
105
  for both Windows and POSIX drivers for UNIX based systems.
106
106
  parameters:
@@ -244,3 +244,7 @@ SCREEN:
244
244
  description: Screen Name of related telemetry screen
245
245
  values: .+
246
246
  since: 5.14.0
247
+ VIRTUAL:
248
+ summary: Marks this packet as virtual and not participating in identification
249
+ description: Used for packet definitions that can be used as structures for items with a given packet.
250
+ since: 5.18.0
@@ -6,9 +6,12 @@ MAP_TARGET:
6
6
  required: true
7
7
  description: Target name to map to this interface
8
8
  values: .+
9
- example: |
9
+ ruby_example: |
10
10
  INTERFACE DATA_INT tcpip_client_interface.rb host.docker.internal 8080 8081 10.0 nil BURST
11
11
  MAP_TARGET DATA
12
+ python_example: |
13
+ INTERFACE DATA_INT openc3/interfaces/tcpip_client_interface.py host.docker.internal 8080 8081 10.0 nil BURST
14
+ MAP_TARGET DATA
12
15
  MAP_CMD_TARGET:
13
16
  summary: Maps a target name to an interface for commands only
14
17
  since: 5.2.0
@@ -17,9 +20,12 @@ MAP_CMD_TARGET:
17
20
  required: true
18
21
  description: Command target name to map to this interface
19
22
  values: .+
20
- example: |
23
+ ruby_example: |
21
24
  INTERFACE CMD_INT tcpip_client_interface.rb host.docker.internal 8080 8081 10.0 nil BURST
22
25
  MAP_CMD_TARGET DATA # Only DATA commands go on the CMD_INT interface
26
+ python_example: |
27
+ INTERFACE CMD_INT openc3/interfaces/tcpip_client_interface.py host.docker.internal 8080 8081 10.0 nil BURST
28
+ MAP_CMD_TARGET DATA # Only DATA commands go on the CMD_INT interface
23
29
  MAP_TLM_TARGET:
24
30
  summary: Maps a target name to an interface for telemetry only
25
31
  since: 5.2.0
@@ -28,9 +34,12 @@ MAP_TLM_TARGET:
28
34
  required: true
29
35
  description: Telemetry target name to map to this interface
30
36
  values: .+
31
- example: |
37
+ ruby_example: |
32
38
  INTERFACE TLM_INT tcpip_client_interface.rb host.docker.internal 8080 8081 10.0 nil BURST
33
39
  MAP_TLM_TARGET DATA # Only DATA telemetry received on TLM_INT interface
40
+ python_example: |
41
+ INTERFACE TLM_INT openc3/interfaces/tcpip_client_interface.py host.docker.internal 8080 8081 10.0 nil BURST
42
+ MAP_TLM_TARGET DATA # Only DATA telemetry received on TLM_INT interface
34
43
  DONT_CONNECT:
35
44
  summary: Server will not automatically try to connect to the interface at startup
36
45
  DONT_RECONNECT:
@@ -102,17 +111,18 @@ PROTOCOL:
102
111
  values: ["READ", "WRITE", "READ_WRITE"]
103
112
  - name: Protocol Filename or Classname
104
113
  required: true
105
- description: Ruby filename or class name which implements the protocol
114
+ description: Ruby or Python filename or class name which implements the protocol
106
115
  values: .*
107
116
  - name: Protocol specific parameters
108
117
  required: false
109
118
  description: Additional parameters used by the protocol
110
- example: |
119
+ ruby_example: |
111
120
  INTERFACE DATA_INT tcpip_client_interface.rb host.docker.internal 8080 8081 10.0 nil nil
112
121
  MAP_TARGET DATA
113
122
  # Rather than defining the LENGTH protocol on the INTERFACE line we define it here
114
123
  PROTOCOL READ LengthProtocol 0 16 0 1 BIG_ENDIAN 4 0xBA5EBA11
115
- INTERFACE DATA_INT tcpip_client_interface.rb host.docker.internal 8080 8081 10.0 nil BURST
124
+ python_example: |
125
+ INTERFACE DATA_INT openc3/interfaces/tcpip_client_interface.py host.docker.internal 8080 8081 10.0 nil BURST
116
126
  MAP_TARGET DATA
117
127
  PROTOCOL READ IgnorePacketProtocol INST IMAGE # Drop all INST IMAGE packets
118
128
  OPTION:
@@ -220,8 +230,8 @@ CMD:
220
230
  required: true
221
231
  description: One or more arguments to exec to run the microservice.
222
232
  values: .+
223
- example: |
224
- CMD ruby interface_microservice.rb DEFAULT__INTERFACE__INT1
233
+ ruby_example: CMD ruby interface_microservice.rb DEFAULT__INTERFACE__INT1
234
+ python_example: CMD python interface_microservice.py DEFAULT__INTERFACE__INT1
225
235
  CONTAINER:
226
236
  summary: Docker Container
227
237
  description: Container to execute and run the microservice in. Only used in COSMOS Enterprise Edition.
@@ -31,14 +31,14 @@ STATE:
31
31
  values: ['GREEN', 'YELLOW', 'RED']
32
32
  READ_CONVERSION:
33
33
  summary: Applies a conversion to the current telemetry item
34
- description: Conversions are implemented in a custom Ruby file which should be
35
- located in the target's lib folder. The class must require 'openc3/conversions/conversion'
36
- and inherit from Conversion. It must implement the initialize method if it
37
- takes extra parameters and must always implement the call method. The conversion
34
+ description: Conversions are implemented in a custom Ruby or Python file which should be
35
+ located in the target's lib folder. The class must inherit from Conversion.
36
+ It must implement the `initialize` (Ruby) or `__init__` (Python) method if it
37
+ takes extra parameters and must always implement the `call` method. The conversion
38
38
  factor is applied to the raw value in the telemetry packet before it is displayed
39
39
  to the user. The user still has the ability to see the raw unconverted value
40
40
  in a details dialog.
41
- example: |
41
+ ruby_example: |
42
42
  READ_CONVERSION the_great_conversion.rb 1000
43
43
 
44
44
  Defined in the_great_conversion.rb:
@@ -55,14 +55,26 @@ READ_CONVERSION:
55
55
  end
56
56
  end
57
57
  end
58
+ python_example: |
59
+ READ_CONVERSION the_great_conversion.py 1000
60
+
61
+ Defined in the_great_conversion.py:
62
+
63
+ from openc3.conversions.conversion import Conversion
64
+ class TheGreatConversion(Conversion):
65
+ def __init__(self, multiplier):
66
+ super().__init__()
67
+ self.multiplier = float(multiplier)
68
+ def call(self, value, packet, buffer):
69
+ return value * multiplier
58
70
  parameters:
59
71
  - name: Class Filename
60
72
  required: true
61
- description: The filename which contains the Ruby class. The filename must
73
+ description: The filename which contains the Ruby or Python class. The filename must
62
74
  be named after the class such that the class is a CamelCase version of the
63
75
  underscored filename. For example, 'the_great_conversion.rb' should contain
64
76
  'class TheGreatConversion'.
65
- values: .*\.rb
77
+ values: .*
66
78
  - name: Parameter
67
79
  required: false
68
80
  description: Additional parameter values for the conversion which are passed
@@ -118,19 +130,24 @@ GENERIC_READ_CONVERSION_START:
118
130
  This conversion factor is applied to the raw value in the telemetry packet
119
131
  before it is displayed to the user. The user still has the ability to see the
120
132
  raw unconverted value in a details dialog. The conversion is specified as
121
- ruby code that receives two implied parameters. 'value' which is the raw
133
+ Ruby or Python code that receives two implied parameters. 'value' which is the raw
122
134
  value being read and 'packet' which is a reference to the telemetry packet
123
135
  class (Note, referencing the packet as 'myself' is still supported for backwards
124
- compatibility). The last line of ruby code given should return the converted
136
+ compatibility). The last line of code should return the converted
125
137
  value. The GENERIC_READ_CONVERSION_END keyword specifies that all lines of
126
- ruby code for the conversion have been given.
138
+ code for the conversion have been given.
127
139
  warning: Generic conversions are not a good long term solution. Consider creating
128
140
  a conversion class and using READ_CONVERSION instead. READ_CONVERSION is easier
129
- to debug and higher performance.
130
- example: |
141
+ to debug and has higher performance.
142
+ ruby_example: |
131
143
  APPEND_ITEM ITEM1 32 UINT
132
144
  GENERIC_READ_CONVERSION_START
133
- value * 1.5 # Convert the value by a scale factor
145
+ return (value * 1.5).to_i # Convert the value by a scale factor
146
+ GENERIC_READ_CONVERSION_END
147
+ python_example: |
148
+ APPEND_ITEM ITEM1 32 UINT
149
+ GENERIC_READ_CONVERSION_START
150
+ return int(value * 1.5) # Convert the value by a scale factor
134
151
  GENERIC_READ_CONVERSION_END
135
152
  parameters:
136
153
  - name: Converted Type
@@ -208,25 +225,16 @@ LIMITS:
208
225
  values: .+
209
226
  LIMITS_RESPONSE:
210
227
  summary: Defines a response class that is called when the limits state of the current item changes
211
- example: LIMITS_RESPONSE example_limits_response.rb 10
228
+ ruby_example: LIMITS_RESPONSE example_limits_response.rb 10
229
+ python_example: LIMITS_RESPONSE example_limits_response.py 10
212
230
  parameters:
213
231
  - name: Response Class Filename
214
232
  required: true
215
- description: Name of the Ruby file which implements the limits response.
216
- This file should be in the config/TARGET/lib directory so it can be found by OpenC3.
233
+ description: Name of the Ruby or Python file which implements the limits response.
234
+ This file should be in the target's lib directory.
217
235
  values: .+
218
236
  - name: Response Specific Options
219
237
  required: false
220
238
  description: Variable length number of options that will be passed to the
221
239
  class constructor
222
240
  values: .+
223
- KEY:
224
- summary: Defines the key used to access this raw value in the packet.
225
- description: Keys are often JsonPath or XPath strings
226
- since: 5.0.10
227
- parameters:
228
- - name: Key string
229
- required: true
230
- description: The key to access this item
231
- values: .+
232
- example: KEY $.book.title
@@ -87,9 +87,12 @@ MICROSERVICE:
87
87
  required: true
88
88
  description: One or more arguments to exec to run the microservice.
89
89
  values: .+
90
- example: |
90
+ ruby_example: |
91
91
  MICROSERVICE EXAMPLE openc3-example
92
92
  CMD ruby example_target.rb
93
+ python_example: |
94
+ MICROSERVICE EXAMPLE openc3-example
95
+ CMD python example_target.py
93
96
  OPTION:
94
97
  summary: Pass an option to the microservice
95
98
  description: Generic key/value(s) options to pass to the microservice. These take the form of KEYWORD/PARAMS like a line in a OpenC3 configuration file. Multiple OPTION keywords can be used to pass multiple options to the microservice.
@@ -60,3 +60,19 @@ KEY:
60
60
  description: The key to access this item
61
61
  values: .+
62
62
  since: 5.0.10
63
+ VARIABLE_BIT_SIZE:
64
+ summary: Marks an item as having its bit size defined by another length item
65
+ since: 5.18.0
66
+ parameters:
67
+ - name: Length Item Name
68
+ required: true
69
+ description: The name of the associated length item
70
+ values: .+
71
+ - name: Length Bits Per Count
72
+ required: false
73
+ description: Bits per count of the length item. Defaults to 8
74
+ values: \d+
75
+ - name: Length Value Bit Offset
76
+ required: false
77
+ description: Offset in Bits to Apply to Length Field Value. Defaults to 0
78
+ values: \d+
@@ -64,10 +64,10 @@ STATE:
64
64
  WRITE_CONVERSION:
65
65
  summary: Applies a conversion when writing the current command parameter
66
66
  description: |
67
- Conversions are implemented in a custom Ruby file which should be
68
- located in the target's lib folder. The class must require 'openc3/conversions/conversion'
69
- and inherit from Conversion. It must implement the initialize method if it
70
- takes extra parameters and must always implement the call method. The conversion
67
+ Conversions are implemented in a custom Ruby or Python file which should be
68
+ located in the target's lib folder. The class must inherit from Conversion.
69
+ It must implement the `initialize` (Ruby) or `__init__` (Python) method if it
70
+ takes extra parameters and must always implement the `call` method. The conversion
71
71
  factor is applied to the value entered by the user before it is written into
72
72
  the binary command packet and sent.
73
73
 
@@ -79,7 +79,7 @@ WRITE_CONVERSION:
79
79
  given_values() method which can be used to retrieve a hash of the user provided
80
80
  values to the command. That can be used to check parameter values passed in.
81
81
  :::
82
- example: |
82
+ ruby_example: |
83
83
  WRITE_CONVERSION the_great_conversion.rb 1000
84
84
 
85
85
  Defined in the_great_conversion.rb:
@@ -96,14 +96,26 @@ WRITE_CONVERSION:
96
96
  end
97
97
  end
98
98
  end
99
+ python_example: |
100
+ WRITE_CONVERSION the_great_conversion.py 1000
101
+
102
+ Defined in the_great_conversion.py:
103
+
104
+ from openc3.conversions.conversion import Conversion
105
+ class TheGreatConversion(Conversion):
106
+ def __init__(self, multiplier):
107
+ super().__init__()
108
+ self.multiplier = float(multiplier)
109
+ def call(self, value, packet, buffer):
110
+ return value * multiplier
99
111
  parameters:
100
112
  - name: Class Filename
101
113
  required: true
102
- description: The filename which contains the Ruby class. The filename must
114
+ description: The filename which contains the Ruby or Python class. The filename must
103
115
  be named after the class such that the class is a CamelCase version of the
104
116
  underscored filename. For example, 'the_great_conversion.rb' should contain
105
117
  'class TheGreatConversion'.
106
- values: .*\.rb
118
+ values: .*
107
119
  - name: Parameter
108
120
  required: false
109
121
  description: Additional parameter values for the conversion which are passed
@@ -157,12 +169,12 @@ GENERIC_WRITE_CONVERSION_START:
157
169
  Adds a generic conversion function to the current command parameter.
158
170
  This conversion factor is applied to the value entered by the user before it
159
171
  is written into the binary command packet and sent. The conversion is specified
160
- as ruby code that receives two implied parameters. 'value' which is the raw
172
+ as Ruby or Python code that receives two implied parameters. 'value' which is the raw
161
173
  value being written and 'packet' which is a reference to the command packet
162
174
  class (Note, referencing the packet as 'myself' is still supported for backwards
163
- compatibility). The last line of ruby code given should return the converted
175
+ compatibility). The last line of code should return the converted
164
176
  value. The GENERIC_WRITE_CONVERSION_END keyword specifies that all lines of
165
- ruby code for the conversion have been given.
177
+ code for the conversion have been given.
166
178
 
167
179
  :::info Multiple write conversions on command parameters
168
180
  When a command is built, each item gets written (and write conversions are run)
@@ -175,10 +187,15 @@ GENERIC_WRITE_CONVERSION_START:
175
187
  warning: Generic conversions are not a good long term solution. Consider creating
176
188
  a conversion class and using WRITE_CONVERSION instead. WRITE_CONVERSION is easier
177
189
  to debug and higher performance.
178
- example: |
190
+ ruby_example: |
191
+ APPEND_PARAMETER ITEM1 32 UINT 0 0xFFFFFFFF 0
192
+ GENERIC_WRITE_CONVERSION_START
193
+ return (value * 1.5).to_i # Convert the value by a scale factor
194
+ GENERIC_WRITE_CONVERSION_END
195
+ python_example: |
179
196
  APPEND_PARAMETER ITEM1 32 UINT 0 0xFFFFFFFF 0
180
197
  GENERIC_WRITE_CONVERSION_START
181
- (value * 1.5).to_i # Convert the value by a scale factor
198
+ return int(value * 1.5) # Convert the value by a scale factor
182
199
  GENERIC_WRITE_CONVERSION_END
183
200
  GENERIC_WRITE_CONVERSION_END:
184
201
  summary: Complete a generic write conversion
@@ -24,7 +24,7 @@ INTERFACE:
24
24
  <%= MetaConfigParser.load('interface_modifiers.yaml').to_meta_config_yaml(4) %>
25
25
  summary: Defines a connection to a physical target
26
26
  description: Interfaces are what OpenC3 uses to talk to a particular piece
27
- of hardware. Interfaces require a Ruby file which implements all the interface
27
+ of hardware. Interfaces require a Ruby or Python file which implements all the interface
28
28
  methods necessary to talk to the hardware. OpenC3 defines many built in interfaces
29
29
  or you can define your own as long as it implements the interface protocol.
30
30
  parameters:
@@ -37,7 +37,7 @@ INTERFACE:
37
37
  values: \D\S*
38
38
  - name: Filename
39
39
  required: true
40
- description: Ruby file to use when instantiating the interface.
40
+ description: Ruby or Python file to use when instantiating the interface.
41
41
  values:
42
42
  <%= MetaConfigParser.load('_interfaces.yaml').to_meta_config_yaml(8) %>
43
43
  documentation: Additional parameters are required. Please see the [Interfaces](../configuration/interfaces.md)
@@ -57,7 +57,7 @@ ROUTER:
57
57
  values: .+
58
58
  - name: Filename
59
59
  required: true
60
- description: Ruby file to use when instantiating the interface.
60
+ description: Ruby or Python file to use when instantiating the interface.
61
61
  values:
62
62
  <%= MetaConfigParser.load('_interfaces.yaml').to_meta_config_yaml(8) %>
63
63
  documentation: Additional parameters are required. Please see the [Interfaces](../configuration/interfaces.md)
@@ -60,8 +60,8 @@ GLOBAL_SUBSETTING:
60
60
  made up of more than one subwidget. For example, LABELVALUE is made up of a LABEL
61
61
  at subwidget index 0 and a VALUE at subwidget index 1. This allows for passing
62
62
  settings to specific subwidgets. Some widgets are made up of multiple subwidgets,
63
- e.g. LABELVALUELIMITSBAR. To set the label text color, pass '0:0' as the Subwidget
64
- Index to first index the LABELVALUE and then the LABEL.
63
+ e.g. LABELVALUELIMITSBAR. To set the Label widget, pass 0 as the Subwidget
64
+ Index, pass 1 for the Value widget, and 2 for the LimitsBar widget.
65
65
  parameters:
66
66
  - name: Widget Class Name
67
67
  required: true
@@ -82,7 +82,7 @@ GLOBAL_SUBSETTING:
82
82
  values: .*
83
83
  example: |
84
84
  # Set all text color to white for labelvaluelimitsbars
85
- GLOBAL_SUBSETTING LABELVALUELIMITSBAR 0:0 TEXTCOLOR white
85
+ GLOBAL_SUBSETTING LABELVALUELIMITSBAR 0 TEXTCOLOR white
86
86
  SETTING:
87
87
  summary: Applies a widget setting to the previously defined widget
88
88
  description: |
@@ -102,8 +102,8 @@ SUBSETTING:
102
102
  made up of more than one subwidget. For example, LABELVALUE is made up of a LABEL
103
103
  at subwidget index 0 and a VALUE at subwidget index 1. This allows for passing
104
104
  settings to specific subwidgets. Some widgets are made up of multiple subwidgets,
105
- e.g. LABELVALUELIMITSBAR. To set the label text color, pass '0:0' as the Subwidget
106
- Index to first index the LABELVALUE and then the LABEL.
105
+ e.g. LABELVALUELIMITSBAR. To set the Label widget, pass 0 as the Subwidget
106
+ Index, pass 1 for the Value widget, and 2 for the LimitsBar widget.
107
107
  parameters:
108
108
  - name: Subwidget Index
109
109
  required: true
@@ -121,9 +121,9 @@ SUBSETTING:
121
121
  example: |
122
122
  VERTICALBOX
123
123
  LABELVALUE INST HEALTH_STATUS TEMP1
124
- SUBSETTING 0 TEXTCOLOR blue # Change the label's text to blue
124
+ SUBSETTING 0 TEXTCOLOR blue # Change the label's text to blue
125
125
  LABELVALUELIMITSBAR INST HEALTH_STATUS TEMP1
126
- SUBSETTING 0:0 TEXTCOLOR green # Change the label's text to green
126
+ SUBSETTING 0 TEXTCOLOR green # Change the label's text to green
127
127
  END
128
128
  NAMED_WIDGET:
129
129
  summary: Name a widget to allow access to it via the getNamedWidget method
@@ -135,7 +135,8 @@ META:
135
135
  values: .*
136
136
  PROCESSOR:
137
137
  summary: Defines a processor class that executes code every time a packet is received
138
- example: PROCESSOR TEMP1HIGH watermark_processor.rb TEMP1
138
+ ruby_example: PROCESSOR TEMP1HIGH watermark_processor.rb TEMP1
139
+ python_example: PROCESSOR TEMP1HIGH watermark_processor.py TEMP1
139
140
  parameters:
140
141
  - name: Processor Name
141
142
  required: true
@@ -143,9 +144,9 @@ PROCESSOR:
143
144
  values: .+
144
145
  - name: Processor Class Filename
145
146
  required: true
146
- description: Name of the Ruby file which implements the processor.
147
- This file should be in the config/TARGET/lib directory so it can be found by OpenC3.
148
- values: '.+\.rb'
147
+ description: Name of the Ruby or Python file which implements the processor.
148
+ This file should be in the target's lib directory.
149
+ values: '.+'
149
150
  - name: Processor Specific Options
150
151
  required: false
151
152
  description: Variable length number of options that will be passed to the class constructor.
@@ -176,3 +177,7 @@ IGNORE_OVERLAP:
176
177
  description: Packet items which overlap normally generate a warning unless each individual item has the OVERLAP keyword.
177
178
  This ignores overlaps across the entire packet.
178
179
  since: 5.16.0
180
+ VIRTUAL:
181
+ summary: Marks this packet as virtual and not participating in identification
182
+ description: Used for packet definitions that can be used as structures for items with a given packet.
183
+ since: 5.18.0
@@ -1023,20 +1023,13 @@ Telemetry Widgets:
1023
1023
  values: .+
1024
1024
  - name: Item name
1025
1025
  required: true
1026
- description: The item name
1026
+ description: The item name to pull the CONVERTED value from.
1027
+ If additional processing (base64 encoding) is needed consider using a DERIVED item.
1027
1028
  values: .+
1028
1029
  - name: Format
1029
1030
  required: true
1030
1031
  description: The image format of the base64 data (e.g. jpg, png, etc)
1031
1032
  values: .+
1032
- - name: Width
1033
- required: false
1034
- description: Width of the widget
1035
- values: .*
1036
- - name: Height
1037
- required: false
1038
- description: Height of the widget
1039
- values: .*
1040
1033
  example: |
1041
1034
  IMAGEVIEWER INST IMAGE IMAGE jpg
1042
1035
  PROGRESSBAR:
@@ -1156,12 +1149,11 @@ Telemetry Widgets:
1156
1149
  # RANGECOLUMN INST HEALTH_STATUS TEMP1 -100 100
1157
1150
  ROLLUP:
1158
1151
  summary: Displays a notification icon which changes color based on a rollup telemetry
1152
+ since: 5.17.1
1159
1153
  parameters:
1160
1154
  - name: Icon name
1161
1155
  required: true
1162
- description: |
1163
- The astro UX icon to display. Valid choices are 'astro' icons taken from
1164
- https://github.com/RocketCommunicationsInc/astro-components/blob/master/static/json/rux-icons.json
1156
+ description: The astro UX icon to display. Valid choices are 'astro' icons taken from https://github.com/RocketCommunicationsInc/astro-components/blob/master/static/json/rux-icons.json.
1165
1157
  values: .+
1166
1158
  - name: Icon label
1167
1159
  required: false
@@ -1173,13 +1165,48 @@ Telemetry Widgets:
1173
1165
  values: .+
1174
1166
  example: |
1175
1167
  ROLLUP satellite-transmit "SAT 1" "Details"
1168
+ # Screen to open on click
1176
1169
  SETTING SCREEN INST HS
1170
+ # Telemetry items to rollup status
1177
1171
  SETTING TLM INST HEALTH_STATUS TEMP1
1178
1172
  SETTING TLM INST HEALTH_STATUS TEMP2
1179
1173
  ROLLUP antenna "GND 2" "Location"
1174
+ # Screen to open on click
1180
1175
  SETTING SCREEN INST HS
1176
+ # Telemetry items to rollup status
1181
1177
  SETTING TLM INST HEALTH_STATUS TEMP3
1182
1178
  SETTING TLM INST HEALTH_STATUS TEMP4
1179
+ SIGNAL:
1180
+ summary: Displays a cellular signal icon which changes based on telemetry value
1181
+ since: 5.17.2
1182
+ parameters:
1183
+ - name: Target name
1184
+ required: true
1185
+ description: The target name
1186
+ values: .+
1187
+ - name: Packet name
1188
+ required: true
1189
+ description: The packet name
1190
+ values: .+
1191
+ - name: Item name
1192
+ required: true
1193
+ description: The item name
1194
+ values: .+
1195
+ - name: Value type
1196
+ required: false
1197
+ description: The type of the value to display. Default is CONVERTED.
1198
+ values: <%= %w(RAW CONVERTED) %>
1199
+ example: |
1200
+ SIGNAL INST HEALTH_STATUS TEMP1
1201
+ # Screen to open on click
1202
+ SETTING SCREEN INST HS
1203
+ # Values to compare when setting the 1-bar, 2-bar and 3-bar icons
1204
+ # Default is 30, 60, 90 (e.g. 0 to 100 range)
1205
+ # Value < -50 display no bars
1206
+ # Value >= -50 and < 0 displays 1 bar
1207
+ # Value >= 0 and < 50 displays 2 bars
1208
+ # Value >= 50 displays 5 bars
1209
+ SETTING RANGE -50 0 50
1183
1210
  TEXTBOX:
1184
1211
  summary: Provides a large box for multiline text
1185
1212
  parameters:
@@ -1320,7 +1347,7 @@ Interactive Widgets:
1320
1347
  BUTTON:
1321
1348
  summary: Displays a rectangular clickable button
1322
1349
  description: |
1323
- Upon clicking, the button executes the Ruby code assigned. Buttons
1350
+ Upon clicking, the button executes the Javascript code assigned. Buttons
1324
1351
  can be used to send commands and perform other tasks. If you want your button
1325
1352
  to use values from other widgets, define them as named widgets and read their
1326
1353
  values using the `screen.getNamedWidget("WIDGET_NAME").text()` method.
@@ -1334,7 +1361,7 @@ Interactive Widgets:
1334
1361
  separated by `;;`.
1335
1362
 
1336
1363
  You can send commands with buttons using api.cmd(). The cmd() syntax looks exactly
1337
- like the standard COSMOS Ruby scripting syntax. You can also request and use
1364
+ like the standard COSMOS scripting syntax. You can also request and use
1338
1365
  telemetry in screens using Javascript Promises.
1339
1366
 
1340
1367
  `api.tlm('INST PARAMS VALUE3', 'RAW').then(dur => api.cmd('INST COLLECT with TYPE NORMAL, DURATION '+dur))"`
@@ -61,6 +61,8 @@ static ID id_ivar_stored = 0;
61
61
  static ID id_ivar_extra = 0;
62
62
  static ID id_ivar_template = 0;
63
63
  static ID id_ivar_packet_time = 0;
64
+ static ID id_ivar_ignore_overlap = 0;
65
+ static ID id_ivar_virtual = 0;
64
66
 
65
67
  /* Sets the target name this packet is associated with. Unidentified packets
66
68
  * will have target name set to nil.
@@ -285,6 +287,8 @@ static VALUE packet_initialize(int argc, VALUE *argv, VALUE self)
285
287
  rb_ivar_set(self, id_ivar_extra, Qnil);
286
288
  rb_ivar_set(self, id_ivar_template, Qnil);
287
289
  rb_ivar_set(self, id_ivar_packet_time, Qnil);
290
+ rb_ivar_set(self, id_ivar_ignore_overlap, Qfalse);
291
+ rb_ivar_set(self, id_ivar_virtual, Qfalse);
288
292
  return self;
289
293
  }
290
294
 
@@ -326,6 +330,8 @@ void Init_packet(void)
326
330
  id_ivar_extra = rb_intern("@extra");
327
331
  id_ivar_template = rb_intern("@template");
328
332
  id_ivar_packet_time = rb_intern("@packet_time");
333
+ id_ivar_ignore_overlap = rb_intern("@ignore_overlap");
334
+ id_ivar_virtual = rb_intern("@virtual");
329
335
 
330
336
  cPacket = rb_define_class_under(mOpenC3, "Packet", cStructure);
331
337
  rb_define_method(cPacket, "initialize", packet_initialize, -1);
@@ -104,6 +104,7 @@ module OpenC3
104
104
  end
105
105
 
106
106
  def self.convert_to_type(value, item)
107
+ return value if value.nil?
107
108
  case item.data_type
108
109
  when :OBJECT, :ARRAY
109
110
  # Do nothing for complex object types