cosmos 4.4.1-java → 4.5.2-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/.github/workflows/build_v4.yml +33 -0
- data/Dockerfile +10 -4
- data/Gemfile +1 -1
- data/Manifest.txt +26 -2
- data/README.md +4 -1
- data/Rakefile +33 -27
- data/autohotkey/tools/cmd_extractor.ahk +11 -9
- data/autohotkey/tools/cmd_sender.ahk +1 -1
- data/autohotkey/tools/cmd_sequence.ahk +1 -1
- data/autohotkey/tools/data_viewer.ahk +1 -1
- data/autohotkey/tools/limits_monitor.ahk +1 -1
- data/autohotkey/tools/packet_viewer.ahk +1 -1
- data/autohotkey/tools/script_runner.ahk +1 -1
- data/autohotkey/tools/test_runner2.ahk +1 -1
- data/autohotkey/tools/tlm_grapher.ahk +1 -1
- data/autohotkey/tools/tlm_grapher3.ahk +1 -1
- data/autohotkey/tools/tlm_viewer.ahk +1 -1
- data/autohotkey/tools/tlm_viewer2.ahk +1 -1
- data/autohotkey/tools/tlm_viewer5.ahk +1 -1
- data/bin/rubysloc +73 -28
- data/bin/xtce_converter +1 -1
- data/cosmos.gemspec +6 -12
- data/data/config/interface_modifiers.yaml +3 -2
- data/data/config/system.yaml +81 -24
- data/data/crc.txt +435 -435
- data/demo/Rakefile +4 -4
- data/demo/config/data/crc.txt +250 -250
- data/demo/config/system/system.txt +15 -7
- data/demo/config/system/system2.txt +15 -7
- data/demo/config/system/system_alt_ports.txt +15 -7
- data/demo/config/targets/INST/cmd_tlm/inst_cmds.txt +1 -1
- data/demo/config/tools/handbook_creator/default_toc.xsl +59 -59
- data/ext/cosmos/ext/buffered_file/buffered_file.c +2 -2
- data/ext/cosmos/ext/config_parser/config_parser.c +1 -2
- data/ext/cosmos/ext/line_graph/line_graph.c +53 -94
- data/ext/cosmos/ext/packet/packet.c +0 -6
- data/ext/cosmos/ext/platform/platform.c +56 -21
- data/ext/cosmos/ext/polynomial_conversion/polynomial_conversion.c +4 -8
- data/ext/cosmos/ext/structure/structure.c +12 -0
- data/extensions/vscode/.gitignore +4 -0
- data/extensions/vscode/.vscode/launch.json +32 -0
- data/extensions/vscode/.vscode/settings.json +13 -0
- data/extensions/vscode/.vscode/tasks.json +79 -0
- data/extensions/vscode/License.txt +879 -0
- data/extensions/vscode/README.md +9 -0
- data/extensions/vscode/client/License.txt +879 -0
- data/extensions/vscode/client/README.md +39 -0
- data/extensions/vscode/client/cosmos.configuration.json +23 -0
- data/extensions/vscode/client/images/icon.png +0 -0
- data/extensions/vscode/client/package-lock.json +414 -0
- data/extensions/vscode/client/package.json +105 -0
- data/extensions/vscode/client/src/extension.ts +132 -0
- data/extensions/vscode/client/src/screen_preview.rb +25 -0
- data/extensions/vscode/client/syntaxes/cosmos.tmLanguage.json +219 -0
- data/extensions/vscode/client/tsconfig.json +17 -0
- data/extensions/vscode/package-lock.json +26 -0
- data/extensions/vscode/package.json +35 -0
- data/extensions/vscode/server/License.txt +879 -0
- data/extensions/vscode/server/package-lock.json +236 -0
- data/extensions/vscode/server/package.json +29 -0
- data/extensions/vscode/server/src/server.ts +59 -0
- data/extensions/vscode/server/tsconfig.json +16 -0
- data/install/Rakefile +4 -4
- data/install/config/data/crc.txt +145 -145
- data/install/config/system/system.txt +15 -7
- data/install/config/tools/handbook_creator/default_toc.xsl +59 -59
- data/lib/cosmos/config/config_parser.rb +2 -10
- data/lib/cosmos/core_ext/class.rb +10 -0
- data/lib/cosmos/core_ext/time.rb +5 -3
- data/lib/cosmos/dart/examples/dart_decom_client.rb +1 -1
- data/lib/cosmos/dart/lib/dart_common.rb +3 -3
- data/lib/cosmos/dart/lib/dart_decommutator.rb +4 -4
- data/lib/cosmos/dart/processes/dart_decom_server.rb +1 -1
- data/lib/cosmos/dart/processes/dart_master.rb +1 -1
- data/lib/cosmos/dart/spec/dart/dart_database_cleaner_spec.rb +2 -2
- data/lib/cosmos/gui/qt.rb +10 -10
- data/lib/cosmos/gui/qt_tool.rb +17 -12
- data/lib/cosmos/gui/text/completion_text_edit.rb +2 -0
- data/lib/cosmos/gui/widgets/dart_meta_frame.rb +1 -1
- data/lib/cosmos/interfaces/dart_status_interface.rb +1 -1
- data/lib/cosmos/interfaces/linc_interface.rb +3 -3
- data/lib/cosmos/interfaces/protocols/burst_protocol.rb +1 -1
- data/lib/cosmos/interfaces/protocols/crc_protocol.rb +1 -1
- data/lib/cosmos/interfaces/protocols/template_protocol.rb +3 -3
- data/lib/cosmos/interfaces/serial_interface.rb +7 -1
- data/lib/cosmos/interfaces/stream_interface.rb +1 -1
- data/lib/cosmos/interfaces/tcpip_server_interface.rb +16 -16
- data/lib/cosmos/io/io_multiplexer.rb +6 -2
- data/lib/cosmos/io/json_drb.rb +3 -11
- data/lib/cosmos/io/json_drb_object.rb +7 -2
- data/lib/cosmos/io/json_drb_rack.rb +25 -5
- data/lib/cosmos/io/json_rpc.rb +1 -1
- data/lib/cosmos/io/posix_serial_driver.rb +60 -22
- data/lib/cosmos/io/serial_driver.rb +11 -8
- data/lib/cosmos/io/win32_serial_driver.rb +8 -1
- data/lib/cosmos/packets/packet.rb +8 -8
- data/lib/cosmos/packets/packet_config.rb +1 -1
- data/lib/cosmos/packets/packet_item_limits.rb +2 -14
- data/lib/cosmos/packets/parsers/xtce_converter.rb +10 -10
- data/lib/cosmos/packets/parsers/xtce_parser.rb +3 -0
- data/lib/cosmos/packets/structure.rb +18 -5
- data/lib/cosmos/packets/structure_item.rb +4 -21
- data/lib/cosmos/script/api_shared.rb +18 -1
- data/lib/cosmos/script/extract.rb +1 -1
- data/lib/cosmos/script/script.rb +4 -11
- data/lib/cosmos/streams/serial_stream.rb +11 -6
- data/lib/cosmos/system/system.rb +47 -13
- data/lib/cosmos/tools/cmd_sender/cmd_param_table_item_delegate.rb +15 -0
- data/lib/cosmos/tools/cmd_sender/cmd_params.rb +25 -3
- data/lib/cosmos/tools/cmd_sender/cmd_sender.rb +7 -0
- data/lib/cosmos/tools/cmd_sequence/sequence_item.rb +0 -5
- data/lib/cosmos/tools/cmd_tlm_server/api.rb +10 -8
- data/lib/cosmos/tools/cmd_tlm_server/cmd_tlm_server.rb +2 -2
- data/lib/cosmos/tools/cmd_tlm_server/gui/logging_tab.rb +1 -1
- data/lib/cosmos/tools/cmd_tlm_server/interface_thread.rb +29 -26
- data/lib/cosmos/tools/cmd_tlm_server/limits_groups_background_task.rb +1 -1
- data/lib/cosmos/tools/cmd_tlm_server/router_thread.rb +5 -0
- data/lib/cosmos/tools/config_editor/config_editor.rb +1 -1
- data/lib/cosmos/tools/handbook_creator/handbook_creator.rb +1 -1
- data/lib/cosmos/tools/handbook_creator/handbook_creator_config.rb +1 -1
- data/lib/cosmos/tools/script_runner/script_runner_frame.rb +5 -2
- data/lib/cosmos/tools/test_runner/test.rb +1 -1
- data/lib/cosmos/tools/test_runner/test_runner.rb +4 -4
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor.rb +3 -3
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor_config.rb +1 -4
- data/lib/cosmos/tools/tlm_extractor/tlm_extractor_processor.rb +3 -3
- data/lib/cosmos/tools/tlm_grapher/tabbed_plots_tool/tabbed_plots_dart_thread.rb +1 -1
- data/lib/cosmos/tools/tlm_viewer/tlm_viewer.rb +2 -2
- data/lib/cosmos/tools/tlm_viewer/widgets/canvasdot_widget.rb +2 -0
- data/lib/cosmos/top_level.rb +1 -1
- data/lib/cosmos/utilities/simulated_target.rb +1 -1
- data/lib/cosmos/version.rb +5 -5
- data/make_gems.sh +1 -1
- data/spec/core_ext/class_spec.rb +54 -0
- data/spec/core_ext/time_spec.rb +4 -0
- data/spec/gui/qt_spec.rb +1 -1
- data/spec/gui/utilities/script_module_gui_spec.rb +1 -1
- data/spec/interfaces/linc_interface_spec.rb +1 -1
- data/spec/interfaces/serial_interface_spec.rb +1 -5
- data/spec/io/json_drb_rack_spec.rb +166 -0
- data/spec/io/json_rpc_spec.rb +4 -5
- data/spec/io/posix_serial_driver_spec.rb +87 -0
- data/spec/io/win32_serial_driver_spec.rb +17 -1
- data/spec/packet_logs/packet_log_reader_spec.rb +34 -35
- data/spec/packets/packet_item_limits_spec.rb +6 -33
- data/spec/packets/structure_item_spec.rb +3 -21
- data/spec/script/extract_spec.rb +4 -1
- data/spec/system/system_spec.rb +109 -1
- data/spec/tools/cmd_tlm_server/api_spec.rb +12 -12
- data/spec/tools/cmd_tlm_server/background_tasks_spec.rb +2 -2
- data/spec/tools/cmd_tlm_server/interface_thread_spec.rb +4 -3
- data/spec/tools/cmd_tlm_server/router_thread_spec.rb +2 -3
- data/spec/top_level/top_level_spec.rb +2 -2
- data/spec/utilities/logger_spec.rb +3 -3
- data/test/performance/Rakefile +4 -4
- data/test/performance/config/data/crc.txt +67 -48
- metadata +53 -9
- data/.coveralls.yml +0 -1
- data/.travis.yml +0 -16
|
@@ -30,20 +30,16 @@ static ID id_method_to_f = 0;
|
|
|
30
30
|
*/
|
|
31
31
|
static VALUE polynomial_conversion_call(VALUE self, VALUE value, VALUE myself, VALUE buffer)
|
|
32
32
|
{
|
|
33
|
-
volatile VALUE coeffs = Qnil;
|
|
34
|
-
long coeffs_length = 0;
|
|
35
33
|
int index = 0;
|
|
36
|
-
double double_value = 0.0;
|
|
37
|
-
double coeff = 0.0;
|
|
38
34
|
double converted = 0.0;
|
|
39
35
|
double raised_to_power = 1.0;
|
|
40
36
|
|
|
41
|
-
coeffs = rb_ivar_get(self, id_ivar_coeffs);
|
|
42
|
-
coeffs_length = RARRAY_LEN(coeffs);
|
|
43
|
-
double_value = RFLOAT_VALUE(rb_funcall(value, id_method_to_f, 0));
|
|
37
|
+
volatile VALUE coeffs = rb_ivar_get(self, id_ivar_coeffs);
|
|
38
|
+
long coeffs_length = RARRAY_LEN(coeffs);
|
|
39
|
+
double double_value = RFLOAT_VALUE(rb_funcall(value, id_method_to_f, 0));
|
|
44
40
|
|
|
45
41
|
/* Handle C0 */
|
|
46
|
-
coeff = RFLOAT_VALUE(rb_ary_entry(coeffs, 0));
|
|
42
|
+
double coeff = RFLOAT_VALUE(rb_ary_entry(coeffs, 0));
|
|
47
43
|
converted += coeff;
|
|
48
44
|
|
|
49
45
|
/* Handle Coefficients raised to a power */
|
|
@@ -493,6 +493,9 @@ static VALUE binary_accessor_read(VALUE self, VALUE param_bit_offset, VALUE para
|
|
|
493
493
|
if (BYTE_ALIGNED(bit_offset)) {
|
|
494
494
|
string_length = upper_bound - lower_bound + 1;
|
|
495
495
|
string = malloc(string_length + 1);
|
|
496
|
+
if (string == NULL) {
|
|
497
|
+
rb_raise(rb_eNoMemError, "malloc of %d returned NULL", string_length + 1);
|
|
498
|
+
}
|
|
496
499
|
memcpy(string, buffer + lower_bound, string_length);
|
|
497
500
|
string[string_length] = 0;
|
|
498
501
|
if (param_data_type == symbol_STRING) {
|
|
@@ -538,6 +541,9 @@ static VALUE binary_accessor_read(VALUE self, VALUE param_bit_offset, VALUE para
|
|
|
538
541
|
string_length = ((bit_size - 1)/ 8) + 1;
|
|
539
542
|
array_length = string_length + 4; /* Required number of bytes plus slack */
|
|
540
543
|
unsigned_char_array = (unsigned char*) malloc(array_length);
|
|
544
|
+
if (unsigned_char_array == NULL) {
|
|
545
|
+
rb_raise(rb_eNoMemError, "malloc of %d returned NULL", array_length);
|
|
546
|
+
}
|
|
541
547
|
read_bitfield(lower_bound, upper_bound, bit_offset, bit_size, given_bit_offset, given_bit_size, param_endianness, buffer, (int)buffer_length, unsigned_char_array);
|
|
542
548
|
|
|
543
549
|
num_words = ((string_length - 1) / 4) + 1;
|
|
@@ -629,6 +635,9 @@ static VALUE binary_accessor_read(VALUE self, VALUE param_bit_offset, VALUE para
|
|
|
629
635
|
string_length = ((bit_size - 1)/ 8) + 1;
|
|
630
636
|
array_length = string_length + 4; /* Required number of bytes plus slack */
|
|
631
637
|
unsigned_char_array = (unsigned char*) malloc(array_length);
|
|
638
|
+
if (unsigned_char_array == NULL) {
|
|
639
|
+
rb_raise(rb_eNoMemError, "malloc of %d returned NULL", array_length);
|
|
640
|
+
}
|
|
632
641
|
read_bitfield(lower_bound, upper_bound, bit_offset, bit_size, given_bit_offset, given_bit_size, param_endianness, buffer, (int)buffer_length, unsigned_char_array);
|
|
633
642
|
|
|
634
643
|
num_words = ((string_length - 1) / 4) + 1;
|
|
@@ -1001,6 +1010,9 @@ static VALUE binary_accessor_write(VALUE self, VALUE value, VALUE param_bit_offs
|
|
|
1001
1010
|
string_length = ((bit_size - 1)/ 8) + 1;
|
|
1002
1011
|
array_length = string_length + 4; /* Required number of bytes plus slack */
|
|
1003
1012
|
unsigned_char_array = (unsigned char*) malloc(array_length);
|
|
1013
|
+
if (unsigned_char_array == NULL) {
|
|
1014
|
+
rb_raise(rb_eNoMemError, "malloc of %d returned NULL", array_length);
|
|
1015
|
+
}
|
|
1004
1016
|
|
|
1005
1017
|
num_words = ((string_length - 1) / 4) + 1;
|
|
1006
1018
|
num_bytes = num_words * 4;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.0.2",
|
|
3
|
+
// List of configurations. Add new configurations or edit existing ones.
|
|
4
|
+
"configurations": [
|
|
5
|
+
{
|
|
6
|
+
"name": "Launch Client",
|
|
7
|
+
"type": "extensionHost",
|
|
8
|
+
"request": "launch",
|
|
9
|
+
"runtimeExecutable": "${execPath}",
|
|
10
|
+
"args": [
|
|
11
|
+
"--extensionDevelopmentPath=${workspaceRoot}/client"
|
|
12
|
+
],
|
|
13
|
+
"stopOnEntry": false,
|
|
14
|
+
"sourceMaps": true,
|
|
15
|
+
"outFiles": [
|
|
16
|
+
"${workspaceRoot}/client/out/**/*.js"
|
|
17
|
+
],
|
|
18
|
+
"preLaunchTask": "watch:client"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "Attach to Server",
|
|
22
|
+
"type": "node",
|
|
23
|
+
"request": "attach",
|
|
24
|
+
"port": 6009,
|
|
25
|
+
"sourceMaps": true,
|
|
26
|
+
"outFiles": [
|
|
27
|
+
"${workspaceRoot}/client/server/**/*.js"
|
|
28
|
+
],
|
|
29
|
+
"preLaunchTask": "watch:server"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
// PowerShell
|
|
3
|
+
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
|
|
4
|
+
"files.exclude": {
|
|
5
|
+
"out": false // set this to true to hide the "out" folder with the compiled JS files
|
|
6
|
+
},
|
|
7
|
+
"search.exclude": {
|
|
8
|
+
"out": true // set this to false to include "out" folder in search results
|
|
9
|
+
},
|
|
10
|
+
"typescript.tsdk": "./node_modules/typescript/lib",
|
|
11
|
+
"typescript.tsc.autoDetect": "off",
|
|
12
|
+
"npm.enableScriptExplorer": true
|
|
13
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "2.0.0",
|
|
3
|
+
"tasks": [
|
|
4
|
+
{
|
|
5
|
+
"label": "compile",
|
|
6
|
+
"dependsOn": [
|
|
7
|
+
"compile:client",
|
|
8
|
+
"compile:server"
|
|
9
|
+
],
|
|
10
|
+
"problemMatcher": []
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"label": "compile:client",
|
|
14
|
+
"type": "npm",
|
|
15
|
+
"script": "compile:client",
|
|
16
|
+
"group": "build",
|
|
17
|
+
"presentation": {
|
|
18
|
+
"panel": "dedicated",
|
|
19
|
+
"reveal": "never"
|
|
20
|
+
},
|
|
21
|
+
"problemMatcher": [
|
|
22
|
+
"$tsc"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"label": "compile:server",
|
|
27
|
+
"type": "npm",
|
|
28
|
+
"script": "compile:server",
|
|
29
|
+
"group": "build",
|
|
30
|
+
"presentation": {
|
|
31
|
+
"panel": "dedicated",
|
|
32
|
+
"reveal": "never"
|
|
33
|
+
},
|
|
34
|
+
"problemMatcher": [
|
|
35
|
+
"$tsc"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"label": "watch",
|
|
40
|
+
"dependsOn": [
|
|
41
|
+
"watch:client",
|
|
42
|
+
"watch:server"
|
|
43
|
+
],
|
|
44
|
+
"group": {
|
|
45
|
+
"kind": "build",
|
|
46
|
+
"isDefault": true
|
|
47
|
+
},
|
|
48
|
+
"problemMatcher": []
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"label": "watch:client",
|
|
52
|
+
"type": "npm",
|
|
53
|
+
"script": "watch:client",
|
|
54
|
+
"isBackground": true,
|
|
55
|
+
"group": "build",
|
|
56
|
+
"presentation": {
|
|
57
|
+
"panel": "dedicated",
|
|
58
|
+
"reveal": "never"
|
|
59
|
+
},
|
|
60
|
+
"problemMatcher": [
|
|
61
|
+
"$tsc-watch"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"label": "watch:server",
|
|
66
|
+
"type": "npm",
|
|
67
|
+
"script": "watch:server",
|
|
68
|
+
"isBackground": true,
|
|
69
|
+
"group": "build",
|
|
70
|
+
"presentation": {
|
|
71
|
+
"panel": "dedicated",
|
|
72
|
+
"reveal": "never"
|
|
73
|
+
},
|
|
74
|
+
"problemMatcher": [
|
|
75
|
+
"$tsc-watch"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|