ORKDeviceMotionRecorderConfiguration Class Reference

Inherits from ORKRecorderConfiguration : NSObject
Declared in ORKDeviceMotionRecorder.m
ORKRecorder.h

Overview

The ORKDeviceMotionRecorderConfiguration class represents a configuration that records device motion data during an active step.

Device motion data is the processed motion data provided by CoreMotion and obtained from a CMMotionManager object. The data can include measures of the overall device orientation obtained from combining accelerometer, magnetometer, and gyroscope data.

Device motion data is serialized to JSON and returned as an ORKFileResult object. For details on the format, see CMDeviceMotion+ORKJSONDictionary.

To use a recorder, include its configuration in the recorderConfigurations property of an ORKActiveStep object, include that step in a task, and present it with a task view controller.

Other Methods

– initWithIdentifier:

Returns an initialized recorder configuration.

- (instancetype)initWithIdentifier:(NSString *)identifier

Parameters

identifier

The unique identifier of the recorder configuration.

Return Value

An initialized recorder configuration.

Discussion

This method is the designated initializer.

Declared In

ORKRecorder_Private.h

– initWithIdentifier:frequency:

Returns an initialized device motion recorder configuration using the specified frequency.

- (instancetype)initWithIdentifier:(NSString *)identifier frequency:(double)frequency

Parameters

identifier

The unique identifier of the recorder configuration.

frequency

Motion data collection frequency in samples per second (Hz).

Return Value

An initialized device motion recorder configuration.

Discussion

This method is the designated initializer.

Declared In

ORKRecorder.h

– recorderForStep:outputDirectory:

Returns a recorder instance using this configuration.

- (ORKRecorder *)recorderForStep:(ORKStep *)step outputDirectory:(NSURL *)outputDirectory

Parameters

step

The step for which this recorder is being created.

outputDirectory

The directory in which all output file data should be written (if producing ORKFileResult instances).

Return Value

A configured recorder instance.

Declared In

ORKRecorder.h

– initWithCoder:

Returns a new device motion recorder configuration initialized from data in the given unarchiver.

- (instancetype)initWithCoder:(NSCoder *)aDecoder

Parameters

aDecoder

Coder from which to initialize the device motion recorder configuration.

Return Value

A new device motion recorder configuration.

Declared In

ORKRecorder.h

– requestedPermissionMask

Returns the permission mask indicating the permissions required for this configuration.

- (ORKPermissionMask)requestedPermissionMask

Discussion

This method is typically overridden in new recorder configuration subclasses.

Declared In

ORKRecorder_Private.h

Other Methods

  frequency

The frequency of motion data collection in samples per second (Hz).

@property (nonatomic, readonly) double frequency

Declared In

ORKRecorder.h