当前位置: 首页 > java >正文

CarPropertyService 介绍

目录

1. CarPropertyService 基本介绍

1.1 CarPropertyService 结构图

1.2 CarPropertyService 的定义与实现

1.3 CarPropertyManager 与 CarPropertyService

2. PropertyHalService  与 CarPropertyService

3. CarPropertyService 的重要接口介绍

3.1 CarPropertyService–registerListener接口的时序图


    本文为android11 上的CarPropertyService 的基本介绍,后续版本基本相同。

1. CarPropertyService 基本介绍

1.1 CarPropertyService 结构图

1.2 CarPropertyService 的定义与实现

CarPropertyService的主要功能是支持订阅和接收属性变化。

CarPropertyService是与CarPowerManagementService同层级的服务。

50  /**
51   * This class implements the binder interface for ICarProperty.aidl to make it easier to create
52   * multiple managers that deal with Vehicle Properties. The property Ids in this class are IDs in
53   * manager level.
54   */
55  public class CarPropertyService extends ICarProperty.Stub
56          implements CarServiceBase, PropertyHalService.PropertyHalListener {

CarPropertyService实现了ICarProperty接口

主要接口为:注册和解注册属性监听,获取和设置属性值等。

1.3 CarPropertyManager 与 CarPropertyService

client使用的属性相关的API集合。

2. PropertyHalService  与 CarPropertyService

PropertyHalService  是 CarPropertyService的关键成员变量:

private final PropertyHalService mHal;

CarPropertyService与PropertyHalService的关系,可以理解为分层关系,PropertyHalService是CarPropertyService的下一层。

PropertyHalService实现了HalServiceBase:


51  /**
52   * Common interface for HAL services that send Vehicle Properties back and forth via ICarProperty.
53   * Services that communicate by passing vehicle properties back and forth via ICarProperty should
54   * extend this class.
55   */
56  public class PropertyHalService extends HalServiceBase {

它实现了基本的属性获取接口:

public void subscribeProperty(int mgrPropId, float rate)

它转发从底层获取来的属性变化消息:

public void onHalEvents(List<VehiclePropValue> values)

3. CarPropertyService 的重要接口介绍

3.1 CarPropertyService–registerListener接口的时序图

http://www.xdnf.cn/news/9374.html

相关文章:

  • 【FAQ】spring boot 3 集成 nacos
  • pgsql 查看每张表大小
  • 创建vue项目
  • 3D Web轻量化引擎HOOPS Communicator实时协作功能深度解析
  • 小黑黑大模型应用日常摸索中:初次使用langchain智能体调用工具,准备继续深入
  • 题解——相交链表(力扣160 easy)
  • Java研学-MybatisPlus(三)
  • 磁盘管理练习题
  • 《Python基础》第1期:人生苦短,我用Python
  • Java基础 5.27
  • Oracle初识
  • 遗传算法简明指南:思路解析与C++实现
  • C++优先队列(priority_queue)使用详解
  • 计算机系统结构-第四章节-背诵
  • 使用Auto-Coder对js文件进行审计并修复漏洞1.3 1.4 1.5版本
  • BugKu Web渗透之Post
  • Python 实现简易版的文件管理(结合网络编程)
  • linux kernel 内存回收水位线调整方法
  • 第九章 Java基础-集合
  • 鸿蒙OSUniApp 制作简洁的用户个人中心页面#三方框架 #Uniapp
  • 【Springboot+LangChain4j】实现多轮对话,即记忆对话功能
  • v4.0 论文投稿-Latex论文投稿注意事项
  • 基于Alibaba Cloud Linux + 宝塔面板安装 LibreOffice 全攻略流程
  • 怎么实现pid隔离
  • 海信IP810N-72UB0贵州联通原机分区备份包
  • mysql 合集
  • TLE9893-2QKW62S新建Keil MDK工程
  • cursor使用mcp
  • 智能门禁的项目
  • 用 Python 打造你的专属虚拟试衣间!——AI+AR 如何改变时尚体验