diff --git a/api/@ohos.distributedHardware.mechanicManager.d.ts b/api/@ohos.distributedHardware.mechanicManager.d.ts index 58456bc01c15a0a6075deaecb96b8870d6a1ad93..562afe69cdc36f26c8f23bb86453c61045fd1643 100644 --- a/api/@ohos.distributedHardware.mechanicManager.d.ts +++ b/api/@ohos.distributedHardware.mechanicManager.d.ts @@ -146,9 +146,9 @@ declare namespace mechanicManager { /** * Rotates a mechanical device to the relative angles. - * @param { number } mechId ID of the mechanical device. + * @param { int } mechId ID of the mechanical device. * @param { RotationAngles } angles Relative angles. - * @param { number } duration Rotation duration. Unit: millisecond. + * @param { int } duration Rotation duration. Unit: millisecond. * @returns { Promise } Promise that return the execution result. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 33300001 - Service exception. @@ -158,13 +158,13 @@ declare namespace mechanicManager { * @since 20 */ - function rotate(mechId: number, angles: RotationAngles, duration: number): Promise; + function rotate(mechId: int, angles: RotationAngles, duration: int): Promise; /** * Rotates a mechanical device to the absolute angles. - * @param { number } mechId ID of the mechanical device. + * @param { int } mechId ID of the mechanical device. * @param { EulerAngles } angles Absolute angles. - * @param { number } duration Rotation duration. Unit: millisecond. + * @param { int } duration Rotation duration. Unit: millisecond. * @returns { Promise } Promise that return the execution result. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 33300001 - Service exception. @@ -174,13 +174,13 @@ declare namespace mechanicManager { * @since 20 */ - function rotateToEulerAngles(mechId: number, angles: EulerAngles, duration: number): Promise; + function rotateToEulerAngles(mechId: int, angles: EulerAngles, duration: int): Promise; /** * Obtains the maximum continuous rotation duration of a mechanical device. * - * @param { number } mechId ID of the mechanical device. - * @returns { number } Maximum rotation duration. Unit: millisecond. + * @param { int } mechId ID of the mechanical device. + * @returns { int } Maximum rotation duration. Unit: millisecond. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 33300001 - Service exception. * @throws { BusinessError } 33300002 - Device not connected. @@ -188,12 +188,12 @@ declare namespace mechanicManager { * @systemapi * @since 20 */ - function getMaxRotationTime(mechId: number): number; + function getMaxRotationTime(mechId: int): int; /** * Obtains the maximum rotation speed of a mechanical device. * - * @param { number } mechId ID of the mechanical device. + * @param { int } mechId ID of the mechanical device. * @returns { RotationSpeed } Maximum speed. Only the absolute value of the speed is returned. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 33300001 - Service exception. @@ -202,13 +202,13 @@ declare namespace mechanicManager { * @systemapi * @since 20 */ - function getMaxRotationSpeed(mechId: number): RotationSpeed; + function getMaxRotationSpeed(mechId: int): RotationSpeed; /** * Rotates a mechanical device at the specified speed. - * @param { number } mechId ID of the mechanical device. + * @param { int } mechId ID of the mechanical device. * @param { RotationSpeed } speed Rotation speed. - * @param { number } duration Rotation duration. Unit: millisecond. + * @param { int } duration Rotation duration. Unit: millisecond. * @returns { Promise } Promise that return the execution result. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 33300001 - Service exception. @@ -217,11 +217,11 @@ declare namespace mechanicManager { * @systemapi * @since 20 */ - function rotateBySpeed(mechId: number, speed: RotationSpeed, duration: number): Promise; + function rotateBySpeed(mechId: int, speed: RotationSpeed, duration: int): Promise; /** * Stops a mechanical device from moving. - * @param { number } mechId ID of the mechanical device. + * @param { int } mechId ID of the mechanical device. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 33300001 - Service exception. @@ -230,11 +230,11 @@ declare namespace mechanicManager { * @systemapi * @since 20 */ - function stopMoving(mechId: number): Promise; + function stopMoving(mechId: int): Promise; /** * Obtains the current angles of a mechanical device. - * @param { number } mechId ID of the mechanical device. + * @param { int } mechId ID of the mechanical device. * @returns { EulerAngles } Rotation angles. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 33300001 - Service exception. @@ -244,12 +244,12 @@ declare namespace mechanicManager { * @since 20 */ - function getCurrentAngles(mechId: number): EulerAngles; + function getCurrentAngles(mechId: int): EulerAngles; /** * Obtains the maximum rotation angles relative to the reference point for the specified mechanical device. * - * @param { number } mechId ID of the mechanical device. + * @param { int } mechId ID of the mechanical device. * @returns { RotationLimits } Maximum rotation angles. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 33300001 - Service exception. @@ -259,11 +259,11 @@ declare namespace mechanicManager { * @since 20 */ - function getRotationLimits(mechId: number): RotationLimits; + function getRotationLimits(mechId: int): RotationLimits; /** * Obtains the status of the rotation axes. - * @param { number } mechId ID of the mechanical device. + * @param { int } mechId ID of the mechanical device. * @returns { RotationAxesStatus } Rotation axis status. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 33300001 - Service exception. @@ -272,7 +272,7 @@ declare namespace mechanicManager { * @systemapi * @since 20 */ - function getRotationAxesStatus(mechId: number): RotationAxesStatus; + function getRotationAxesStatus(mechId: int): RotationAxesStatus; /** @@ -311,11 +311,11 @@ declare namespace mechanicManager { export interface MechInfo { /** * ID of the mechanical device. - * @type { number } + * @type { int } * @syscap SystemCapability.Mechanic.Core * @since 20 */ - mechId: number; + mechId: int; /** @@ -346,33 +346,33 @@ declare namespace mechanicManager { export interface RotationAngles { /** * Yaw angle, ranging from -2*Math.PI to 2*Math.PI, measured in radians. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 */ - yaw?: number; + yaw?: double; /** * Roll angle, ranging from -2*Math.PI to 2*Math.PI, measured in radians. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 */ - roll?: number; + roll?: double; /** * Pitch angle, ranging from -2*Math.PI to 2*Math.PI, measured in radians. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 */ - pitch?: number; + pitch?: double; } /** @@ -386,33 +386,33 @@ declare namespace mechanicManager { export interface EulerAngles { /** * Yaw angle, ranging from -Math.PI to Math.PI, measured in radians. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 */ - yaw?: number; + yaw?: double; /** * Roll angle, ranging from -Math.PI to Math.PI, measured in radians. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 */ - roll?: number; + roll?: double; /** * Pitch angle, ranging from -Math.PI to Math.PI, measured in radians. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 */ - pitch?: number; + pitch?: double; } /** @@ -427,33 +427,33 @@ declare namespace mechanicManager { export interface RotationSpeed { /** * Yaw speed, measured in radians per second. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 */ - yawSpeed?: number; + yawSpeed?: double; /** * Roll speed, measured in radians per second. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 */ - rollSpeed?: number; + rollSpeed?: double; /** * Pitch speed, measured in radians per second. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 */ - pitchSpeed?: number; + pitchSpeed?: double; } @@ -469,62 +469,62 @@ declare namespace mechanicManager { /** * Maximum yaw rotation angles in the negative direction, ranging from -2*Math.PI to 0, measured in radians. * If the value is less than or equal to -2*Math.PI, there is no restriction. - * @type { number } + * @type { double } * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 */ - negativeYawMax: number; + negativeYawMax: double; /** * Maximum yaw rotation angles in the positive direction, ranging from 0 to 2*Math.PI, measured in radians. * If the value is greater than or equal to 2*Math.PI, there is no restriction. - * @type { number } + * @type { double } * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 */ - positiveYawMax: number; + positiveYawMax: double; /** * Maximum roll rotation angles in the negative direction, ranging from -2*Math.PI to 0, measured in radians. * If the value is less than or equal to -2*Math.PI, there is no restriction. - * @type { number } + * @type { double } * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 */ - negativeRollMax: number; + negativeRollMax: double; /** * Maximum roll rotation angles in the positive direction, ranging from 0 to 2*Math.PI, measured in radians. * If the value is greater than or equal to 2*Math.PI, there is no restriction. - * @type { number } + * @type { double } * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 */ - positiveRollMax: number; + positiveRollMax: double; /** * Maximum pitch rotation angles in the negative direction, ranging from -2*Math.PI to 0, measured in radians. * If the value is less than or equal to -2*Math.PI, there is no restriction. - * @type { number } + * @type { double } * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 */ - negativePitchMax: number; + negativePitchMax: double; /** * Maximum pitch rotation angles in the positive direction, ranging from 0 to 2*Math.PI, measured in radians. * If the value is greater than or equal to 2*Math.PI, there is no restriction. - * @type { number } + * @type { double } * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 */ - positivePitchMax: number; + positivePitchMax: double; } /** @@ -634,12 +634,12 @@ declare namespace mechanicManager { export interface RotationAxesStateChangeInfo { /** * ID of the mechanical device. - * @type { number } + * @type { int } * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 */ - mechId: number; + mechId: int; /** * Rotate axis status. @@ -843,14 +843,12 @@ declare namespace mechanicManager { * Enumerates the camera tracking layouts. * @enum { int } * @syscap SystemCapability.Mechanic.Core - * @systemapi * @since 20 */ export enum CameraTrackingLayout { /** * Default layout. * @syscap SystemCapability.Mechanic.Core - * @systemapi * @since 20 */ DEFAULT = 0, @@ -858,7 +856,6 @@ declare namespace mechanicManager { /** * Left-side layout. * @syscap SystemCapability.Mechanic.Core - * @systemapi * @since 20 */ LEFT = 1, @@ -866,7 +863,6 @@ declare namespace mechanicManager { /** * Middle layout. * @syscap SystemCapability.Mechanic.Core - * @systemapi * @since 20 */ MIDDLE = 2, @@ -874,7 +870,6 @@ declare namespace mechanicManager { /** * Right-side layout. * @syscap SystemCapability.Mechanic.Core - * @systemapi * @since 20 */ RIGHT = 3