ubuntu 16.04 配置ibeo SDK boost1_59_0 without mongodb

这篇博客详细介绍了如何在Ubuntu 16.04上配置ibeo SDK,特别是针对boost 1_59_0版本,且不包含MongoDB的设置。首先,通过执行make命令生成static或shared library,然后运行官方DEMO,并给出了调用DEMO的格式。最后,指导读者如何编写程序,选择合适的头文件,创建并注册监听器,以及注意事项,如使用--whole-archive链接选项避免类名冲突。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

参考ibeoSDk README 手册

 无MONGODB版

 ubuntu 16.04  boost 1_59_0

 1. 生成ibeoSDK library

打开SHELL窗口    

进入SDK所在文件夹

      make static  生成 static liberary 或者   make shared 生成shared library 

    make 可用选项

    shared       Build ibeosdk as shared library
    shareddemos  Build ibeosdk as shared library and demos using the shared library (demo binary will end with suffix _shared).
    static       Build ibeosdk as static library
    staticdemos  Build ibeosdk as static library and demos using  the shared library (demo binary will end with suffix _static).
    clean        Delete all object files and dependency files (*.o .d) and demo binaries.
    democlean    Delete all demo binaries and demo object files and dependence  files.
    distclean    Like clean and the libs folder will be erased as well
    docs         Create a documentation from the doxygen comments. The result  can be found in docs/html/index.html
    docsclean    Delete all generated documentation.
    all          Will generate the ibeosdk object files (static flags) and link them directly to the demo binaries (no lib will be generated,   demo binaries won't have a suffix).

生成的库文件将存储在IbeoSDK/libs

2.使用官方DEMO

   进入SDK所在的根目录 ,

mkdir build
cd build
cmake ..

生成的Demo存放在ibeosdk/src/demo 

以   ./ Demo_name  IP地址   的格式调用即可。

3.编写程序

 根据所连接的设备,对应选择头文件:

  IbeoLux include:     <ibeosdk/lux.hpp>
  IbeoEcu include:     <ibeosdk/ecu.hpp>
  IbeoScala include:   <ibeosdk/scala.hpp>
  IbeoMiniLux include: <iboesdk/minilux.hpp>IbeoSdkEcuLiveDemo:
AllEcuListener where all listeners gathered into one single class)

选择你所感兴趣的信号类型,建立相应的listenr类(参照IbeoSDKFIleDemo中的MyScanListener, MyObjectListener ,在IbeoSdkEcuLiveDemo:
所有的listener集中于AllEcuListener )

步骤:

1. Create the listener objects.
2. Create the IbeoDevice providing the IP address and port as parameters.
3. Optional: Set the devices LogFileManger
4. Register all listener
5. Establish connection between the hardware and the IbeoDevice class.

注意:

通过调用exit(cstdlib)退出程序。

如果建立的是静态libibeosdk 在linux需要通过link选项连接 --whole-archive (g++ 命令行使用”-WI,--whole-archive);

为了避免类名称冲突 不要使用using namespace ibeosdk;



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值