openc3 5.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (307) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +18 -0
  3. data/Guardfile +35 -0
  4. data/LICENSE.txt +727 -0
  5. data/README.md +37 -0
  6. data/Rakefile +131 -0
  7. data/bin/cstol_converter +1178 -0
  8. data/bin/openc3cli +531 -0
  9. data/bin/rubysloc +139 -0
  10. data/data/config/_array_params.yaml +23 -0
  11. data/data/config/_id_items.yaml +24 -0
  12. data/data/config/_id_params.yaml +58 -0
  13. data/data/config/_interfaces.yaml +214 -0
  14. data/data/config/_interfaces.yaml.err +1017 -0
  15. data/data/config/_items.yaml +20 -0
  16. data/data/config/_params.yaml +60 -0
  17. data/data/config/cmd_tlm_server.yaml +136 -0
  18. data/data/config/command.yaml +44 -0
  19. data/data/config/command_modifiers.yaml +160 -0
  20. data/data/config/command_telemetry.yaml +3 -0
  21. data/data/config/interface_modifiers.yaml +104 -0
  22. data/data/config/item_modifiers.yaml +221 -0
  23. data/data/config/microservice.yaml +78 -0
  24. data/data/config/param_item_modifiers.yaml +52 -0
  25. data/data/config/parameter_modifiers.yaml +200 -0
  26. data/data/config/plugins.yaml +80 -0
  27. data/data/config/protocols.yaml +290 -0
  28. data/data/config/screen.yaml +147 -0
  29. data/data/config/table_manager.yaml +89 -0
  30. data/data/config/table_parameter_modifiers.yaml +9 -0
  31. data/data/config/target.yaml +142 -0
  32. data/data/config/target_config.yaml +94 -0
  33. data/data/config/telemetry.yaml +87 -0
  34. data/data/config/telemetry_modifiers.yaml +159 -0
  35. data/data/config/tool.yaml +63 -0
  36. data/data/config/unknown.yaml +3 -0
  37. data/data/config/widgets.yaml +1505 -0
  38. data/ext/mkrf_conf.rb +49 -0
  39. data/ext/openc3/ext/array/array.c +122 -0
  40. data/ext/openc3/ext/array/extconf.rb +13 -0
  41. data/ext/openc3/ext/buffered_file/buffered_file.c +198 -0
  42. data/ext/openc3/ext/buffered_file/extconf.rb +13 -0
  43. data/ext/openc3/ext/config_parser/config_parser.c +280 -0
  44. data/ext/openc3/ext/config_parser/extconf.rb +13 -0
  45. data/ext/openc3/ext/crc/crc.c +351 -0
  46. data/ext/openc3/ext/crc/extconf.rb +13 -0
  47. data/ext/openc3/ext/openc3_io/extconf.rb +13 -0
  48. data/ext/openc3/ext/openc3_io/openc3_io.c +158 -0
  49. data/ext/openc3/ext/packet/extconf.rb +13 -0
  50. data/ext/openc3/ext/packet/packet.c +318 -0
  51. data/ext/openc3/ext/platform/extconf.rb +13 -0
  52. data/ext/openc3/ext/platform/platform.c +134 -0
  53. data/ext/openc3/ext/polynomial_conversion/extconf.rb +13 -0
  54. data/ext/openc3/ext/polynomial_conversion/polynomial_conversion.c +79 -0
  55. data/ext/openc3/ext/string/extconf.rb +13 -0
  56. data/ext/openc3/ext/string/string.c +63 -0
  57. data/ext/openc3/ext/structure/structure.c +1719 -0
  58. data/ext/openc3/ext/tabbed_plots_config/extconf.rb +13 -0
  59. data/ext/openc3/ext/tabbed_plots_config/tabbed_plots_config.c +62 -0
  60. data/ext/openc3/ext/telemetry/extconf.rb +13 -0
  61. data/ext/openc3/ext/telemetry/telemetry.c +336 -0
  62. data/lib/cosmos.rb +20 -0
  63. data/lib/cosmosc2.rb +20 -0
  64. data/lib/openc3/api/api.rb +39 -0
  65. data/lib/openc3/api/authorized_api.rb +30 -0
  66. data/lib/openc3/api/cmd_api.rb +451 -0
  67. data/lib/openc3/api/config_api.rb +58 -0
  68. data/lib/openc3/api/interface_api.rb +117 -0
  69. data/lib/openc3/api/limits_api.rb +375 -0
  70. data/lib/openc3/api/router_api.rb +117 -0
  71. data/lib/openc3/api/settings_api.rb +70 -0
  72. data/lib/openc3/api/target_api.rb +78 -0
  73. data/lib/openc3/api/tlm_api.rb +455 -0
  74. data/lib/openc3/bridge/bridge.rb +54 -0
  75. data/lib/openc3/bridge/bridge_config.rb +167 -0
  76. data/lib/openc3/bridge/bridge_interface_thread.rb +42 -0
  77. data/lib/openc3/bridge/bridge_router_thread.rb +42 -0
  78. data/lib/openc3/ccsds/ccsds_packet.rb +68 -0
  79. data/lib/openc3/ccsds/ccsds_parser.rb +148 -0
  80. data/lib/openc3/config/config_parser.rb +549 -0
  81. data/lib/openc3/config/meta_config_parser.rb +74 -0
  82. data/lib/openc3/conversions/conversion.rb +70 -0
  83. data/lib/openc3/conversions/generic_conversion.rb +83 -0
  84. data/lib/openc3/conversions/packet_time_formatted_conversion.rb +43 -0
  85. data/lib/openc3/conversions/packet_time_seconds_conversion.rb +43 -0
  86. data/lib/openc3/conversions/polynomial_conversion.rb +87 -0
  87. data/lib/openc3/conversions/processor_conversion.rb +70 -0
  88. data/lib/openc3/conversions/received_count_conversion.rb +38 -0
  89. data/lib/openc3/conversions/received_time_formatted_conversion.rb +42 -0
  90. data/lib/openc3/conversions/received_time_seconds_conversion.rb +42 -0
  91. data/lib/openc3/conversions/segmented_polynomial_conversion.rb +171 -0
  92. data/lib/openc3/conversions/unix_time_conversion.rb +68 -0
  93. data/lib/openc3/conversions/unix_time_formatted_conversion.rb +49 -0
  94. data/lib/openc3/conversions/unix_time_seconds_conversion.rb +49 -0
  95. data/lib/openc3/conversions.rb +34 -0
  96. data/lib/openc3/core_ext/array.rb +416 -0
  97. data/lib/openc3/core_ext/binding.rb +29 -0
  98. data/lib/openc3/core_ext/class.rb +72 -0
  99. data/lib/openc3/core_ext/exception.rb +61 -0
  100. data/lib/openc3/core_ext/file.rb +83 -0
  101. data/lib/openc3/core_ext/hash.rb +37 -0
  102. data/lib/openc3/core_ext/io.rb +134 -0
  103. data/lib/openc3/core_ext/kernel.rb +42 -0
  104. data/lib/openc3/core_ext/math.rb +128 -0
  105. data/lib/openc3/core_ext/matrix.rb +156 -0
  106. data/lib/openc3/core_ext/objectspace.rb +36 -0
  107. data/lib/openc3/core_ext/openc3_io.rb +57 -0
  108. data/lib/openc3/core_ext/range.rb +27 -0
  109. data/lib/openc3/core_ext/socket.rb +38 -0
  110. data/lib/openc3/core_ext/string.rb +389 -0
  111. data/lib/openc3/core_ext/stringio.rb +33 -0
  112. data/lib/openc3/core_ext/time.rb +508 -0
  113. data/lib/openc3/core_ext.rb +36 -0
  114. data/lib/openc3/interfaces/interface.rb +498 -0
  115. data/lib/openc3/interfaces/linc_interface.rb +475 -0
  116. data/lib/openc3/interfaces/protocols/burst_protocol.rb +192 -0
  117. data/lib/openc3/interfaces/protocols/crc_protocol.rb +193 -0
  118. data/lib/openc3/interfaces/protocols/fixed_protocol.rb +155 -0
  119. data/lib/openc3/interfaces/protocols/ignore_packet_protocol.rb +56 -0
  120. data/lib/openc3/interfaces/protocols/length_protocol.rb +165 -0
  121. data/lib/openc3/interfaces/protocols/override_protocol.rb +60 -0
  122. data/lib/openc3/interfaces/protocols/preidentified_protocol.rb +206 -0
  123. data/lib/openc3/interfaces/protocols/protocol.rb +82 -0
  124. data/lib/openc3/interfaces/protocols/template_protocol.rb +261 -0
  125. data/lib/openc3/interfaces/protocols/terminated_protocol.rb +93 -0
  126. data/lib/openc3/interfaces/serial_interface.rb +94 -0
  127. data/lib/openc3/interfaces/simulated_target_interface.rb +168 -0
  128. data/lib/openc3/interfaces/stream_interface.rb +81 -0
  129. data/lib/openc3/interfaces/tcpip_client_interface.rb +69 -0
  130. data/lib/openc3/interfaces/tcpip_server_interface.rb +629 -0
  131. data/lib/openc3/interfaces/udp_interface.rb +169 -0
  132. data/lib/openc3/interfaces.rb +44 -0
  133. data/lib/openc3/io/buffered_file.rb +109 -0
  134. data/lib/openc3/io/io_multiplexer.rb +80 -0
  135. data/lib/openc3/io/json_api_object.rb +208 -0
  136. data/lib/openc3/io/json_drb.rb +335 -0
  137. data/lib/openc3/io/json_drb_object.rb +114 -0
  138. data/lib/openc3/io/json_drb_rack.rb +84 -0
  139. data/lib/openc3/io/json_rpc.rb +420 -0
  140. data/lib/openc3/io/openc3_snmp.rb +58 -0
  141. data/lib/openc3/io/posix_serial_driver.rb +156 -0
  142. data/lib/openc3/io/raw_logger.rb +167 -0
  143. data/lib/openc3/io/raw_logger_pair.rb +77 -0
  144. data/lib/openc3/io/serial_driver.rb +105 -0
  145. data/lib/openc3/io/stderr.rb +43 -0
  146. data/lib/openc3/io/stdout.rb +43 -0
  147. data/lib/openc3/io/udp_sockets.rb +194 -0
  148. data/lib/openc3/io/win32_serial_driver.rb +196 -0
  149. data/lib/openc3/logs/log_writer.rb +302 -0
  150. data/lib/openc3/logs/packet_log_constants.rb +62 -0
  151. data/lib/openc3/logs/packet_log_reader.rb +345 -0
  152. data/lib/openc3/logs/packet_log_writer.rb +299 -0
  153. data/lib/openc3/logs/text_log_writer.rb +68 -0
  154. data/lib/openc3/logs.rb +25 -0
  155. data/lib/openc3/microservices/cleanup_microservice.rb +68 -0
  156. data/lib/openc3/microservices/decom_microservice.rb +136 -0
  157. data/lib/openc3/microservices/interface_microservice.rb +532 -0
  158. data/lib/openc3/microservices/log_microservice.rb +108 -0
  159. data/lib/openc3/microservices/microservice.rb +204 -0
  160. data/lib/openc3/microservices/plugin_microservice.rb +43 -0
  161. data/lib/openc3/microservices/reaction_microservice.rb +541 -0
  162. data/lib/openc3/microservices/reducer_microservice.rb +313 -0
  163. data/lib/openc3/microservices/router_microservice.rb +44 -0
  164. data/lib/openc3/microservices/text_log_microservice.rb +84 -0
  165. data/lib/openc3/microservices/timeline_microservice.rb +363 -0
  166. data/lib/openc3/microservices/trigger_group_microservice.rb +638 -0
  167. data/lib/openc3/models/activity_model.rb +319 -0
  168. data/lib/openc3/models/auth_model.rb +65 -0
  169. data/lib/openc3/models/cvt_model.rb +185 -0
  170. data/lib/openc3/models/environment_model.rb +58 -0
  171. data/lib/openc3/models/gem_model.rb +137 -0
  172. data/lib/openc3/models/info_model.rb +31 -0
  173. data/lib/openc3/models/interface_model.rb +281 -0
  174. data/lib/openc3/models/interface_status_model.rb +117 -0
  175. data/lib/openc3/models/metadata_model.rb +139 -0
  176. data/lib/openc3/models/metric_model.rb +59 -0
  177. data/lib/openc3/models/microservice_model.rb +206 -0
  178. data/lib/openc3/models/microservice_status_model.rb +74 -0
  179. data/lib/openc3/models/model.rb +204 -0
  180. data/lib/openc3/models/note_model.rb +122 -0
  181. data/lib/openc3/models/notification_model.rb +40 -0
  182. data/lib/openc3/models/ping_model.rb +35 -0
  183. data/lib/openc3/models/plugin_model.rb +292 -0
  184. data/lib/openc3/models/process_status_model.rb +76 -0
  185. data/lib/openc3/models/reaction_model.rb +322 -0
  186. data/lib/openc3/models/reducer_model.rb +65 -0
  187. data/lib/openc3/models/router_model.rb +35 -0
  188. data/lib/openc3/models/router_status_model.rb +27 -0
  189. data/lib/openc3/models/scope_model.rb +153 -0
  190. data/lib/openc3/models/settings_model.rb +55 -0
  191. data/lib/openc3/models/sorted_model.rb +167 -0
  192. data/lib/openc3/models/target_model.rb +759 -0
  193. data/lib/openc3/models/timeline_model.rb +154 -0
  194. data/lib/openc3/models/tool_config_model.rb +38 -0
  195. data/lib/openc3/models/tool_model.rb +262 -0
  196. data/lib/openc3/models/trigger_group_model.rb +186 -0
  197. data/lib/openc3/models/trigger_model.rb +330 -0
  198. data/lib/openc3/models/widget_model.rb +138 -0
  199. data/lib/openc3/operators/microservice_operator.rb +128 -0
  200. data/lib/openc3/operators/operator.rb +277 -0
  201. data/lib/openc3/packets/binary_accessor.rb +1207 -0
  202. data/lib/openc3/packets/commands.rb +373 -0
  203. data/lib/openc3/packets/json_packet.rb +134 -0
  204. data/lib/openc3/packets/limits.rb +271 -0
  205. data/lib/openc3/packets/limits_response.rb +53 -0
  206. data/lib/openc3/packets/packet.rb +1168 -0
  207. data/lib/openc3/packets/packet_config.rb +625 -0
  208. data/lib/openc3/packets/packet_item.rb +586 -0
  209. data/lib/openc3/packets/packet_item_limits.rb +162 -0
  210. data/lib/openc3/packets/parsers/format_string_parser.rb +65 -0
  211. data/lib/openc3/packets/parsers/limits_parser.rb +159 -0
  212. data/lib/openc3/packets/parsers/limits_response_parser.rb +61 -0
  213. data/lib/openc3/packets/parsers/packet_item_parser.rb +272 -0
  214. data/lib/openc3/packets/parsers/packet_parser.rb +134 -0
  215. data/lib/openc3/packets/parsers/processor_parser.rb +73 -0
  216. data/lib/openc3/packets/parsers/state_parser.rb +127 -0
  217. data/lib/openc3/packets/parsers/xtce_converter.rb +442 -0
  218. data/lib/openc3/packets/parsers/xtce_parser.rb +722 -0
  219. data/lib/openc3/packets/structure.rb +553 -0
  220. data/lib/openc3/packets/structure_item.rb +365 -0
  221. data/lib/openc3/packets/telemetry.rb +487 -0
  222. data/lib/openc3/processors/processor.rb +86 -0
  223. data/lib/openc3/processors/statistics_processor.rb +82 -0
  224. data/lib/openc3/processors/watermark_processor.rb +58 -0
  225. data/lib/openc3/processors.rb +24 -0
  226. data/lib/openc3/script/api_shared.rb +828 -0
  227. data/lib/openc3/script/calendar.rb +89 -0
  228. data/lib/openc3/script/commands.rb +227 -0
  229. data/lib/openc3/script/exceptions.rb +29 -0
  230. data/lib/openc3/script/extract.rb +161 -0
  231. data/lib/openc3/script/limits.rb +60 -0
  232. data/lib/openc3/script/script.rb +299 -0
  233. data/lib/openc3/script/script_runner.rb +238 -0
  234. data/lib/openc3/script/storage.rb +146 -0
  235. data/lib/openc3/script/suite.rb +542 -0
  236. data/lib/openc3/script/suite_results.rb +196 -0
  237. data/lib/openc3/script/suite_runner.rb +217 -0
  238. data/lib/openc3/script.rb +21 -0
  239. data/lib/openc3/streams/serial_stream.rb +167 -0
  240. data/lib/openc3/streams/stream.rb +63 -0
  241. data/lib/openc3/streams/tcpip_client_stream.rb +116 -0
  242. data/lib/openc3/streams/tcpip_socket_stream.rb +195 -0
  243. data/lib/openc3/system/system.rb +127 -0
  244. data/lib/openc3/system/system_config.rb +411 -0
  245. data/lib/openc3/system/target.rb +269 -0
  246. data/lib/openc3/system.rb +24 -0
  247. data/lib/openc3/tools/cmd_tlm_server/api.rb +20 -0
  248. data/lib/openc3/tools/cmd_tlm_server/cmd_tlm_server_config.rb +320 -0
  249. data/lib/openc3/tools/cmd_tlm_server/interface_thread.rb +294 -0
  250. data/lib/openc3/tools/table_manager/table.rb +77 -0
  251. data/lib/openc3/tools/table_manager/table_config.rb +273 -0
  252. data/lib/openc3/tools/table_manager/table_item.rb +90 -0
  253. data/lib/openc3/tools/table_manager/table_item_parser.rb +66 -0
  254. data/lib/openc3/tools/table_manager/table_manager_core.rb +333 -0
  255. data/lib/openc3/tools/table_manager/table_parser.rb +93 -0
  256. data/lib/openc3/tools/test_runner/test.rb +67 -0
  257. data/lib/openc3/top_level.rb +595 -0
  258. data/lib/openc3/topics/autonomic_topic.rb +52 -0
  259. data/lib/openc3/topics/calendar_topic.rb +44 -0
  260. data/lib/openc3/topics/command_decom_topic.rb +76 -0
  261. data/lib/openc3/topics/command_topic.rb +83 -0
  262. data/lib/openc3/topics/config_topic.rb +68 -0
  263. data/lib/openc3/topics/interface_topic.rb +73 -0
  264. data/lib/openc3/topics/limits_event_topic.rb +109 -0
  265. data/lib/openc3/topics/notifications_topic.rb +28 -0
  266. data/lib/openc3/topics/router_topic.rb +85 -0
  267. data/lib/openc3/topics/telemetry_decom_topic.rb +54 -0
  268. data/lib/openc3/topics/telemetry_topic.rb +36 -0
  269. data/lib/openc3/topics/timeline_topic.rb +45 -0
  270. data/lib/openc3/topics/topic.rb +53 -0
  271. data/lib/openc3/utilities/authentication.rb +141 -0
  272. data/lib/openc3/utilities/authorization.rb +51 -0
  273. data/lib/openc3/utilities/crc.rb +278 -0
  274. data/lib/openc3/utilities/csv.rb +153 -0
  275. data/lib/openc3/utilities/logger.rb +187 -0
  276. data/lib/openc3/utilities/message_log.rb +91 -0
  277. data/lib/openc3/utilities/metric.rb +141 -0
  278. data/lib/openc3/utilities/process_manager.rb +139 -0
  279. data/lib/openc3/utilities/quaternion.rb +257 -0
  280. data/lib/openc3/utilities/ruby_lex_utils.rb +568 -0
  281. data/lib/openc3/utilities/s3.rb +202 -0
  282. data/lib/openc3/utilities/s3_autoload.rb +9 -0
  283. data/lib/openc3/utilities/s3_file_cache.rb +274 -0
  284. data/lib/openc3/utilities/simulated_target.rb +117 -0
  285. data/lib/openc3/utilities/sleeper.rb +51 -0
  286. data/lib/openc3/utilities/store.rb +23 -0
  287. data/lib/openc3/utilities/store_autoload.rb +237 -0
  288. data/lib/openc3/utilities/zip.rb +21 -0
  289. data/lib/openc3/utilities.rb +35 -0
  290. data/lib/openc3/version.rb +14 -0
  291. data/lib/openc3/win32/excel.rb +132 -0
  292. data/lib/openc3/win32/win32.rb +402 -0
  293. data/lib/openc3/win32/win32_main.rb +333 -0
  294. data/lib/openc3.rb +49 -0
  295. data/tasks/gemfile_stats.rake +113 -0
  296. data/tasks/spec.rake +30 -0
  297. data/templates/plugin-template/README.md +15 -0
  298. data/templates/plugin-template/Rakefile +12 -0
  299. data/templates/plugin-template/plugin.gemspec +23 -0
  300. data/templates/plugin-template/plugin.txt +9 -0
  301. data/templates/plugin-template/targets/TARGET/cmd_tlm/cmd.txt +8 -0
  302. data/templates/plugin-template/targets/TARGET/cmd_tlm/tlm.txt +8 -0
  303. data/templates/plugin-template/targets/TARGET/lib/target.rb +10 -0
  304. data/templates/plugin-template/targets/TARGET/procedures/procedure.rb +3 -0
  305. data/templates/plugin-template/targets/TARGET/screens/status.txt +9 -0
  306. data/templates/plugin-template/targets/TARGET/target.txt +5 -0
  307. metadata +849 -0
@@ -0,0 +1,20 @@
1
+ ---
2
+ - name: Bit Size
3
+ required: true
4
+ description: Bit size of this telemetry item. Zero or Negative values may be used
5
+ to indicate that a string fills the packet up to the offset from the end of
6
+ the packet specified by this value. If Bit Offset is 0 and Bit Size is 0 then
7
+ this is a derived parameter and the Data Type must be set to 'DERIVED'.
8
+ values: \d+
9
+ - name: Data Type
10
+ required: true
11
+ description: Data Type of this telemetry item
12
+ values: <%= %w(INT UINT FLOAT STRING BLOCK DERIVED) %>
13
+ - name: Description
14
+ required: false
15
+ description: Description for this telemetry item which must be enclosed with quotes
16
+ values: "['\"].*['\"]"
17
+ - name: Endianness
18
+ required: false
19
+ description: Indicates if the item is to be interpreted in Big Endian or Little Endian format
20
+ values: <%= %w(BIG_ENDIAN LITTLE_ENDIAN) %>
@@ -0,0 +1,60 @@
1
+ ---
2
+ - name: Bit Size
3
+ required: true
4
+ description: Bit size of this parameter. Zero or Negative values may be used
5
+ to indicate that a string fills the packet up to the offset from the end of
6
+ the packet specified by this value. If Bit Offset is 0 and Bit Size is 0 then
7
+ this is a derived parameter and the Data Type must be set to 'DERIVED'.
8
+ values: \d+
9
+ - name: Data Type
10
+ required: true
11
+ description: Data Type of this parameter
12
+ values:
13
+ INT:
14
+ parameters: &params
15
+ - name: Minimum Value
16
+ required: true
17
+ description: Minimum allowed value for this parameter
18
+ values: .*
19
+ - name: Maximum Value
20
+ required: true
21
+ description: Maximum allowed value for this parameter
22
+ values: .*
23
+ - name: Default Value
24
+ required: true
25
+ description:
26
+ Default value for this parameter. You must provide a default
27
+ but if you mark the parameter REQUIRED then scripts will be forced to specify a value.
28
+ values: .*
29
+ - name: Description
30
+ required: false
31
+ description: Description for this parameter which must be enclosed with quotes
32
+ values: '[''"].*[''"]'
33
+ - name: Endianness
34
+ required: false
35
+ description: Indicates if the data in this command is to be sent in Big Endian or Little Endian format
36
+ values: <%= %w(BIG_ENDIAN LITTLE_ENDIAN) %>
37
+ UINT:
38
+ parameters: *params
39
+ FLOAT:
40
+ parameters: *params
41
+ DERIVED:
42
+ parameters: *params
43
+ STRING:
44
+ parameters: &sparams
45
+ - name: Default Value
46
+ required: true
47
+ description:
48
+ Default value for this parameter. You must provide a default
49
+ but if you mark the parameter REQUIRED then scripts will be forced to specify a value.
50
+ values: .*
51
+ - name: Description
52
+ required: false
53
+ description: Description for this parameter which must be enclosed with quotes
54
+ values: '[''"].*[''"]'
55
+ - name: Endianness
56
+ required: false
57
+ description: Indicates if the data in this command is to be sent in Big Endian or Little Endian format
58
+ values: <%= %w(BIG_ENDIAN LITTLE_ENDIAN) %>
59
+ BLOCK:
60
+ parameters: *sparams
@@ -0,0 +1,136 @@
1
+ ---
2
+ TITLE:
3
+ summary: Sets the Command and Telemetry Server window title
4
+ parameters:
5
+ - name: Text
6
+ required: true
7
+ description: Text to put in the title of the Command and Telemetry Server window
8
+ values: .+
9
+ PACKET_LOG_WRITER:
10
+ summary: Declare a packet log writer
11
+ description: Packet log writer is used to declare a packet log writer class and
12
+ give it a name which can be referenced by an interface. This is required if you
13
+ want interfaces to have their own dedicated log writers or want to combine
14
+ various interfaces into a single log file. By default, OpenC3 logs all data
15
+ on all interfaces into a single command log and a single telemetry log.
16
+ This keyword can also be used if you want to declare a different log file class
17
+ to create log files.
18
+ warning: You should NOT override the default without consulting a OpenC3 expert
19
+ as this may break the ability to successfully read and write log files.
20
+ example: |
21
+ PACKET_LOG_WRITER DEFAULT packet_log_writer.rb # Default
22
+ # The default logger filename will be <DATE>_openc3tlm.bin and will create a new log every 1MB
23
+ PACKET_LOG_WRITER DEFAULT packet_log_writer.rb openc3 true nil 1000000
24
+ # Create a logger named OPENC3_LOG which creates a new log every 5 min (600s)
25
+ PACKET_LOG_WRITER OPENC3_LOG packet_log_writer.rb openc3 true 600
26
+ parameters:
27
+ - name: Log Writer Name
28
+ required: true
29
+ description: The name of the log writer as reference by other cmd_tlm_server keywords.
30
+ This name also appears in the Logging tab on the Command and Telemetry Server.
31
+ values: .+
32
+ - name: Filename
33
+ required: true
34
+ description: Ruby file to use when instantiating a new log writer
35
+ values: '.+\.rb'
36
+ - name: Parameters
37
+ required: false
38
+ description: Optional parameters to pass to the log writer class when instantiating it.
39
+ AUTO_INTERFACE_TARGETS:
40
+ summary: Automatically use each target's cmd_tlm_server.txt file to define the interface
41
+ description: Look for a cmd_tlm_server.txt file at the top level
42
+ of each target directory and use this file to configure the interface for that target.
43
+ This is a good way of keeping the knowledge of how to interface to a target
44
+ within that target. However, if you use substitute target names (by using DECLARE_TARGET)
45
+ or use different IP addresses then this will not work and you'll have to use the
46
+ INTERFACE_TARGET or INTERFACE keyword.
47
+ INTERFACE_TARGET:
48
+ summary: Load the specified target's cmd_tlm_server.txt configuration file
49
+ example: |
50
+ INTERFACE_TARGET OPENC3 # Look in the OPENC3 target directory for cmd_tlm_server.txt
51
+ INTERFACE_TARGET OPENC3 config.txt # Look in the OPENC3 target directory for config.txt
52
+ parameters:
53
+ - name: Target Name
54
+ required: true
55
+ description: Name of the target
56
+ values: .+
57
+ - name: Configuration File
58
+ required: false
59
+ description: Configuration filename which contains the interface configuration.
60
+ Defaults to 'cmd_tlm_server.txt'.
61
+ values: .+
62
+ INTERFACE:
63
+ modifiers:
64
+ <%= MetaConfigParser.load('interface_modifiers.yaml').to_meta_config_yaml(4) %>
65
+ summary: Defines a connection to a physical target
66
+ description: Interfaces are what OpenC3 uses to talk to a particular piece
67
+ of hardware. Interfaces require a Ruby file which implements all the interface
68
+ methods necessary to talk to the hardware. OpenC3 defines many built in interfaces
69
+ or you can define your own as long as it implements the interface protocol.
70
+ parameters:
71
+ - name: Interface Name
72
+ required: true
73
+ description: Name of the interface. This name will appear in the
74
+ Interfaces tab of the Server and is also referenced by other keywords.
75
+ The OpenC3 convention is to name interfaces after their targets with
76
+ '_INT' appended to the name, e.g. INST_INT for the INST target.
77
+ values: \D\S*
78
+ - name: Filename
79
+ required: true
80
+ description: Ruby file to use when instantiating the interface.
81
+ values:
82
+ <%= MetaConfigParser.load('_interfaces.yaml').to_meta_config_yaml(8) %>
83
+ documentation: Additional parameters are required. Please see the [Interfaces](/docs/v5/interfaces)
84
+ documentation for more details.
85
+ ROUTER:
86
+ modifiers:
87
+ ROUTE:
88
+ summary: Map an interface to a router
89
+ description: Once an interface has been mapped to a router, all its received telemetry
90
+ will be sent out through the router.
91
+ parameters:
92
+ - name: Interface
93
+ required: true
94
+ description: Name of the interface
95
+ values: .+
96
+ <%= MetaConfigParser.load('interface_modifiers.yaml').to_meta_config_yaml(4) %>
97
+ summary: Create an interface which reverses cmd/tlm data
98
+ description: Router creates an interface which receives command packets from
99
+ their remote targets and send them out their interfaces. They receive telemetry
100
+ packets from their interfaces and send them to their remote targets. This allows
101
+ routers to be intermediaries between an external client and an actual device.
102
+ parameters:
103
+ - name: Name
104
+ required: true
105
+ description: Name of the router
106
+ values: .+
107
+ - name: Filename
108
+ required: true
109
+ description: Ruby file to use when instantiating the interface.
110
+ values:
111
+ <%= MetaConfigParser.load('_interfaces.yaml').to_meta_config_yaml(8) %>
112
+ documentation: Additional parameters are required. Please see the [Interfaces](/docs/v5/interfaces)
113
+ documentation for more details.
114
+ COLLECT_METADATA:
115
+ summary: Prompts the user for meta data when starting the Command and Telemetry Server
116
+ BACKGROUND_TASK:
117
+ modifiers:
118
+ STOPPED:
119
+ summary: Indicate the background task should not be automatically started
120
+ summary: Create a background task in the Command and Telemetry Server
121
+ description: The Server instantiates the class which must inherit from BackgroundTask
122
+ and then calls the call() method which the class must implement. The call() method
123
+ is only called once so if your background task is supposed to live on while the
124
+ Server is running, you must implement your code in a loop with a sleep to not
125
+ use all the CPU.
126
+ example: BACKGROUND_TASK example_background_task.rb
127
+ parameters:
128
+ - name: Filename
129
+ required: true
130
+ description: Ruby file which contains the background task implementation.
131
+ Must inherit from BackgroundTask and implement the call method.
132
+ values: '.+\.rb'
133
+ - name: Optional Arguments
134
+ required: false
135
+ description: Optional arguments to the background task constructor
136
+ values: .+
@@ -0,0 +1,44 @@
1
+ ---
2
+ COMMAND:
3
+ # Prevent prettier from removing the newline after modifiers:
4
+ # prettier-ignore
5
+ modifiers:
6
+ <%= MetaConfigParser.load('command_modifiers.yaml').to_meta_config_yaml(4) %>
7
+ summary: Defines a new command packet
8
+ example: COMMAND INST COLLECT BIG_ENDIAN "Start collect"
9
+ parameters:
10
+ - name: Target
11
+ required: true
12
+ description: Name of the target this command is associated with
13
+ values: .+
14
+ - name: Command
15
+ required: true
16
+ description: Name of this command. Also referred to as its mnemonic.
17
+ Must be unique to commands to this target. Ideally will be as short and clear as possible.
18
+ values: \D\S*
19
+ - name: Endianness
20
+ required: true
21
+ description: Indicates if the data in this command is to be sent in Big Endian or Little Endian format
22
+ values: ["BIG_ENDIAN", "LITTLE_ENDIAN"]
23
+ - name: Description
24
+ required: false
25
+ description: Description of this command which must be enclosed with quotes
26
+ values: '[''"].*[''"]'
27
+ SELECT_COMMAND:
28
+ # prettier-ignore
29
+ modifiers:
30
+ <%= MetaConfigParser.load('command_modifiers.yaml').to_meta_config_yaml(4) %>
31
+ summary: Selects an existing command packet for editing
32
+ description:
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
+ example: SELECT_COMMAND INST COLLECT
36
+ parameters:
37
+ - name: Target Name
38
+ required: true
39
+ description: Name of the target this command is associated with
40
+ values: .+
41
+ - name: Command Name
42
+ required: true
43
+ description: Name of the command to select
44
+ values: .*
@@ -0,0 +1,160 @@
1
+ ---
2
+ PARAMETER:
3
+ modifiers:
4
+ <%= MetaConfigParser.load('parameter_modifiers.yaml').to_meta_config_yaml(4) %>
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
+ parameters:
13
+ - name: Name
14
+ required: true
15
+ description: Name of the parameter. Must be unique within the command.
16
+ values: '\D\S*'
17
+ - name: Bit Offset
18
+ required: true
19
+ description: Bit offset into the command packet of the Most Significant Bit of this parameter.
20
+ May be negative to indicate on offset from the end of the packet.
21
+ Always use a bit offset of 0 for derived parameters.
22
+ values: '[-]?\d+'
23
+ <%= MetaConfigParser.load('_params.yaml').to_meta_config_yaml(4) %>
24
+ APPEND_PARAMETER:
25
+ modifiers:
26
+ <%= MetaConfigParser.load('parameter_modifiers.yaml').to_meta_config_yaml(4) %>
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
+ parameters:
33
+ - name: Name
34
+ required: true
35
+ description: Name of the parameter. Must be unique within the command.
36
+ values: .+
37
+ <%= MetaConfigParser.load('_params.yaml').to_meta_config_yaml(4) %>
38
+ ID_PARAMETER:
39
+ modifiers:
40
+ <%= MetaConfigParser.load('parameter_modifiers.yaml').to_meta_config_yaml(4) %>
41
+ summary: Defines an identification command parameter in the current command packet
42
+ description: ID parameters are used to identify the binary block of data as a
43
+ particular command. A command packet may have one or more ID_PARAMETERs and all
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
+ parameters:
47
+ - name: Name
48
+ required: true
49
+ description: Name of the parameter. Must be unique within the command.
50
+ values: .+
51
+ - name: Bit Offset
52
+ required: true
53
+ description: Bit offset into the command packet of the Most Significant Bit of this parameter.
54
+ May be negative to indicate on offset from the end of the packet.
55
+ Always use a bit offset of 0 for derived parameters.
56
+ values: '[-]?\d+'
57
+ <%= MetaConfigParser.load('_id_params.yaml').to_meta_config_yaml(4) %>
58
+ APPEND_ID_PARAMETER:
59
+ modifiers:
60
+ <%= MetaConfigParser.load('parameter_modifiers.yaml').to_meta_config_yaml(4) %>
61
+ summary: Defines an identification command parameter in the current command packet
62
+ description: ID parameters are used to identify the binary block of data as a
63
+ particular command. A command packet may have one or more ID_PARAMETERs and all
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
+ parameters:
67
+ - name: Name
68
+ required: true
69
+ description: Name of the parameter. Must be unique within the command.
70
+ values: .+
71
+ <%= MetaConfigParser.load('_id_params.yaml').to_meta_config_yaml(4) %>
72
+ ARRAY_PARAMETER:
73
+ modifiers:
74
+ <%= MetaConfigParser.load('parameter_modifiers.yaml').to_meta_config_yaml(4) %>
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
+ parameters:
78
+ - name: Name
79
+ required: true
80
+ description: Name of the parameter. Must be unique within the command.
81
+ values: \'
82
+ - name: Bit Offset
83
+ required: true
84
+ description: Bit offset into the command packet of the Most Significant Bit of this parameter.
85
+ May be negative to indicate on offset from the end of the packet.
86
+ Always use a bit offset of 0 for derived parameters.
87
+ values: '[-]?\d+'
88
+ <%= MetaConfigParser.load('_array_params.yaml').to_meta_config_yaml(4) %>
89
+ APPEND_ARRAY_PARAMETER:
90
+ modifiers:
91
+ <%= MetaConfigParser.load('parameter_modifiers.yaml').to_meta_config_yaml(4) %>
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
+ parameters:
95
+ - name: Name
96
+ required: true
97
+ description: Name of the parameter. Must be unique within the command.
98
+ values: '\D\S*'
99
+ <%= MetaConfigParser.load('_array_params.yaml').to_meta_config_yaml(4) %>
100
+ SELECT_PARAMETER:
101
+ modifiers:
102
+ <%= MetaConfigParser.load('parameter_modifiers.yaml').to_meta_config_yaml(4) %>
103
+ summary: Selects an existing command parameter for editing
104
+ example: |
105
+ SELECT_COMMAND INST COLLECT
106
+ SELECT_PARAMETER DURATION
107
+ parameters:
108
+ - name: Parameter
109
+ required: true
110
+ description: Name of the parameter to select for modification
111
+ values: .+
112
+ DELETE_PARAMETER:
113
+ summary: Deletes an existing command parameter from the packet definition
114
+ description: Deleting a parameter from the command definition does not remove the
115
+ defined space for that parameter. Thus unless you redefine a new parameter, there
116
+ will be a "hole" in the packet where the data is not accessible. You can
117
+ use SELECT_COMMAND and then PARAMETER to define a new parameter.
118
+ example: |
119
+ SELECT_COMMAND INST COLLECT
120
+ DELETE_PARAMETER DURATION
121
+ since: 4.4.1
122
+ parameters:
123
+ - name: Parameter
124
+ required: true
125
+ description: Name of the parameter to delete
126
+ values: .+
127
+ HIDDEN:
128
+ summary: Hides this command from all OpenC3 tools such as Command Sender and Handbook Creator
129
+ description: Hidden commands do not appear in the Script Runner popup helper when writing scripts.
130
+ The command still exists in the system and can be sent by scripts.
131
+ DISABLED:
132
+ summary: Disables this command from being sent
133
+ description: Hides the command and also disables it from being sent by scripts.
134
+ Attempts to send DISABLED commands result in an error message.
135
+ DISABLE_MESSAGES:
136
+ summary: Disable the Server from printing cmd(...) messages. Commands are still logged.
137
+ META:
138
+ summary: Stores metadata for the current command
139
+ description: Meta data is user specific data that can be used by custom tools
140
+ for various purposes. One example is to store additional information needed
141
+ to generate source code header files.
142
+ example: META FSW_TYPE "struct command"
143
+ parameters:
144
+ - name: Meta Name
145
+ required: true
146
+ description: Name of the metadata to store
147
+ values: .*
148
+ - name: Meta Values
149
+ required: false
150
+ description: One or more values to be stored for this Meta Name
151
+ values: .*
152
+ HAZARDOUS:
153
+ summary: Designates the current command as hazardous
154
+ description: Sending a hazardous command causes a dialog asking for confirmation
155
+ before sending the command
156
+ parameters:
157
+ - name: Description
158
+ required: false
159
+ description: Description for why the command is hazardous which must be enclosed with quotes
160
+ values: "['\"].*['\"]"
@@ -0,0 +1,3 @@
1
+ ---
2
+ <%= MetaConfigParser.load('command.yaml').to_meta_config_yaml(0) %>
3
+ <%= MetaConfigParser.load('telemetry.yaml').to_meta_config_yaml(0) %>
@@ -0,0 +1,104 @@
1
+ ---
2
+ MAP_TARGET:
3
+ summary: Maps a target name to an interface
4
+ parameters:
5
+ - name: Target Name
6
+ required: true
7
+ description: Target name to map to this interface
8
+ values: .+
9
+ DONT_CONNECT:
10
+ summary: Server will not automatically try to connect to the interface at startup
11
+ DONT_RECONNECT:
12
+ summary: Server will not try to reconnect to the interface if the connection is lost
13
+ RECONNECT_DELAY:
14
+ summary: Reconnect delay in seconds
15
+ description:
16
+ If DONT_RECONNECT is not present the Server will try to reconnect to an
17
+ interface if the connection is lost. Reconnect delay sets the interval in seconds
18
+ between reconnect tries.
19
+ parameters:
20
+ - name: Delay
21
+ required: true
22
+ description: Delay in seconds between reconnect attempts. The default is 15 seconds.
23
+ values: ([0-9]*[.])?[0-9]+
24
+ DISABLE_DISCONNECT:
25
+ summary: Disable the Disconnect button on the Interfaces tab in the Server
26
+ description:
27
+ Use this keyword to prevent the user from disconnecting from the interface.
28
+ This is typically used in a 'production' environment where you would not want
29
+ the user to inadvertantly disconnect from a target.
30
+ LOG:
31
+ summary: Enable logging on the interface by the specified log writer
32
+ description:
33
+ LOG is only required if you want a log writer other than the default
34
+ to log commands and telemetry on this interface
35
+ warning: Choosing a custom log writer can prevent OpenC3 from reading back your log files
36
+ parameters:
37
+ - name: Name
38
+ required: true
39
+ description: Log writer name as defined by PACKET_LOG_WRITER
40
+ values: \D\S*
41
+ LOG_STORED:
42
+ summary: Enable logging of stored telemetry on the interface by the specified log writer
43
+ description:
44
+ LOG_STORED allows you to specify a different log writer for stored telemetry
45
+ (telemetry which has the 'stored' flag set in the packet). By default the stored telemetry
46
+ is intermingled in the normal log file.
47
+ warning: Choosing a custom log writer can prevent OpenC3 from reading back your log files
48
+ parameters:
49
+ - name: Name
50
+ required: true
51
+ description: Log writer name as defined by PACKET_LOG_WRITER
52
+ values: \D\S*
53
+ DONT_LOG:
54
+ summary: Disable logging commands and telemetry on this interface
55
+ LOG_RAW:
56
+ summary: Log all data on the interface exactly as it is sent and received
57
+ description:
58
+ LOG_RAW does not add any OpenC3 headers and thus can not be read by OpenC3 tools.
59
+ It is primarily useful for low level debugging of an interface. You will have to
60
+ manually parse these logs yourself using a hex editor or other application.
61
+ PROTOCOL:
62
+ summary: Protocols modify the interface by processing the data
63
+ description:
64
+ Protocols can be either READ, WRITE, or READ_WRITE. READ protocols act on the data
65
+ received by the interface while write acts on the data before it is sent out. READ_WRITE applies
66
+ the protocol to both reading and writing.<br/><br/>
67
+ There is only one built in protocol implemented by override_protocol.rb.
68
+ This protocol allows for Scripts to use the override_tlm() and normalize_tlm() methods to permanently
69
+ change a telemetry value. Note, this differs from set_tlm() as set_tlm() is over-written by new
70
+ incoming telemetry.<br/><br/>
71
+ For information on creating your own custom protocol please see <a href="https://openc3.com/docs/v5/protocols">https://openc3.com/docs/v5/protocols</a>
72
+ since: 4.0.0
73
+ parameters:
74
+ - name: Type
75
+ required: true
76
+ description: Whether to apply the protocol on incoming data, outgoing data, or both
77
+ values: ["READ", "WRITE", "READ_WRITE"]
78
+ - name: Protocol Filename or Classname
79
+ required: true
80
+ description: Ruby filename or class name which implements the protocol
81
+ values: .*
82
+ - name: Protocol specific parameters
83
+ required: false
84
+ description: Additional parameters used by the protocol
85
+ OPTION:
86
+ summary: Set a parameter on an interface
87
+ description:
88
+ When an option is set the interface class calls the set_option method.
89
+ Custom interfaces can override set_option to handle any additional options they want.
90
+ parameters:
91
+ - name: Name
92
+ required: true
93
+ description:
94
+ The option to set. OpenC3 defines several options on the core provided
95
+ interfaces. The SerialInterface defines FLOW_CONTROL which can be NONE (default) or RTSCTS
96
+ and DATA_BITS which changes the data bits of the serial interface.
97
+ The TcpipServerInterface defines LISTEN_ADDRESS which is the IP address to accept
98
+ connections on (default 0.0.0.0) and AUTO_SYSTEM_META which will automatically send
99
+ SYSTEM META when the interface connects (default false).
100
+ values: .*
101
+ - name: Parameters
102
+ required: false
103
+ description: Parameters to pass to the option
104
+ values: .*