Sha256: fb16dcaa19c2a03083d7023dd10bb67401a1ea74d5974418e3f1cfa69b496eba

Contents?: true

Size: 417 Bytes

Versions: 3

Compression:

Stored size: 417 Bytes

Contents

module Fit
  class File
    class Header < BinData::Record
      endian :little

      uint8  :header_size, :check_value => lambda { value >= 12 }
      uint8  :protocol_version
      uint16 :profile_version
      uint32 :data_size
      string :data_type, :read_length => 4
      uint16 :crc, :onlyif => lambda { header_size == 14 }

      def end_pos
        header_size + data_size - 2
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fit-parser-0.0.3 lib/fit/file/header.rb
fit-parser-0.0.2 lib/fit/file/header.rb
fit-parser-0.0.1 lib/fit/file/header.rb