Sha256: 55a0e1e5161b9ff0c119a6fe4bcc1e474ec0dfaaaf2b20e5daeba7a36f3c7992

Contents?: true

Size: 423 Bytes

Versions: 17

Compression:

Stored size: 423 Bytes

Contents

module FitParser
  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

17 entries across 17 versions & 1 rubygems

Version Path
fit_parser-1.0.9 lib/fit_parser/file/header.rb
fit_parser-1.0.8 lib/fit_parser/file/header.rb
fit_parser-1.0.7 lib/fit_parser/file/header.rb
fit_parser-1.0.6 lib/fit_parser/file/header.rb
fit_parser-1.0.5 lib/fit_parser/file/header.rb
fit_parser-1.0.4 lib/fit_parser/file/header.rb
fit_parser-1.0.3 lib/fit_parser/file/header.rb
fit_parser-1.0.2 lib/fit_parser/file/header.rb
fit_parser-1.0.1 lib/fit_parser/file/header.rb
fit_parser-1.0.0 lib/fit_parser/file/header.rb
fit_parser-0.0.8 lib/fit_parser/file/header.rb
fit_parser-0.0.7 lib/fit_parser/file/header.rb
fit_parser-0.0.6 lib/fit_parser/file/header.rb
fit_parser-0.0.5 lib/fit_parser/file/header.rb
fit_parser-0.0.4 lib/fit_parser/file/header.rb
fit_parser-0.0.2 lib/fit_parser/file/header.rb
fit_parser-0.0.1 lib/fit_parser/file/header.rb