在Ubuntu上学习BMW中间件capicxx + someip

本文介绍了在Ubuntu 20.04环境下,使用capicxx和someip进行BMW中间件的学习和实践。首先展示了环境配置,包括Ubuntu版本信息。接着,详细列举了涉及的模块,如boost、vsomeip和capicxx等,并给出了服务端和客户端的运行效果。最后,提供了相关软件的下载和编译步骤,以及fidl和fdepl文件的编写示例,帮助读者快速上手capicxx和someip的使用。
摘要由CSDN通过智能技术生成

环境

sice@T:/mnt/capi$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
sice@T:/mnt/capi$

涉及到的模块

boost

vsomeip

capicxx-core-runtime
capicxx-someip-runtime

commonapi_someip_generator

commonapi_core_generator

fidl

fdepl

服务端运行效果

sice@T:/mnt/capi/HelloDemo/build$ ./HelloDemoService
[CAPI][INFO] Loading configuration file '/etc/commonapi.ini'
[CAPI][INFO] Using default binding 'dbus'
[CAPI][INFO] Using default shared library folder '/usr/local/lib/commonapi'
[CAPI][INFO] Registering function for creating "commonapi.HelloDemo:v1_0" stub adapter.
[CAPI][INFO] Registering stub for "local:commonapi.HelloDemo:v1_0:HelloDemo"
2022-09-07 22:11:54.979012 [info] Parsed vsomeip configuration in 0ms
2022-09-07 22:11:54.980294 [info] Configuration module loaded.
2022-09-07 22:11:54.980612 [info] Initializing vsomeip application "".
2022-09-07 22:11:54.981101 [info] Instantiating routing manager [Host].
2022-09-07 22:11:54.982839 [info] create_local_server Routing endpoint at /tmp/vsomeip-0
2022-09-07 22:11:54.984705 [info] Service Discovery enabled. Trying to load module.
2022-09-07 22:11:54.994366 [info] Service Discovery module loaded.
2022-09-07 22:11:54.995462 [info] Application(unnamed, 0100) is initialized (11, 100).
2022-09-07 22:11:54.998068 [info] REGISTER EVENT(0100): [1234.0c98.8001:is_provider=true]
2022-09-07 22:11:54.998487 [info] Starting vsomeip application "" (0100) using 2 threads I/O nice 255
2022-09-07 22:11:54.000317 [info] OFFER(0100): [1234.0c98:1.0] (true)
2022-09-07 22:11:54.003273 [info] Listening at /tmp/vsomeip-100
2022-09-07 22:11:54.004592 [info] Watchdog is disabled!
2022-09-07 22:11:54.004684 [info] main dispatch thread id from application: 0100 () is: 7f0c6217a700 TID: 376806
2022-09-07 22:11:54.008621 [info] io thread id from application: 0100 () is: 7f0c6297b700 TID: 376805
2022-09-07 22:11:54.009112 [info] io thread id from application: 0100 () is: 7f0c60977700 TID: 376809
2022-09-07 22:11:54.003069 [info] shutdown thread id from application: 0100 () is: 7f0c61979700 TID: 376807
2022-09-07 22:11:54.009761 [info] vSomeIP 3.1.20.3 | (default)
2022-09-07 22:11:54.011414 [info] Network interface "lo" state changed: up
2022-09-07 22:11:56.233840 [info] Application/Client 0101 is registering.
2022-09-07 22:11:56.235097 [info] Client [100] is connecting to [101] at /tmp/vsomeip-101
2022-09-07 22:11:56.244275 [info] REGISTERED_ACK(0101)
2022-09-07 22:11:56.248681 [info] REGISTER EVENT(0101): [1234.0c98.8001:is_provider=0:reliability=2]
2022-09-07 22:11:56.324117 [info] REQUEST(0101): [1234.0c98:1.4294967295]
sayHello('Bob'): 'Hello Bob!'
2022-09-07 22:11:56.345602 [info] SUBSCRIBE(0101): [1234.0c98.2225:8001:1]
Service:input:H e l l o ,   i   a m   c l i e n t  v e c t o r : : _ M _ d e f a u l t _ a p p e n d
Service:input:H e l l o ,   i   a m   c l i e n t  v e c t o r : : _ M _ d e f a u l t _ a p p e n d
Service:input:H e l l o ,   i   a m   c l i e n t  v e c t o r : : _ M _ d e f a u l t _ a p p e n d
Service:input:H e l l o ,   i   a m   c l i e n t  v e c t o r : : _ M _ d e f a u l t _ a p p e n d
Service:input:H e l l o ,   i   a m   c l i e n t  v e c t o r : : _ M _ d e f a u l t _ a p p e n d
Service:input:H e l l o ,

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值