BEHealthKit 1.11
A HealthKit plugin for Unity
Loading...
Searching...
No Matches
Public Attributes | Public Member Functions | List of all members
BeliefEngine.HealthKit.QuantitySample Class Reference

Wrapper around HKQuantitySample. More...

Detailed Description

A quantity sample has a quantity and a type. In iOS 13 and later, HKQuantitySample is actually an abstract superclass for either an HKDiscreteQuantitySample or HKCumulativeQuantitySample. In those cases, a single sample can actually represent multiple samples, and there are properties to examine them in aggregate.

Public Attributes

QuantityType quantityType
 
Quantity quantity
 
double sumQuantity = 0
 
DateInterval mostRecentQuantityDateInterval = null
 If this is an HKDiscreteQuantitySample ,the date interval for the most recent quantity. Otherwise null.
 
double mostRecentQuantity = 0
 
double minimumQuantity = 0
 
double maximumQuantity = 0
 
double averageQuantity = 0
 
- Public Attributes inherited from BeliefEngine.HealthKit.Sample
DateTimeOffset startDate
 
DateTimeOffset endDate
 
- Public Attributes inherited from BeliefEngine.HealthKit.HObject
SourceRevision source
 
XmlNode metadata
 

Public Member Functions

 QuantitySample (XmlNode node)
 The default constructor.
 
override string ToString ()
 convert to a reasonable string representation
 
- Public Member Functions inherited from BeliefEngine.HealthKit.Sample
 Sample (XmlNode node)
 The default constructor.
 
 Sample (DateTimeOffset startDate, DateTimeOffset endDate)
 Manual constructor.
 
override XElement ToXML ()
 Internal method. Converts the sample to XML.
 
- Public Member Functions inherited from BeliefEngine.HealthKit.HObject
 HObject (XmlNode node)
 The constructor used internally when reading health data.
 

Constructor & Destructor Documentation

◆ QuantitySample()

BeliefEngine.HealthKit.QuantitySample.QuantitySample ( XmlNode node)
inline
Parameters
nodethe XmlNode to create this object from.

Member Data Documentation

◆ averageQuantity

double BeliefEngine.HealthKit.QuantitySample.averageQuantity = 0

If this is an discrete quantity ,the average of the samples. Otherwise 0.

◆ maximumQuantity

double BeliefEngine.HealthKit.QuantitySample.maximumQuantity = 0

If this is an discrete quantity ,the maximum of the samples. Otherwise 0.

◆ minimumQuantity

double BeliefEngine.HealthKit.QuantitySample.minimumQuantity = 0

If this is an discrete quantity ,the minimum of the samples. Otherwise 0.

◆ mostRecentQuantity

double BeliefEngine.HealthKit.QuantitySample.mostRecentQuantity = 0

If this is an discrete quantity ,the most recent quantity. Otherwise 0.

◆ quantity

Quantity BeliefEngine.HealthKit.QuantitySample.quantity

the quantity

◆ quantityType

QuantityType BeliefEngine.HealthKit.QuantitySample.quantityType

the aggregation style of this sample, either cumulative or discrete

◆ sumQuantity

double BeliefEngine.HealthKit.QuantitySample.sumQuantity = 0

If this is an cumulative quantity ,the sum. Otherwise 0.