cosmos 4.2.4-java → 4.3.0-java
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 +4 -4
- data/.travis.yml +1 -1
- data/Gemfile +1 -1
- data/Manifest.txt +12 -0
- data/autohotkey/tools/cmd_sequence.ahk +21 -20
- data/autohotkey/tools/cmd_sequence2.ahk +1 -1
- data/autohotkey/tools/config_editor.ahk +1 -1
- data/autohotkey/tools/launcher.ahk +1 -0
- data/autohotkey/tools/packet_viewer.ahk +6 -5
- data/autohotkey/tools/test_runner.ahk +8 -8
- data/bin/cosmos +37 -0
- data/bin/dart_util +0 -0
- data/data/config/item_modifiers.yaml +9 -0
- data/data/crc.txt +91 -86
- data/demo/Rakefile +2 -0
- data/demo/config/dart/Gemfile +1 -1
- data/demo/config/data/crc.txt +8 -5
- data/demo/config/system/system.txt +28 -0
- data/demo/config/system/system2.txt +21 -3
- data/demo/config/system/system_alt_ports.txt +69 -0
- data/demo/config/targets/INST/cmd_tlm/inst_tlm.txt +1 -0
- data/demo/config/tools/cmd_tlm_server/cmd_tlm_server_chain.txt +18 -0
- data/demo/procedures/cosmos_api_test.rb +18 -14
- data/demo/procedures/local_screen_example.rb +51 -0
- data/ext/cosmos/ext/cosmos_io/cosmos_io.c +32 -4
- data/ext/cosmos/ext/packet/packet.c +6 -0
- data/ext/mkrf_conf.rb +2 -2
- data/install/config/dart/Gemfile +1 -1
- data/install/config/data/crc.txt +2 -2
- data/install/config/system/system.txt +23 -1
- data/lib/cosmos/conversions.rb +2 -0
- data/lib/cosmos/conversions/packet_time_formatted_conversion.rb +38 -0
- data/lib/cosmos/conversions/packet_time_seconds_conversion.rb +38 -0
- data/lib/cosmos/core_ext/cosmos_io.rb +2 -1
- data/lib/cosmos/dart/Gemfile +1 -1
- data/lib/cosmos/dart/examples/dart_stream_client.rb +6 -2
- data/lib/cosmos/dart/lib/dart_common.rb +1 -1
- data/lib/cosmos/dart/lib/dart_database_cleaner.rb +2 -2
- data/lib/cosmos/dart/lib/dart_decommutator.rb +4 -4
- data/lib/cosmos/dart/lib/dart_importer.rb +3 -3
- data/lib/cosmos/dart/lib/dart_packet_log_writer.rb +2 -2
- data/lib/cosmos/dart/processes/dart_ingester.rb +2 -0
- data/lib/cosmos/dart/processes/dart_util.rb +4 -4
- data/lib/cosmos/dart/spec/dart/dart_reducer_manager_spec.rb +3 -3
- data/lib/cosmos/gui/dialogs/cmd_tlm_raw_dialog.rb +9 -5
- data/lib/cosmos/gui/dialogs/details_dialog.rb +29 -29
- data/lib/cosmos/gui/dialogs/exception_list_dialog.rb +1 -1
- data/lib/cosmos/gui/dialogs/find_replace_dialog.rb +3 -3
- data/lib/cosmos/gui/dialogs/interface_raw_dialog.rb +2 -2
- data/lib/cosmos/gui/dialogs/set_tlm_dialog.rb +1 -1
- data/lib/cosmos/gui/dialogs/tlm_details_dialog.rb +10 -10
- data/lib/cosmos/gui/qt.rb +10 -1
- data/lib/cosmos/gui/qt_tool.rb +17 -10
- data/lib/cosmos/gui/text/ruby_editor.rb +47 -8
- data/lib/cosmos/gui/utilities/classification_banner.rb +60 -0
- data/lib/cosmos/gui/utilities/script_module_gui.rb +26 -0
- data/lib/cosmos/interfaces.rb +1 -0
- data/lib/cosmos/interfaces/interface.rb +4 -0
- data/lib/cosmos/interfaces/protocols/ignore_packet_protocol.rb +46 -0
- data/lib/cosmos/interfaces/protocols/preidentified_protocol.rb +68 -23
- data/lib/cosmos/packet_logs/packet_log_reader.rb +69 -26
- data/lib/cosmos/packet_logs/packet_log_writer.rb +13 -1
- data/lib/cosmos/packets/commands.rb +5 -1
- data/lib/cosmos/packets/packet.rb +36 -2
- data/lib/cosmos/packets/packet_config.rb +0 -1
- data/lib/cosmos/packets/parsers/format_string_parser.rb +0 -1
- data/lib/cosmos/packets/parsers/xtce_parser.rb +1 -1
- data/lib/cosmos/packets/telemetry.rb +4 -0
- data/lib/cosmos/script/api_shared.rb +2 -0
- data/lib/cosmos/script/limits.rb +4 -0
- data/lib/cosmos/script/script.rb +27 -11
- data/lib/cosmos/script/telemetry.rb +3 -1
- data/lib/cosmos/script/tools.rb +18 -8
- data/lib/cosmos/system/system.rb +21 -0
- data/lib/cosmos/tools/cmd_extractor/cmd_extractor.rb +26 -24
- data/lib/cosmos/tools/cmd_sender/cmd_sender.rb +29 -29
- data/lib/cosmos/tools/cmd_sequence/cmd_sequence.rb +65 -40
- data/lib/cosmos/tools/cmd_sequence/sequence_item.rb +6 -6
- data/lib/cosmos/tools/cmd_tlm_server/api.rb +13 -0
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server.rb +12 -9
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_config.rb +7 -1
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server_gui.rb +8 -8
- data/lib/cosmos/tools/cmd_tlm_server/commanding.rb +13 -2
- data/lib/cosmos/tools/cmd_tlm_server/gui/interfaces_tab.rb +2 -2
- data/lib/cosmos/tools/cmd_tlm_server/gui/logging_tab.rb +13 -13
- data/lib/cosmos/tools/cmd_tlm_server/gui/packets_tab.rb +4 -4
- data/lib/cosmos/tools/cmd_tlm_server/gui/status_tab.rb +8 -8
- data/lib/cosmos/tools/cmd_tlm_server/gui/targets_tab.rb +5 -5
- data/lib/cosmos/tools/cmd_tlm_server/interface_thread.rb +35 -20
- data/lib/cosmos/tools/cmd_tlm_server/replay_backend.rb +15 -11
- data/lib/cosmos/tools/config_editor/config_editor.rb +69 -69
- data/lib/cosmos/tools/data_viewer/data_viewer.rb +42 -38
- data/lib/cosmos/tools/data_viewer/data_viewer_component.rb +1 -0
- data/lib/cosmos/tools/data_viewer/dump_component.rb +1 -0
- data/lib/cosmos/tools/handbook_creator/handbook_creator.rb +4 -4
- data/lib/cosmos/tools/launcher/launcher.rb +1 -1
- data/lib/cosmos/tools/limits_monitor/limits_monitor.rb +28 -24
- data/lib/cosmos/tools/opengl_builder/opengl_builder.rb +42 -42
- data/lib/cosmos/tools/packet_viewer/packet_viewer.rb +56 -53
- data/lib/cosmos/tools/script_runner/script_runner.rb +112 -95
- data/lib/cosmos/tools/script_runner/script_runner_frame.rb +48 -30
- data/lib/cosmos/tools/table_manager/table_manager.rb +42 -42
- data/lib/cosmos/tools/test_runner/test_runner.rb +45 -27
- data/lib/cosmos/tools/test_runner/test_runner_chooser.rb +3 -3
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor.rb +45 -45
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor_config.rb +4 -4
- data/lib/cosmos/tools/tlm_grapher/data_object_adders/xy_data_object_adder.rb +3 -3
- data/lib/cosmos/tools/tlm_grapher/data_object_editors/housekeeping_data_object_editor.rb +7 -7
- data/lib/cosmos/tools/tlm_grapher/data_object_editors/xy_data_object_editor.rb +10 -10
- data/lib/cosmos/tools/tlm_grapher/data_objects/housekeeping_data_object.rb +10 -3
- data/lib/cosmos/tools/tlm_grapher/data_objects/xy_data_object.rb +6 -6
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots/overview_tabbed_plots.rb +14 -14
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_tool.rb +83 -83
- data/lib/cosmos/tools/tlm_viewer/screen.rb +73 -13
- data/lib/cosmos/tools/tlm_viewer/tlm_viewer.rb +15 -15
- data/lib/cosmos/tools/tlm_viewer/widgets.rb +1 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasellipse_widget.rb +40 -0
- data/lib/cosmos/tools/tlm_viewer/widgets/timegraph_widget.rb +1 -1
- data/lib/cosmos/tools/tlm_viewer/widgets/widget.rb +6 -1
- data/lib/cosmos/top_level.rb +14 -1
- data/lib/cosmos/version.rb +5 -5
- data/lib/cosmos/win32/excel.rb +63 -12
- data/make_gems.sh +10 -0
- data/spec/conversions/packet_time_formatted_conversion_spec.rb +58 -0
- data/spec/conversions/packet_time_seconds_conversion_spec.rb +60 -0
- data/spec/interfaces/protocols/ignore_packet_protocol_spec.rb +243 -0
- data/spec/interfaces/protocols/preidentified_protocol_spec.rb +227 -4
- data/spec/io/serial_driver_spec.rb +15 -13
- data/spec/packet_logs/packet_log_reader_spec.rb +72 -17
- data/spec/packets/packet_config_spec.rb +5 -16
- data/spec/packets/parsers/format_string_parser_spec.rb +0 -11
- data/spec/packets/parsers/macro_parser_spec.rb +36 -36
- data/spec/packets/parsers/state_parser_spec.rb +36 -0
- data/spec/packets/telemetry_spec.rb +11 -9
- data/spec/script/script_spec.rb +2 -3
- data/spec/script/scripting_spec.rb +2 -1
- data/spec/script/tools_spec.rb +0 -1
- data/spec/tools/cmd_tlm_server/api_spec.rb +28 -20
- data/spec/tools/cmd_tlm_server/cmd_tlm_server_config_spec.rb +33 -0
- data/spec/tools/cmd_tlm_server/commanding_spec.rb +25 -1
- data/spec/tools/cmd_tlm_server/interface_thread_spec.rb +15 -0
- data/tasks/gemfile_stats.rake +3 -2
- metadata +14 -2
data/demo/Rakefile
CHANGED
|
@@ -72,10 +72,12 @@ def create_crc_file(official)
|
|
|
72
72
|
puts "Created config/data/crc.txt with #{count} CRCs"
|
|
73
73
|
end
|
|
74
74
|
|
|
75
|
+
desc 'Updates the config/data/crc.txt file with USER_MODIFIED (unofficial)'
|
|
75
76
|
task :crc do
|
|
76
77
|
create_crc_file(false)
|
|
77
78
|
end
|
|
78
79
|
|
|
80
|
+
desc 'Updates the config/data/crc.txt file (official)'
|
|
79
81
|
task :crc_official do
|
|
80
82
|
create_crc_file(true)
|
|
81
83
|
end
|
data/demo/config/dart/Gemfile
CHANGED
data/demo/config/data/crc.txt
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"config/targets/INST/tools/table_manager/McConfigTable_def.txt" 0x5B6FA631
|
|
55
55
|
"config/targets/INST/tools/data_viewer/data_viewer2.txt" 0x7FFA3A8A
|
|
56
56
|
"config/targets/INST/tools/data_viewer/data_viewer.txt" 0xB25E2644
|
|
57
|
-
"config/targets/INST/cmd_tlm/inst_tlm.txt"
|
|
57
|
+
"config/targets/INST/cmd_tlm/inst_tlm.txt" 0x83356727
|
|
58
58
|
"config/targets/INST/cmd_tlm/_ccsds_tlm.txt" 0xE833D935
|
|
59
59
|
"config/targets/INST/cmd_tlm/inst_cmds.txt" 0x7E5C780F
|
|
60
60
|
"config/targets/INST/cmd_tlm/_ccsds_cmd.txt" 0x7F5572F3
|
|
@@ -82,8 +82,9 @@
|
|
|
82
82
|
"config/data/hselectoff.gif" 0x8A0C192E
|
|
83
83
|
"config/data/groundon.gif" 0x97D9A501
|
|
84
84
|
"config/data/vswitchon.gif" 0xD747AC45
|
|
85
|
-
"config/system/
|
|
86
|
-
"config/system/
|
|
85
|
+
"config/system/system_alt_ports.txt" 0xB5D194B0
|
|
86
|
+
"config/system/system.txt" 0x84099B85
|
|
87
|
+
"config/system/system2.txt" 0x52BFC433
|
|
87
88
|
"config/tools/launcher/launcher2.css" 0x69DA47AB
|
|
88
89
|
"config/tools/launcher/launcher.txt" 0x7060F202
|
|
89
90
|
"config/tools/launcher/launcher2.txt" 0x697956FC
|
|
@@ -107,6 +108,7 @@
|
|
|
107
108
|
"config/tools/tlm_extractor/_adcs_time.txt" 0x3DAD5094
|
|
108
109
|
"config/tools/tlm_extractor/tlm_extractor2.txt" 0x5C780BD2
|
|
109
110
|
"config/tools/cmd_tlm_server/cmd_tlm_server2.txt" 0x2534CD8E
|
|
111
|
+
"config/tools/cmd_tlm_server/cmd_tlm_server_chain.txt" 0x0A7ED710
|
|
110
112
|
"config/tools/cmd_tlm_server/cmd_tlm_server.txt" 0xEE1CB154
|
|
111
113
|
"config/tools/tlm_grapher/README.txt" 0x93B2C07E
|
|
112
114
|
"config/tools/opengl_builder/README.txt" 0x93B2C07E
|
|
@@ -127,7 +129,7 @@
|
|
|
127
129
|
"config/tools/handbook_creator/default_toc.xsl" 0x4122A040
|
|
128
130
|
"config/tools/handbook_creator/handbook_creator.txt" 0xAA806C94
|
|
129
131
|
"config/tools/script_runner/script_runner.txt" 0x1EECD803
|
|
130
|
-
"config/dart/Gemfile"
|
|
132
|
+
"config/dart/Gemfile" 0x294591DB
|
|
131
133
|
"tools/TlmExtractor.bat" 0x2B98E027
|
|
132
134
|
"tools/Launcher" 0xFD4E356C
|
|
133
135
|
"tools/CmdSequence" 0x4A13C82C
|
|
@@ -262,9 +264,10 @@
|
|
|
262
264
|
"tools/CmdExtractor" 0x96E82AC3
|
|
263
265
|
"tools/OpenGLBuilder" 0x585EA691
|
|
264
266
|
"tools/CmdSender.bat" 0x2B98E027
|
|
265
|
-
"procedures/cosmos_api_test.rb"
|
|
267
|
+
"procedures/cosmos_api_test.rb" 0x9D13FFA3
|
|
266
268
|
"procedures/example_test.rb" 0xEB8B8E79
|
|
267
269
|
"procedures/test.rb" 0xCE4DA55A
|
|
268
270
|
"procedures/replay_test.rb" 0xBB4D6A36
|
|
269
271
|
"procedures/plot_test.rb" 0xF311D562
|
|
270
272
|
"procedures/run_example_test.rb" 0x0F244140
|
|
273
|
+
"procedures/local_screen_example.rb" 0x677D2019
|
|
@@ -14,18 +14,33 @@ LISTEN_HOST CTS_API 127.0.0.1
|
|
|
14
14
|
LISTEN_HOST TLMVIEWER_API 127.0.0.1
|
|
15
15
|
LISTEN_HOST CTS_PREIDENTIFIED 0.0.0.0 # 127.0.0.1 is more secure if you don't need external connections
|
|
16
16
|
LISTEN_HOST CTS_CMD_ROUTER 0.0.0.0 # 127.0.0.1 is more secure if you don't need external connections
|
|
17
|
+
LISTEN_HOST REPLAY_API 127.0.0.1
|
|
18
|
+
LISTEN_HOST REPLAY_PREIDENTIFIED 0.0.0.0 # 127.0.0.1 is more secure if you don't need external connections
|
|
19
|
+
LISTEN_HOST REPLAY_CMD_ROUTER 0.0.0.0 # 127.0.0.1 is more secure if you don't need external connections
|
|
20
|
+
LISTEN_HOST DART_STREAM 0.0.0.0 # 127.0.0.1 is more secure if you don't need external connections
|
|
21
|
+
LISTEN_HOST DART_DECOM 0.0.0.0 # 127.0.0.1 is more secure if you don't need external connections
|
|
17
22
|
|
|
18
23
|
# Connect Hosts - Ip addresses or hostnames to connect to when running the tools
|
|
19
24
|
CONNECT_HOST CTS_API 127.0.0.1
|
|
20
25
|
CONNECT_HOST TLMVIEWER_API 127.0.0.1
|
|
21
26
|
CONNECT_HOST CTS_PREIDENTIFIED 127.0.0.1
|
|
22
27
|
CONNECT_HOST CTS_CMD_ROUTER 127.0.0.1
|
|
28
|
+
CONNECT_HOST REPLAY_API 127.0.0.1
|
|
29
|
+
CONNECT_HOST REPLAY_PREIDENTIFIED 127.0.0.1
|
|
30
|
+
CONNECT_HOST REPLAY_CMD_ROUTER 127.0.0.1
|
|
31
|
+
CONNECT_HOST DART_STREAM 127.0.0.1
|
|
32
|
+
CONNECT_HOST DART_DECOM 127.0.0.1
|
|
23
33
|
|
|
24
34
|
# Ethernet Ports
|
|
25
35
|
PORT CTS_API 7777
|
|
26
36
|
PORT TLMVIEWER_API 7778
|
|
27
37
|
PORT CTS_PREIDENTIFIED 7779
|
|
28
38
|
PORT CTS_CMD_ROUTER 7780
|
|
39
|
+
PORT REPLAY_API 7877
|
|
40
|
+
PORT REPLAY_PREIDENTIFIED 7879
|
|
41
|
+
PORT REPLAY_CMD_ROUTER 7880
|
|
42
|
+
PORT DART_STREAM 8777
|
|
43
|
+
PORT DART_DECOM 8779
|
|
29
44
|
|
|
30
45
|
# Default Packet Log Writer and Reader
|
|
31
46
|
DEFAULT_PACKET_LOG_WRITER packet_log_writer.rb
|
|
@@ -38,6 +53,9 @@ PATH SAVED_CONFIG ./outputs/saved_config
|
|
|
38
53
|
PATH TABLES ./outputs/tables
|
|
39
54
|
PATH HANDBOOKS ./outputs/handbooks
|
|
40
55
|
PATH PROCEDURES ./procedures
|
|
56
|
+
PATH SEQUENCES ./outputs/sequences
|
|
57
|
+
PATH DART_DATA ./outputs/dart/data
|
|
58
|
+
PATH DART_LOGS ./outputs/dart/logs
|
|
41
59
|
|
|
42
60
|
ALLOW_ACCESS ALL
|
|
43
61
|
|
|
@@ -49,3 +67,13 @@ ENABLE_SOUND
|
|
|
49
67
|
META_INIT config/data/meta_init.txt
|
|
50
68
|
|
|
51
69
|
ADD_MD5_FILE lib/user_version.rb
|
|
70
|
+
|
|
71
|
+
# Banner examples
|
|
72
|
+
# Create a banner using an existing COSMOS color (Cosmos::GREEN in this case)
|
|
73
|
+
# CLASSIFICATION UNCLASSIFIED green
|
|
74
|
+
|
|
75
|
+
# Create a banner using a Qt::Color that doesn't exist in COSMOS
|
|
76
|
+
# CLASSIFICATION "Ball Aerospace COSMOS" teal
|
|
77
|
+
|
|
78
|
+
# Create a banner using a RGB color values
|
|
79
|
+
# CLASSIFICATION Secret 255 114 0
|
|
@@ -12,18 +12,33 @@ LISTEN_HOST CTS_API 127.0.0.1
|
|
|
12
12
|
LISTEN_HOST TLMVIEWER_API 127.0.0.1
|
|
13
13
|
LISTEN_HOST CTS_PREIDENTIFIED 0.0.0.0 # 127.0.0.1 is more secure if you don't need external connections
|
|
14
14
|
LISTEN_HOST CTS_CMD_ROUTER 0.0.0.0 # 127.0.0.1 is more secure if you don't need external connections
|
|
15
|
+
LISTEN_HOST REPLAY_API 127.0.0.1
|
|
16
|
+
LISTEN_HOST REPLAY_PREIDENTIFIED 0.0.0.0 # 127.0.0.1 is more secure if you don't need external connections
|
|
17
|
+
LISTEN_HOST REPLAY_CMD_ROUTER 0.0.0.0 # 127.0.0.1 is more secure if you don't need external connections
|
|
18
|
+
LISTEN_HOST DART_STREAM 0.0.0.0 # 127.0.0.1 is more secure if you don't need external connections
|
|
19
|
+
LISTEN_HOST DART_DECOM 0.0.0.0 # 127.0.0.1 is more secure if you don't need external connections
|
|
15
20
|
|
|
16
21
|
# Connect Hosts - Ip addresses or hostnames to connect to when running the tools
|
|
17
22
|
CONNECT_HOST CTS_API 127.0.0.1
|
|
18
23
|
CONNECT_HOST TLMVIEWER_API 127.0.0.1
|
|
19
24
|
CONNECT_HOST CTS_PREIDENTIFIED 127.0.0.1
|
|
20
25
|
CONNECT_HOST CTS_CMD_ROUTER 127.0.0.1
|
|
26
|
+
CONNECT_HOST REPLAY_API 127.0.0.1
|
|
27
|
+
CONNECT_HOST REPLAY_PREIDENTIFIED 127.0.0.1
|
|
28
|
+
CONNECT_HOST REPLAY_CMD_ROUTER 127.0.0.1
|
|
29
|
+
CONNECT_HOST DART_STREAM 127.0.0.1
|
|
30
|
+
CONNECT_HOST DART_DECOM 127.0.0.1
|
|
21
31
|
|
|
22
32
|
# Ethernet Ports
|
|
23
|
-
PORT CTS_API
|
|
24
|
-
PORT TLMVIEWER_API
|
|
25
|
-
PORT CTS_PREIDENTIFIED
|
|
33
|
+
PORT CTS_API 7777
|
|
34
|
+
PORT TLMVIEWER_API 7778
|
|
35
|
+
PORT CTS_PREIDENTIFIED 7779
|
|
26
36
|
PORT CTS_CMD_ROUTER 7780
|
|
37
|
+
PORT REPLAY_API 7877
|
|
38
|
+
PORT REPLAY_PREIDENTIFIED 7879
|
|
39
|
+
PORT REPLAY_CMD_ROUTER 7880
|
|
40
|
+
PORT DART_STREAM 8777
|
|
41
|
+
PORT DART_DECOM 8779
|
|
27
42
|
|
|
28
43
|
# Default Packet Log Writer and Reader
|
|
29
44
|
DEFAULT_PACKET_LOG_WRITER packet_log_writer.rb
|
|
@@ -36,6 +51,9 @@ PATH SAVED_CONFIG ./outputs/saved_config
|
|
|
36
51
|
PATH TABLES ./outputs/tables
|
|
37
52
|
PATH HANDBOOKS ./outputs/handbooks
|
|
38
53
|
PATH PROCEDURES ./procedures
|
|
54
|
+
PATH SEQUENCES ./outputs/sequences
|
|
55
|
+
PATH DART_DATA ./outputs/dart/data
|
|
56
|
+
PATH DART_LOGS ./outputs/dart/logs
|
|
39
57
|
|
|
40
58
|
ALLOW_ACCESS ALL
|
|
41
59
|
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Declare Targets that make up the system
|
|
2
|
+
# DECLARE_TARGET target_name [substitute_name]
|
|
3
|
+
|
|
4
|
+
# AUTO_DECLARE_TARGETS
|
|
5
|
+
DECLARE_TARGET INST
|
|
6
|
+
DECLARE_TARGET INST INST2
|
|
7
|
+
DECLARE_TARGET EXAMPLE
|
|
8
|
+
DECLARE_TARGET TEMPLATED
|
|
9
|
+
DECLARE_TARGET DART
|
|
10
|
+
DECLARE_TARGET SYSTEM
|
|
11
|
+
|
|
12
|
+
# Listen Hosts - Ip addresses or hostnames to listen on when running the tools
|
|
13
|
+
LISTEN_HOST CTS_API 127.0.0.1
|
|
14
|
+
LISTEN_HOST TLMVIEWER_API 127.0.0.1
|
|
15
|
+
LISTEN_HOST CTS_PREIDENTIFIED 0.0.0.0 # 127.0.0.1 is more secure if you don't need external connections
|
|
16
|
+
LISTEN_HOST CTS_CMD_ROUTER 0.0.0.0 # 127.0.0.1 is more secure if you don't need external connections
|
|
17
|
+
LISTEN_HOST REPLAY_API 127.0.0.1
|
|
18
|
+
LISTEN_HOST REPLAY_PREIDENTIFIED 0.0.0.0 # 127.0.0.1 is more secure if you don't need external connections
|
|
19
|
+
LISTEN_HOST REPLAY_CMD_ROUTER 0.0.0.0 # 127.0.0.1 is more secure if you don't need external connections
|
|
20
|
+
LISTEN_HOST DART_STREAM 0.0.0.0 # 127.0.0.1 is more secure if you don't need external connections
|
|
21
|
+
LISTEN_HOST DART_DECOM 0.0.0.0 # 127.0.0.1 is more secure if you don't need external connections
|
|
22
|
+
|
|
23
|
+
# Connect Hosts - Ip addresses or hostnames to connect to when running the tools
|
|
24
|
+
CONNECT_HOST CTS_API 127.0.0.1
|
|
25
|
+
CONNECT_HOST TLMVIEWER_API 127.0.0.1
|
|
26
|
+
CONNECT_HOST CTS_PREIDENTIFIED 127.0.0.1
|
|
27
|
+
CONNECT_HOST CTS_CMD_ROUTER 127.0.0.1
|
|
28
|
+
CONNECT_HOST REPLAY_API 127.0.0.1
|
|
29
|
+
CONNECT_HOST REPLAY_PREIDENTIFIED 127.0.0.1
|
|
30
|
+
CONNECT_HOST REPLAY_CMD_ROUTER 127.0.0.1
|
|
31
|
+
CONNECT_HOST DART_STREAM 127.0.0.1
|
|
32
|
+
CONNECT_HOST DART_DECOM 127.0.0.1
|
|
33
|
+
|
|
34
|
+
# Ethernet Ports
|
|
35
|
+
PORT CTS_API 9777
|
|
36
|
+
PORT TLMVIEWER_API 9778
|
|
37
|
+
PORT CTS_PREIDENTIFIED 9779
|
|
38
|
+
PORT CTS_CMD_ROUTER 9780
|
|
39
|
+
PORT REPLAY_API 9877
|
|
40
|
+
PORT REPLAY_PREIDENTIFIED 9879
|
|
41
|
+
PORT REPLAY_CMD_ROUTER 9880
|
|
42
|
+
PORT DART_STREAM 10777
|
|
43
|
+
PORT DART_DECOM 10779
|
|
44
|
+
|
|
45
|
+
# Default Packet Log Writer and Reader
|
|
46
|
+
DEFAULT_PACKET_LOG_WRITER packet_log_writer.rb
|
|
47
|
+
DEFAULT_PACKET_LOG_READER packet_log_reader.rb
|
|
48
|
+
|
|
49
|
+
# Paths
|
|
50
|
+
PATH LOGS ./outputs/logs
|
|
51
|
+
PATH TMP ./outputs/tmp
|
|
52
|
+
PATH SAVED_CONFIG ./outputs/saved_config
|
|
53
|
+
PATH TABLES ./outputs/tables
|
|
54
|
+
PATH HANDBOOKS ./outputs/handbooks
|
|
55
|
+
PATH PROCEDURES ./procedures
|
|
56
|
+
PATH SEQUENCES ./outputs/sequences
|
|
57
|
+
PATH DART_DATA ./outputs/dart/data
|
|
58
|
+
PATH DART_LOGS ./outputs/dart/logs
|
|
59
|
+
|
|
60
|
+
ALLOW_ACCESS ALL
|
|
61
|
+
|
|
62
|
+
ENABLE_SOUND
|
|
63
|
+
# DISABLE_DNS
|
|
64
|
+
# STALENESS_SECONDS 30
|
|
65
|
+
|
|
66
|
+
# Initialize the metadata dialog using values from the following file:
|
|
67
|
+
META_INIT config/data/meta_init.txt
|
|
68
|
+
|
|
69
|
+
ADD_MD5_FILE lib/user_version.rb
|
|
@@ -35,6 +35,7 @@ TELEMETRY INST HEALTH_STATUS BIG_ENDIAN "Health and status from the <%= @target_
|
|
|
35
35
|
APPEND_ITEM COLLECT_TYPE 16 UINT "Most recent collect type"
|
|
36
36
|
STATE NORMAL 0
|
|
37
37
|
STATE SPECIAL 1
|
|
38
|
+
STATE ERROR ANY
|
|
38
39
|
APPEND_ARRAY_ITEM ARY2 64 FLOAT 640 "Double array"
|
|
39
40
|
UNITS CELCIUS C
|
|
40
41
|
APPEND_ITEM ASCIICMD 2048 STRING "Most recent ASCIICMD string"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Using this file WITH LOCALHOST requires changing the ports in system.txt
|
|
2
|
+
# Otherwise don't change the ports!
|
|
3
|
+
|
|
4
|
+
TITLE 'COSMOS Command and Telemetry Server - Chain Configuration'
|
|
5
|
+
|
|
6
|
+
# Don't log on the chained server
|
|
7
|
+
PACKET_LOG_WRITER DEFAULT packet_log_writer.rb nil false
|
|
8
|
+
|
|
9
|
+
# Replace localhost below with the IP Address of the master CmdTlmServer
|
|
10
|
+
# Update the target list below to the full list of targets in your system
|
|
11
|
+
# To make this child unable to send commands change the first 7779 to nil
|
|
12
|
+
INTERFACE CHAININT tcpip_client_interface.rb localhost 7779 7779 10 5 PREIDENTIFIED
|
|
13
|
+
TARGET INST
|
|
14
|
+
TARGET INST2
|
|
15
|
+
TARGET EXAMPLE
|
|
16
|
+
TARGET TEMPLATED
|
|
17
|
+
TARGET SYSTEM
|
|
18
|
+
TARGET DART
|
|
@@ -146,9 +146,12 @@ send_raw("INT1", "\x00\x00")
|
|
|
146
146
|
send_raw("INT1", "\x00\x00", "\x00\x00")
|
|
147
147
|
|
|
148
148
|
# get_cmd_list
|
|
149
|
-
expected_list = [["ABORT", "Aborts a collect on the instrument"], ["ARYCMD", "Command with array parameter"], ["ASCIICMD", "Enumerated ASCII command"], ["CLEAR", "Clears counters on the instrument"], ["COLLECT", "Starts a collect on the
|
|
149
|
+
expected_list = [["ABORT", "Aborts a collect on the INST instrument"], ["ARYCMD", "Command with array parameter"], ["ASCIICMD", "Enumerated ASCII command"], ["CLEAR", "Clears counters on the INST instrument"], ["COLLECT", "Starts a collect on the INST target"], ["FLTCMD", "Command with float parameters"], ["SETPARAMS", "Sets numbered parameters"], ["SLRPNLDEPLOY", "Deploy solar array panels"], ["SLRPNLRESET", "Reset solar array panels"]]
|
|
150
150
|
list = get_cmd_list("INST")
|
|
151
|
-
|
|
151
|
+
puts list.inspect
|
|
152
|
+
if list != expected_list
|
|
153
|
+
raise "Fail"
|
|
154
|
+
end
|
|
152
155
|
|
|
153
156
|
# get_cmd_list should fail
|
|
154
157
|
get_cmd_list()
|
|
@@ -156,19 +159,20 @@ get_cmd_list("BOB")
|
|
|
156
159
|
get_cmd_list("BOB", "TED")
|
|
157
160
|
|
|
158
161
|
# get_cmd_param_list
|
|
159
|
-
expected_list = [["CCSDSVER", 0, nil, "CCSDS primary header version number", nil, nil, false],
|
|
160
|
-
["CCSDSTYPE", 1, nil, "CCSDS primary header packet type", nil, nil, false],
|
|
161
|
-
["CCSDSSHF", 0, nil, "CCSDS primary header secondary header flag", nil, nil, false],
|
|
162
|
-
["CCSDSAPID", 999, nil, "CCSDS primary header application id", nil, nil, false],
|
|
163
|
-
["CCSDSSEQFLAGS", 3, nil, "CCSDS primary header sequence flags", nil, nil, false],
|
|
164
|
-
["CCSDSSEQCNT", 0, nil, "CCSDS primary header sequence count", nil, nil, false],
|
|
165
|
-
["CCSDSLENGTH", 12, nil, "CCSDS primary header packet length", nil, nil, false],
|
|
166
|
-
["PKTID", 1, nil, "Packet id", nil, nil, false],
|
|
167
|
-
["TYPE", 0, {"NORMAL"=>0, "SPECIAL"=>1}, "Collect type", nil, nil, true],
|
|
168
|
-
["DURATION", 1.0, nil, "Collect duration", nil, nil, false],
|
|
169
|
-
["OPCODE", "0xAB", nil, "Collect opcode", nil, nil, false],
|
|
170
|
-
["TEMP", 0.0, nil, "Collect temperature", "Celcius", "C", false]]
|
|
162
|
+
expected_list = [["CCSDSVER", 0, nil, "CCSDS primary header version number", nil, nil, false, "UINT"],
|
|
163
|
+
["CCSDSTYPE", 1, nil, "CCSDS primary header packet type", nil, nil, false, "UINT"],
|
|
164
|
+
["CCSDSSHF", 0, nil, "CCSDS primary header secondary header flag", nil, nil, false, "UINT"],
|
|
165
|
+
["CCSDSAPID", 999, nil, "CCSDS primary header application id", nil, nil, false, "UINT"],
|
|
166
|
+
["CCSDSSEQFLAGS", 3, nil, "CCSDS primary header sequence flags", nil, nil, false, "UINT"],
|
|
167
|
+
["CCSDSSEQCNT", 0, nil, "CCSDS primary header sequence count", nil, nil, false, "UINT"],
|
|
168
|
+
["CCSDSLENGTH", 12, nil, "CCSDS primary header packet length", nil, nil, false, "UINT"],
|
|
169
|
+
["PKTID", 1, nil, "Packet id", nil, nil, false, "UINT"],
|
|
170
|
+
["TYPE", 0, {"NORMAL"=>0, "SPECIAL"=>1}, "Collect type", nil, nil, true, "UINT"],
|
|
171
|
+
["DURATION", 1.0, nil, "Collect duration", nil, nil, false, "FLOAT"],
|
|
172
|
+
["OPCODE", "0xAB", nil, "Collect opcode", nil, nil, false, "UINT"],
|
|
173
|
+
["TEMP", 0.0, nil, "Collect temperature", "Celcius", "C", false, "FLOAT"]]
|
|
171
174
|
list = get_cmd_param_list("INST", "COLLECT")
|
|
175
|
+
puts list.inspect(100)
|
|
172
176
|
if list != expected_list
|
|
173
177
|
raise "Fail"
|
|
174
178
|
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
temp = 0
|
|
2
|
+
screen = local_screen('Title') do
|
|
3
|
+
'
|
|
4
|
+
SCREEN AUTO AUTO 0.1 FIXED
|
|
5
|
+
|
|
6
|
+
VERTICAL
|
|
7
|
+
TITLE "Local Variable and Target Display"
|
|
8
|
+
|
|
9
|
+
VERTICALBOX
|
|
10
|
+
LABELVALUE LOCAL LOCAL temp
|
|
11
|
+
LABELVALUE INST ADCS POSX
|
|
12
|
+
LABELVALUE INST ADCS TIMEFORMATTED WITH_UNITS 30
|
|
13
|
+
END
|
|
14
|
+
END
|
|
15
|
+
'
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
disable_instrumentation do
|
|
19
|
+
5000000.times do
|
|
20
|
+
temp += 1
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
screen.close
|
|
25
|
+
|
|
26
|
+
temp2 = 5000000
|
|
27
|
+
screen_def =
|
|
28
|
+
'
|
|
29
|
+
SCREEN AUTO AUTO 0.1 FIXED
|
|
30
|
+
STAY_ON_TOP
|
|
31
|
+
|
|
32
|
+
VERTICAL
|
|
33
|
+
TITLE "Local Variable and Target Display #2"
|
|
34
|
+
|
|
35
|
+
VERTICALBOX
|
|
36
|
+
LABELVALUE LOCAL LOCAL temp2
|
|
37
|
+
LABELVALUE INST ADCS POSY
|
|
38
|
+
LABELVALUE INST ADCS TIMEFORMATTED WITH_UNITS 30
|
|
39
|
+
END
|
|
40
|
+
END
|
|
41
|
+
'
|
|
42
|
+
|
|
43
|
+
local_screen('Title2', screen_def, 100, 200)
|
|
44
|
+
|
|
45
|
+
disable_instrumentation do
|
|
46
|
+
5000000.times do
|
|
47
|
+
temp2 -= 1
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
close_local_screens()
|
|
@@ -34,9 +34,10 @@ static ID id_method_read = 0;
|
|
|
34
34
|
* @param length_num_bytes [Integer] Number of bytes in the length field
|
|
35
35
|
* @return [String] A String of "length field" number of bytes
|
|
36
36
|
*/
|
|
37
|
-
static VALUE read_length_bytes(VALUE
|
|
37
|
+
static VALUE read_length_bytes(int argc, VALUE* argv, VALUE self)
|
|
38
38
|
{
|
|
39
|
-
int length_num_bytes =
|
|
39
|
+
int length_num_bytes = 0;
|
|
40
|
+
int max_read_size = 0;
|
|
40
41
|
unsigned char* string = NULL;
|
|
41
42
|
long string_length = 0;
|
|
42
43
|
unsigned short short_length = 0;
|
|
@@ -44,7 +45,27 @@ static VALUE read_length_bytes(VALUE self, VALUE param_length_num_bytes)
|
|
|
44
45
|
volatile VALUE temp_string = Qnil;
|
|
45
46
|
volatile VALUE temp_string_length = Qnil;
|
|
46
47
|
volatile VALUE return_value = Qnil;
|
|
47
|
-
|
|
48
|
+
volatile VALUE param_length_num_bytes = Qnil;
|
|
49
|
+
volatile VALUE param_max_read_size = Qnil;
|
|
50
|
+
|
|
51
|
+
switch (argc)
|
|
52
|
+
{
|
|
53
|
+
case 1:
|
|
54
|
+
param_length_num_bytes = argv[0];
|
|
55
|
+
param_max_read_size = Qnil;
|
|
56
|
+
break;
|
|
57
|
+
case 2:
|
|
58
|
+
param_length_num_bytes = argv[0];
|
|
59
|
+
param_max_read_size = argv[1];
|
|
60
|
+
break;
|
|
61
|
+
default:
|
|
62
|
+
/* Invalid number of arguments given */
|
|
63
|
+
rb_raise(rb_eArgError, "wrong number of arguments (%d for 1..2)", argc);
|
|
64
|
+
break;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
length_num_bytes = FIX2INT(param_length_num_bytes);
|
|
68
|
+
|
|
48
69
|
/* Read bytes for string length */
|
|
49
70
|
temp_string = rb_funcall(self, id_method_read, 1, param_length_num_bytes);
|
|
50
71
|
if (NIL_P(temp_string) || (RSTRING_LEN(temp_string) != length_num_bytes))
|
|
@@ -94,6 +115,13 @@ static VALUE read_length_bytes(VALUE self, VALUE param_length_num_bytes)
|
|
|
94
115
|
break;
|
|
95
116
|
};
|
|
96
117
|
|
|
118
|
+
if (RTEST(param_max_read_size)) {
|
|
119
|
+
max_read_size = FIX2INT(param_max_read_size);
|
|
120
|
+
if (string_length > max_read_size) {
|
|
121
|
+
return Qnil;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
97
125
|
/* Read String */
|
|
98
126
|
temp_string_length = UINT2NUM(string_length);
|
|
99
127
|
return_value = rb_funcall(self, id_method_read, 1, temp_string_length);
|
|
@@ -113,5 +141,5 @@ void Init_cosmos_io (void)
|
|
|
113
141
|
id_method_read = rb_intern("read");
|
|
114
142
|
|
|
115
143
|
mCosmosIO = rb_define_module("CosmosIO");
|
|
116
|
-
rb_define_method(mCosmosIO, "read_length_bytes", read_length_bytes, 1);
|
|
144
|
+
rb_define_method(mCosmosIO, "read_length_bytes", read_length_bytes, -1);
|
|
117
145
|
}
|
|
@@ -44,6 +44,8 @@ static ID id_ivar_disabled = 0;
|
|
|
44
44
|
static ID id_ivar_target_name = 0;
|
|
45
45
|
static ID id_ivar_packet_name = 0;
|
|
46
46
|
static ID id_ivar_description = 0;
|
|
47
|
+
static ID id_ivar_stored = 0;
|
|
48
|
+
static ID id_ivar_extra = 0;
|
|
47
49
|
|
|
48
50
|
/* Wraps read_item_internal so that it can be called by rb_protect in protected_read_item_internal */
|
|
49
51
|
static VALUE wrap_read_item_internal(VALUE args)
|
|
@@ -297,6 +299,8 @@ static VALUE packet_initialize(int argc, VALUE* argv, VALUE self) {
|
|
|
297
299
|
rb_ivar_set(self, id_ivar_meta, Qnil);
|
|
298
300
|
rb_ivar_set(self, id_ivar_hidden, Qfalse);
|
|
299
301
|
rb_ivar_set(self, id_ivar_disabled, Qfalse);
|
|
302
|
+
rb_ivar_set(self, id_ivar_stored, Qfalse);
|
|
303
|
+
rb_ivar_set(self, id_ivar_extra, Qnil);
|
|
300
304
|
|
|
301
305
|
return self;
|
|
302
306
|
}
|
|
@@ -336,6 +340,8 @@ void Init_packet (void)
|
|
|
336
340
|
id_ivar_target_name = rb_intern("@target_name");
|
|
337
341
|
id_ivar_packet_name = rb_intern("@packet_name");
|
|
338
342
|
id_ivar_description = rb_intern("@description");
|
|
343
|
+
id_ivar_stored = rb_intern("@stored");
|
|
344
|
+
id_ivar_extra = rb_intern("@extra");
|
|
339
345
|
|
|
340
346
|
cPacket = rb_define_class_under(mCosmos, "Packet", cStructure);
|
|
341
347
|
rb_define_method(cPacket, "initialize", packet_initialize, -1);
|