Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Replace old directory names with new (GitHub) names

...

Code Block
languagebash
themeEmacs
titleClone CommonAPI SOME/IP
x@ubuntu:~/work$ git clone https://github.com/GENIVI/capicxx-someip-runtime.git

Cloning into 'cppcapicxx-someip-runtime'...
remote: Counting objects: 95, done.
remote: Compressing objects: 100% (88/88), done.
remote: Total 95 (delta 17), reused 0 (delta 0)
Unpacking objects: 100% (95/95), done.
Checking connectivity... done.
x@ubuntu:~/work$ ls
commoncapicxx-apicore-runtime  cppcapicxx-someip-runtime

Just as CommonAPI C++ D-Bus requires the D-Bus library libdbus, the SOME/IP binding builds on the SOME/IP core library vsomeip. Fortunately. the source code of this library can be easily downloaded by cloning the vsomeip repository on GitHub.

Code Block
languagebash
themeEmacs
titleGet vsomeip
x@ubuntu:~/work$ git clone http://github.com/GENIVI/vSomeIP.git 
x@ubuntu:~/work$ ls
commoncapicxx-apicore-runtime  cppcapicxx-someip-runtime  vSomeIP
Note
  • At GENIVI there is another SOME/IP implementation in the repository someip.git. This implementation cannot be used together with cpp capicxx-someip-runtime. Make sure that you cloned the right repository.
  • CommonAPI 3.1.3  depends on vsomeip 1.3.0.

...

Code Block
languagebash
themeEmacs
titleBuild CommonAPI C++ SOME/IP
x@ubuntu:~/work$ cd cppcapicxx-someip-runtime
x@ubuntu:~/work/cppcapicxx-someip-runtime$ mkdir build
x@ubuntu:~/work/cppcapicxx-someip-runtime$ cd build
x@ubuntu:~/work/cppcapicxx-someip-runtime/build$ cmake -DUSE_INSTALLED_COMMONAPI=OFF ..
x@ubuntu:~/work/cppcapicxx-someip-runtime/build$ make

...

Code Block
languagebash
titleCMakeLists.txt
linenumberstrue
cmake_minimum_required(VERSION 2.8)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -std=c++0x")

include_directories(
     src-gen
     ../commoncapicxx-apicore-runtime/include
     ../cppcapicxx-someip-runtime/include
     ../vSomeIP/interface
)

link_directories(
     /home/x/work/commoncapicxx-apicore-runtime/build
     /home/x/work/cppcapicxx-someip-runtime/build
     /home/x/work/vSomeIP/build
)

add_executable(HelloWorldClient
    src/HelloWorldClient.cpp
    src-gen/v1_0/commonapi/HelloWorldSomeIPProxy.cpp
    src-gen/v1_0/commonapi/HelloWorldSomeIPDeployment.cpp
)
target_link_libraries(HelloWorldClient CommonAPI CommonAPI-SomeIP vsomeip)

add_executable(HelloWorldService
    src/HelloWorldService.cpp
    src/HelloWorldStubImpl.cpp
    src-gen/v1_0/commonapi/HelloWorldSomeIPStubAdapter.cpp
    src-gen/v1_0/commonapi/HelloWorldStubDefault.cpp
    src-gen/v1_0/commonapi/HelloWorldSomeIPDeployment.cpp
)
target_link_libraries(HelloWorldService CommonAPI CommonAPI-SomeIP vsomeip) 

...