llt test构建配置修改 Created-by: qq_35037212 Commit-by: fangwusheng Merged-by: openharmony_ci Description: ### 一、内容说明(相关的Issue) https://gitcode.com/openharmony/connectivity_connectivity_cangjie_wrapper/issues/52 ### 二、建议测试周期和提测地址 建议测试完成时间:xxxx.xx.xx 投产上线时间:xxxx.xx.xx 提测地址:CI环境/压测环境 测试账号: 无 ### 三、变更内容 * 3.1 关联PR列表 https://gitcode.com/openharmony/connectivity_connectivity_cangjie_wrapper/pull/74 * 3.2 数据库和部署说明 1. 常规更新 2. 重启unicorn 3. 重启sidekiq 4. 迁移任务:是否有迁移任务,没有写 "无" 5. rake脚本:`bundle exec xxx RAILS_ENV = production`;没有写 "无" 无 * 3.4 其他技术优化内容(做了什么,变更了什么) 根据仓上对应分支修改用例工程构建配置,Dev/Trunk分支修改为6.1.0-APILevel23,Cangjie-build-support同样匹配对应版本构建方式 主要修改: hvigor-config.json5文件 test目录下build-profile.json5文件 检查module.json5中的设备类型HarmonyOS工程为"phone",OpenHarmony工程对应为"default" * 3.5 废弃通知(什么字段、方法弃用?) 无 * 3.6 后向不兼容变更(是否有无法向后兼容的变更?) 无 ### 四、研发自测点(自测哪些?冒烟用例全部自测?) 自测测试结论: 测试通过 ### 五、测试关注点(需要提醒QA重点关注的、可能会忽略的地方) 检查点: | 需求名称 | 是否影响xx公共模块 | 是否需要xx功能 | 需求升级是否依赖其他子产品 | |------|------------|----------|---------------| | xxx | 否 | 需要 | 不需要 | | | | | | 接口测试:不涉及 性能测试:不涉及 并发测试:不涉及 其他: See merge request: openharmony/connectivity_connectivity_cangjie_wrapper!74
connectivity_cangjie_wrapper(beta feature)
Introduction
The connectivity_cangjie_wrapper is a Cangjie API encapsulated on OpenHarmony for application developers to use Bluetooth services and WLAN service capabilities. The currently open basic communication Cangjie interface only supports standard devices.
Bluetooth services: Provide traditional Bluetooth and low-energy Bluetooth related functions and services for applications.
WLAN services: Wireless Local Area Network (Wireless Local Area Networks, WLAN) is a local area network that sends and receives data through radio, infrared light signals or other technologies. Users can realize network communication between nodes without physical connection through WLAN. Commonly used in office and public environments where users carry mobile terminals.
System Architecture
Figure 1
As shown in the architecture diagram:
Interface layer description:
- Low-Power Bluetooth Interface: Cangjie public interfaces based on low-power Bluetooth encapsulation exposed to developers.
- Bluetooth Profile Interface: Cangjie public interfaces based on Bluetooth Profile encapsulation exposed to developers.
- Bluetooth Constant Interface: Cangjie public interfaces based on Bluetooth constants exposed to developers.
- Basic WLAN Functionality Interface: Cangjie public interfaces based on WLAN basic functionality encapsulation exposed to developers.
Framework layer description:
- Low-Power Bluetooth Wrapper: Bluetooth Low Energy is a Bluetooth technology that can communicate in low power consumption situations. This encapsulation layer is a Cangjie encapsulation implementation of low-power Bluetooth functionality based on the Bluetooth component.
- Bluetooth Profile Wrapper: Bluetooth Profile is a universal file transfer protocol based on Bluetooth that allows file transfer between devices, such as a2dp, hfp, etc. This encapsulation layer is a Cangjie encapsulation implementation of Bluetooth Profile functionality based on the Bluetooth component.
- Bluetooth Constants: Defines public constants related to Bluetooth.
- Basic WLAN Functionality Wrapper: Provides P2P (peer-to-peer) functionality, a point-to-point connection technology that can directly establish a TCP/IP link between two STAs. This encapsulation layer is a Cangjie encapsulation implementation of WLAN basic functionality based on the WLAN component.
Cangjie Basic Communication Service Dependencies:
- Bluetooth Component: Calls the underlying Bluetooth driver to provide relevant functions for accessing and using Bluetooth that can be called by the basic communication Cangjie interface, including BLE device gatt-related operations, as well as BLE broadcasting, scanning and other functions.
- WLAN Component: Calls the underlying Wi-Fi driver to provide WLAN-related functional C language interfaces that can be called by the basic communication Cangjie interface, including WLAN basic functions, WLAN message notifications, WLAN P2P mode and other functions.
- cangjie_ark_interop: Encapsulates public interfaces for C language interoperation, and provides Cangjie tag class implementation for annotating Cangjie APIs, as well as providing BusinessException exception class definitions thrown to users.
- hiviewdfx_cangjie_wrapper: Responsible for providing log interfaces, providing Cangjie interfaces that can be called by the basic communication Cangjie interface to print logs at critical paths.
Directory Structure
The connectivity cangjie wrapper directory structure is as follows:
foundation/communication/connectivity_cangjie_wrapper
├── figures # architecture pictures
├── kit # kit code
│ └── ConnectivityKit # Cangjie ConnectivityKit code implementation
├── ohos # Cangjie connectivity code
│ ├── bluetooth # Cangjie bluetooth code implementation
│ │ ├── a2dp # a2dp Profile interfaces
│ │ ├── base_profile # Bluetooth base profile interfaces
│ │ ├── ble # Bluetooth Low Energy interfaces
│ │ ├── connection # Bluetooth connection interfaces
│ │ ├── constant # Bluetooth constant definitions
│ │ ├── error_message.cj # Bluetooth error message definitions
│ │ └── hfp # hfp Profile interfaces
│ └── wifi_manager # Cangjie wifi code implementation
└── test # Test code
├── bluetooth # Bluetooth UT tests
│ └── test # Bluetooth test project
└── wifi_manager # WiFi UT tests
└── test # WiFi test project
Usage
bluetooth api
Bluetooth-related interfaces currently provide BLE-related capabilities, as well as various device Profile-related capabilities.
- BLE(Bluetooth Low Energy)
Bluetooth Low Energy (BLE) is a wireless, low-power Bluetooth technology. Compared with Classic Bluetooth, BLE allows for lower power consumption and is applicable to devices with long standby time, such as smart watches, healthcare devices, smart home devices.
For details, please refer to ble API。
- A2DP(Advanced Audio Distribution Profile)
Advanced Audio Distribution Profile (A2DP) allows high-quality multimedia audio (such as music and voice) to be streamed between devices over a Bluetooth connection. It supports bidirectional communication and can be used in devices such as headsets, speakers, and car audio devices.
For details, please refer to a2dp API。
- HFP (Hands-Free Profile) is a Bluetooth hands-free protocol that allows Bluetooth devices to control the calls of the peer Bluetooth device, such as Bluetooth headsets controlling the answering, hanging up, rejecting, and voice dialing of mobile phone calls.
For details, please refer to hfp API。
For relevant guidance, please refer to Overview of Bluetooth Service Development
Wifi api
WLAN-related api provide users with P2P functions
The P2P mode is also called Wi-Fi Direct, which allows two devices to establish a direct Wi-Fi connection without an intermediary wireless access point (AP). It can set up a TCP/IP connection between two STAs without an AP. Of the two STAs, one is called the group owner (GO), which serves as a traditional AP. the other is called a group client (GC), which connects to the GO like an AP.
For details, see wifi API。
For relevant guidance, please refer to WLAN Development Guide
Constraints
Compared with the API capabilities provided by ArkTS, the following functions are not supported:
- Bluetooth services do not yet provide Bluetooth socket, hid, pan, pbap, map Profile related functions.
- Wifi services do not yet provide STA mode and AP mode related functions.
Code Contribution
Developers are welcome to contribute code, documentation, etc. For specific contribution processes and methods, please refer to Code Contribution.
