harmony 鸿蒙@ohos.bluetooth.constant (Bluetooth constant Module)

  • 2023-10-30
  • 浏览 (362)

@ohos.bluetooth.constant (Bluetooth constant Module)

The constant module provides definitions of the constants used in Bluetooth.

NOTE

The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.

Modules to Import

import constant from '@ohos.bluetooth.constant';

ProfileId

Enumerates profiles.

System capability: SystemCapability.Communication.Bluetooth.Core

Name Value Description
PROFILE_A2DP_SOURCE 1 Advanced Audio Distribution Profile (A2DP).
PROFILE_HANDSFREE_AUDIO_GATEWAY 4 Hands-Free Profile (HFP).
PROFILE_HID_HOST 6 Human Interface Device (HID) profile.
PROFILE_PAN_NETWORK 7 Bluetooth personal area network (PAN) profile.

ProfileUuids

Enumerates profile UUIDs.

System API: This is a system API.

System capability: SystemCapability.Communication.Bluetooth.Core

Name Value Description
PROFILE_UUID_HFP_AG ‘0000111F-0000-1000-8000-00805F9B34FB’ UUID of the HFPAG Profile.
This is a system API.
PROFILE_UUID_HFP_HF ‘0000111E-0000-1000-8000-00805F9B34FB’ UUID of the HFPHF Profile.
This is a system API.
PROFILE_UUID_HSP_AG ‘00001112-0000-1000-8000-00805F9B34FB’ UUID of the HSPAG Profile.
This is a system API.
PROFILE_UUID_HSP_HS ‘00001108-0000-1000-8000-00805F9B34FB’ UUID of the HSPHS Profile.
This is a system API.
PROFILE_UUID_A2DP_SRC ‘0000110A-0000-1000-8000-00805F9B34FB’ Indicates the UID of the A2DPSRC Profile.
This is a system API.
PROFILE_UUID_A2DP_SINK ‘0000110B-0000-1000-8000-00805F9B34FB’ UUID of the A2DPSINK Profile.
This is a system API.
PROFILE_UUID_AVRCP_CT ‘0000110E-0000-1000-8000-00805F9B34FB’ UUID of the AVRCPCT Profile.
This is a system API.
PROFILE_UUID_AVRCP_TG ‘0000110C-0000-1000-8000-00805F9B34FB’ UUID of the AVRCPTG Profile.
This is a system API.
PROFILE_UUID_HID ‘00001124-0000-1000-8000-00805F9B34FB’ UUID of the HID Profile.
This is a system API.
PROFILE_UUID_HOGP ‘00001812-0000-1000-8000-00805F9B34FB’ UUID of the HOGP Profile.
This is a system API.

ProfileConnectionState

Enumerates the profile connection states.

System capability: SystemCapability.Communication.Bluetooth.Core

Name Value Description
STATE_DISCONNECTED 0 Disconnected.
STATE_CONNECTING 1 Connecting.
STATE_CONNECTED 2 Connected.
STATE_DISCONNECTING 3 Disconnecting.

MajorClass

Enumerates the major classes of Bluetooth devices.

System capability: SystemCapability.Communication.Bluetooth.Core

Name Value Description
MAJOR_MISC 0x0000 Miscellaneous device.
MAJOR_COMPUTER 0x0100 Computer.
MAJOR_PHONE 0x0200 Mobile phone.
MAJOR_NETWORKING 0x0300 Network device.
MAJOR_AUDIO_VIDEO 0x0400 Audio or video device.
MAJOR_PERIPHERAL 0x0500 Peripheral device.
MAJOR_IMAGING 0x0600 Imaging device.
MAJOR_WEARABLE 0x0700 Wearable device.
MAJOR_TOY 0x0800 Toy.
MAJOR_HEALTH 0x0900 Health device.
MAJOR_UNCATEGORIZED 0x1F00 Unclassified device.

MajorMinorClass

Enumerates the major and minor classes of Bluetooth devices.

System capability: SystemCapability.Communication.Bluetooth.Core

Name Value Description
COMPUTER_UNCATEGORIZED 0x0100 Unclassified computer.
COMPUTER_DESKTOP 0x0104 Desktop computer.
COMPUTER_SERVER 0x0108 Server.
COMPUTER_LAPTOP 0x010C Laptop.
COMPUTER_HANDHELD_PC_PDA 0x0110 Hand-held computer.
COMPUTER_PALM_SIZE_PC_PDA 0x0114 Palmtop computer.
COMPUTER_WEARABLE 0x0118 Wearable computer.
COMPUTER_TABLET 0x011C Tablet.
PHONE_UNCATEGORIZED 0x0200 Unclassified mobile phone.
PHONE_CELLULAR 0x0204 Portable phone.
PHONE_CORDLESS 0x0208 Cordless phone.
PHONE_SMART 0x020C Smartphone.
PHONE_MODEM_OR_GATEWAY 0x0210 Modem or gateway phone.
PHONE_ISDN 0x0214 ISDN phone.
NETWORK_FULLY_AVAILABLE 0x0300 Device with network fully available.
NETWORK_1_TO_17_UTILIZED 0x0320 Device used on network 1 to 17.
NETWORK_17_TO_33_UTILIZED 0x0340 Device used on network 17 to 33.
NETWORK_33_TO_50_UTILIZED 0x0360 Device used on network 33 to 50.
NETWORK_60_TO_67_UTILIZED 0x0380 Device used on network 60 to 67.
NETWORK_67_TO_83_UTILIZED 0x03A0 Device used on network 67 to 83.
NETWORK_83_TO_99_UTILIZED 0x03C0 Device used on network 83 to 99.
NETWORK_NO_SERVICE 0x03E0 Device without network service
AUDIO_VIDEO_UNCATEGORIZED 0x0400 Unclassified audio or video device.
AUDIO_VIDEO_WEARABLE_HEADSET 0x0404 Wearable audio or video headset.
AUDIO_VIDEO_HANDSFREE 0x0408 Hands-free audio or video device.
AUDIO_VIDEO_MICROPHONE 0x0410 Audio or video microphone.
AUDIO_VIDEO_LOUDSPEAKER 0x0414 Audio or video loudspeaker.
AUDIO_VIDEO_HEADPHONES 0x0418 Audio or video headphones.
AUDIO_VIDEO_PORTABLE_AUDIO 0x041C Portable audio or video device.
AUDIO_VIDEO_CAR_AUDIO 0x0420 In-vehicle audio or video device.
AUDIO_VIDEO_SET_TOP_BOX 0x0424 Audio or video STB device.
AUDIO_VIDEO_HIFI_AUDIO 0x0428 High-fidelity speaker device.
AUDIO_VIDEO_VCR 0x042C Video cassette recording (VCR) device.
AUDIO_VIDEO_VIDEO_CAMERA 0x0430 Camera.
AUDIO_VIDEO_CAMCORDER 0x0434 Camcorder
AUDIO_VIDEO_VIDEO_MONITOR 0x0438 Audio or video monitor.
AUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER 0x043C Video display or loudspeaker.
AUDIO_VIDEO_VIDEO_CONFERENCING 0x0440 Video conferencing device.
AUDIO_VIDEO_VIDEO_GAMING_TOY 0x0448 Audio or video gaming toy.
PERIPHERAL_NON_KEYBOARD_NON_POINTING 0x0500 Non-keyboard or non-pointing peripheral device.
PERIPHERAL_KEYBOARD 0x0540 Keyboard device.
PERIPHERAL_POINTING_DEVICE 0x0580 Pointing peripheral device.
PERIPHERAL_KEYBOARD_POINTING 0x05C0 Keyboard pointing device.
PERIPHERAL_UNCATEGORIZED 0x0500 Unclassified peripheral device.
PERIPHERAL_JOYSTICK 0x0504 Peripheral joystick.
PERIPHERAL_GAMEPAD 0x0508 Peripheral game pad
PERIPHERAL_REMOTE_CONTROL 0x05C0 Peripheral remote control device
PERIPHERAL_SENSING_DEVICE 0x0510 Peripheral sensing device.
PERIPHERAL_DIGITIZER_TABLET 0x0514 Peripheral digitizer tablet.
PERIPHERAL_CARD_READER 0x0518 Peripheral card reader.
PERIPHERAL_DIGITAL_PEN 0x051C Peripheral digital pen.
PERIPHERAL_SCANNER_RFID 0x0520 Peripheral RFID scanner.
PERIPHERAL_GESTURAL_INPUT 0x0522 Gesture input device.
IMAGING_UNCATEGORIZED 0x0600 Unclassified imaging device.
IMAGING_DISPLAY 0x0610 Imaging display device.
IMAGING_CAMERA 0x0620 Imaging camera device.
IMAGING_SCANNER 0x0640 Imaging scanner.
IMAGING_PRINTER 0x0680 Imaging printer.
WEARABLE_UNCATEGORIZED 0x0700 Unclassified wearable device.
WEARABLE_WRIST_WATCH 0x0704 Smart watch.
WEARABLE_PAGER 0x0708 Wearable pager.
WEARABLE_JACKET 0x070C Smart jacket.
WEARABLE_HELMET 0x0710 Wearable helmet.
WEARABLE_GLASSES 0x0714 Wearable glasses.
TOY_UNCATEGORIZED 0x0800 Unclassified toy.
TOY_ROBOT 0x0804 Toy robot.
TOY_VEHICLE 0x0808 Toy vehicle.
TOY_DOLL_ACTION_FIGURE 0x080C Humanoid toy doll.
TOY_CONTROLLER 0x0810 Toy controller.
TOY_GAME 0x0814 Toy gaming device.
HEALTH_UNCATEGORIZED 0x0900 Unclassified health devices.
HEALTH_BLOOD_PRESSURE 0x0904 Blood pressure device.
HEALTH_THERMOMETER 0x0908 Thermometer
HEALTH_WEIGHING 0x090C Body scale.
HEALTH_GLUCOSE 0x0910 Blood glucose monitor.
HEALTH_PULSE_OXIMETER 0x0914 Pulse oximeter.
HEALTH_PULSE_RATE 0x0918 Heart rate monitor.
HEALTH_DATA_DISPLAY 0x091C Health data display.
HEALTH_STEP_COUNTER 0x0920 Step counter.
HEALTH_BODY_COMPOSITION_ANALYZER 0x0924 Body composition analyzer.
HEALTH_PEAK_FLOW_MONITOR 0x0928 Hygrometer.
HEALTH_MEDICATION_MONITOR 0x092C Medication monitor.
HEALTH_KNEE_PROSTHESIS 0x0930 Prosthetic knee.
HEALTH_ANKLE_PROSTHESIS 0x0934 Prosthetic ankle.
HEALTH_GENERIC_HEALTH_MANAGER 0x0938 Generic health management device.
HEALTH_PERSONAL_MOBILITY_DEVICE 0x093C Personal mobility device.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙APIs

harmony 鸿蒙System Common Events (To Be Deprecated Soon)

harmony 鸿蒙System Common Events

harmony 鸿蒙API Reference Document Description

harmony 鸿蒙Enterprise Device Management Overview (for System Applications Only)

harmony 鸿蒙BundleStatusCallback

harmony 鸿蒙@ohos.bundle.innerBundleManager (innerBundleManager)

harmony 鸿蒙@ohos.distributedBundle (Distributed Bundle Management)

harmony 鸿蒙@ohos.bundle (Bundle)

harmony 鸿蒙@ohos.enterprise.EnterpriseAdminExtensionAbility (EnterpriseAdminExtensionAbility)

0  赞