cosmos 4.0.2-universal-java-1.8 → 4.0.3-universal-java-1.8

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: aa743efd88b1f40cbe8b30a4fe554250df894cd5504623922983bb022c94516a
4
- data.tar.gz: ca495dc357053842b8d6cf0665a8583c46169b7cf8e7c9eb92b3829603e49258
3
+ metadata.gz: da53694a08f0c86344fb8609ae0911269b213e083f4be1d81565a1556109c9f4
4
+ data.tar.gz: f3af09bc3bc6c44eb77826990feba46b606275404f3f9b85abb16151ddb3e952
5
5
  SHA512:
6
- metadata.gz: 91e4cd22b79229e07263e2fd63245b992897d4bd6a08a2227aafd8063b8965654aa47fe9e016735aebc64829b9d32a971710c79e5e52675a94da532d7efe2c13
7
- data.tar.gz: 769a8c98697a2bba14dc831e1204b7b890346578f14b09eb1bdd5a8486cce945e1439dc491bf907499860790cb3cb0e1e0fc1f85b7fbea0a14fd88b41e7db6e8
6
+ metadata.gz: 8f4973a77eb107793157298461fd97a1073a4c52d6383579c34fef539743a38be1aec11ff4416833caa56f116424d1521684bdcadf71ce93f0423f58f01b8710
7
+ data.tar.gz: ce7fe1517de470c870255aa8b27b6b6862241751cb62cb7b5f489ecce58a7319ead72137a5496173c95c66957f0fd574404b165c6ad4680309d939dd2e4ed260
@@ -17,12 +17,12 @@
17
17
  "lib/cosmos/processors/processor.rb" 0x1FEB7030
18
18
  "lib/cosmos/processors/statistics_processor.rb" 0xE732AE7F
19
19
  "lib/cosmos/processors/watermark_processor.rb" 0x8829E260
20
- "lib/cosmos/version.rb" 0x127242E9
20
+ "lib/cosmos/version.rb" 0x2FAA2651
21
21
  "lib/cosmos/conversions/new_packet_log_conversion.rb" 0x4AA03555
22
22
  "lib/cosmos/conversions/segmented_polynomial_conversion.rb" 0xC498CE81
23
23
  "lib/cosmos/conversions/processor_conversion.rb" 0xC72B73BD
24
24
  "lib/cosmos/conversions/unix_time_seconds_conversion.rb" 0x64C40BC3
25
- "lib/cosmos/conversions/conversion.rb" 0xF068D84B
25
+ "lib/cosmos/conversions/conversion.rb" 0xCE9919ED
26
26
  "lib/cosmos/conversions/received_time_seconds_conversion.rb" 0x414E5121
27
27
  "lib/cosmos/conversions/generic_conversion.rb" 0x0DDD4FE9
28
28
  "lib/cosmos/conversions/unix_time_conversion.rb" 0x2D48D8B4
@@ -100,7 +100,7 @@
100
100
  "lib/cosmos/packets/parsers/packet_parser.rb" 0x26478943
101
101
  "lib/cosmos/packets/telemetry.rb" 0xD779DE95
102
102
  "lib/cosmos/packets/binary_accessor.rb" 0xCD678EF6
103
- "lib/cosmos/packets/packet.rb" 0x186A8824
103
+ "lib/cosmos/packets/packet.rb" 0xCB2557A5
104
104
  "lib/cosmos/packets/structure.rb" 0xD98A1B1E
105
105
  "lib/cosmos/packets/commands.rb" 0x4D4411BD
106
106
  "lib/cosmos/packets/limits_response.rb" 0xB836D388
@@ -116,7 +116,7 @@
116
116
  "lib/cosmos/streams/stream.rb" 0xE35AFB89
117
117
  "lib/cosmos/processors.rb" 0x5241327D
118
118
  "lib/cosmos/utilities.rb" 0xBE9CEAF4
119
- "lib/cosmos/interfaces/udp_interface.rb" 0x6B6BE34F
119
+ "lib/cosmos/interfaces/udp_interface.rb" 0x27E6A0DE
120
120
  "lib/cosmos/interfaces/cmd_tlm_server_interface.rb" 0x8921CFC1
121
121
  "lib/cosmos/interfaces/serial_interface.rb" 0x5042BC9B
122
122
  "lib/cosmos/interfaces/stream_interface.rb" 0x621E6153
@@ -16,11 +16,14 @@ module Cosmos
16
16
  attr_reader :converted_type
17
17
  # @return [Integer] The size in bits of the converted value
18
18
  attr_reader :converted_bit_size
19
+ # @return [Integer] The size in bits of the converted array value
20
+ attr_reader :converted_array_size
19
21
 
20
22
  # Create a new conversion
21
23
  def initialize
22
24
  @converted_type = nil
23
25
  @converted_bit_size = nil
26
+ @converted_array_size = nil
24
27
  end
25
28
 
26
29
  # Perform the conversion on the value.
@@ -75,6 +75,11 @@ module Cosmos
75
75
  # the constructor and a new {UdpReadSocket} if the read_port was given in
76
76
  # the constructor.
77
77
  def connect
78
+ @read_socket = UdpReadSocket.new(
79
+ @read_port,
80
+ @hostname,
81
+ @interface_address,
82
+ @bind_address) if @read_port
78
83
  @write_socket = UdpWriteSocket.new(
79
84
  @hostname,
80
85
  @write_dest_port,
@@ -82,11 +87,6 @@ module Cosmos
82
87
  @interface_address,
83
88
  @ttl,
84
89
  @bind_address) if @write_dest_port
85
- @read_socket = UdpReadSocket.new(
86
- @read_port,
87
- @hostname,
88
- @interface_address,
89
- @bind_address) if @read_port
90
90
  @thread_sleeper = nil
91
91
  end
92
92
 
@@ -8,6 +8,7 @@
8
8
  # as published by the Free Software Foundation; version 3 with
9
9
  # attribution addendums as found in the LICENSE.txt
10
10
 
11
+ require 'digest/md5'
11
12
  require 'cosmos/packets/structure'
12
13
  require 'cosmos/packets/packet_item'
13
14
  require 'cosmos/ext/packet' if RUBY_ENGINE == 'ruby' and !ENV['COSMOS_NO_EXT']
@@ -209,6 +210,20 @@ module Cosmos
209
210
 
210
211
  end
211
212
 
213
+ # Calculates a unique MD5Sum that changes if the parts of the packet configuration change that could affect
214
+ # the "shape" of the packet. This value is cached and that packet should not be changed if this method is being used
215
+ def config_name
216
+ return @config_name if @config_name
217
+ string = "#{self.target_name} #{self.packet_name}"
218
+ @sorted_items.each do |item|
219
+ string << " ITEM #{item.name} #{item.bit_offset} #{item.bit_size} #{item.data_type} #{item.array_size} #{item.endianness} #{item.overflow} #{item.states} #{item.read_conversion ? item.read_conversion.class : 'NO_CONVERSION'}"
220
+ end
221
+ digest = Digest::MD5.new
222
+ digest << string
223
+ @config_name = digest.hexdigest
224
+ @config_name
225
+ end
226
+
212
227
  # (see Structure#buffer=)
213
228
  def buffer=(buffer)
214
229
  synchronize() do
@@ -1,12 +1,12 @@
1
1
  # encoding: ascii-8bit
2
2
 
3
- COSMOS_VERSION = '4.0.2'
3
+ COSMOS_VERSION = '4.0.3'
4
4
  module Cosmos
5
5
  module Version
6
6
  MAJOR = '4'
7
7
  MINOR = '0'
8
- PATCH = '2'
9
- BUILD = 'e9da0b19c0c72edef48b0717440a06c0da1d5690'
8
+ PATCH = '3'
9
+ BUILD = '04e4681c862983cb85d08e888a07efffb60b4fbb'
10
10
  end
11
- VERSION = '4.0.2'
11
+ VERSION = '4.0.3'
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cosmos
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.0.3
5
5
  platform: universal-java-1.8
6
6
  authors:
7
7
  - Ryan Melton
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-09-29 00:00:00.000000000 Z
12
+ date: 2017-10-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement