rsmp 0.33.3 → 0.33.4

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: fc78c33cf43b0e3b3560966ba78d1947a3d7cbbc82937c383cab284222128260
4
- data.tar.gz: 20f3c49513fb4c7d3524bf6ceed603646bdf07f319a5318be4f902fa385636e1
3
+ metadata.gz: 7695095d716cbc6f3b6713584bf7b78fc2323a6d9ea80abe28c0ebd8eddfa14b
4
+ data.tar.gz: b9efc9a38e5ea2020a2038c28bfbf6c45e2555b4804f763726750995e0c40d5c
5
5
  SHA512:
6
- metadata.gz: 56493d90f7d4b17986039064c1bd6a03034aacf99b6a2ae94c5cf3cef72efe0718b146437d547ef86b51f4330153ab7b621ce072a2ec0fefc7446814aced900a
7
- data.tar.gz: bed1fe93798ce23343f0178cef7d5c0b2aae9dfad1e230e8ae754b6bbc5f33b37da2e885b28ad84462a9a5c5e20731b82756b10c0d28ea68dcae1e557cacb186
6
+ metadata.gz: 9ccd49421abfa90e1d0dd3c8e84e6346623a4ee3eaf7aa9af8183974e0f867f520c37562d8468338179dd4425aded09f18cd169b9921744f61d368a975c7cf52
7
+ data.tar.gz: 6feabda3a5a2ba01042fb594e7c479545d15c48b4d41d22c0f0d0121f15d4d3e4f3c23b2e3e4f7da7f853e4746146bf91c8999e6decddb33846ef60d2a98cd0a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rsmp (0.33.3)
4
+ rsmp (0.33.4)
5
5
  async (~> 2.16)
6
6
  async-io (~> 1.43)
7
7
  colorize (~> 1.1)
@@ -137,7 +137,7 @@ module RSMP
137
137
 
138
138
  def process_aggregated_status message
139
139
  se = message.attribute("se")
140
- validate_aggregated_status(message,se) == false
140
+ validate_aggregated_status(message,se)
141
141
  c_id = message.attributes["cId"]
142
142
  component = find_component c_id
143
143
  unless component
@@ -172,19 +172,24 @@ module RSMP
172
172
 
173
173
  def send_aggregated_status component, options={}
174
174
  m_id = options[:m_id] || RSMP::Message.make_m_id
175
+
176
+ # For core <=3.1.2, se items must be send as strings
177
+ # For core > 3.1.2, se items must be send as booleans
178
+ if Proxy::version_meets_requirement?(core_version,"<=3.1.2")
179
+ se = component.aggregated_status_bools.map {|bool| bool ? "true" : "false"}
180
+ else
181
+ se = component.aggregated_status_bools
182
+ end
183
+
175
184
  message = AggregatedStatus.new({
176
185
  "aSTS" => clock.to_s,
177
186
  "cId" => component.c_id,
178
187
  "fP" => nil,
179
188
  "fS" => nil,
180
- "se" => component.aggregated_status_bools,
189
+ "se" => se,
181
190
  "mId" => m_id,
182
191
  })
183
192
 
184
- # Core 3.1.2 or earlier requires that se items to be send as strings
185
- if Proxy::version_meets_requirement?(core_version,"<=3.1.2")
186
- message.attributes["se"].map! {|bool| bool ? "true" : "false"}
187
- end
188
193
 
189
194
  set_nts_message_attributes message
190
195
  send_and_optionally_collect message, options do |collect_options|
@@ -200,7 +205,7 @@ module RSMP
200
205
 
201
206
  def process_aggregated_status message
202
207
  se = message.attribute("se")
203
- validate_aggregated_status(message,se) == false
208
+ validate_aggregated_status(message,se)
204
209
  on = set_aggregated_status se
205
210
  log "Received #{message.type} status [#{on.join(', ')}]", message: message, level: :log
206
211
  acknowledge message
data/lib/rsmp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RSMP
2
- VERSION = "0.33.3"
2
+ VERSION = "0.33.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsmp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.33.3
4
+ version: 0.33.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emil Tin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-12 00:00:00.000000000 Z
11
+ date: 2024-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logger