openc3 5.10.0 → 5.10.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c37c79f2062a5921e13c3370ce281c443b9abba929ca36f152df7cd1bcea92e
4
- data.tar.gz: 643d74e05f61eb9016eaefbe5dca61316939e3d4e063fcf4150423cee4d95474
3
+ metadata.gz: e462e9d0a5d73e46212ec61b784b432827b0588b64308449309196e1257ad5b0
4
+ data.tar.gz: 4811700be9aeab28edc867d11e26481d7cbf63abe8bb3ca9ef956823d8adb17d
5
5
  SHA512:
6
- metadata.gz: 25285376d600c16a3d0b6d485a359998fda7226fc3781f639cdde992370291fa7d23b0ce6ca89e02ddcf4e6386dd596839ed4d8c704003b893e37e726ed1a7e4
7
- data.tar.gz: 3ae81b7ea67047a8e23cfb161aeb77b4e7224e44b2c9c1dc4fa2dd78cb06eae50710b0a5c882cfcaf8da9e0214b6b96e517ec2a6af0b7671f5b8e8a0dc1448fe
6
+ metadata.gz: 0e01b50dc62e075afe78f66101e176ec20118f017122a8f76a1eb3d1b302250e55717897c2302c6bf812cece5bedf0d9e6a0b1fdc2dc43f68998a693d7b04b4d
7
+ data.tar.gz: 5a93a1b914e84e5555cc88e4c74da80a8283ae621c958c6d9535848c1ff384dd7aa3a6ba59dff7e148b91eb3370ef563ec0a8c94f1ecafc517bd65665f8f8e2a
data/Gemfile CHANGED
@@ -14,4 +14,4 @@ gem 'tzinfo-data'
14
14
  gem 'rspec-rails', '~> 6.0'
15
15
  gem 'simplecov', '~> 0.20'
16
16
  gem 'simplecov-cobertura', '~> 2.1'
17
- gem 'mock_redis'
17
+ gem 'mock_redis', '0.36'
@@ -355,9 +355,13 @@ module OpenC3
355
355
  end
356
356
  # This shouldn't happen because the frontend provides valid items but good to check
357
357
  # The raise is ultimately rescued inside evaluate_trigger when operand_value is called
358
- raise "Packet #{operand[ITEM_TARGET]} #{operand[ITEM_PACKET]} not found" if packet.nil?
358
+ if packet.nil?
359
+ raise "Packet #{operand[ITEM_TARGET]} #{operand[ITEM_PACKET]} not found"
360
+ end
359
361
  value = packet.read(operand[ITEM_TYPE], operand[ITEM_VALUE_TYPE].intern)
360
- raise "Item #{operand[ITEM_TARGET]} #{operand[ITEM_PACKET]} #{operand[ITEM_TYPE]} not found" if value.nil?
362
+ if value.nil?
363
+ raise "Item #{operand[ITEM_TARGET]} #{operand[ITEM_PACKET]} #{operand[ITEM_TYPE]} not found"
364
+ end
361
365
  value
362
366
  end
363
367
 
@@ -540,7 +540,7 @@ module OpenC3
540
540
 
541
541
  # (see Structure#get_item)
542
542
  def get_item(name)
543
- super(name)
543
+ return super(name)
544
544
  rescue ArgumentError
545
545
  raise "Packet item '#{@target_name} #{@packet_name} #{name.upcase}' does not exist"
546
546
  end
@@ -1056,10 +1056,10 @@ module OpenC3
1056
1056
 
1057
1057
  if @processors
1058
1058
  processors = []
1059
- config['processors'] = processors
1060
1059
  @processors.each do |processor_name, processor|
1061
1060
  processors << processor.as_json(*a)
1062
1061
  end
1062
+ config['processors'] = processors
1063
1063
  end
1064
1064
 
1065
1065
  config['meta'] = @meta if @meta
@@ -1144,17 +1144,11 @@ module OpenC3
1144
1144
  # Update to new limits state
1145
1145
  item.limits.state = limits_state
1146
1146
 
1147
- if old_limits_state == nil # Changing from nil
1148
- if limits_state != :GREEN && limits_state != :BLUE # Warnings are needed
1149
- @limits_change_callback.call(self, item, old_limits_state, value, true) if @limits_change_callback
1150
- end
1151
- else # Changing from a state other than nil so always call the callback
1152
- if @limits_change_callback
1153
- if item.limits.state.nil?
1154
- @limits_change_callback.call(self, item, old_limits_state, value, false)
1155
- else
1156
- @limits_change_callback.call(self, item, old_limits_state, value, true)
1157
- end
1147
+ if @limits_change_callback
1148
+ if item.limits.state.nil?
1149
+ @limits_change_callback.call(self, item, old_limits_state, value, false)
1150
+ else
1151
+ @limits_change_callback.call(self, item, old_limits_state, value, true)
1158
1152
  end
1159
1153
  end
1160
1154
  end
@@ -76,9 +76,6 @@ module OpenC3
76
76
  # @return [Boolean] Whether this structure item can overlap another item in the same packet
77
77
  attr_accessor :overlap
78
78
 
79
- # A large buffer size in bits (1 Megabyte)
80
- LARGE_BUFFER_SIZE_BITS = 1024 * 1024 * 8
81
-
82
79
  # Create a StructureItem by setting all the attributes. It
83
80
  # calls all the setter routines to do the attribute verification and then
84
81
  # verifies the overall integrity.
@@ -24,10 +24,6 @@ require 'openc3/topics/topic'
24
24
 
25
25
  module OpenC3
26
26
  class CommandDecomTopic < Topic
27
- def self.topics(scope:)
28
- super(scope, 'DECOMCMD')
29
- end
30
-
31
27
  def self.write_packet(packet, scope:)
32
28
  topic = "#{scope}__DECOMCMD__{#{packet.target_name}}__#{packet.packet_name}"
33
29
  msg_hash = { time: packet.packet_time.to_nsec_from_epoch,
@@ -25,10 +25,6 @@ require 'openc3/utilities/open_telemetry'
25
25
 
26
26
  module OpenC3
27
27
  class TelemetryDecomTopic < Topic
28
- def self.topics(scope:)
29
- super(scope, 'DECOM')
30
- end
31
-
32
28
  def self.write_packet(packet, id: nil, scope:)
33
29
  OpenC3.in_span("write_packet") do
34
30
  # Need to build a JSON hash of the decommutated data
@@ -17,7 +17,7 @@
17
17
  # All changes Copyright 2022, OpenC3, Inc.
18
18
  # All Rights Reserved
19
19
  #
20
- # This file may also be used under the terms of a commercial license
20
+ # This file may also be used under the terms of a commercial license
21
21
  # if purchased from OpenC3, Inc.
22
22
 
23
23
  require 'openc3/topics/topic'
@@ -25,10 +25,6 @@ require 'openc3/utilities/open_telemetry'
25
25
 
26
26
  module OpenC3
27
27
  class TelemetryReducedMinuteTopic < Topic
28
- def self.topics(scope:)
29
- super(scope, 'REDUCED_MINUTE')
30
- end
31
-
32
28
  def self.write(target_name:, packet_name:, stored:, time:, data:, id: nil, scope:)
33
29
  OpenC3.in_span("write") do
34
30
  # Write to stream
@@ -47,10 +43,6 @@ module OpenC3
47
43
  end
48
44
 
49
45
  class TelemetryReducedHourTopic < Topic
50
- def self.topics(scope:)
51
- super(scope, 'REDUCED_HOUR')
52
- end
53
-
54
46
  def self.write(target_name:, packet_name:, stored:, time:, data:, id: nil, scope:)
55
47
  OpenC3.in_span("write") do
56
48
  # Write to stream
@@ -69,10 +61,6 @@ module OpenC3
69
61
  end
70
62
 
71
63
  class TelemetryReducedDayTopic < Topic
72
- def self.topics(scope:)
73
- super(scope, 'REDUCED_DAY')
74
- end
75
-
76
64
  def self.write(target_name:, packet_name:, stored:, time:, data:, id: nil, scope:)
77
65
  OpenC3.in_span("write") do
78
66
  # Write to stream
@@ -33,14 +33,6 @@ module OpenC3
33
33
  topics.each { |topic| EphemeralStore.xtrim(topic, maxlen) }
34
34
  end
35
35
 
36
- def self.topics(scope, key)
37
- EphemeralStore
38
- .scan_each(match: "#{scope}__#{key}__*", type: 'stream', count: 100)
39
- .to_a # Change the enumerator into an array
40
- .uniq # Scan can return duplicates so ensure unique
41
- .sort # Sort not entirely necessary but nice
42
- end
43
-
44
36
  def self.get_cnt(topic)
45
37
  _, packet = EphemeralStore.get_newest_message(topic)
46
38
  packet ? packet["received_count"].to_i : 0
@@ -42,45 +42,47 @@ module OpenC3
42
42
  end
43
43
 
44
44
  def ensure_public(bucket)
45
- policy = <<~EOL
46
- {
47
- "Version": "2012-10-17",
48
- "Statement": [
49
- {
50
- "Action": [
51
- "s3:GetBucketLocation",
52
- "s3:ListBucket"
53
- ],
54
- "Effect": "Allow",
55
- "Principal": {
56
- "AWS": [
57
- "*"
58
- ]
59
- },
60
- "Resource": [
61
- "arn:aws:s3:::#{bucket}"
62
- ],
63
- "Sid": ""
64
- },
65
- {
66
- "Action": [
67
- "s3:GetObject"
68
- ],
69
- "Effect": "Allow",
70
- "Principal": {
71
- "AWS": [
72
- "*"
73
- ]
45
+ unless ENV['OPENC3_NO_BUCKET_POLICY']
46
+ policy = <<~EOL
47
+ {
48
+ "Version": "2012-10-17",
49
+ "Statement": [
50
+ {
51
+ "Action": [
52
+ "s3:GetBucketLocation",
53
+ "s3:ListBucket"
54
+ ],
55
+ "Effect": "Allow",
56
+ "Principal": {
57
+ "AWS": [
58
+ "*"
59
+ ]
60
+ },
61
+ "Resource": [
62
+ "arn:aws:s3:::#{bucket}"
63
+ ],
64
+ "Sid": ""
74
65
  },
75
- "Resource": [
76
- "arn:aws:s3:::#{bucket}/*"
77
- ],
78
- "Sid": ""
79
- }
80
- ]
81
- }
82
- EOL
83
- @client.put_bucket_policy({ bucket: bucket, policy: policy })
66
+ {
67
+ "Action": [
68
+ "s3:GetObject"
69
+ ],
70
+ "Effect": "Allow",
71
+ "Principal": {
72
+ "AWS": [
73
+ "*"
74
+ ]
75
+ },
76
+ "Resource": [
77
+ "arn:aws:s3:::#{bucket}/*"
78
+ ],
79
+ "Sid": ""
80
+ }
81
+ ]
82
+ }
83
+ EOL
84
+ @client.put_bucket_policy({ bucket: bucket, policy: policy })
85
+ end
84
86
  end
85
87
 
86
88
  def exist?(bucket)
@@ -1,14 +1,14 @@
1
1
  # encoding: ascii-8bit
2
2
 
3
- OPENC3_VERSION = '5.10.0'
3
+ OPENC3_VERSION = '5.10.1'
4
4
  module OpenC3
5
5
  module Version
6
6
  MAJOR = '5'
7
7
  MINOR = '10'
8
- PATCH = '0'
8
+ PATCH = '1'
9
9
  OTHER = ''
10
- BUILD = '926e6a3798993710a67729b9599c5a295b210152'
10
+ BUILD = 'b248056bc6fa7af79757e21f3b79601118eec0e5'
11
11
  end
12
- VERSION = '5.10.0'
13
- GEM_VERSION = '5.10.0'
12
+ VERSION = '5.10.1'
13
+ GEM_VERSION = '5.10.1'
14
14
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "<%= tool_name %>",
3
- "version": "5.10.0",
3
+ "version": "5.10.1",
4
4
  "scripts": {
5
5
  "ng": "ng",
6
6
  "start": "ng serve",
@@ -12,30 +12,30 @@
12
12
  },
13
13
  "private": true,
14
14
  "dependencies": {
15
- "@angular/animations": "^16.1.3",
16
- "@angular/cdk": "^16.1.3",
17
- "@angular/common": "^16.1.3",
18
- "@angular/compiler": "^16.1.3",
19
- "@angular/core": "^16.1.3",
20
- "@angular/forms": "^16.1.3",
21
- "@angular/material": "16.1.3",
22
- "@angular/platform-browser": "^16.1.3",
23
- "@angular/platform-browser-dynamic": "^16.1.3",
24
- "@angular/router": "^16.1.3",
25
- "@openc3/tool-common": "5.10.0",
15
+ "@openc3/tool-common": "5.10.1",
16
+ "@angular/animations": "^16.2.0",
17
+ "@angular/cdk": "^16.2.0",
18
+ "@angular/common": "^16.2.0",
19
+ "@angular/compiler": "^16.2.0",
20
+ "@angular/core": "^16.2.0",
21
+ "@angular/forms": "^16.2.0",
22
+ "@angular/material": "16.2.0",
23
+ "@angular/platform-browser": "^16.2.0",
24
+ "@angular/platform-browser-dynamic": "^16.2.0",
25
+ "@angular/router": "^16.2.0",
26
26
  "rxjs": "~7.8.0",
27
27
  "single-spa": ">=5.9.5",
28
28
  "single-spa-angular": "^8.1.0",
29
- "tslib": "^2.6.0",
29
+ "tslib": "^2.6.1",
30
30
  "zone.js": "~0.13.1"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@angular-builders/custom-webpack": "16.0.0",
34
- "@angular-devkit/build-angular": "^16.0.5",
35
- "@angular/cli": "~16.1.3",
36
- "@angular/compiler-cli": "^16.0.0",
34
+ "@angular-devkit/build-angular": "^16.2.0",
35
+ "@angular/cli": "~16.2.0",
36
+ "@angular/compiler-cli": "^16.2.0",
37
37
  "@types/jasmine": "~4.3.0",
38
- "jasmine-core": "~5.0.1",
38
+ "jasmine-core": "~5.1.0",
39
39
  "karma": "~6.4.0",
40
40
  "karma-chrome-launcher": "~3.2.0",
41
41
  "karma-coverage": "~2.2.0",