1# @ohos.distributedHardware.mechanicManager (机械体控制模块)(系统接口) 2<!--Kit: Mechanic Kit--> 3<!--Subsystem: Mechanic--> 4<!--Owner: @hobbycao--> 5<!--Designer: @saga2025--> 6<!--Tester: @zhaodengqi--> 7<!--Adviser: @foryourself--> 8 9本模块提供与机械设备交互的能力,包括设备连接管理、控制和监控功能。 10 11> **说明:** 12> 13> - 本模块首批接口从API version 20开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 14> 15> - 当前页面仅包含本模块的系统接口,其他公开接口参见[@ohos.distributedHardware.mechanicManager (机械体控制模块)](js-apis-mechanicManager.md)。 16 17## 导入模块 18 19```js 20import { mechanicManager } from '@kit.MechanicKit'; 21``` 22 23## mechanicManager.setUserOperation 24 25setUserOperation(operation: Operation, mac: string, params: string): void 26 27设置用户的连接或断开操作。 28 29**需要权限**:ohos.permission.CONNECT_MECHANIC_HARDWARE 30 31**系统能力**:SystemCapability.Mechanic.Core 32 33**系统接口**:该接口为系统接口。 34 35**参数:** 36 37| 参数名 | 类型 | 必填 | 说明 | 38| ---------- | ---------------------- | ---- | ----- | 39| operation | [Operation](#operation) | 是 | 操作类型。 | 40| mac | string | 是 | 机械体设备MAC地址。 | 41| params | string | 是 | 操作参数。 | 42 43**错误码:** 44 45以下的错误码的详细介绍请参见[机械体控制模块错误码](errorcode-mechanic.md)和[通用错误码](../errorcode-universal.md)。 46 47| 错误码ID | 错误信息 | 48| -------- | ------- | 49| 201 | Permission denied. | 50| 202 | Not system application. | 51| 33300001 | Service exception. | 52 53**示例:** 54 55```ts 56console.info('User operate'); 57mechanicManager.setUserOperation(mechanicManager.Operation.CONNECT, "58:51:9e:e7:79:6d", "operatingParams"); 58console.info('User operation was successful'); 59``` 60 61## mechanicManager.setCameraTrackingLayout 62 63setCameraTrackingLayout(trackingLayout: CameraTrackingLayout): void 64 65设置当前机械体设备摄像头跟踪布局。 66 67**系统能力**:SystemCapability.Mechanic.Core 68 69**系统接口**:该接口为系统接口。 70 71**参数:** 72 73| 参数名 | 类型 | 必填 | 说明 | 74| ---------- | ---------------------- | ---- | ----- | 75| trackingLayout | [CameraTrackingLayout](js-apis-mechanicManager.md#cameratrackinglayout) | 是 | 摄像头跟踪布局。 | 76 77**错误码:** 78 79以下的错误码的详细介绍请参见[机械体控制模块错误码](errorcode-mechanic.md)和[通用错误码](../errorcode-universal.md)。 80 81| 错误码ID | 错误信息 | 82| -------- | ----------------- | 83| 202 | Not system application. | 84| 33300001 | Service exception. | 85| 33300002 | Device not connected. | 86| 33300003 | Feature not supported. | 87 88**示例:** 89 90```ts 91console.info('Set layout'); 92mechanicManager.setCameraTrackingLayout(mechanicManager.CameraTrackingLayout.LEFT); 93console.info('Set layout successful'); 94``` 95 96## mechanicManager.rotate 97 98rotate(mechId: number, angles: RotationAngles, duration: number): Promise\<Result> 99 100将机械体设备旋转到相对角度。使用Promise异步回调。 101 102**系统能力**:SystemCapability.Mechanic.Core 103 104**系统接口**:该接口为系统接口。 105 106**参数:** 107 108| 参数名 | 类型 | 必填 | 说明 | 109| ---------- | ---------------------- | ---- | ----- | 110| mechId | number | 是 | 机械体设备ID。 | 111| angles | [RotationAngles](#rotationangles) | 是 | 相对当前位置的旋转角度。 | 112| duration | number | 是 | 旋转持续时间,单位:ms。 | 113 114**返回值:** 115 116| 类型 | 说明 | 117| ------------------------------------------- | --------- | 118| Promise\<[Result](#result)> | Promise对象,返回旋转执行结果。 | 119 120**错误码:** 121 122以下的错误码的详细介绍请参见[机械体控制模块错误码](errorcode-mechanic.md)和[通用错误码](../errorcode-universal.md)。 123 124| 错误码ID | 错误信息 | 125| -------- | ----------------- | 126| 202 | Not system application. | 127| 33300001 | Service exception. | 128| 33300002 | Device not connected. | 129 130**示例:** 131 132```ts 133console.info('Start rotate'); 134let degree: mechanicManager.RotationAngles = { 135 yaw: 0.1 * Math.PI, 136 roll: 0.0, 137 pitch: 0.0 138} 139mechanicManager.rotate(0, degree, 500) 140 .then((result: mechanicManager.Result) => { 141 console.info(`'Rotate result:' ${result}`); 142 }); 143console.info('End rotation'); 144``` 145 146## mechanicManager.rotateToEulerAngles 147 148rotateToEulerAngles(mechId: number, angles: EulerAngles, duration: number): Promise\<Result> 149 150将机械体设备旋转到绝对角度。使用Promise异步回调。 151 152**系统能力**:SystemCapability.Mechanic.Core 153 154**系统接口**:该接口为系统接口。 155 156**参数:** 157 158| 参数名 | 类型 | 必填 | 说明 | 159| ---------- | ---------------------- | ---- | ----- | 160| mechId | number | 是 | 机械体设备ID。 | 161| angles | [EulerAngles](#eulerangles) | 是 | 绝对角度。 | 162| duration | number | 是 | 旋转持续时间,单位:ms。 | 163 164**返回值:** 165 166| 类型 | 说明 | 167| ------------------------------------------- | --------- | 168| Promise\<[Result](#result)> | Promise对象,返回旋转执行结果。 | 169 170**错误码:** 171 172以下的错误码的详细介绍请参见[机械体控制模块错误码](errorcode-mechanic.md)和[通用错误码](../errorcode-universal.md)。 173 174| 错误码ID | 错误信息 | 175| -------- | ----------------- | 176| 202 | Not system application. | 177| 33300001 | Service exception. | 178| 33300002 | Device not connected. | 179 180**示例:** 181 182```ts 183let degree: mechanicManager.EulerAngles = { 184 yaw: 0.9 * Math.PI, 185 roll: 0.9 * Math.PI, 186 pitch: 0.9 * Math.PI 187} 188mechanicManager.rotateToEulerAngles(0, degree, 500) 189 .then((result: mechanicManager.Result) => { 190 console.info(`'Rotate result:' ${result}`); 191 }); 192console.info('End rotation'); 193``` 194 195## mechanicManager.getMaxRotationTime 196 197getMaxRotationTime(mechId: number): number 198 199获取机械体设备的最大连续旋转持续时间。 200 201**系统能力**:SystemCapability.Mechanic.Core 202 203**系统接口**:该接口为系统接口。 204 205**参数:** 206 207| 参数名 | 类型 | 必填 | 说明 | 208| ---------- | ---------------------- | ---- | ----- | 209| mechId | number | 是 | 机械体设备ID。 | 210 211**返回值:** 212 213| 类型 | 说明 | 214| ------------------------------------------- | --------- | 215| number | 最大旋转持续时间,单位:ms。 | 216 217**错误码:** 218 219以下的错误码的详细介绍请参见[机械体控制模块错误码](errorcode-mechanic.md)和[通用错误码](../errorcode-universal.md)。 220 221| 错误码ID | 错误信息 | 222| -------- | -------- | 223| 202 | Not system application. | 224| 33300001 | Service exception. | 225| 33300002 | Device not connected. | 226 227**示例:** 228 229```ts 230console.info('Query maximum rotation time'); 231let maxTime = mechanicManager.getMaxRotationTime(0); 232console.info(`'Query maximum rotation time successful, maximum time:' ${maxTime}`); 233``` 234 235## mechanicManager.getMaxRotationSpeed 236 237getMaxRotationSpeed(mechId: number): RotationSpeed 238 239获取机械设备的最大旋转速度。 240 241**系统能力**:SystemCapability.Mechanic.Core 242 243**系统接口**:该接口为系统接口。 244 245**参数:** 246 247| 参数名 | 类型 | 必填 | 说明 | 248| ---------- | ---------------------- | ---- | ----- | 249| mechId | number | 是 | 机械体设备ID。 | 250 251**返回值:** 252 253| 类型 | 说明 | 254| ------------------------------------------- | --------- | 255| [RotationSpeed](#rotationspeed) | 最大旋转速度,仅返回速度的绝对值。 | 256 257**错误码:** 258 259以下的错误码的详细介绍请参见[机械体控制模块错误码](errorcode-mechanic.md)和[通用错误码](../errorcode-universal.md)。 260 261| 错误码ID | 错误信息 | 262| -------- | ----------------- | 263| 202 | Not system application. | 264| 33300001 | Service exception. | 265| 33300002 | Device not connected. | 266 267**示例:** 268 269```ts 270console.info('Query rotation speed'); 271let speedLimit: mechanicManager.RotationSpeed = mechanicManager.getMaxRotationSpeed(0); 272console.info(`'Query rotation speed successful, speed limit information:' ${speedLimit}`); 273``` 274 275## mechanicManager.rotateBySpeed 276 277rotateBySpeed(mechId: number, speed: RotationSpeed, duration: number): Promise\<Result> 278 279以指定速度旋转当前机械体设备。 280 281**系统能力**:SystemCapability.Mechanic.Core 282 283**系统接口**:该接口为系统接口。 284 285**参数:** 286 287| 参数名 | 类型 | 必填 | 说明 | 288| ---------- | ---------------------- | ---- | ----- | 289| mechId | number | 是 | 机械体设备ID。 | 290| speed | [RotationSpeed](#rotationspeed) | 是 | 指定旋转速度。最大旋转速度不超过getMaxRotationSpeed的返回值大小,如果超过最大速度,默认取最大值。 | 291| duration | number | 是 | 旋转持续时间,单位:ms。最大时间不超过getMaxRotationTime的返回值大小,如果超过最大时间,默认取最大值。 | 292 293**错误码:** 294 295以下的错误码的详细介绍请参见[机械体控制模块错误码](errorcode-mechanic.md)和[通用错误码](../errorcode-universal.md)。 296 297| 错误码ID | 错误信息 | 298| -------- | ----------------- | 299| 202 | Not system application. | 300| 33300001 | Service exception. | 301| 33300002 | Device not connected. | 302 303**示例:** 304 305```ts 306console.info('Start rotate'); 307let degree: mechanicManager.RotationSpeed = { 308 yawSpeed: 3 * Math.PI, 309 rollSpeed: 3 * Math.PI, 310 pitchSpeed: 3 * Math.PI 311} 312mechanicManager.rotateBySpeed(0, degree, 500) 313 .then((result) => { 314 console.info(`'Rotate result:' ${result}`); 315 }); 316console.info('Rotate finish'); 317``` 318 319## mechanicManager.stopMoving 320 321stopMoving(mechId: number): Promise\<void> 322 323停止机械体设备的移动。使用Promise异步回调。 324 325**系统能力**:SystemCapability.Mechanic.Core 326 327**系统接口**:该接口为系统接口。 328 329**参数:** 330 331| 参数名 | 类型 | 必填 | 说明 | 332| ---------- | ---------------------- | ---- | ----- | 333| mechId | number | 是 | 机械体设备ID。 | 334 335**返回值:** 336 337| 类型 | 说明 | 338| ------------------------------------------- | --------- | 339| Promise\<void> | Promise对象,无返回结果。 | 340 341**错误码:** 342 343以下的错误码的详细介绍请参见[机械体控制模块错误码](errorcode-mechanic.md)和[通用错误码](../errorcode-universal.md)。 344 345| 错误码ID | 错误信息 | 346| -------- | ----------------- | 347| 202 | Not system application. | 348| 33300001 | Service exception. | 349| 33300002 | Device not connected. | 350 351**示例:** 352 353```ts 354console.info('Stop moving'); 355mechanicManager.stopMoving(0) 356 .then(() => { 357 console.info('Get stop complete'); 358 }); 359console.info('Stop succeeded'); 360``` 361 362## mechanicManager.getCurrentAngles 363 364getCurrentAngles(mechId: number): EulerAngles 365 366获取指定机械体设备相对于初始位置的当前旋转角度。 367 368> **说明:** 369> 370> 初始位置:机械设备初始化的位置,坐标为(0, 0, 0)。 371 372**系统能力**:SystemCapability.Mechanic.Core 373 374**系统接口**:该接口为系统接口。 375 376**参数:** 377 378| 参数名 | 类型 | 必填 | 说明 | 379| ---------- | ---------------------- | ---- | ----- | 380| mechId | number | 是 | 机械体设备ID。 | 381 382**返回值:** 383 384| 类型 | 说明 | 385| ------------------------------------------- | --------- | 386| [EulerAngles](#eulerangles) | 机械体设备的当前旋转角度。 | 387 388**错误码:** 389 390以下的错误码的详细介绍请参见[机械体控制模块错误码](errorcode-mechanic.md)和[通用错误码](../errorcode-universal.md)。 391 392| 错误码ID | 错误信息 | 393| -------- | ----------------- | 394| 202 | Not system application. | 395| 33300001 | Service exception. | 396| 33300002 | Device not connected. | 397 398**示例:** 399 400```ts 401console.info('Query current location'); 402let currentAngles: mechanicManager.EulerAngles = mechanicManager.getCurrentAngles(0); 403console.info(`'Query current location, location:' ${currentAngles}`); 404``` 405 406## mechanicManager.getRotationLimits 407 408getRotationLimits(mechId: number): RotationLimits 409 410获取指定机械体设备相对于初始位置的最大旋转角度。 411 412**系统能力**:SystemCapability.Mechanic.Core 413 414**系统接口**:该接口为系统接口。 415 416**参数:** 417 418| 参数名 | 类型 | 必填 | 说明 | 419| ---------- | ---------------------- | ---- | ----- | 420| mechId | number | 是 | 机械体设备ID。 | 421 422**返回值:** 423 424| 类型 | 说明 | 425| ------------------------------------------- | --------- | 426| [RotationLimits](#rotationlimits) | 最大旋转角度。 | 427 428**错误码:** 429 430以下的错误码的详细介绍请参见[机械体控制模块错误码](errorcode-mechanic.md)和[通用错误码](../errorcode-universal.md)。 431 432| 错误码ID | 错误信息 | 433| -------- | ----------------- | 434| 202 | Not system application. | 435| 33300001 | Service exception. | 436| 33300002 | Device not connected. | 437 438**示例:** 439 440```ts 441console.info('Query rotation limit information'); 442let degreeLimit: mechanicManager.RotationLimits = mechanicManager.getRotationLimits(0); 443console.info(`'Query the rotation limit information successfully, limit information:' ${degreeLimit}`); 444``` 445 446## mechanicManager.on('rotationAxesStatusChange') 447 448on(type: 'rotationAxesStatusChange', callback: Callback\<RotationAxesStateChangeInfo>): void 449 450注册旋转轴状态变化事件的回调监听。使用callback异步回调。 451 452**系统能力**:SystemCapability.Mechanic.Core 453 454**系统接口**:该接口为系统接口。 455 456**参数:** 457 458| 参数名 | 类型 | 必填 | 说明 | 459| ---------- | ---------------------- | ---- | ----- | 460| type | 'rotationAxesStatusChange' | 是 | 注册监听事件的类型。取值为:'rotationAxesStatusChange'。 | 461| callback | Callback\<[RotationAxesStateChangeInfo](#rotationaxesstatechangeinfo)> | 是 | 回调函数,返回机械体设备旋转轴状态变化信息。 | 462 463**错误码:** 464 465以下的错误码的详细介绍请参见[机械体控制模块错误码](errorcode-mechanic.md)和[通用错误码](../errorcode-universal.md)。 466 467| 错误码ID | 错误信息 | 468| -------- | ----------------- | 469| 202 | Not system application. | 470| 33300001 | Service exception. | 471 472**示例:** 473 474```ts 475console.info('Register Axis Status listener'); 476mechanicManager.on("rotationAxesStatusChange", (result: mechanicManager.RotationAxesStateChangeInfo) => { 477 console.info(`'result:' ${result}`); 478}); 479console.info('Successful registration'); 480``` 481 482## mechanicManager.off('rotationAxesStatusChange') 483 484off(type: 'rotationAxesStatusChange', callback?: Callback\<RotationAxesStateChangeInfo>): void 485 486取消注册旋转轴状态变化事件的回调监听。使用callback异步回调。 487 488**系统能力**:SystemCapability.Mechanic.Core 489 490**系统接口**:该接口为系统接口。 491 492**参数:** 493 494| 参数名 | 类型 | 必填 | 说明 | 495| ---------- | ---------------------- | ---- | ----- | 496| type | 'rotationAxesStatusChange' | 是 | 取消注册监听事件的类型。取值为:'rotationAxesStatusChange'。 | 497| callback | Callback\<[RotationAxesStateChangeInfo](#rotationaxesstatechangeinfo)> | 否 | mechanicManager.off('rotationAxesStatusChange')注册的回调函数。不填时默认取消所有注册的回调函数。 | 498 499**错误码:** 500 501以下的错误码的详细介绍请参见[机械体控制模块错误码](errorcode-mechanic.md)和[通用错误码](../errorcode-universal.md)。 502 503| 错误码ID | 错误信息 | 504| -------- | ----------------- | 505| 202 | Not system application. | 506| 33300001 | Service exception. | 507 508**示例:** 509 510```ts 511console.info('Unregister Axis Status listener'); 512mechanicManager.off("rotationAxesStatusChange", (result: mechanicManager.RotationAxesStateChangeInfo) => { 513 console.info(`'result:' ${result}`); 514}); 515console.info('Unregister successfully'); 516``` 517 518## mechanicManager.getRotationAxesStatus 519 520getRotationAxesStatus(mechId: number): RotationAxesStatus 521 522获取当前机械体设备旋转轴的状态。 523 524**系统能力**:SystemCapability.Mechanic.Core 525 526**系统接口**:该接口为系统接口。 527 528**参数:** 529 530| 参数名 | 类型 | 必填 | 说明 | 531| ---------- | ---------------------- | ---- | ----- | 532| mechId | number | 是 | 机械体设备ID。 | 533 534**返回值:** 535 536| 类型 | 说明 | 537| ------------------------------------------- | --------- | 538| [RotationAxesStatus](#rotationaxesstatus) | 旋转轴状态。 | 539 540**错误码:** 541 542以下的错误码的详细介绍请参见[机械体控制模块错误码](errorcode-mechanic.md)和[通用错误码](../errorcode-universal.md)。 543 544| 错误码ID | 错误信息 | 545| -------- | ----------------- | 546| 202 | Not system application. | 547| 33300001 | Service exception. | 548| 33300002 | Device not connected. | 549 550**示例:** 551 552```ts 553console.info('Query the rotation axis status'); 554let axisStatus: mechanicManager.RotationAxesStatus = mechanicManager.getRotationAxesStatus(0); 555console.info(`'Query the rotation axis status successfully, axis state:' ${axisStatus}`); 556``` 557 558## RotationAngles 559 560相对当前位置的旋转角度。 561 562**系统能力**:SystemCapability.Mechanic.Core 563 564**系统接口**:该接口为系统接口。 565 566| 名称 | 类型 | 只读 | 可选 | 说明| 567| ----- | ---- | ---- | --- | --- | 568| yaw | number | 否 | 是 | 偏航角,范围为[-2\*Math.PI, 2\*Math.PI],以弧度为单位。 | 569| roll | number | 否 | 是 | 横滚角,范围为[-2\*Math.PI, 2\*Math.PI],以弧度为单位。 | 570| pitch | number | 否 | 是 | 俯仰角,范围为[-2\*Math.PI, 2\*Math.PI],以弧度为单位。 | 571 572## EulerAngles 573 574相对于初始位置的绝对欧拉角。 575 576**系统能力**:SystemCapability.Mechanic.Core 577 578**系统接口**:该接口为系统接口。 579 580| 名称 | 类型 | 只读 | 可选 | 说明| 581| ----- | ---- | ---- | --- | --- | 582| yaw | number | 否 | 是 | 偏航角,范围为[-2\*Math.PI, 2\*Math.PI],以弧度为单位。 | 583| roll | number | 否 | 是 | 横滚角,范围为[-2\*Math.PI, 2\*Math.PI],以弧度为单位。 | 584| pitch | number | 否 | 是 | 俯仰角,范围为[-2\*Math.PI, 2\*Math.PI],以弧度为单位。 | 585 586## RotationSpeed 587 588旋转速度。负值表示顺时针旋转,正值表示逆时针旋转。 589 590**系统能力**:SystemCapability.Mechanic.Core 591 592**系统接口**:该接口为系统接口。 593 594| 名称 | 类型 | 只读 | 可选 | 说明| 595| ----- | ---- | ---- | --- | --- | 596| yawSpeed | number | 否| 是 | 偏航速度,以弧度每秒为单位。 | 597| rollSpeed | number | 否 | 是 | 横滚速度,以弧度每秒为单位。 | 598| pitchSpeed | number | 否 | 是 | 俯仰速度,以弧度每秒为单位。 | 599 600## RotationLimits 601 602相对于初始位置的旋转角度限制。 603 604**系统能力**:SystemCapability.Mechanic.Core 605 606**系统接口**:该接口为系统接口。 607 608| 名称 | 类型 | 只读 | 可选 | 说明| 609| ----- | ---- | ---- | --- | --- | 610| negativeYawMax | number | 否 | 否 | 最大偏航旋转角度(负方向),范围为[-2\*Math.PI, 0],以弧度为单位。如果值小于或等于 -2\*Math.PI,则没有限制。 | 611| positiveYawMax | number | 否 | 否 | 最大偏航旋转角度(正方向),范围为[0, 2\*Math.PI],以弧度为单位。如果值大于或等于 2\*Math.PI,则没有限制。 | 612| negativeRollMax | number | 否 | 否 | 最大横滚旋转角度(负方向),范围为[-2\*Math.PI, 0],以弧度为单位。如果值小于或等于 -2\*Math.PI,则没有限制。 | 613| positiveRollMax | number | 否 | 否 | 最大横滚旋转角度(正方向),范围为[0, 2\*Math.PI],以弧度为单位。如果值大于或等于 2\*Math.PI,则没有限制。 | 614| negativePitchMax | number | 否 | 否 | 最大俯仰旋转角度(负方向),范围为[-2\*Math.PI, 0],以弧度为单位。如果值小于或等于 -2\*Math.PI,则没有限制。 | 615| positivePitchMax | number | 否 | 否 | 最大俯仰旋转角度(正方向),范围为[0, 2\*Math.PI],以弧度为单位。如果值大于或等于 2\*Math.PI,则没有限制。 | 616 617## RotationAxesStatus 618 619旋转轴状态。 620 621**系统能力**:SystemCapability.Mechanic.Core 622 623**系统接口**:该接口为系统接口。 624 625| 名称 | 类型 | 只读 | 可选 | 说明| 626| ----- | ---- | ---- | --- | --- | 627| yawEnabled | boolean | 否 | 否 | 是否启用了偏航轴,true表示已启用,false表示已禁用。 | 628| rollEnabled | boolean | 否 | 否 | 是否启用了横滚轴,true表示已启用,false表示已禁用。 | 629| pitchEnabled | boolean | 否 | 否 | 是否启用了俯仰轴,true表示已启用,false表示已禁用。 | 630| yawLimited | [RotationAxisLimited](#rotationaxislimited) | 否 | 是 | 偏航轴限位状态。 | 631| rollLimited | [RotationAxisLimited](#rotationaxislimited) | 否 | 是 | 横滚轴限位状态。 | 632| pitchLimited | [RotationAxisLimited](#rotationaxislimited) | 否 | 是 | 俯仰轴限位状态。 | 633 634## RotationAxisLimited 635 636旋转轴限位状态的枚举。 637 638**系统能力**:SystemCapability.Mechanic.Core 639 640**系统接口**:该接口为系统接口。 641 642| 名称 | 值 | 说明 | 643| ----------- | ---- | --------------- | 644| NOT_LIMITED | 0 | 无限制 | 645| NEGATIVE_LIMITED | 1 | 负方向受限,可以向相反方向转动。 | 646| POSITIVE_LIMITED | 2 | 正方向受限,可以向相反方向转动。 | 647 648## RotationAxesStateChangeInfo 649 650旋转轴状态变化信息。 651 652**系统能力**:SystemCapability.Mechanic.Core 653 654**系统接口**:该接口为系统接口。 655 656| 名称 | 类型 | 只读 | 可选 | 说明| 657| ----- | ---- | ---- | --- | --- | 658| mechId | number | 否 | 否 | 机械体设备ID。 | 659| status | [RotationAxesStatus](#rotationaxesstatus)| 否 | 否 | 旋转轴状态。 | 660 661## Operation 662 663用户操作的枚举。 664 665**系统能力**:SystemCapability.Mechanic.Core 666 667**系统接口**:该接口为系统接口。 668 669| 名称 | 值 | 说明 | 670| ----------- | ---- | --------------- | 671| CONNECT | 0 | 连接。 | 672| DISCONNECT | 1 | 断开。 | 673 674## Result 675 676旋转执行结果的枚举。 677 678**系统能力**:SystemCapability.Mechanic.Core 679 680**系统接口**:该接口为系统接口。 681 682| 名称 | 值 | 说明 | 683| ----------- | ---- | --------------- | 684| COMPLETED | 0 | 执行完成。 | 685| INTERRUPTED | 1 | 执行被打断。 | 686| LIMITED | 2 | 执行受最大旋转角度限制。 | 687| TIMEOUT | 3 | 执行超时。 | 688| SYSTEM_ERROR | 100 | 系统错误。 | 689