vsomeip客户端/服务端大致运行流程
vsomeip客户端:
===================== 初始化 =====================
1. 初始化app (init)
2. 注册routing状态回调 (app是否注册到routingmanager, register_state_handler)
3. 注册消息处理回调 (response/event, register_message_handler)
4. 注册service/instance状态回调 (avaliable/unavaliable, register_availability_handler)
5. 向routingmanager注册event (request_event)
6. 向routingmanager订阅事件组 (subscribe)
====================== 启动 ======================
7. 启动app (start)
8. 当app注册到routingmanager后,向routingmanager请求服务实例 (request_service)
====================== 停止 ======================
8. 清除2,3,4步骤注册的状态回调函数 (clear_all_handler)
9. 向routingmanager取消event的注册 (release_event)
10. 向routingmanager释放服务实例 (release_service)
11. 停止app (stop)
vsomeip服务端:
===================== 初始化 =====================
1. 初始化app (init)
2. 注册routing状态回调 (app是否注册到routingmanager, register_state_handler)
3. 注册消息处理回调 (request, register_message_handler)
====================== 启动 ======================
4. 启动app (start)
5. 当app注册到routingmanager后,发布服务实例,事件,属性 (offer_service, offer_event[ET_EVENT/ET_FIELD])
6. 在消息处理回调函数中处理request请求
7. 回复响应 (create_response, set_payload, send)
8. 发布事件/属性值变更 (create_payload, notify)
====================== 停止 ======================
9. 停止发布服务实例 (stop_offer_service)
10. 清除2,3步骤注册的状态回调函数 (clear_all_handler)
11. 停止app (stop)