diff --git a/frameworks/ets/taihe/author/src/ohos.sensor.impl.cpp b/frameworks/ets/taihe/author/src/ohos.sensor.impl.cpp index 13f7cdbf792b941bda0b81fc98eaea52a8444e0c..bf59043de13d8e99b2dbc40f06816b7783ad04ef 100644 --- a/frameworks/ets/taihe/author/src/ohos.sensor.impl.cpp +++ b/frameworks/ets/taihe/author/src/ohos.sensor.impl.cpp @@ -1481,9 +1481,18 @@ void OffColor(optional_view opq) // Since there macros are auto-generate, lint will cause false positive. // NOLINTBEGIN TH_EXPORT_CPP_API_getRotationMatrixSyncGrav(getRotationMatrixSyncGrav); +TH_EXPORT_CPP_API_GetRotationMatrixWithCallback(getRotationMatrixSyncGrav); +TH_EXPORT_CPP_API_GetRotationMatrixReturnsPromise(getRotationMatrixSyncGrav); TH_EXPORT_CPP_API_getOrientationSync(getOrientationSync); +TH_EXPORT_CPP_API_GetOrientationWithCallback(getOrientationSync); +TH_EXPORT_CPP_API_GetOrientationReturnsPromise(getOrientationSync); TH_EXPORT_CPP_API_getRotationMatrixSync(getRotationMatrixSync); +TH_EXPORT_CPP_API_GetRotationMatrixWithCallback_chinast_1(getRotationMatrixSync); +TH_EXPORT_CPP_API_GetRotationMatrixReturnsPromise_chinast_1(getRotationMatrixSync); + TH_EXPORT_CPP_API_getSensorListSync(getSensorListSync); +TH_EXPORT_CPP_API_GetSensorListMethodWithCallback(getSensorListSync); +TH_EXPORT_CPP_API_GetSensorListReturnsPromise(getSensorListSync); TH_EXPORT_CPP_API_OnWearDetection(OnWearDetection); TH_EXPORT_CPP_API_OnceWearDetection(OnceWearDetection); TH_EXPORT_CPP_API_OffWearDetection(OffWearDetection); diff --git a/frameworks/ets/taihe/idl/ohos.sensor.taihe b/frameworks/ets/taihe/idl/ohos.sensor.taihe index 7681850a1484b0917503d61c1a55c796ff572066..0c2a9f929fe738a24c070bf0c2b232444cc8b8eb 100644 --- a/frameworks/ets/taihe/idl/ohos.sensor.taihe +++ b/frameworks/ets/taihe/idl/ohos.sensor.taihe @@ -1345,10 +1345,14 @@ struct Options { * @syscap SystemCapability.Sensors.Sensor * @since 9 */ -@gen_async("getRotationMatrix") -@gen_promise("getRotationMatrix") -function getRotationMatrixSyncGrav(gravity: Array, geomagnetic: Array): RotationMatrixResponse; +function getRotationMatrixSyncGrav(gravity: Array, geomagnetic: Array): RotationMatrixResponse; +@static_overload("getRotationMatrix") +@async +function GetRotationMatrixWithCallback(gravity: Array, geomagnetic: Array): RotationMatrixResponse; +@static_overload("getRotationMatrix") +@promise +function GetRotationMatrixReturnsPromise(gravity: Array, geomagnetic: Array): RotationMatrixResponse; /** * Computes the device's orientation based on the rotation matrix. * @param { Array } rotationMatrix - rotationMatrix Indicates the rotation matrix. @@ -1359,9 +1363,13 @@ function getRotationMatrixSyncGrav(gravity: Array, geomagnetic: Array) * @syscap SystemCapability.Sensors.Sensor * @since 9 */ -@gen_async("getOrientation") -@gen_promise("getOrientation") function getOrientationSync(rotationMatrix: Array): Array; +@static_overload("getOrientation") +@async +function GetOrientationWithCallback(rotationMatrix: Array): Array; +@static_overload("getOrientation") +@promise +function GetOrientationReturnsPromise(rotationMatrix: Array): Array; /** * Convert rotation vector to rotation matrix. @@ -1373,9 +1381,13 @@ function getOrientationSync(rotationMatrix: Array): Array; * @syscap SystemCapability.Sensors.Sensor * @since 9 */ -@gen_async("getRotationMatrix") -@gen_promise("getRotationMatrix") function getRotationMatrixSync(rotationVector: Array): Array; +@static_overload("getRotationMatrix") +@async +function GetRotationMatrixWithCallback_chinast_1(rotationVector: Array): Array; +@static_overload("getRotationMatrix") +@promise +function GetRotationMatrixReturnsPromise_chinast_1(rotationVector: Array): Array; /** * Obtains all sensor information on the device. @@ -1386,180 +1398,171 @@ function getRotationMatrixSync(rotationVector: Array): Array; * @syscap SystemCapability.Sensors.Sensor * @since 9 */ -@gen_async("getSensorList") -@gen_promise("getSensorList") function getSensorListSync(): Array; - -@!sts_inject(""" - function on(type: string, callback: (arg0 : Object) => void, options?: Options) { - switch(type) { - case "wearDetectionChange": return onWearDetection(callback as (info: WearDetectionResponse) => void, callback, options); - case "significantMotionChange": return onSignificantMotion(callback as (info: SignificantMotionResponse) => void, callback, options); - case "rotationVectorChange": return onRotationVector(callback as (info: RotationVectorResponse) => void, callback, options); - case "proximityChange": return onProximity(callback as (info: ProximityResponse) => void, callback, options); - case "pedometerDetectionChange": return onPedometerDetection(callback as (info: PedometerDetectionResponse) => void, callback, options); - case "pedometerChange": return onPedometer(callback as (info: PedometerResponse) => void, callback, options); - case "orientationChange": return onOrientation(callback as (info: OrientationResponse) => void, callback, options); - case "magneticFieldUncalibratedChange": return onMagneticFieldUncalibrated(callback as (info: MagneticFieldUncalibratedResponse) => void, callback, options); - case "magneticFieldChange": return onMagneticField(callback as (info: MagneticFieldResponse) => void, callback, options); - case "linearAccelerometerChange": return onLinearAccelerometer(callback as (info: LinearAccelerometerResponse) => void, callback, options); - case "humidityChange": return onHumidity(callback as (info: HumidityResponse) => void, callback, options); - case "heartRateChange": return onHeartRate(callback as (info: HeartRateResponse) => void, callback, options); - case "hallChange": return onHall(callback as (info: HallResponse) => void, callback, options); - case "gyroscopeUncalibratedChange": return onGyroscopeUncalibrated(callback as (info: GyroscopeUncalibratedResponse) => void, callback, options); - case "gyroscopeChange": return onGyroscope(callback as (info: GyroscopeResponse) => void, callback, options); - case "gravityChange": return onGravity(callback as (info: GravityResponse) => void, callback, options); - case "barometerChange": return onBarometer(callback as (info: BarometerResponse) => void, callback, options); - case "ambientTemperatureChange": return onAmbientTemperature(callback as (info: AmbientTemperatureResponse) => void, callback, options); - case "ambientLightChange": return onAmbientLight(callback as (info: LightResponse) => void, callback, options); - case "accelerometerUncalibratedChange": return onAccelerometerUncalibrated(callback as (info: AccelerometerUncalibratedResponse) => void, callback, options); - case "accelerometerChange": return onAccelerometer(callback as (info: AccelerometerResponse) => void, callback, options); - case "sarChange": return onSar(callback as (info: SarResponse) => void, callback, options); - case "colorChange": return onColor(callback as (info: ColorResponse) => void, callback, options); - default: throw new Error(`Unknown type: ${type}`); - } - } - function once(type: string, callback: (arg0 : Object) => void) { - switch(type) { - case "wearDetectionChange": return onceWearDetection(callback as (info: WearDetectionResponse) => void, callback); - case "significantMotionChange": return onceSignificantMotion(callback as (info: SignificantMotionResponse) => void, callback); - case "rotationVectorChange": return onceRotationVector(callback as (info: RotationVectorResponse) => void, callback); - case "proximityChange": return onceProximity(callback as (info: ProximityResponse) => void, callback); - case "pedometerDetectionChange": return oncePedometerDetection(callback as (info: PedometerDetectionResponse) => void, callback); - case "pedometerChange": return oncePedometer(callback as (info: PedometerResponse) => void, callback); - case "orientationChange": return onceOrientation(callback as (info: OrientationResponse) => void, callback); - case "magneticFieldUncalibratedChange": return onceMagneticFieldUncalibrated(callback as (info: MagneticFieldUncalibratedResponse) => void, callback); - case "magneticFieldChange": return onceMagneticField(callback as (info: MagneticFieldResponse) => void, callback); - case "linearAccelerometerChange": return onceLinearAccelerometer(callback as (info: LinearAccelerometerResponse) => void, callback); - case "humidityChange": return onceHumidity(callback as (info: HumidityResponse) => void, callback); - case "heartRateChange": return onceHeartRate(callback as (info: HeartRateResponse) => void, callback); - case "hallChange": return onceHall(callback as (info: HallResponse) => void, callback); - case "gyroscopeUncalibratedChange": return onceGyroscopeUncalibrated(callback as (info: GyroscopeUncalibratedResponse) => void, callback); - case "gyroscopeChange": return onceGyroscope(callback as (info: GyroscopeResponse) => void, callback); - case "gravityChange": return onceGravity(callback as (info: GravityResponse) => void, callback); - case "barometerChange": return onceBarometer(callback as (info: BarometerResponse) => void, callback); - case "ambientTemperatureChange": return onceAmbientTemperature(callback as (info: AmbientTemperatureResponse) => void, callback); - case "ambientLightChange": return onceAmbientLight(callback as (info: LightResponse) => void, callback); - case "accelerometerUncalibratedChange": return onceAccelerometerUncalibrated(callback as (info: AccelerometerUncalibratedResponse) => void, callback); - case "accelerometerChange": return onceAccelerometer(callback as (info: AccelerometerResponse) => void, callback); - default: throw new Error(`Unknown type: ${type}`); - } - } - function off(type: string, callback?: (arg0 : Object) => void) { - switch(type) { - case "wearDetectionChange": return offWearDetection(callback); - case "significantMotionChange": return offSignificantMotion(callback); - case "rotationVectorChange": return offRotationVector(callback); - case "proximityChange": return offProximity(callback); - case "pedometerDetectionChange": return offPedometerDetection(callback); - case "pedometerChange": return offPedometer(callback); - case "orientationChange": return offOrientation(callback); - case "magneticFieldUncalibratedChange": return offMagneticFieldUncalibrated(callback); - case "magneticFieldChange": return offMagneticField(callback); - case "linearAccelerometerChange": return offLinearAccelerometer(callback); - case "humidityChange": return offHumidity(callback); - case "heartRateChange": return offHeartRate(callback); - case "hallChange": return offHall(callback); - case "gyroscopeUncalibratedChange": return offGyroscopeUncalibrated(callback); - case "gyroscopeChange": return offGyroscope(callback); - case "gravityChange": return offGravity(callback); - case "barometerChange": return offBarometer(callback); - case "ambientTemperatureChange": return offAmbientTemperature(callback); - case "ambientLightChange": return offAmbientLight(callback); - case "accelerometerUncalibratedChange": return offAccelerometerUncalibrated(callback); - case "accelerometerChange": return offAccelerometer(callback); - case "sarChange": return offSar(callback); - case "colorChange": return offColor(callback); - default: throw new Error(`Unknown type: ${type}`); - } - } -""") -function OnWearDetection(f: (info: WearDetectionResponse) => void, opq: Opaque, options: Optional); -function OnceWearDetection(f: (info: WearDetectionResponse) => void, opq: Opaque); -function OffWearDetection(opq: Optional); - -function OnSignificantMotion(f: (info: SignificantMotionResponse) => void, opq: Opaque, options: Optional); -function OnceSignificantMotion(f: (info: SignificantMotionResponse) => void, opq: Opaque); -function OffSignificantMotion(opq: Optional); - -function OnRotationVector(f: (info: RotationVectorResponse) => void, opq: Opaque, options: Optional); -function OnceRotationVector(f: (info: RotationVectorResponse) => void, opq: Opaque); -function OffRotationVector(opq: Optional); - -function OnProximity(f: (info: ProximityResponse) => void, opq: Opaque, options: Optional); -function OnceProximity(f: (info: ProximityResponse) => void, opq: Opaque); -function OffProximity(opq: Optional); - -function OnPedometerDetection(f: (info: PedometerDetectionResponse) => void, opq: Opaque, options: Optional); -function OncePedometerDetection(f: (info: PedometerDetectionResponse) => void, opq: Opaque); -function OffPedometerDetection(opq: Optional); - -function OnPedometer(f: (info: PedometerResponse) => void, opq: Opaque, options: Optional); -function OncePedometer(f: (info: PedometerResponse) => void, opq: Opaque); -function OffPedometer(opq: Optional); - -function OnOrientation(f: (info: OrientationResponse) => void, opq: Opaque, options: Optional); -function OnceOrientation(f: (info: OrientationResponse) => void, opq: Opaque); -function OffOrientation(opq: Optional); - -function OnMagneticFieldUncalibrated(f: (info: MagneticFieldUncalibratedResponse) => void, opq: Opaque, options: Optional); -function OnceMagneticFieldUncalibrated(f: (info: MagneticFieldUncalibratedResponse) => void, opq: Opaque); -function OffMagneticFieldUncalibrated(opq: Optional); - -function OnMagneticField(f: (info: MagneticFieldResponse) => void, opq: Opaque, options: Optional); -function OnceMagneticField(f: (info: MagneticFieldResponse) => void, opq: Opaque); -function OffMagneticField(opq: Optional); - -function OnLinearAccelerometer(f: (info: LinearAccelerometerResponse) => void, opq: Opaque, options: Optional); -function OnceLinearAccelerometer(f: (info: LinearAccelerometerResponse) => void, opq: Opaque); -function OffLinearAccelerometer(opq: Optional); - -function OnHumidity(f: (info: HumidityResponse) => void, opq: Opaque, options: Optional); -function OnceHumidity(f: (info: HumidityResponse) => void, opq: Opaque); -function OffHumidity(opq: Optional); - -function OnHeartRate(f: (info: HeartRateResponse) => void, opq: Opaque, options: Optional); -function OnceHeartRate(f: (info: HeartRateResponse) => void, opq: Opaque); -function OffHeartRate(opq: Optional); - -function OnHall(f: (info: HallResponse) => void, opq: Opaque, options: Optional); -function OnceHall(f: (info: HallResponse) => void, opq: Opaque); -function OffHall(opq: Optional); - -function OnGyroscopeUncalibrated(f: (info: GyroscopeUncalibratedResponse) => void, opq: Opaque, options: Optional); -function OnceGyroscopeUncalibrated(f: (info: GyroscopeUncalibratedResponse) => void, opq: Opaque); -function OffGyroscopeUncalibrated(opq: Optional); - -function OnGyroscope(f: (info: GyroscopeResponse) => void, opq: Opaque, options: Optional); -function OnceGyroscope(f: (info: GyroscopeResponse) => void, opq: Opaque); -function OffGyroscope(opq: Optional); - -function OnGravity(f: (info: GravityResponse) => void, opq: Opaque, options: Optional); -function OnceGravity(f: (info: GravityResponse) => void, opq: Opaque); -function OffGravity(opq: Optional); - -function OnBarometer(f: (info: BarometerResponse) => void, opq: Opaque, options: Optional); -function OnceBarometer(f: (info: BarometerResponse) => void, opq: Opaque); -function OffBarometer(opq: Optional); - -function OnAmbientTemperature(f: (info: AmbientTemperatureResponse) => void, opq: Opaque, options: Optional); -function OnceAmbientTemperature(f: (info: AmbientTemperatureResponse) => void, opq: Opaque); -function OffAmbientTemperature(opq: Optional); - -function OnAmbientLight(f: (info: LightResponse) => void, opq: Opaque, options: Optional); -function OnceAmbientLight(f: (info: LightResponse) => void, opq: Opaque); -function OffAmbientLight(opq: Optional); - -function OnAccelerometerUncalibrated(f: (info: AccelerometerUncalibratedResponse) => void, opq: Opaque, options: Optional); -function OnceAccelerometerUncalibrated(f: (info: AccelerometerUncalibratedResponse) => void, opq: Opaque); -function OffAccelerometerUncalibrated(opq: Optional); - -function OnAccelerometer(f: (info: AccelerometerResponse) => void, opq: Opaque, options: Optional); -function OnceAccelerometer(f: (info: AccelerometerResponse) => void, opq: Opaque); -function OffAccelerometer(opq: Optional); - -function OnSar(f: (info: SarResponse) => void, opq: Opaque, options: Optional); -function OffSar(opq: Optional); - -function OnColor(f: (info: ColorResponse) => void, opq: Opaque, options: Optional); -function OffColor(opq: Optional); \ No newline at end of file +@static_overload("getSensorList") +@async +function GetSensorListMethodWithCallback(): Array; +@static_overload("getSensorList") +@promise +function GetSensorListReturnsPromise(): Array; + + + +@static_overload("on") +function OnWearDetection(type: String, f: (info: WearDetectionResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OnceWearDetection(type: String, f: (info: WearDetectionResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffWearDetection(type: String, opq:Optional<@sts_type("Function1") Opaque>); + +@static_overload("on") +function OnSignificantMotion(type: String, f: (info: SignificantMotionResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OnceSignificantMotion(type: String, f: (info: SignificantMotionResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffSignificantMotion(type: String, opq:Optional<@sts_type("Function2") Opaque>); + +@static_overload("on") +function OnRotationVector(type: String, f: (info: RotationVectorResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OnceRotationVector(type: String, f: (info: RotationVectorResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffRotationVector(type: String, opq:Optional<@sts_type("Function3") Opaque>); + +@static_overload("on") +function OnProximity(type: String, f: (info: ProximityResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OnceProximity(type: String, f: (info: ProximityResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffProximity(type: String, opq:Optional<@sts_type("Function4") Opaque>); + +@static_overload("on") +function OnPedometerDetection(type: String, f: (info: PedometerDetectionResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OncePedometerDetection(type: String, f: (info: PedometerDetectionResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffPedometerDetection(type: String, opq:Optional<@sts_type("Function5") Opaque>); + +@static_overload("on") +function OnPedometer(type: String, f: (info: PedometerResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OncePedometer(type: String, f: (info: PedometerResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffPedometer(type: String, opq:Optional<@sts_type("Function6") Opaque>); + +@static_overload("on") +function OnOrientation(type: String, f: (info: OrientationResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OnceOrientation(type: String, f: (info: OrientationResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffOrientation(type: String, opq:Optional<@sts_type("Function7") Opaque>); + +@static_overload("on") +function OnMagneticFieldUncalibrated(type: String, f: (info: MagneticFieldUncalibratedResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OnceMagneticFieldUncalibrated(type: String, f: (info: MagneticFieldUncalibratedResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffMagneticFieldUncalibrated(type: String, opq:Optional<@sts_type("Function8") Opaque>); + +@static_overload("on") +function OnMagneticField(type: String, f: (info: MagneticFieldResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OnceMagneticField(type: String, f: (info: MagneticFieldResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffMagneticField(type: String, opq:Optional<@sts_type("Function9") Opaque>); + +@static_overload("on") +function OnLinearAccelerometer(type: String, f: (info: LinearAccelerometerResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OnceLinearAccelerometer(type: String, f: (info: LinearAccelerometerResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffLinearAccelerometer(type: String, opq:Optional<@sts_type("Function10") Opaque>); + +@static_overload("on") +function OnHumidity(type: String, f: (info: HumidityResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OnceHumidity(type: String, f: (info: HumidityResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffHumidity(type: String, opq:Optional<@sts_type("Function11") Opaque>); + +@static_overload("on") +function OnHeartRate(type: String, f: (info: HeartRateResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OnceHeartRate(type: String, f: (info: HeartRateResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffHeartRate(type: String, opq:Optional<@sts_type("Function12") Opaque>); + +@static_overload("on") +function OnHall(type: String, f: (info: HallResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OnceHall(type: String, f: (info: HallResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffHall(type: String, opq:Optional<@sts_type("Function13") Opaque>); + +@static_overload("on") +function OnGyroscopeUncalibrated(type: String, f: (info: GyroscopeUncalibratedResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OnceGyroscopeUncalibrated(type: String, f: (info: GyroscopeUncalibratedResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffGyroscopeUncalibrated(type: String, opq:Optional<@sts_type("Function14") Opaque>); + + +@static_overload("on") +function OnGyroscope(type: String, f: (info: GyroscopeResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OnceGyroscope(type: String, f: (info: GyroscopeResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffGyroscope(type: String, opq:Optional<@sts_type("Function15") Opaque>); + +@static_overload("on") +function OnGravity(type: String, f: (info: GravityResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OnceGravity(type: String, f: (info: GravityResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffGravity(type: String, opq:Optional<@sts_type("Function16") Opaque>); + +@static_overload("on") +function OnBarometer(type: String, f: (info: BarometerResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OnceBarometer(type: String, f: (info: BarometerResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffBarometer(type: String, opq:Optional<@sts_type("Function17") Opaque>); + +@static_overload("on") +function OnAmbientTemperature(type: String, f: (info: AmbientTemperatureResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OnceAmbientTemperature(type: String, f: (info: AmbientTemperatureResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffAmbientTemperature(type: String, opq:Optional<@sts_type("Function18") Opaque>); + + +@static_overload("on") +function OnAmbientLight(type: String, f: (info: LightResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OnceAmbientLight(type: String, f: (info: LightResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffAmbientLight(type: String, opq:Optional<@sts_type("Function19") Opaque>); + +@static_overload("on") +function OnAccelerometerUncalibrated(type: String, f: (info: AccelerometerUncalibratedResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OnceAccelerometerUncalibrated(type: String, f: (info: AccelerometerUncalibratedResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffAccelerometerUncalibrated(type: String, opq:Optional<@sts_type("Function20") Opaque>); + +@static_overload("on") +function OnAccelerometer(type: String, f: (info: AccelerometerResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("once") +function OnceAccelerometer(type: String, f: (info: AccelerometerResponse) => void, @sts_last opq: Opaque); +@static_overload("off") +function OffAccelerometer(type: String, opq:Optional<@sts_type("Function21") Opaque>); + +@static_overload("on") +function OnSar(type: String, f: (info: SarResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("off") +function OffSar(type: String, opq:Optional<@sts_type("Function22") Opaque>); + +@static_overload("on") +function OnColor(type: String, f: (info: ColorResponse) => void, @sts_last opq: Opaque, options: Optional); +@static_overload("off") +function OffColor(type: String, opq:Optional<@sts_type("Function23") Opaque>); \ No newline at end of file