openc3 5.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +18 -0
- data/Guardfile +35 -0
- data/LICENSE.txt +727 -0
- data/README.md +37 -0
- data/Rakefile +131 -0
- data/bin/cstol_converter +1178 -0
- data/bin/openc3cli +531 -0
- data/bin/rubysloc +139 -0
- data/data/config/_array_params.yaml +23 -0
- data/data/config/_id_items.yaml +24 -0
- data/data/config/_id_params.yaml +58 -0
- data/data/config/_interfaces.yaml +214 -0
- data/data/config/_interfaces.yaml.err +1017 -0
- data/data/config/_items.yaml +20 -0
- data/data/config/_params.yaml +60 -0
- data/data/config/cmd_tlm_server.yaml +136 -0
- data/data/config/command.yaml +44 -0
- data/data/config/command_modifiers.yaml +160 -0
- data/data/config/command_telemetry.yaml +3 -0
- data/data/config/interface_modifiers.yaml +104 -0
- data/data/config/item_modifiers.yaml +221 -0
- data/data/config/microservice.yaml +78 -0
- data/data/config/param_item_modifiers.yaml +52 -0
- data/data/config/parameter_modifiers.yaml +200 -0
- data/data/config/plugins.yaml +80 -0
- data/data/config/protocols.yaml +290 -0
- data/data/config/screen.yaml +147 -0
- data/data/config/table_manager.yaml +89 -0
- data/data/config/table_parameter_modifiers.yaml +9 -0
- data/data/config/target.yaml +142 -0
- data/data/config/target_config.yaml +94 -0
- data/data/config/telemetry.yaml +87 -0
- data/data/config/telemetry_modifiers.yaml +159 -0
- data/data/config/tool.yaml +63 -0
- data/data/config/unknown.yaml +3 -0
- data/data/config/widgets.yaml +1505 -0
- data/ext/mkrf_conf.rb +49 -0
- data/ext/openc3/ext/array/array.c +122 -0
- data/ext/openc3/ext/array/extconf.rb +13 -0
- data/ext/openc3/ext/buffered_file/buffered_file.c +198 -0
- data/ext/openc3/ext/buffered_file/extconf.rb +13 -0
- data/ext/openc3/ext/config_parser/config_parser.c +280 -0
- data/ext/openc3/ext/config_parser/extconf.rb +13 -0
- data/ext/openc3/ext/crc/crc.c +351 -0
- data/ext/openc3/ext/crc/extconf.rb +13 -0
- data/ext/openc3/ext/openc3_io/extconf.rb +13 -0
- data/ext/openc3/ext/openc3_io/openc3_io.c +158 -0
- data/ext/openc3/ext/packet/extconf.rb +13 -0
- data/ext/openc3/ext/packet/packet.c +318 -0
- data/ext/openc3/ext/platform/extconf.rb +13 -0
- data/ext/openc3/ext/platform/platform.c +134 -0
- data/ext/openc3/ext/polynomial_conversion/extconf.rb +13 -0
- data/ext/openc3/ext/polynomial_conversion/polynomial_conversion.c +79 -0
- data/ext/openc3/ext/string/extconf.rb +13 -0
- data/ext/openc3/ext/string/string.c +63 -0
- data/ext/openc3/ext/structure/structure.c +1719 -0
- data/ext/openc3/ext/tabbed_plots_config/extconf.rb +13 -0
- data/ext/openc3/ext/tabbed_plots_config/tabbed_plots_config.c +62 -0
- data/ext/openc3/ext/telemetry/extconf.rb +13 -0
- data/ext/openc3/ext/telemetry/telemetry.c +336 -0
- data/lib/cosmos.rb +20 -0
- data/lib/cosmosc2.rb +20 -0
- data/lib/openc3/api/api.rb +39 -0
- data/lib/openc3/api/authorized_api.rb +30 -0
- data/lib/openc3/api/cmd_api.rb +451 -0
- data/lib/openc3/api/config_api.rb +58 -0
- data/lib/openc3/api/interface_api.rb +117 -0
- data/lib/openc3/api/limits_api.rb +375 -0
- data/lib/openc3/api/router_api.rb +117 -0
- data/lib/openc3/api/settings_api.rb +70 -0
- data/lib/openc3/api/target_api.rb +78 -0
- data/lib/openc3/api/tlm_api.rb +455 -0
- data/lib/openc3/bridge/bridge.rb +54 -0
- data/lib/openc3/bridge/bridge_config.rb +167 -0
- data/lib/openc3/bridge/bridge_interface_thread.rb +42 -0
- data/lib/openc3/bridge/bridge_router_thread.rb +42 -0
- data/lib/openc3/ccsds/ccsds_packet.rb +68 -0
- data/lib/openc3/ccsds/ccsds_parser.rb +148 -0
- data/lib/openc3/config/config_parser.rb +549 -0
- data/lib/openc3/config/meta_config_parser.rb +74 -0
- data/lib/openc3/conversions/conversion.rb +70 -0
- data/lib/openc3/conversions/generic_conversion.rb +83 -0
- data/lib/openc3/conversions/packet_time_formatted_conversion.rb +43 -0
- data/lib/openc3/conversions/packet_time_seconds_conversion.rb +43 -0
- data/lib/openc3/conversions/polynomial_conversion.rb +87 -0
- data/lib/openc3/conversions/processor_conversion.rb +70 -0
- data/lib/openc3/conversions/received_count_conversion.rb +38 -0
- data/lib/openc3/conversions/received_time_formatted_conversion.rb +42 -0
- data/lib/openc3/conversions/received_time_seconds_conversion.rb +42 -0
- data/lib/openc3/conversions/segmented_polynomial_conversion.rb +171 -0
- data/lib/openc3/conversions/unix_time_conversion.rb +68 -0
- data/lib/openc3/conversions/unix_time_formatted_conversion.rb +49 -0
- data/lib/openc3/conversions/unix_time_seconds_conversion.rb +49 -0
- data/lib/openc3/conversions.rb +34 -0
- data/lib/openc3/core_ext/array.rb +416 -0
- data/lib/openc3/core_ext/binding.rb +29 -0
- data/lib/openc3/core_ext/class.rb +72 -0
- data/lib/openc3/core_ext/exception.rb +61 -0
- data/lib/openc3/core_ext/file.rb +83 -0
- data/lib/openc3/core_ext/hash.rb +37 -0
- data/lib/openc3/core_ext/io.rb +134 -0
- data/lib/openc3/core_ext/kernel.rb +42 -0
- data/lib/openc3/core_ext/math.rb +128 -0
- data/lib/openc3/core_ext/matrix.rb +156 -0
- data/lib/openc3/core_ext/objectspace.rb +36 -0
- data/lib/openc3/core_ext/openc3_io.rb +57 -0
- data/lib/openc3/core_ext/range.rb +27 -0
- data/lib/openc3/core_ext/socket.rb +38 -0
- data/lib/openc3/core_ext/string.rb +389 -0
- data/lib/openc3/core_ext/stringio.rb +33 -0
- data/lib/openc3/core_ext/time.rb +508 -0
- data/lib/openc3/core_ext.rb +36 -0
- data/lib/openc3/interfaces/interface.rb +498 -0
- data/lib/openc3/interfaces/linc_interface.rb +475 -0
- data/lib/openc3/interfaces/protocols/burst_protocol.rb +192 -0
- data/lib/openc3/interfaces/protocols/crc_protocol.rb +193 -0
- data/lib/openc3/interfaces/protocols/fixed_protocol.rb +155 -0
- data/lib/openc3/interfaces/protocols/ignore_packet_protocol.rb +56 -0
- data/lib/openc3/interfaces/protocols/length_protocol.rb +165 -0
- data/lib/openc3/interfaces/protocols/override_protocol.rb +60 -0
- data/lib/openc3/interfaces/protocols/preidentified_protocol.rb +206 -0
- data/lib/openc3/interfaces/protocols/protocol.rb +82 -0
- data/lib/openc3/interfaces/protocols/template_protocol.rb +261 -0
- data/lib/openc3/interfaces/protocols/terminated_protocol.rb +93 -0
- data/lib/openc3/interfaces/serial_interface.rb +94 -0
- data/lib/openc3/interfaces/simulated_target_interface.rb +168 -0
- data/lib/openc3/interfaces/stream_interface.rb +81 -0
- data/lib/openc3/interfaces/tcpip_client_interface.rb +69 -0
- data/lib/openc3/interfaces/tcpip_server_interface.rb +629 -0
- data/lib/openc3/interfaces/udp_interface.rb +169 -0
- data/lib/openc3/interfaces.rb +44 -0
- data/lib/openc3/io/buffered_file.rb +109 -0
- data/lib/openc3/io/io_multiplexer.rb +80 -0
- data/lib/openc3/io/json_api_object.rb +208 -0
- data/lib/openc3/io/json_drb.rb +335 -0
- data/lib/openc3/io/json_drb_object.rb +114 -0
- data/lib/openc3/io/json_drb_rack.rb +84 -0
- data/lib/openc3/io/json_rpc.rb +420 -0
- data/lib/openc3/io/openc3_snmp.rb +58 -0
- data/lib/openc3/io/posix_serial_driver.rb +156 -0
- data/lib/openc3/io/raw_logger.rb +167 -0
- data/lib/openc3/io/raw_logger_pair.rb +77 -0
- data/lib/openc3/io/serial_driver.rb +105 -0
- data/lib/openc3/io/stderr.rb +43 -0
- data/lib/openc3/io/stdout.rb +43 -0
- data/lib/openc3/io/udp_sockets.rb +194 -0
- data/lib/openc3/io/win32_serial_driver.rb +196 -0
- data/lib/openc3/logs/log_writer.rb +302 -0
- data/lib/openc3/logs/packet_log_constants.rb +62 -0
- data/lib/openc3/logs/packet_log_reader.rb +345 -0
- data/lib/openc3/logs/packet_log_writer.rb +299 -0
- data/lib/openc3/logs/text_log_writer.rb +68 -0
- data/lib/openc3/logs.rb +25 -0
- data/lib/openc3/microservices/cleanup_microservice.rb +68 -0
- data/lib/openc3/microservices/decom_microservice.rb +136 -0
- data/lib/openc3/microservices/interface_microservice.rb +532 -0
- data/lib/openc3/microservices/log_microservice.rb +108 -0
- data/lib/openc3/microservices/microservice.rb +204 -0
- data/lib/openc3/microservices/plugin_microservice.rb +43 -0
- data/lib/openc3/microservices/reaction_microservice.rb +541 -0
- data/lib/openc3/microservices/reducer_microservice.rb +313 -0
- data/lib/openc3/microservices/router_microservice.rb +44 -0
- data/lib/openc3/microservices/text_log_microservice.rb +84 -0
- data/lib/openc3/microservices/timeline_microservice.rb +363 -0
- data/lib/openc3/microservices/trigger_group_microservice.rb +638 -0
- data/lib/openc3/models/activity_model.rb +319 -0
- data/lib/openc3/models/auth_model.rb +65 -0
- data/lib/openc3/models/cvt_model.rb +185 -0
- data/lib/openc3/models/environment_model.rb +58 -0
- data/lib/openc3/models/gem_model.rb +137 -0
- data/lib/openc3/models/info_model.rb +31 -0
- data/lib/openc3/models/interface_model.rb +281 -0
- data/lib/openc3/models/interface_status_model.rb +117 -0
- data/lib/openc3/models/metadata_model.rb +139 -0
- data/lib/openc3/models/metric_model.rb +59 -0
- data/lib/openc3/models/microservice_model.rb +206 -0
- data/lib/openc3/models/microservice_status_model.rb +74 -0
- data/lib/openc3/models/model.rb +204 -0
- data/lib/openc3/models/note_model.rb +122 -0
- data/lib/openc3/models/notification_model.rb +40 -0
- data/lib/openc3/models/ping_model.rb +35 -0
- data/lib/openc3/models/plugin_model.rb +292 -0
- data/lib/openc3/models/process_status_model.rb +76 -0
- data/lib/openc3/models/reaction_model.rb +322 -0
- data/lib/openc3/models/reducer_model.rb +65 -0
- data/lib/openc3/models/router_model.rb +35 -0
- data/lib/openc3/models/router_status_model.rb +27 -0
- data/lib/openc3/models/scope_model.rb +153 -0
- data/lib/openc3/models/settings_model.rb +55 -0
- data/lib/openc3/models/sorted_model.rb +167 -0
- data/lib/openc3/models/target_model.rb +759 -0
- data/lib/openc3/models/timeline_model.rb +154 -0
- data/lib/openc3/models/tool_config_model.rb +38 -0
- data/lib/openc3/models/tool_model.rb +262 -0
- data/lib/openc3/models/trigger_group_model.rb +186 -0
- data/lib/openc3/models/trigger_model.rb +330 -0
- data/lib/openc3/models/widget_model.rb +138 -0
- data/lib/openc3/operators/microservice_operator.rb +128 -0
- data/lib/openc3/operators/operator.rb +277 -0
- data/lib/openc3/packets/binary_accessor.rb +1207 -0
- data/lib/openc3/packets/commands.rb +373 -0
- data/lib/openc3/packets/json_packet.rb +134 -0
- data/lib/openc3/packets/limits.rb +271 -0
- data/lib/openc3/packets/limits_response.rb +53 -0
- data/lib/openc3/packets/packet.rb +1168 -0
- data/lib/openc3/packets/packet_config.rb +625 -0
- data/lib/openc3/packets/packet_item.rb +586 -0
- data/lib/openc3/packets/packet_item_limits.rb +162 -0
- data/lib/openc3/packets/parsers/format_string_parser.rb +65 -0
- data/lib/openc3/packets/parsers/limits_parser.rb +159 -0
- data/lib/openc3/packets/parsers/limits_response_parser.rb +61 -0
- data/lib/openc3/packets/parsers/packet_item_parser.rb +272 -0
- data/lib/openc3/packets/parsers/packet_parser.rb +134 -0
- data/lib/openc3/packets/parsers/processor_parser.rb +73 -0
- data/lib/openc3/packets/parsers/state_parser.rb +127 -0
- data/lib/openc3/packets/parsers/xtce_converter.rb +442 -0
- data/lib/openc3/packets/parsers/xtce_parser.rb +722 -0
- data/lib/openc3/packets/structure.rb +553 -0
- data/lib/openc3/packets/structure_item.rb +365 -0
- data/lib/openc3/packets/telemetry.rb +487 -0
- data/lib/openc3/processors/processor.rb +86 -0
- data/lib/openc3/processors/statistics_processor.rb +82 -0
- data/lib/openc3/processors/watermark_processor.rb +58 -0
- data/lib/openc3/processors.rb +24 -0
- data/lib/openc3/script/api_shared.rb +828 -0
- data/lib/openc3/script/calendar.rb +89 -0
- data/lib/openc3/script/commands.rb +227 -0
- data/lib/openc3/script/exceptions.rb +29 -0
- data/lib/openc3/script/extract.rb +161 -0
- data/lib/openc3/script/limits.rb +60 -0
- data/lib/openc3/script/script.rb +299 -0
- data/lib/openc3/script/script_runner.rb +238 -0
- data/lib/openc3/script/storage.rb +146 -0
- data/lib/openc3/script/suite.rb +542 -0
- data/lib/openc3/script/suite_results.rb +196 -0
- data/lib/openc3/script/suite_runner.rb +217 -0
- data/lib/openc3/script.rb +21 -0
- data/lib/openc3/streams/serial_stream.rb +167 -0
- data/lib/openc3/streams/stream.rb +63 -0
- data/lib/openc3/streams/tcpip_client_stream.rb +116 -0
- data/lib/openc3/streams/tcpip_socket_stream.rb +195 -0
- data/lib/openc3/system/system.rb +127 -0
- data/lib/openc3/system/system_config.rb +411 -0
- data/lib/openc3/system/target.rb +269 -0
- data/lib/openc3/system.rb +24 -0
- data/lib/openc3/tools/cmd_tlm_server/api.rb +20 -0
- data/lib/openc3/tools/cmd_tlm_server/cmd_tlm_server_config.rb +320 -0
- data/lib/openc3/tools/cmd_tlm_server/interface_thread.rb +294 -0
- data/lib/openc3/tools/table_manager/table.rb +77 -0
- data/lib/openc3/tools/table_manager/table_config.rb +273 -0
- data/lib/openc3/tools/table_manager/table_item.rb +90 -0
- data/lib/openc3/tools/table_manager/table_item_parser.rb +66 -0
- data/lib/openc3/tools/table_manager/table_manager_core.rb +333 -0
- data/lib/openc3/tools/table_manager/table_parser.rb +93 -0
- data/lib/openc3/tools/test_runner/test.rb +67 -0
- data/lib/openc3/top_level.rb +595 -0
- data/lib/openc3/topics/autonomic_topic.rb +52 -0
- data/lib/openc3/topics/calendar_topic.rb +44 -0
- data/lib/openc3/topics/command_decom_topic.rb +76 -0
- data/lib/openc3/topics/command_topic.rb +83 -0
- data/lib/openc3/topics/config_topic.rb +68 -0
- data/lib/openc3/topics/interface_topic.rb +73 -0
- data/lib/openc3/topics/limits_event_topic.rb +109 -0
- data/lib/openc3/topics/notifications_topic.rb +28 -0
- data/lib/openc3/topics/router_topic.rb +85 -0
- data/lib/openc3/topics/telemetry_decom_topic.rb +54 -0
- data/lib/openc3/topics/telemetry_topic.rb +36 -0
- data/lib/openc3/topics/timeline_topic.rb +45 -0
- data/lib/openc3/topics/topic.rb +53 -0
- data/lib/openc3/utilities/authentication.rb +141 -0
- data/lib/openc3/utilities/authorization.rb +51 -0
- data/lib/openc3/utilities/crc.rb +278 -0
- data/lib/openc3/utilities/csv.rb +153 -0
- data/lib/openc3/utilities/logger.rb +187 -0
- data/lib/openc3/utilities/message_log.rb +91 -0
- data/lib/openc3/utilities/metric.rb +141 -0
- data/lib/openc3/utilities/process_manager.rb +139 -0
- data/lib/openc3/utilities/quaternion.rb +257 -0
- data/lib/openc3/utilities/ruby_lex_utils.rb +568 -0
- data/lib/openc3/utilities/s3.rb +202 -0
- data/lib/openc3/utilities/s3_autoload.rb +9 -0
- data/lib/openc3/utilities/s3_file_cache.rb +274 -0
- data/lib/openc3/utilities/simulated_target.rb +117 -0
- data/lib/openc3/utilities/sleeper.rb +51 -0
- data/lib/openc3/utilities/store.rb +23 -0
- data/lib/openc3/utilities/store_autoload.rb +237 -0
- data/lib/openc3/utilities/zip.rb +21 -0
- data/lib/openc3/utilities.rb +35 -0
- data/lib/openc3/version.rb +14 -0
- data/lib/openc3/win32/excel.rb +132 -0
- data/lib/openc3/win32/win32.rb +402 -0
- data/lib/openc3/win32/win32_main.rb +333 -0
- data/lib/openc3.rb +49 -0
- data/tasks/gemfile_stats.rake +113 -0
- data/tasks/spec.rake +30 -0
- data/templates/plugin-template/README.md +15 -0
- data/templates/plugin-template/Rakefile +12 -0
- data/templates/plugin-template/plugin.gemspec +23 -0
- data/templates/plugin-template/plugin.txt +9 -0
- data/templates/plugin-template/targets/TARGET/cmd_tlm/cmd.txt +8 -0
- data/templates/plugin-template/targets/TARGET/cmd_tlm/tlm.txt +8 -0
- data/templates/plugin-template/targets/TARGET/lib/target.rb +10 -0
- data/templates/plugin-template/targets/TARGET/procedures/procedure.rb +3 -0
- data/templates/plugin-template/targets/TARGET/screens/status.txt +9 -0
- data/templates/plugin-template/targets/TARGET/target.txt +5 -0
- metadata +849 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
---
|
|
2
|
+
<%= MetaConfigParser.load('param_item_modifiers.yaml').to_meta_config_yaml(0) %>
|
|
3
|
+
STATE:
|
|
4
|
+
summary: Defines a key/value pair for the current item
|
|
5
|
+
description: Key value pairs allow for user friendly strings. For example,
|
|
6
|
+
you might define states for ON = 1 and OFF = 0. This allows the word ON to be
|
|
7
|
+
used rather than the number 1 when sending the telemetry item and allows
|
|
8
|
+
for much greater clarity and less chance for user error.
|
|
9
|
+
example: |
|
|
10
|
+
APPEND_ITEM ENABLE 32 UINT "Enable setting"
|
|
11
|
+
STATE FALSE 0
|
|
12
|
+
STATE TRUE 1
|
|
13
|
+
APPEND_ITEM STRING 1024 STRING "String"
|
|
14
|
+
STATE "NOOP" "NOOP" GREEN
|
|
15
|
+
STATE "ARM LASER" "ARM LASER" YELLOW
|
|
16
|
+
STATE "FIRE LASER" "FIRE LASER" RED
|
|
17
|
+
parameters:
|
|
18
|
+
- name: Key
|
|
19
|
+
required: true
|
|
20
|
+
description: The string state name
|
|
21
|
+
values: .*
|
|
22
|
+
- name: Value
|
|
23
|
+
required: true
|
|
24
|
+
description: The numerical state value
|
|
25
|
+
values: .*
|
|
26
|
+
- name: Color
|
|
27
|
+
required: false
|
|
28
|
+
description: The color the state should be displayed as
|
|
29
|
+
values: ['GREEN', 'YELLOW', 'RED']
|
|
30
|
+
READ_CONVERSION:
|
|
31
|
+
summary: Applies a conversion to the current telemetry item
|
|
32
|
+
description: Conversions are implemented in a custom Ruby file which should be
|
|
33
|
+
located in the target's lib folder and required by the target's target.txt
|
|
34
|
+
file (see REQUIRE). The class must require 'openc3/conversions/conversion'
|
|
35
|
+
and inherit from Conversion. It must implement the initialize method if it
|
|
36
|
+
takes extra parameters and must always implement the call method. The conversion
|
|
37
|
+
factor is applied to the raw value in the telemetry packet before it is displayed
|
|
38
|
+
to the user. The user still has the ability to see the raw unconverted value
|
|
39
|
+
in a details dialog.
|
|
40
|
+
example: |
|
|
41
|
+
READ_CONVERSION the_great_conversion.rb 1000
|
|
42
|
+
|
|
43
|
+
Defined in the_great_conversion.rb:
|
|
44
|
+
|
|
45
|
+
require 'openc3/conversions/conversion'
|
|
46
|
+
module OpenC3
|
|
47
|
+
class TheGreatConversion < Conversion
|
|
48
|
+
def initialize(multiplier)
|
|
49
|
+
super()
|
|
50
|
+
@multiplier = multiplier.to_f
|
|
51
|
+
end
|
|
52
|
+
def call(value, packet, buffer)
|
|
53
|
+
return value * multiplier
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
parameters:
|
|
58
|
+
- name: Class Filename
|
|
59
|
+
required: true
|
|
60
|
+
description: The filename which contains the Ruby class. The filename must
|
|
61
|
+
be named after the class such that the class is a CamelCase version of the
|
|
62
|
+
underscored filename. For example, 'the_great_conversion.rb' should contain
|
|
63
|
+
'class TheGreatConversion'.
|
|
64
|
+
values: .*\.rb
|
|
65
|
+
- name: Parameter
|
|
66
|
+
required: false
|
|
67
|
+
description: Additional parameter values for the conversion which are passed
|
|
68
|
+
to the class constructor.
|
|
69
|
+
values: .*
|
|
70
|
+
POLY_READ_CONVERSION:
|
|
71
|
+
summary: Adds a polynomial conversion factor to the current telemetry item
|
|
72
|
+
description: The conversion factor is applied to raw value in the telemetry
|
|
73
|
+
packet before it is displayed to the user. The user still has the ability
|
|
74
|
+
to see the raw unconverted value in a details dialog.
|
|
75
|
+
example: POLY_READ_CONVERSION 10 0.5 0.25
|
|
76
|
+
parameters:
|
|
77
|
+
- name: C0
|
|
78
|
+
required: true
|
|
79
|
+
description: Coefficient
|
|
80
|
+
values: .*
|
|
81
|
+
- name: Cx
|
|
82
|
+
required: false
|
|
83
|
+
description: Additional coefficient values for the conversion. Any order
|
|
84
|
+
polynomial conversion may be used so the value of 'x' will vary with the
|
|
85
|
+
order of the polynomial. Note that larger order polynomials take longer
|
|
86
|
+
to process than shorter order polynomials, but are sometimes more accurate.
|
|
87
|
+
values: .*
|
|
88
|
+
SEG_POLY_READ_CONVERSION:
|
|
89
|
+
summary: Adds a segmented polynomial conversion factor to the current telemetry item
|
|
90
|
+
description: This conversion factor is applied to the raw value in the telemetry packet
|
|
91
|
+
before it is displayed to the user. The user still has the ability to see the raw
|
|
92
|
+
unconverted value in a details dialog.
|
|
93
|
+
example: |
|
|
94
|
+
SEG_POLY_READ_CONVERSION 0 10 0.5 0.25 # Apply the conversion to all values < 50
|
|
95
|
+
SEG_POLY_READ_CONVERSION 50 11 0.5 0.275 # Apply the conversion to all values >= 50 and < 100
|
|
96
|
+
SEG_POLY_READ_CONVERSION 100 12 0.5 0.3 # Apply the conversion to all values >= 100
|
|
97
|
+
parameters:
|
|
98
|
+
- name: Lower Bound
|
|
99
|
+
required: true
|
|
100
|
+
description: Defines the lower bound of the range of values that this segmented
|
|
101
|
+
polynomial applies to. Is ignored for the segment with the smallest lower bound.
|
|
102
|
+
values: .*
|
|
103
|
+
- name: C0
|
|
104
|
+
required: true
|
|
105
|
+
description: Coefficient
|
|
106
|
+
values: .*
|
|
107
|
+
- name: Cx
|
|
108
|
+
required: false
|
|
109
|
+
description: Additional coefficient values for the conversion. Any order
|
|
110
|
+
polynomial conversion may be used so the value of 'x' will vary with the
|
|
111
|
+
order of the polynomial. Note that larger order polynomials take longer
|
|
112
|
+
to process than shorter order polynomials, but are sometimes more accurate.
|
|
113
|
+
values: .*
|
|
114
|
+
GENERIC_READ_CONVERSION_START:
|
|
115
|
+
summary: Start a generic read conversion
|
|
116
|
+
description: Adds a generic conversion function to the current telemetry item.
|
|
117
|
+
This conversion factor is applied to the raw value in the telemetry packet
|
|
118
|
+
before it is displayed to the user. The user still has the ability to see the
|
|
119
|
+
raw unconverted value in a details dialog. The conversion is specified as
|
|
120
|
+
ruby code that receives two implied parameters. 'value' which is the raw
|
|
121
|
+
value being read and 'packet' which is a reference to the telemetry packet
|
|
122
|
+
class (Note, referencing the packet as 'myself' is still supported for backwards
|
|
123
|
+
compatibility). The last line of ruby code given should return the converted
|
|
124
|
+
value. The GENERIC_READ_CONVERSION_END keyword specifies that all lines of
|
|
125
|
+
ruby code for the conversion have been given.
|
|
126
|
+
warning: Generic conversions are not a good long term solution. Consider creating
|
|
127
|
+
a conversion class and using READ_CONVERSION instead. READ_CONVERSION is easier
|
|
128
|
+
to debug and higher performance.
|
|
129
|
+
example: |
|
|
130
|
+
APPEND_ITEM ITEM1 32 UINT
|
|
131
|
+
GENERIC_READ_CONVERSION_START
|
|
132
|
+
value * 1.5 # Convert the value by a scale factor
|
|
133
|
+
GENERIC_READ_CONVERSION_END
|
|
134
|
+
parameters:
|
|
135
|
+
- name: Converted Type
|
|
136
|
+
required: false
|
|
137
|
+
description: Type of the converted value
|
|
138
|
+
values: <%= %w(INT UINT FLOAT STRING BLOCK) %>
|
|
139
|
+
- name: Converted Bit Size
|
|
140
|
+
required: false
|
|
141
|
+
description: Bit size of converted value
|
|
142
|
+
values: \d+
|
|
143
|
+
GENERIC_READ_CONVERSION_END:
|
|
144
|
+
summary: Complete a generic read conversion
|
|
145
|
+
LIMITS:
|
|
146
|
+
summary: Defines a set of limits for a telemetry item
|
|
147
|
+
description: If limits are violated a message is printed in the Command and Telemetry Server
|
|
148
|
+
to indicate an item went out of limits. Other tools also use this information
|
|
149
|
+
to update displays with different colored telemetry items or other useful information.
|
|
150
|
+
The concept of "limits sets" is defined to allow for different limits values
|
|
151
|
+
in different environments. For example, you might want tighter or looser limits
|
|
152
|
+
on telemetry if your environment changes such as during thermal vacuum testing.
|
|
153
|
+
example: |
|
|
154
|
+
LIMITS DEFAULT 3 ENABLED -80.0 -70.0 60.0 80.0 -20.0 20.0
|
|
155
|
+
LIMITS TVAC 3 ENABLED -80.0 -30.0 30.0 80.0
|
|
156
|
+
parameters:
|
|
157
|
+
- name: Limits Set
|
|
158
|
+
required: true
|
|
159
|
+
description: Name of the limits set. If you have no unique limits sets use
|
|
160
|
+
the keyword DEFAULT.
|
|
161
|
+
values: .+
|
|
162
|
+
- name: Persistence
|
|
163
|
+
required: true
|
|
164
|
+
description: Number of consecutive times the telemetry item must be within
|
|
165
|
+
a different limits range before changing limits state.
|
|
166
|
+
values: \d+
|
|
167
|
+
- name: Initial State
|
|
168
|
+
required: true
|
|
169
|
+
description: Whether limits monitoring for this telemetry item is initially enabled or disabled.
|
|
170
|
+
Note if you have multiple LIMITS items they should all have the same initial state.
|
|
171
|
+
values: ['ENABLED', 'DISABLED']
|
|
172
|
+
- name: Red Low Limit
|
|
173
|
+
required: true
|
|
174
|
+
description: If the telemetry value is less than or equal to this value a
|
|
175
|
+
Red Low condition will be detected
|
|
176
|
+
values: .+
|
|
177
|
+
- name: Yellow Low Limit
|
|
178
|
+
required: true
|
|
179
|
+
description: If the telemetry value is less than or equal to this value,
|
|
180
|
+
but greater than the Red Low Limit, a Yellow Low condition will be detected
|
|
181
|
+
values: .+
|
|
182
|
+
- name: Yellow High Limit
|
|
183
|
+
required: true
|
|
184
|
+
description: If the telemetry value is greater than or equal to this value,
|
|
185
|
+
but less than the Red High Limit, a Yellow High condition will be detected
|
|
186
|
+
values: .+
|
|
187
|
+
- name: Red High Limit
|
|
188
|
+
required: true
|
|
189
|
+
description: If the telemetry value is greater than or equal to this value
|
|
190
|
+
a Red High condition will be detected
|
|
191
|
+
values: .+
|
|
192
|
+
- name: Green Low Limit
|
|
193
|
+
required: false
|
|
194
|
+
description: Setting the Green Low and Green High limits defines an
|
|
195
|
+
"operational limit" which is colored blue by OpenC3. This allows for a
|
|
196
|
+
distinct desired operational range which is narrower than the green safety limit.
|
|
197
|
+
If the telemetry value is greater than or equal to this value, but less
|
|
198
|
+
than the Green High Limit, a Blue operational condition will be detected.
|
|
199
|
+
values: .+
|
|
200
|
+
- name: Green High Limit
|
|
201
|
+
required: false
|
|
202
|
+
description: Setting the Green Low and Green High limits defines an
|
|
203
|
+
"operational limit" which is colored blue by OpenC3. This allows for a
|
|
204
|
+
distinct desired operational range which is narrower than the green safety limit.
|
|
205
|
+
If the telemetry value is less than or equal to this value, but greater
|
|
206
|
+
than the Green Low Limit, a Blue operational condition will be detected.
|
|
207
|
+
values: .+
|
|
208
|
+
LIMITS_RESPONSE:
|
|
209
|
+
summary: Defines a response class that is called when the limits state of the current item changes
|
|
210
|
+
example: LIMITS_RESPONSE example_limits_response.rb 10
|
|
211
|
+
parameters:
|
|
212
|
+
- name: Response Class Filename
|
|
213
|
+
required: true
|
|
214
|
+
description: Name of the Ruby file which implements the limits response.
|
|
215
|
+
This file should be in the config/TARGET/lib directory so it can be found by OpenC3.
|
|
216
|
+
values: .+
|
|
217
|
+
- name: Response Specific Options
|
|
218
|
+
required: false
|
|
219
|
+
description: Variable length number of options that will be passed to the
|
|
220
|
+
class constructor
|
|
221
|
+
values: .+
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
MICROSERVICE:
|
|
3
|
+
summary: Defines a new microservice
|
|
4
|
+
example: MICROSERVICE EXAMPLE example-microservice
|
|
5
|
+
description: Defines a microservice that the plugin adds to the OpenC3 system. Microservices are background software processes that perform persistent processing.
|
|
6
|
+
parameters:
|
|
7
|
+
- name: Microservice Folder Name
|
|
8
|
+
description: The exact name of the microservice folder in the plugin. ie. microservices/<Microservice Folder Name>
|
|
9
|
+
required: true
|
|
10
|
+
values: .+
|
|
11
|
+
- name: Microservice Name
|
|
12
|
+
description: The specific name of this instance of the microservice in the OpenC3 system
|
|
13
|
+
required: true
|
|
14
|
+
values: .+
|
|
15
|
+
modifiers:
|
|
16
|
+
ENV:
|
|
17
|
+
summary: Sets an environment variable in the microservice.
|
|
18
|
+
parameters:
|
|
19
|
+
- name: Key
|
|
20
|
+
required: true
|
|
21
|
+
description: Environment variable name
|
|
22
|
+
values: .+
|
|
23
|
+
- name: Value
|
|
24
|
+
required: true
|
|
25
|
+
description: Environment variable value
|
|
26
|
+
values: .+
|
|
27
|
+
WORK_DIR:
|
|
28
|
+
summary: Set the working directory
|
|
29
|
+
description: Working directory to run the microservice CMD in. Can be a path relative to the microservice folder in the plugin, or an absolute path in the container the microservice runs in.
|
|
30
|
+
parameters:
|
|
31
|
+
- name: Directory
|
|
32
|
+
required: true
|
|
33
|
+
description: Working directory to run the microservice CMD in. Can be a path relative to the microservice folder in the plugin, or an absolute path in the container the microservice runs in.
|
|
34
|
+
values: .+
|
|
35
|
+
TOPIC:
|
|
36
|
+
summary: Associate a Redis topic
|
|
37
|
+
description: Redis topic to associate with this microservice. Standard OpenC3 microservices such as decom_microservice use this information to know what packet streams to subscribe to. The TOPIC keyword can be used as many times as necessary to associate all needed topics.
|
|
38
|
+
parameters:
|
|
39
|
+
- name: Topic Name
|
|
40
|
+
required: true
|
|
41
|
+
description: Redis Topic to associate with the microservice
|
|
42
|
+
values: .+
|
|
43
|
+
TARGET_NAME:
|
|
44
|
+
summary: Associate a OpenC3 target
|
|
45
|
+
description: OpenC3 target to associate with the microservice. For standard OpenC3 microservices such as decom_microservice this causes the target configuration to get loaded into the container for the microservice.
|
|
46
|
+
parameters:
|
|
47
|
+
- name: Target Name
|
|
48
|
+
required: true
|
|
49
|
+
description: OpenC3 target to associate with the microservice
|
|
50
|
+
values: .+
|
|
51
|
+
CMD:
|
|
52
|
+
summary: Command line to execute to run the microservice.
|
|
53
|
+
description: Command line to execute to run the microservice.
|
|
54
|
+
parameters:
|
|
55
|
+
- name: Args
|
|
56
|
+
required: true
|
|
57
|
+
description: One or more arguments to exec to run the microservice.
|
|
58
|
+
values: .+
|
|
59
|
+
OPTION:
|
|
60
|
+
summary: Pass an option to the microservice
|
|
61
|
+
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.
|
|
62
|
+
parameters:
|
|
63
|
+
- name: Option Name
|
|
64
|
+
required: true
|
|
65
|
+
description: Name of the option
|
|
66
|
+
values: .+
|
|
67
|
+
- name: Option Value(s)
|
|
68
|
+
required: true
|
|
69
|
+
description: One or more values to associate with the option
|
|
70
|
+
values: .+
|
|
71
|
+
CONTAINER:
|
|
72
|
+
summary: Docker Container.
|
|
73
|
+
description: Container to execute and run the microservice in.
|
|
74
|
+
parameters:
|
|
75
|
+
- name: Args
|
|
76
|
+
required: false
|
|
77
|
+
description: Name of the container
|
|
78
|
+
values: .+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
FORMAT_STRING:
|
|
3
|
+
summary: Adds printf style formatting
|
|
4
|
+
example: FORMAT_STRING "0x%0X"
|
|
5
|
+
parameters:
|
|
6
|
+
- name: Format
|
|
7
|
+
required: true
|
|
8
|
+
description: How to format using printf syntax.
|
|
9
|
+
For example, '0x%0X' will display the value in hex.
|
|
10
|
+
values: .*
|
|
11
|
+
UNITS:
|
|
12
|
+
summary: Add displayed units
|
|
13
|
+
example: |
|
|
14
|
+
UNITS Celsius C
|
|
15
|
+
UNITS Kilometers KM
|
|
16
|
+
parameters:
|
|
17
|
+
- name: Full Name
|
|
18
|
+
required: true
|
|
19
|
+
description: Full name of the units type, e.g. Celsius
|
|
20
|
+
values: .*
|
|
21
|
+
- name: Abbreviated
|
|
22
|
+
required: true
|
|
23
|
+
description: Abbreviation for the units, e.g. C
|
|
24
|
+
values: .*
|
|
25
|
+
DESCRIPTION:
|
|
26
|
+
summary: Override the defined description
|
|
27
|
+
parameters:
|
|
28
|
+
- name: Value
|
|
29
|
+
required: true
|
|
30
|
+
description: The new description
|
|
31
|
+
values: .*
|
|
32
|
+
META:
|
|
33
|
+
summary: Stores custom user metadata
|
|
34
|
+
description: Meta data is user specific data that can be used by custom tools
|
|
35
|
+
for various purposes. One example is to store additional information needed
|
|
36
|
+
to generate source code header files.
|
|
37
|
+
example: META TEST "This parameter is for test purposes only"
|
|
38
|
+
parameters:
|
|
39
|
+
- name: Meta Name
|
|
40
|
+
required: true
|
|
41
|
+
description: Name of the metadata to store
|
|
42
|
+
values: .*
|
|
43
|
+
- name: Meta Values
|
|
44
|
+
required: false
|
|
45
|
+
description: One or more values to be stored for this Meta Name
|
|
46
|
+
values: .*
|
|
47
|
+
OVERLAP:
|
|
48
|
+
summary: This item is allowed to overlap other items in the packet
|
|
49
|
+
description:
|
|
50
|
+
If an item's bit offset overlaps another item, OpenC3 issues a warning. This keyword explicitly
|
|
51
|
+
allows an item to overlap another and supresses the warning message.
|
|
52
|
+
since: 4.4.1
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
---
|
|
2
|
+
<%= MetaConfigParser.load('param_item_modifiers.yaml').to_meta_config_yaml(0) %>
|
|
3
|
+
REQUIRED:
|
|
4
|
+
summary: Parameter is required to be populated in scripts
|
|
5
|
+
description: When sending the command via Script Runner a value must always be
|
|
6
|
+
given for the current command parameter. This prevents the user from relying
|
|
7
|
+
on a default value. Note that this does not affect Command Sender which will
|
|
8
|
+
still populate the field with the default value provided in the PARAMETER definition.
|
|
9
|
+
MINIMUM_VALUE:
|
|
10
|
+
summary: Override the defined minimum value
|
|
11
|
+
parameters:
|
|
12
|
+
- name: Value
|
|
13
|
+
required: true
|
|
14
|
+
description: The new minimum value for the parameter
|
|
15
|
+
values: .*
|
|
16
|
+
MAXIMUM_VALUE:
|
|
17
|
+
summary: Override the defined maximum value
|
|
18
|
+
parameters:
|
|
19
|
+
- name: Value
|
|
20
|
+
required: true
|
|
21
|
+
description: The new maximum value for the parameter
|
|
22
|
+
values: .*
|
|
23
|
+
DEFAULT_VALUE:
|
|
24
|
+
summary: Override the defined default value
|
|
25
|
+
parameters:
|
|
26
|
+
- name: Value
|
|
27
|
+
required: true
|
|
28
|
+
description: The new default value for the parameter
|
|
29
|
+
values: .*
|
|
30
|
+
STATE:
|
|
31
|
+
summary: Defines a key/value pair for the current command parameter
|
|
32
|
+
description: Key value pairs allow for user friendly strings. For example,
|
|
33
|
+
you might define states for ON = 1 and OFF = 0. This allows the word ON to be
|
|
34
|
+
used rather than the number 1 when sending the command parameter and allows
|
|
35
|
+
for much greater clarity and less chance for user error.
|
|
36
|
+
example: |
|
|
37
|
+
APPEND_PARAMETER ENABLE 32 UINT 0 1 0 "Enable setting"
|
|
38
|
+
STATE FALSE 0
|
|
39
|
+
STATE TRUE 1
|
|
40
|
+
APPEND_PARAMETER STRING 1024 STRING "NOOP" "String parameter"
|
|
41
|
+
STATE "NOOP" "NOOP"
|
|
42
|
+
STATE "ARM LASER" "ARM LASER" HAZARDOUS "Arming the laser is an eye safety hazard"
|
|
43
|
+
STATE "FIRE LASER" "FIRE LASER" HAZARDOUS "WARNING! Laser will be fired!"
|
|
44
|
+
parameters:
|
|
45
|
+
- name: Key
|
|
46
|
+
required: true
|
|
47
|
+
description: The string state name
|
|
48
|
+
values: .*
|
|
49
|
+
- name: Value
|
|
50
|
+
required: true
|
|
51
|
+
description: The numerical state value
|
|
52
|
+
values: .*
|
|
53
|
+
- name: Hazardous
|
|
54
|
+
required: false
|
|
55
|
+
description: Indicates the state is hazardous. This will cause a popup
|
|
56
|
+
to ask for user confirmation when sending this command.
|
|
57
|
+
values: ['HAZARDOUS']
|
|
58
|
+
- name: Hazardous Description
|
|
59
|
+
required: false
|
|
60
|
+
description: String describing why this state is hazardous
|
|
61
|
+
values: "['\"].*['\"]"
|
|
62
|
+
WRITE_CONVERSION:
|
|
63
|
+
summary: Applies a conversion when writing the current command parameter
|
|
64
|
+
description: Conversions are implemented in a custom Ruby file which should be
|
|
65
|
+
located in the target's lib folder and required by the target's target.txt
|
|
66
|
+
file (see REQUIRE). The class must require 'openc3/conversions/conversion'
|
|
67
|
+
and inherit from Conversion. It must implement the initialize method if it
|
|
68
|
+
takes extra parameters and must always implement the call method. The conversion
|
|
69
|
+
factor is applied to the value entered by the user before it is written into
|
|
70
|
+
the binary command packet and sent.
|
|
71
|
+
|
|
72
|
+
<div class="note info">
|
|
73
|
+
<h5>Multiple write conversions on command parameters</h5>
|
|
74
|
+
<p>When a command is built, each item gets written (and write conversions are run)
|
|
75
|
+
to set the default value. Then items are written (again write conversions are run)
|
|
76
|
+
with user provided values. Thus write conversions can be run twice. Also there are
|
|
77
|
+
no guarantees which parameters have already been written. The packet itself has a
|
|
78
|
+
given_values() method which can be used to retrieve a hash of the user provided
|
|
79
|
+
values to the command. That can be used to check parameter values passed in.</p>
|
|
80
|
+
</div>
|
|
81
|
+
example: |
|
|
82
|
+
WRITE_CONVERSION the_great_conversion.rb 1000
|
|
83
|
+
|
|
84
|
+
Defined in the_great_conversion.rb:
|
|
85
|
+
|
|
86
|
+
require 'openc3/conversions/conversion'
|
|
87
|
+
module OpenC3
|
|
88
|
+
class TheGreatConversion < Conversion
|
|
89
|
+
def initialize(multiplier)
|
|
90
|
+
super()
|
|
91
|
+
@multiplier = multiplier.to_f
|
|
92
|
+
end
|
|
93
|
+
def call(value, packet, buffer)
|
|
94
|
+
return value * multiplier
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
parameters:
|
|
99
|
+
- name: Class Filename
|
|
100
|
+
required: true
|
|
101
|
+
description: The filename which contains the Ruby class. The filename must
|
|
102
|
+
be named after the class such that the class is a CamelCase version of the
|
|
103
|
+
underscored filename. For example, 'the_great_conversion.rb' should contain
|
|
104
|
+
'class TheGreatConversion'.
|
|
105
|
+
values: .*\.rb
|
|
106
|
+
- name: Parameter
|
|
107
|
+
required: false
|
|
108
|
+
description: Additional parameter values for the conversion which are passed
|
|
109
|
+
to the class constructor.
|
|
110
|
+
values: .*
|
|
111
|
+
POLY_WRITE_CONVERSION:
|
|
112
|
+
summary: Adds a polynomial conversion factor to the current command parameter
|
|
113
|
+
description: The conversion factor is applied to the value entered by the user
|
|
114
|
+
before it is written into the binary command packet and sent.
|
|
115
|
+
example: POLY_WRITE_CONVERSION 10 0.5 0.25
|
|
116
|
+
parameters:
|
|
117
|
+
- name: C0
|
|
118
|
+
required: true
|
|
119
|
+
description: Coefficient
|
|
120
|
+
values: .*
|
|
121
|
+
- name: Cx
|
|
122
|
+
required: false
|
|
123
|
+
description: Additional coefficient values for the conversion. Any order
|
|
124
|
+
polynomial conversion may be used so the value of 'x' will vary with the
|
|
125
|
+
order of the polynomial. Note that larger order polynomials take longer
|
|
126
|
+
to process than shorter order polynomials, but are sometimes more accurate.
|
|
127
|
+
values: .*
|
|
128
|
+
SEG_POLY_WRITE_CONVERSION:
|
|
129
|
+
summary: Adds a segmented polynomial conversion factor to the current command parameter
|
|
130
|
+
description: This conversion factor is applied to the value entered by the user
|
|
131
|
+
before it is written into the binary command packet and sent.
|
|
132
|
+
example: |
|
|
133
|
+
SEG_POLY_WRITE_CONVERSION 0 10 0.5 0.25 # Apply the conversion to all values < 50
|
|
134
|
+
SEG_POLY_WRITE_CONVERSION 50 11 0.5 0.275 # Apply the conversion to all values >= 50 and < 100
|
|
135
|
+
SEG_POLY_WRITE_CONVERSION 100 12 0.5 0.3 # Apply the conversion to all values >= 100
|
|
136
|
+
parameters:
|
|
137
|
+
- name: Lower Bound
|
|
138
|
+
required: true
|
|
139
|
+
description: Defines the lower bound of the range of values that this segmented
|
|
140
|
+
polynomial applies to. Is ignored for the segment with the smallest lower bound.
|
|
141
|
+
values: .*
|
|
142
|
+
- name: C0
|
|
143
|
+
required: true
|
|
144
|
+
description: Coefficient
|
|
145
|
+
values: .*
|
|
146
|
+
- name: Cx
|
|
147
|
+
required: false
|
|
148
|
+
description: Additional coefficient values for the conversion. Any order
|
|
149
|
+
polynomial conversion may be used so the value of 'x' will vary with the
|
|
150
|
+
order of the polynomial. Note that larger order polynomials take longer
|
|
151
|
+
to process than shorter order polynomials, but are sometimes more accurate.
|
|
152
|
+
values: .*
|
|
153
|
+
GENERIC_WRITE_CONVERSION_START:
|
|
154
|
+
summary: Start a generic write conversion
|
|
155
|
+
description: Adds a generic conversion function to the current command parameter.
|
|
156
|
+
This conversion factor is applied to the value entered by the user before it
|
|
157
|
+
is written into the binary command packet and sent. The conversion is specified
|
|
158
|
+
as ruby code that receives two implied parameters. 'value' which is the raw
|
|
159
|
+
value being written and 'packet' which is a reference to the command packet
|
|
160
|
+
class (Note, referencing the packet as 'myself' is still supported for backwards
|
|
161
|
+
compatibility). The last line of ruby code given should return the converted
|
|
162
|
+
value. The GENERIC_WRITE_CONVERSION_END keyword specifies that all lines of
|
|
163
|
+
ruby code for the conversion have been given.
|
|
164
|
+
|
|
165
|
+
<div class="note info">
|
|
166
|
+
<h5>Multiple write conversions on command parameters</h5>
|
|
167
|
+
<p>When a command is built, each item gets written (and write conversions are run)
|
|
168
|
+
to set the default value. Then items are written (again write conversions are run)
|
|
169
|
+
with user provided values. Thus write conversions can be run twice. Also there are
|
|
170
|
+
no guarantees which parameters have already been written. The packet itself has a
|
|
171
|
+
given_values() method which can be used to retrieve a hash of the user provided
|
|
172
|
+
values to the command. That can be used to check parameter values passed in.</p>
|
|
173
|
+
</div>
|
|
174
|
+
warning: Generic conversions are not a good long term solution. Consider creating
|
|
175
|
+
a conversion class and using WRITE_CONVERSION instead. WRITE_CONVERSION is easier
|
|
176
|
+
to debug and higher performance.
|
|
177
|
+
example: |
|
|
178
|
+
APPEND_PARAMETER ITEM1 32 UINT 0 0xFFFFFFFF 0
|
|
179
|
+
GENERIC_WRITE_CONVERSION_START
|
|
180
|
+
(value * 1.5).to_i # Convert the value by a scale factor
|
|
181
|
+
GENERIC_WRITE_CONVERSION_END
|
|
182
|
+
GENERIC_WRITE_CONVERSION_END:
|
|
183
|
+
summary: Complete a generic write conversion
|
|
184
|
+
OVERFLOW:
|
|
185
|
+
summary: Set the behavior when writing a value overflows the type
|
|
186
|
+
description: By default OpenC3 throws an error if you try to write a value
|
|
187
|
+
which overflows its specified type, e.g. writing 255 to a 8 bit signed value.
|
|
188
|
+
Setting the overflow behavior also allows for OpenC3 to 'TRUNCATE'
|
|
189
|
+
the value by eliminating any high order bits. You can also set 'SATURATE' which
|
|
190
|
+
causes OpenC3 to replace the value with the maximum or minimum allowable value
|
|
191
|
+
for that type. Finally you can specify 'ERROR_ALLOW_HEX' which will allow for
|
|
192
|
+
a maximum hex value to be writen, e.g. you can successfully write 255 to a 8
|
|
193
|
+
bit signed value.
|
|
194
|
+
example: OVERFLOW TRUNCATE
|
|
195
|
+
parameters:
|
|
196
|
+
- name: Behavior
|
|
197
|
+
required: true
|
|
198
|
+
description: How OpenC3 treats an overflow value. Only applies to signed and
|
|
199
|
+
unsigned integer data types.
|
|
200
|
+
values: <%= %w(ERROR ERROR_ALLOW_HEX TRUNCATE SATURATE) %>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
VARIABLE:
|
|
3
|
+
summary: Define a configurable variable for the plugin
|
|
4
|
+
description: The VARIABLE keyword defines a variable that will be requested for the user to enter during plugin installation. Variables can be used to handle details of targets that are user defined such as specific IP addresses and ports. Variables should also be used to allow users to rename targets to whatever name they want and support multiple installations of the same target with different names.
|
|
5
|
+
Variables can be used later in plugin.txt or in any other configuration file included in a plugin using Ruby ERB syntax. The variables are assigned to accessible local variables in the file.
|
|
6
|
+
At a high level, ERB allows you to run Ruby code in configuration files.
|
|
7
|
+
parameters:
|
|
8
|
+
- name: Variable Name
|
|
9
|
+
required: true
|
|
10
|
+
description: The name of the variable
|
|
11
|
+
values: .+
|
|
12
|
+
- name: Default Value
|
|
13
|
+
required: true
|
|
14
|
+
description: Default value of the variable
|
|
15
|
+
values: .+
|
|
16
|
+
INTERFACE:
|
|
17
|
+
modifiers:
|
|
18
|
+
<%= MetaConfigParser.load('interface_modifiers.yaml').to_meta_config_yaml(4) %>
|
|
19
|
+
summary: Defines a connection to a physical target
|
|
20
|
+
description: Interfaces are what OpenC3 uses to talk to a particular piece
|
|
21
|
+
of hardware. Interfaces require a Ruby file which implements all the interface
|
|
22
|
+
methods necessary to talk to the hardware. OpenC3 defines many built in interfaces
|
|
23
|
+
or you can define your own as long as it implements the interface protocol.
|
|
24
|
+
parameters:
|
|
25
|
+
- name: Interface Name
|
|
26
|
+
required: true
|
|
27
|
+
description: Name of the interface. This name will appear in the
|
|
28
|
+
Interfaces tab of the Server and is also referenced by other keywords.
|
|
29
|
+
The OpenC3 convention is to name interfaces after their targets with
|
|
30
|
+
'_INT' appended to the name, e.g. INST_INT for the INST target.
|
|
31
|
+
values: \D\S*
|
|
32
|
+
- name: Filename
|
|
33
|
+
required: true
|
|
34
|
+
description: Ruby file to use when instantiating the interface.
|
|
35
|
+
values:
|
|
36
|
+
<%= MetaConfigParser.load('_interfaces.yaml').to_meta_config_yaml(8) %>
|
|
37
|
+
documentation: Additional parameters are required. Please see the [Interfaces](/docs/v5/interfaces)
|
|
38
|
+
documentation for more details.
|
|
39
|
+
ROUTER:
|
|
40
|
+
modifiers:
|
|
41
|
+
ROUTE:
|
|
42
|
+
summary: Map an interface to a router
|
|
43
|
+
description: Once an interface has been mapped to a router, all its received telemetry
|
|
44
|
+
will be sent out through the router.
|
|
45
|
+
parameters:
|
|
46
|
+
- name: Interface
|
|
47
|
+
required: true
|
|
48
|
+
description: Name of the interface
|
|
49
|
+
values: .+
|
|
50
|
+
<%= MetaConfigParser.load('interface_modifiers.yaml').to_meta_config_yaml(4) %>
|
|
51
|
+
summary: Create router to receive commands and output telemetry packets from one or more interfaces
|
|
52
|
+
description: Creates an router which receives command packets from
|
|
53
|
+
their remote clients and sends them to associated interfaces. They receive telemetry
|
|
54
|
+
packets from their interfaces and send them to their remote clients. This allows
|
|
55
|
+
routers to be intermediaries between an external client and an actual device.
|
|
56
|
+
parameters:
|
|
57
|
+
- name: Name
|
|
58
|
+
required: true
|
|
59
|
+
description: Name of the router
|
|
60
|
+
values: .+
|
|
61
|
+
- name: Filename
|
|
62
|
+
required: true
|
|
63
|
+
description: Ruby file to use when instantiating the interface.
|
|
64
|
+
values:
|
|
65
|
+
<%= MetaConfigParser.load('_interfaces.yaml').to_meta_config_yaml(8) %>
|
|
66
|
+
documentation: Additional parameters are required. Please see the [Interfaces](/docs/v5/interfaces)
|
|
67
|
+
documentation for more details.
|
|
68
|
+
<%= MetaConfigParser.load('target.yaml').to_meta_config_yaml() %>
|
|
69
|
+
<%= MetaConfigParser.load('microservice.yaml').to_meta_config_yaml() %>
|
|
70
|
+
<%= MetaConfigParser.load('tool.yaml').to_meta_config_yaml() %>
|
|
71
|
+
WIDGET:
|
|
72
|
+
summary: Define a custom widget
|
|
73
|
+
example: WIDGET HELLOWORLD
|
|
74
|
+
description: Defines a custom widget that can be used in Telemetry Viewer screens.
|
|
75
|
+
parameters:
|
|
76
|
+
- name: Widget Name
|
|
77
|
+
description: The name of the widget wil be used to build a path to the widget implementation. For example, `WIDGET HELLOWORLD` will find the as-built file tools/widgets/HelloworldWidget/HelloworldWidget.umd.min.js. See the [Custom Widgets](/docs/v5/custom-widgets)
|
|
78
|
+
guide for more details.
|
|
79
|
+
required: true
|
|
80
|
+
values: .+
|