samplingSchemes property

  1. @override
DataTypeSamplingSchemeMap get samplingSchemes
override

The default sampling schemes for all dataTypes in this package.

All sampling packages should defined a DataTypeSamplingScheme for each data type.

Implementation

@override
DataTypeSamplingSchemeMap get samplingSchemes =>
    DataTypeSamplingSchemeMap.from([
      DataTypeSamplingScheme(
          CarpDataTypes().types[CarpDataTypes.ACCELERATION_TYPE_NAME]!,
          IntervalSamplingConfiguration(
              interval: const Duration(milliseconds: 200))),
      DataTypeSamplingScheme(
          CarpDataTypes()
              .types[CarpDataTypes.NON_GRAVITATIONAL_ACCELERATION_TYPE_NAME]!,
          IntervalSamplingConfiguration(
              interval: const Duration(milliseconds: 200))),
      DataTypeSamplingScheme(
          CarpDataTypes().types[CarpDataTypes.ROTATION_TYPE_NAME]!,
          IntervalSamplingConfiguration(
              interval: const Duration(milliseconds: 200))),
      DataTypeSamplingScheme(
          CarpDataTypes().types[CarpDataTypes.MAGNETIC_FIELD_TYPE_NAME]!,
          IntervalSamplingConfiguration(
              interval: const Duration(milliseconds: 200))),
      DataTypeSamplingScheme(
          CamsDataTypeMetaData(
            type: ACCELERATION_FEATURES,
            displayName: "Accelerometer Features",
            timeType: DataTimeType.TIME_SPAN,
          ),
          PeriodicSamplingConfiguration(
            interval: const Duration(minutes: 1),
            duration: const Duration(seconds: 3),
          )),
      DataTypeSamplingScheme(CamsDataTypeMetaData.fromDataTypeMetaData(
        dataTypeMetaData:
            CarpDataTypes().types[CarpDataTypes.STEP_COUNT_TYPE_NAME]!,
        permissions: [Permission.activityRecognition],
      )),
      DataTypeSamplingScheme(
          CamsDataTypeMetaData(
            type: AMBIENT_LIGHT,
            displayName: "Ambient Light",
            timeType: DataTimeType.TIME_SPAN,
          ),
          PeriodicSamplingConfiguration(
            interval: const Duration(minutes: 5),
            duration: const Duration(seconds: 10),
          )),
    ]);