FitFileDecoder
@available(swift 4.2)
@available(iOS 10.0, tvOS 10.0, watchOS 3.0, macOS 10.12, *)
public struct FitFileDecoder
FIT File Decoder
-
Default FIT Messages for Decoding
Declaration
Swift
public static let defaultMessages: [FitMessage.Type]
-
Options for CRC Checking
See moreDeclaration
Swift
public enum CrcCheckingStrategy
-
The strategy to use for CRC Checking. Defaults to
.throws
.Declaration
Swift
public var crcCheckingStrategy: CrcCheckingStrategy
-
Init Fit File Decoder
Declaration
Swift
public init(crcCheckingStrategy: CrcCheckingStrategy = .throws)
Parameters
crcCheckingStrategy
CRC Checking Strategy
-
Decodes the FIT File Data into FitMessage Objects
Throws
FitDecodingErrorDeclaration
Swift
public mutating func decode(data: Data, messages: [FitMessage.Type], decoded: ((FitMessage) -> Void)?) throws
Parameters
data
FIT File data
messages
FitMessage Types to Decode
decoded
Decoded FitMessages