ubuntu 16.04 配置ibeo SDK boost1_59_0 without mongodb

来源:互联网 发布:阿里云os应用下载 编辑:程序博客网 时间:2024/06/05 14:42

参考ibeoSDk README 手册

 无MONGODB版

 ubuntu 16.04  boost 1_59_0

 1. 生成ibeoSDK liberary

    进入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).


2.使用官方DEMO

   demo 保存在IbeoSDK/src/demo

   进入文件夹  具体程序目的查看该文件夹下README文档


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;



原创粉丝点击