Files
2024-03-28 19:39:04 -04:00

98 lines
3.4 KiB
Objective-C

/*
Copyright (c) 2016, Motus Design Group Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
3. Neither the name of the copyright holder(s) nor the names of any contributors
may be used to endorse or promote products derived from this software without
specific prior written permission. No license is granted to the trademarks of
the copyright holders even if such marks are included in this software.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#import <ResearchKit/ORKResult.h>
NS_ASSUME_NONNULL_BEGIN
@class ORKTrailmakingTap;
/**
The `ORKTrailmakingResult` class represents the result of a signature step (`ORKTrailmakingStep`).
A trail making result is produced by the task view controller when it presents a trail making step.
*/
ORK_CLASS_AVAILABLE
@interface ORKTrailmakingResult : ORKResult
/**
An array of all taps completed during the test
*/
@property (nonatomic, copy) NSArray <ORKTrailmakingTap *> *taps;
/**
The number of errors generated during the test
*/
@property (nonatomic) NSUInteger numberOfErrors;
@end
/**
The `ORKTrailmakingTap` class represents a single tap in a trail making test.
The Trailmaking tap move object records the indexes of tap, if it was in error or not
and the time at which the event occurred. A `trailmakingTap` instance is included in
an `ORKTrailmakingResult` object and is recorded by the step view controller for the
corresponding task when a tap is made.
A trail making tap is typically generated by the framework as the task proceeds. When the task
completes, it may be appropriate to serialize the move for transmission to a server,
or to immediately perform analysis on it.
*/
ORK_CLASS_AVAILABLE
@interface ORKTrailmakingTap : NSObject <NSCopying, NSSecureCoding>
/**
A relative timestamp indicating the time of the tap event.
The timestamp is relative to the value of `startDate` in the `ORKResult` object that includes this move.
The start date of that object represents the time at which the first move was made.
*/
@property (nonatomic, assign) NSTimeInterval timestamp;
/**
The index of the button tapped.
*/
@property (nonatomic,assign) NSUInteger index;
/**
If the button was tapped in error.
*/
@property (nonatomic, assign) BOOL incorrect;
@end
NS_ASSUME_NONNULL_END