source: orbit/iOS/Orbit/CoreMotion.framework/Headers/CMMotionActivity.h @ 876e42b

Servo
Last change on this file since 876e42b was 876e42b, checked in by Steve Castellotti <sc@…>, 7 years ago
  • Property mode set to 100644
File size: 2.3 KB
Line 
1/*
2 *  CMMotionActivity.h
3 *  CoreMotion
4 *
5 *  Copyright (c) 2013 Apple Inc. All rights reserved.
6 *
7 */
8
9#import <Foundation/Foundation.h>
10#import <CoreMotion/CMLogItem.h>
11
12/*
13 *  CMMotionActivityConfidence
14 *
15 *  Discussion:
16 *    Enumerates the level of accuracy of the activity estimate.
17 */
18typedef NS_ENUM(NSInteger, CMMotionActivityConfidence) {
19        CMMotionActivityConfidenceLow = 0,
20        CMMotionActivityConfidenceMedium,
21        CMMotionActivityConfidenceHigh
22};
23
24/*
25 *  CMMotionActivity
26 *
27 *  Discussion:
28 *    An estimate of the user's activity based on the motion of the device.
29 *
30 *    The activity is exposed as a set of properties, the properties are not
31 *    mutually exclusive.
32 *
33 *    For example, if you're in a car stopped at a stop sign the state might
34 *    look like:
35 *       stationary = YES, walking = NO, running = NO, automotive = YES
36 *
37 *    Or a moving vehicle,
38 *       stationary = NO, walking = NO, running = NO, automotive = YES
39 *
40 *    Or the device could be in motion but not walking or in a vehicle.
41 *       stationary = NO, walking = NO, running = NO, automotive = NO.
42 *    Note in this case all of the properties are NO.
43 *
44 */
45NS_CLASS_AVAILABLE(NA, 7_0)
46@interface CMMotionActivity : CMLogItem
47
48/*
49 *  confidence
50 *
51 *  Discussion:
52 *    A confidence estimate associated with this state.
53 *
54 *    CoreMotion always provides the most likely state.  Confidence represents
55 *    how likely that the state is to be correct.
56 */
57@property(readonly, nonatomic) CMMotionActivityConfidence confidence;
58
59/*
60 *  startDate
61 *
62 *  Discussion:
63 *    Time at which the activity started.
64 */
65@property(readonly, nonatomic) NSDate *startDate;
66
67/*
68 *  unknown
69 *
70 *  Discussion:
71 *    True if there is no estimate of the current state.  This can happen if
72 *    the device was turned off.
73 */
74@property(readonly, nonatomic) BOOL unknown;
75
76/*
77 *  stationary
78 *
79 *  Discussion:
80 *    True if the device is not moving.
81 */
82@property(readonly, nonatomic) BOOL stationary;
83
84/*
85 *  walking
86 *
87 *  Discussion:
88 *    True if the device is on a walking person.
89 */
90@property(readonly, nonatomic) BOOL walking;
91
92/*
93 *  running
94 *
95 *  Discussion:
96 *    True if the device is on a running person.
97 */
98@property(readonly, nonatomic) BOOL running;
99
100/*
101 *  automotive
102 *
103 *  Discussion:
104 *    True if the device is in a vehicle.
105 */
106@property(readonly, nonatomic) BOOL automotive;
107
108@end
Note: See TracBrowser for help on using the repository browser.