Sha256: 1104c570b8c864008d506c5aaa6782c587913ac4d84c31c5aff728ae199e9d80

Contents?: true

Size: 559 Bytes

Versions: 2

Compression:

Stored size: 559 Bytes

Contents

module MaxCube
  module Messages
    module UDP
      class Parser
        # Identify message.
        # It can be used in broadcast.
        module MessageI
          private

          # Mandatory keys.
          KEYS = (Parser::KEYS + %i[unknown
                                    rf_address firmware_version]).freeze

          def parse_udp_i(_body)
            {
              unknown: read(1),
              rf_address: read(3, true),
              firmware_version: read(2, 'H*'),
            }
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
maxcube-client-0.5.1 lib/maxcube/messages/udp/type/i.rb
maxcube-client-0.5.0 lib/maxcube/messages/udp/type/i.rb