Skip to content

Commit

Permalink
Merge pull request #1 from Lagavulin9/main
Browse files Browse the repository at this point in the history
Updates in commonAPI version and cmake
  • Loading branch information
kianwasabi authored Dec 13, 2023
2 parents d70147b + f5e03e5 commit ae4bd21
Show file tree
Hide file tree
Showing 17 changed files with 51 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codegenerator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
- name: 2) Download CommonAPI Core Generator.
run: |
wget https://github.com/COVESA/capicxx-core-tools/releases/download/3.2.0.1/commonapi_core_generator.zip
wget https://github.com/COVESA/capicxx-core-tools/releases/download/3.2.14/commonapi_core_generator.zip
unzip commonapi_core_generator.zip -d ${{ github.workspace }}/core-generator
- name: 3) Download CommonAPI vSOME/IP Generator.
run: |
wget https://github.com/COVESA/capicxx-someip-tools/releases/download/3.2.0.1/commonapi_someip_generator.zip
wget https://github.com/COVESA/capicxx-someip-tools/releases/download/3.2.14/commonapi_someip_generator.zip
unzip commonapi_someip_generator.zip -d ${{ github.workspace }}/someip-generator
- name: 4) Generate CommonAPI Code from Core Generator.
Expand Down
32 changes: 21 additions & 11 deletions car_info/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
cmake_minimum_required (VERSION 3.0)
set(PROJ_NAME Car_Info)
project(${PROJ_NAME})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}-pthread -std=c++11 -fsanitize=thread -g ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -std=c++11")

### PACKAGES ###
find_package(Python3 COMPONENTS Development)
Expand All @@ -21,21 +21,25 @@ set(SOMEIP_RUNTIME_DIR ~/capicxx-someip-runtime)
set(VSOMEIP_DIR ~/vsomeip)
set(COMMONAPI_INTERFACE_VER v0/commonapi)

FILE(GLOB PRJ_SOMEIP_LIB_SRCS ./src-gen/someip/v0/commonapi/*.cpp)

### DIRECTORIES ###
include_directories(
./include
./src-gen/core
./src-gen/someip
${Python3_INCLUDE_DIRS}
${CORE_GEN_SRC_DIR}
${SOMEIP_GEN_SRC_DIR}
${SOMEIP_RUNTIME_DIR}/include
${CORE_RUNTIME_DIR}/include
${VSOMEIP_DIR}/include
${COMMONAPI_INCLUDE_DIRS}
${COMMONAPI_SOMEIP_INCLUDE_DIRS}
)

link_directories(
${SOMEIP_RUNTIME_DIR}/build
${CORE_RUNTIME_DIR}/build
${VSOMEIP_DIR}/build
${COMMONAPI_LIBDIR}
${COMMONAPI_SOMEIP_CMAKE_DIR}/build
${Boost_LIBRARY_DIR}
# ${SOMEIP_RUNTIME_DIR}/build
# ${CORE_RUNTIME_DIR}/build
# ${VSOMEIP_DIR}/build
)

### BUILD ###
Expand All @@ -44,8 +48,6 @@ add_executable(CarInfoService
${PRJ_SRC_VAR}/PiRacer.cpp
${PRJ_SRC_VAR}/CarInfoService.cpp
${PRJ_SRC_VAR}/CarInfoStubImpl.cpp
${SOMEIP_GEN_SRC_DIR}/${COMMONAPI_INTERFACE_VER}/CarInfoSomeIPStubAdapter.cpp
${SOMEIP_GEN_SRC_DIR}/${COMMONAPI_INTERFACE_VER}/CarInfoSomeIPDeployment.cpp
)
target_link_libraries(CarInfoService
CommonAPI
Expand All @@ -65,3 +67,11 @@ target_link_libraries(CarInfoClient
CommonAPI-SomeIP
vsomeip3
)

add_library(CarInfoService-someip
SHARED ${PRJ_SOMEIP_LIB_SRCS}
)
target_link_libraries(CarInfoService-someip
CommonAPI
CommonAPI-SomeIP
)
2 changes: 1 addition & 1 deletion car_info/src-gen/core/v0/commonapi/CarInfo.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.core 3.2.0.v202012010850.
* Used org.genivi.commonapi.core 3.2.14.v202310241605.
* Used org.franca.core 0.13.1.201807231814.
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
Expand Down
4 changes: 2 additions & 2 deletions car_info/src-gen/core/v0/commonapi/CarInfoProxy.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.core 3.2.0.v202012010850.
* Used org.genivi.commonapi.core 3.2.14.v202310241605.
* Used org.franca.core 0.13.1.201807231814.
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
Expand Down Expand Up @@ -38,7 +38,7 @@ class CarInfoProxy
CarInfoProxy(std::shared_ptr<CommonAPI::Proxy> delegate);
~CarInfoProxy();

typedef CarInfo InterfaceType;
typedef ::v0::commonapi::CarInfo InterfaceType;


/**
Expand Down
2 changes: 1 addition & 1 deletion car_info/src-gen/core/v0/commonapi/CarInfoProxyBase.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.core 3.2.0.v202012010850.
* Used org.genivi.commonapi.core 3.2.14.v202310241605.
* Used org.franca.core 0.13.1.201807231814.
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
Expand Down
4 changes: 2 additions & 2 deletions car_info/src-gen/core/v0/commonapi/CarInfoStub.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.core 3.2.0.v202012010850.
* Used org.genivi.commonapi.core 3.2.14.v202310241605.
* Used org.franca.core 0.13.1.201807231814.
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
Expand Down Expand Up @@ -131,7 +131,7 @@ class CarInfoStub
typedef CommonAPI::Stub<CarInfoStubAdapter, CarInfoStubRemoteEvent>::StubAdapterType StubAdapterType;
typedef CommonAPI::Stub<CarInfoStubAdapter, CarInfoStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType;
typedef CarInfoStubRemoteEvent RemoteEventType;
typedef CarInfo StubInterface;
typedef ::v0::commonapi::CarInfo StubInterface;
};

} // namespace commonapi
Expand Down
2 changes: 1 addition & 1 deletion car_info/src-gen/core/v0/commonapi/CarInfoStubDefault.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.core 3.2.0.v202012010850.
* Used org.genivi.commonapi.core 3.2.14.v202310241605.
* Used org.franca.core 0.13.1.201807231814.
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
Expand Down
2 changes: 1 addition & 1 deletion car_info/src-gen/core/v0/commonapi/CommonTypes.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.core 3.2.0.v202012010850.
* Used org.genivi.commonapi.core 3.2.14.v202310241605.
* Used org.franca.core 0.13.1.201807231814.
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"commonapi.CarInfo" : {
"service_id": 5000,
"instances" : {
"commonapi.CarInfo": 5001
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.someip 3.2.0.v202012010944.
* Used org.genivi.commonapi.someip 3.2.14.v202310241606.
* Used org.franca.core 0.13.1.201807231814.
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.someip 3.2.0.v202012010944.
* Used org.genivi.commonapi.someip 3.2.14.v202310241606.
* Used org.franca.core 0.13.1.201807231814.
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
Expand Down
5 changes: 2 additions & 3 deletions car_info/src-gen/someip/v0/commonapi/CarInfoSomeIPProxy.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.someip 3.2.0.v202012010944.
* Used org.genivi.commonapi.someip 3.2.14.v202310241606.
* Used org.franca.core 0.13.1.201807231814.
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
Expand Down Expand Up @@ -52,7 +52,6 @@ CarInfoSomeIPProxy::CarInfoSomeIPProxy(
}

CarInfoSomeIPProxy::~CarInfoSomeIPProxy() {
completed_.set_value();
}

CarInfoSomeIPProxy::BatteryAttribute& CarInfoSomeIPProxy::getBatteryAttribute() {
Expand All @@ -66,7 +65,7 @@ void CarInfoSomeIPProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownV
}

std::future<void> CarInfoSomeIPProxy::getCompletionFuture() {
return completed_.get_future();
return CommonAPI::SomeIP::Proxy::getCompletionFuture();
}

} // namespace commonapi
Expand Down
3 changes: 1 addition & 2 deletions car_info/src-gen/someip/v0/commonapi/CarInfoSomeIPProxy.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.someip 3.2.0.v202012010944.
* Used org.genivi.commonapi.someip 3.2.14.v202310241606.
* Used org.franca.core 0.13.1.201807231814.
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
Expand Down Expand Up @@ -64,7 +64,6 @@ class CarInfoSomeIPProxy
private:
CommonAPI::SomeIP::ObservableAttribute<CommonAPI::SomeIP::ReadonlyAttribute<BatteryAttribute, ::v0::commonapi::CommonTypes_::batteryStructDeployment_t>> battery_;

std::promise<void> completed_;
};

} // namespace commonapi
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.someip 3.2.0.v202012010944.
* Used org.genivi.commonapi.someip 3.2.14.v202310241606.
* Used org.franca.core 0.13.1.201807231814.
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.someip 3.2.0.v202012010944.
* Used org.genivi.commonapi.someip 3.2.14.v202310241606.
* Used org.franca.core 0.13.1.201807231814.
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
Expand Down Expand Up @@ -79,7 +79,7 @@ class CarInfoSomeIPStubAdapterInternal
_stub->hasElement(0))
{
CarInfoSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x13ed) }, &getBatteryAttributeStubDispatcher );
std::shared_ptr<CommonAPI::SomeIP::ClientId> itsClient = std::make_shared<CommonAPI::SomeIP::ClientId>(0xFFFF, 0xFFFFFFFF, 0xFFFFFFFF);
std::shared_ptr<CommonAPI::SomeIP::ClientId> itsClient = std::make_shared<CommonAPI::SomeIP::ClientId>();

// Provided events/fields
if (_stub->hasElement(0)) {
Expand Down Expand Up @@ -118,10 +118,12 @@ void CarInfoSomeIPStubAdapterInternal<_Stub, _Stubs...>::fireBatteryAttributeCha

template <typename _Stub, typename... _Stubs>
void CarInfoSomeIPStubAdapterInternal<_Stub, _Stubs...>::registerSelectiveEventHandlers() {

}

template <typename _Stub, typename... _Stubs>
void CarInfoSomeIPStubAdapterInternal<_Stub, _Stubs...>::unregisterSelectiveEventHandlers() {

}

template <typename _Stub = ::v0::commonapi::CarInfoStub, typename... _Stubs>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

/*
* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.someip 3.2.0.v202012010944.
* Used org.genivi.commonapi.someip 3.2.14.v202310241606.
* Used org.franca.core 0.13.1.201807231814.
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file was generated by the CommonAPI Generators.
* Used org.genivi.commonapi.someip 3.2.0.v202012010944.
* Used org.genivi.commonapi.someip 3.2.14.v202310241606.
* Used org.franca.core 0.13.1.201807231814.
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
Expand Down

0 comments on commit ae4bd21

Please sign in to comment.