diff --git a/ArduinoCAN/README.md b/ArduinoCAN/README.md deleted file mode 100644 index 4f8a9202..00000000 --- a/ArduinoCAN/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# Basic Concepts : - -1. **Pulse:** The sensor used in this code generates a pulse with each rotation. It's assumed here that two pulses are generated per revolution. This pulse is a digital signal produced a set number of times as the sensor completes one full rotation. -2. **Period:** It refers to the time between two consecutive pulses. For instance, if pulses occur every 1ms, then the period is 1ms. -3. **Frequency:** It denotes the number of pulses in a unit of time. It can be calculated as the inverse of the period. For example, if the period is 1ms, then the frequency is 1000Hz or 1kHz. - -# How the Code Works : - -1. **Detecting Pulses:** The attachInterrupt() function is used to detect pulses from the sensor. Every time a pulse is generated, the Pulse_Event() function is invoked. -2. **Calculating the Period:** Inside the Pulse_Event() function, the difference between the time the last pulse occurred (LastTimeWeMeasured) and the time the current pulse occurred (micros()) is calculated to determine the period (PeriodBetweenPulses). -3. **Calculating Frequency:** Within the main loop(), the frequency (FrequencyRaw) is calculated using the average period (PeriodAverage). -4. **Calculating RPM:** As we know the number of pulses per revolution (PulsesPerRevolution), the RPM can be determined using the frequency. This frequency is multiplied by 60 to convert it to revolutions per minute and then divided by the number of pulses per revolution. - -# How does this represent speed? - -Frankly, this code isn't directly measuring "speed." It's measuring the revolutions per minute (RPM), which indicates how many times a wheel rotates in a minute. - -If you know the diameter or circumference of the wheel, you can calculate the actual speed (e.g., km/h or m/s) using the RPM. This calculation would follow the formula: - -Speed=RPM×Circumference - -$$ -Speed = RPM \times Circumference -$$ - -For instance, if the wheel's circumference is 2m and the RPM is 30, the speed would be 3**0 x 2 = 60m/min** or **1m/s**. - -So, while the code doesn't provide speed directly, it offers the foundational rotational data that, combined with additional information (like wheel circumference), can facilitate this. - -If you want to know more about it, go to our "arduino _can" repo diff --git a/CMakeLists.txt b/CMakeLists.txt index cc3cb4f3..2c67eb4f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,37 +1,23 @@ -# Set the minimum required CMake version cmake_minimum_required(VERSION 3.15) - -# Define the project name as DESproject project(DESproject) -# Enable auto UI generation, MOC, and RCC for Qt set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) -# Set C++ standard to C++14 set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) -# set(CMAKE_PREFIX_PATH "/opt/Qt/5.15.0/gcc_64") - -# Append C++ compiler flags, including -pthread and -std=c++0x set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -std=c++0x") - -# Find required Qt5 components (Core, Quick, Gui, Multimedia) find_package(Qt5 COMPONENTS Core Quick Gui Multimedia WaylandCompositor REQUIRED) - -# Find Python libraries find_package(PythonLibs REQUIRED) -# Include Python include directories -include_directories(${PYTHON_INCLUDE_DIRS}) - -# Configure include and link directories include_directories( - src-gen-desproject + ${PYTHON_INCLUDE_DIRS} +) +include_directories( ~/build-commonapi/capicxx-core-runtime/include ~/build-commonapi/capicxx-someip-runtime/include ~/build-commonapi/vsomeip/interface @@ -41,9 +27,86 @@ link_directories( ~/build-commonapi/capicxx-someip-runtime/build ~/build-commonapi/vsomeip/build ) +include_directories( + src-gen/CANSender/core/common + src-gen/CANSender/core/proxy + src-gen/CANSender/core/skel + src-gen/CANSender/core/stub + src-gen/CANSender/someip/common + src-gen/CANSender/someip/proxy + src-gen/CANSender/someip/stub + + src-gen/PiracerSender/core/common + src-gen/PiracerSender/core/proxy + src-gen/PiracerSender/core/skel + src-gen/PiracerSender/core/stub + src-gen/PiracerSender/someip/common + src-gen/PiracerSender/someip/proxy + src-gen/PiracerSender/someip/stub + + src-gen/PiracerController/core/common + src-gen/PiracerController/core/proxy + src-gen/PiracerController/core/skel + src-gen/PiracerController/core/stub + src-gen/PiracerController/someip/common + src-gen/PiracerController/someip/proxy + src-gen/PiracerController/someip/stub + + src-gen/IPCManager/core/common + src-gen/IPCManager/core/proxy + src-gen/IPCManager/core/skel + src-gen/IPCManager/core/stub + src-gen/IPCManager/someip/common + src-gen/IPCManager/someip/proxy + src-gen/IPCManager/someip/stub + + src-gen/InstrumentCluster/core/common + src-gen/InstrumentCluster/core/proxy + src-gen/InstrumentCluster/core/skel + src-gen/InstrumentCluster/core/stub + src-gen/InstrumentCluster/someip/common + src-gen/InstrumentCluster/someip/proxy + src-gen/InstrumentCluster/someip/stub + + src-gen/HeadUnit/core/common + src-gen/HeadUnit/core/proxy + src-gen/HeadUnit/core/skel + src-gen/HeadUnit/core/stub + src-gen/HeadUnit/someip/common + src-gen/HeadUnit/someip/proxy + src-gen/HeadUnit/someip/stub + + src-gen/PDCUnit/core/common + src-gen/PDCUnit/core/proxy + src-gen/PDCUnit/core/skel + src-gen/PDCUnit/core/stub + src-gen/PDCUnit/someip/common + src-gen/PDCUnit/someip/proxy + src-gen/PDCUnit/someip/stub + + src-gen/IVICompositor/core/common + src-gen/IVICompositor/core/proxy + src-gen/IVICompositor/core/skel + src-gen/IVICompositor/core/stub + src-gen/IVICompositor/someip/common + src-gen/IVICompositor/someip/proxy + src-gen/IVICompositor/someip/stub + + src-gen/RemoteSpeaker/core/common + src-gen/RemoteSpeaker/core/proxy + src-gen/RemoteSpeaker/core/skel + src-gen/RemoteSpeaker/core/stub + src-gen/RemoteSpeaker/someip/common + src-gen/RemoteSpeaker/someip/proxy + src-gen/RemoteSpeaker/someip/stub +) + + +set(SOMEIP_PROXY_PATH someip/proxy/v1/commonapi/) +set(SOMEIP_DEPLOYMENT_PATH someip/common/v1/commonapi/) +set(SOMEIP_STUBADAPTER_PATH someip/stub/v1/commonapi/) -# Create executables and link libraries for the CANSender, PiracerSender, PiracerController, IPCManager, InstrumentCluster, HeadUnit, PDCUnit and IVICompositor targets add_executable(CANSender src/CANSender/CANSender.cpp src/CANSender/ReadCANThread.c @@ -51,10 +114,10 @@ add_executable(CANSender src/CANSender/DistanceBuffer.c src/CANSender/SendSomeipThread.cpp src/CANSender/CANSenderStubImpl.cpp - src-gen-desproject/v1/commonapi/IPCManagerSomeIPProxy.cpp - src-gen-desproject/v1/commonapi/IPCManagerSomeIPDeployment.cpp - src-gen-desproject/v1/commonapi/CANSenderSomeIPStubAdapter.cpp - src-gen-desproject/v1/commonapi/CANSenderSomeIPDeployment.cpp + src-gen/IPCManager/${SOMEIP_PROXY_PATH}/IPCManagerSomeIPProxy.cpp + src-gen/IPCManager/${SOMEIP_DEPLOYMENT_PATH}/IPCManagerSomeIPDeployment.cpp + src-gen/CANSender/${SOMEIP_STUBADAPTER_PATH}/CANSenderSomeIPStubAdapter.cpp + src-gen/CANSender/${SOMEIP_DEPLOYMENT_PATH}/CANSenderSomeIPDeployment.cpp ) target_link_libraries(CANSender CommonAPI CommonAPI-SomeIP vsomeip3) @@ -62,10 +125,10 @@ add_executable(PiracerSender src/PiracerSender/PiracerSender.cpp src/PiracerSender/PiracerClass.cpp src/PiracerSender/PiracerSenderStubImpl.cpp - src-gen-desproject/v1/commonapi/IPCManagerSomeIPProxy.cpp - src-gen-desproject/v1/commonapi/IPCManagerSomeIPDeployment.cpp - src-gen-desproject/v1/commonapi/PiracerSenderSomeIPStubAdapter.cpp - src-gen-desproject/v1/commonapi/PiracerSenderSomeIPDeployment.cpp + src-gen/IPCManager/${SOMEIP_PROXY_PATH}/IPCManagerSomeIPProxy.cpp + src-gen/IPCManager/${SOMEIP_DEPLOYMENT_PATH}/IPCManagerSomeIPDeployment.cpp + src-gen/PiracerSender/${SOMEIP_STUBADAPTER_PATH}/PiracerSenderSomeIPStubAdapter.cpp + src-gen/PiracerSender/${SOMEIP_DEPLOYMENT_PATH}/PiracerSenderSomeIPDeployment.cpp ) target_link_libraries(PiracerSender ${PYTHON_LIBRARIES} CommonAPI CommonAPI-SomeIP vsomeip3) @@ -73,10 +136,10 @@ add_executable(PiracerController src/PiracerController/PiracerController.cpp src/PiracerController/PiracerControllerStubImpl.cpp src/PiracerController/ControllerClass.cpp - src-gen-desproject/v1/commonapi/IPCManagerSomeIPProxy.cpp - src-gen-desproject/v1/commonapi/IPCManagerSomeIPDeployment.cpp - src-gen-desproject/v1/commonapi/PiracerControllerSomeIPStubAdapter.cpp - src-gen-desproject/v1/commonapi/PiracerControllerSomeIPDeployment.cpp + src-gen/IPCManager/${SOMEIP_PROXY_PATH}/IPCManagerSomeIPProxy.cpp + src-gen/IPCManager/${SOMEIP_DEPLOYMENT_PATH}/IPCManagerSomeIPDeployment.cpp + src-gen/PiracerController/${SOMEIP_STUBADAPTER_PATH}/PiracerControllerSomeIPStubAdapter.cpp + src-gen/PiracerController/${SOMEIP_DEPLOYMENT_PATH}/PiracerControllerSomeIPDeployment.cpp ) target_link_libraries(PiracerController ${PYTHON_LIBRARIES} CommonAPI CommonAPI-SomeIP vsomeip3) @@ -85,24 +148,24 @@ add_executable(IPCManager src/IPCManager/IPCManagerStubImpl.cpp src/IPCManager/IPCManagerSenderClass.cpp src/IPCManager/PiracerClass.cpp - src-gen-desproject/v1/commonapi/CANSenderSomeIPProxy.cpp - src-gen-desproject/v1/commonapi/CANSenderSomeIPDeployment.cpp - src-gen-desproject/v1/commonapi/PiracerSenderSomeIPProxy.cpp - src-gen-desproject/v1/commonapi/PiracerSenderSomeIPDeployment.cpp - src-gen-desproject/v1/commonapi/PiracerControllerSomeIPProxy.cpp - src-gen-desproject/v1/commonapi/PiracerControllerSomeIPDeployment.cpp - src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPProxy.cpp - src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPDeployment.cpp - src-gen-desproject/v1/commonapi/HeadUnitSomeIPProxy.cpp - src-gen-desproject/v1/commonapi/HeadUnitSomeIPDeployment.cpp - src-gen-desproject/v1/commonapi/PDCUnitSomeIPProxy.cpp - src-gen-desproject/v1/commonapi/PDCUnitSomeIPDeployment.cpp - src-gen-desproject/v1/commonapi/IVICompositorSomeIPProxy.cpp - src-gen-desproject/v1/commonapi/IVICompositorSomeIPDeployment.cpp - src-gen-desproject/v1/commonapi/RemoteSpeakerSomeIPProxy.cpp - src-gen-desproject/v1/commonapi/RemoteSpeakerSomeIPDeployment.cpp - src-gen-desproject/v1/commonapi/IPCManagerSomeIPStubAdapter.cpp - src-gen-desproject/v1/commonapi/IPCManagerSomeIPDeployment.cpp + src-gen/CANSender/${SOMEIP_PROXY_PATH}/CANSenderSomeIPProxy.cpp + src-gen/CANSender/${SOMEIP_DEPLOYMENT_PATH}/CANSenderSomeIPDeployment.cpp + src-gen/PiracerSender/${SOMEIP_PROXY_PATH}/PiracerSenderSomeIPProxy.cpp + src-gen/PiracerSender/${SOMEIP_DEPLOYMENT_PATH}/PiracerSenderSomeIPDeployment.cpp + src-gen/PiracerController/${SOMEIP_PROXY_PATH}/PiracerControllerSomeIPProxy.cpp + src-gen/PiracerController/${SOMEIP_DEPLOYMENT_PATH}/PiracerControllerSomeIPDeployment.cpp + src-gen/InstrumentCluster/${SOMEIP_PROXY_PATH}/InstrumentClusterSomeIPProxy.cpp + src-gen/InstrumentCluster/${SOMEIP_DEPLOYMENT_PATH}/InstrumentClusterSomeIPDeployment.cpp + src-gen/HeadUnit/${SOMEIP_PROXY_PATH}/HeadUnitSomeIPProxy.cpp + src-gen/HeadUnit/${SOMEIP_DEPLOYMENT_PATH}/HeadUnitSomeIPDeployment.cpp + src-gen/PDCUnit/${SOMEIP_PROXY_PATH}/PDCUnitSomeIPProxy.cpp + src-gen/PDCUnit/${SOMEIP_DEPLOYMENT_PATH}/PDCUnitSomeIPDeployment.cpp + src-gen/IVICompositor/${SOMEIP_PROXY_PATH}/IVICompositorSomeIPProxy.cpp + src-gen/IVICompositor/${SOMEIP_DEPLOYMENT_PATH}/IVICompositorSomeIPDeployment.cpp + src-gen/RemoteSpeaker/${SOMEIP_PROXY_PATH}/RemoteSpeakerSomeIPProxy.cpp + src-gen/RemoteSpeaker/${SOMEIP_DEPLOYMENT_PATH}/RemoteSpeakerSomeIPDeployment.cpp + src-gen/IPCManager/${SOMEIP_STUBADAPTER_PATH}/IPCManagerSomeIPStubAdapter.cpp + src-gen/IPCManager/${SOMEIP_DEPLOYMENT_PATH}/IPCManagerSomeIPDeployment.cpp ) target_link_libraries(IPCManager ${PYTHON_LIBRARIES} CommonAPI CommonAPI-SomeIP vsomeip3) @@ -112,10 +175,10 @@ add_executable(InstrumentCluster src/InstrumentCluster/InstrumentClusterSenderClass.cpp src/InstrumentCluster/InstrumentClusterQtClass.cpp src/InstrumentCluster/qml.qrc - src-gen-desproject/v1/commonapi/IPCManagerSomeIPProxy.cpp - src-gen-desproject/v1/commonapi/IPCManagerSomeIPDeployment.cpp - src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPStubAdapter.cpp - src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPDeployment.cpp + src-gen/IPCManager/${SOMEIP_PROXY_PATH}/IPCManagerSomeIPProxy.cpp + src-gen/IPCManager/${SOMEIP_DEPLOYMENT_PATH}/IPCManagerSomeIPDeployment.cpp + src-gen/InstrumentCluster/${SOMEIP_STUBADAPTER_PATH}/InstrumentClusterSomeIPStubAdapter.cpp + src-gen/InstrumentCluster/${SOMEIP_DEPLOYMENT_PATH}/InstrumentClusterSomeIPDeployment.cpp ) target_compile_definitions(InstrumentCluster PRIVATE $<$,$>:QT_QML_DEBUG>) @@ -128,10 +191,10 @@ add_executable(HeadUnit src/HeadUnit/HeadUnitQtClass.cpp src/HeadUnit/HeadUnitSenderClass.cpp src/HeadUnit/qml.qrc - src-gen-desproject/v1/commonapi/IPCManagerSomeIPProxy.cpp - src-gen-desproject/v1/commonapi/IPCManagerSomeIPDeployment.cpp - src-gen-desproject/v1/commonapi/HeadUnitSomeIPStubAdapter.cpp - src-gen-desproject/v1/commonapi/HeadUnitSomeIPDeployment.cpp + src-gen/IPCManager/${SOMEIP_PROXY_PATH}/IPCManagerSomeIPProxy.cpp + src-gen/IPCManager/${SOMEIP_DEPLOYMENT_PATH}/IPCManagerSomeIPDeployment.cpp + src-gen/HeadUnit/${SOMEIP_STUBADAPTER_PATH}/HeadUnitSomeIPStubAdapter.cpp + src-gen/HeadUnit/${SOMEIP_DEPLOYMENT_PATH}/HeadUnitSomeIPDeployment.cpp ) target_compile_definitions(HeadUnit PRIVATE $<$,$>:QT_QML_DEBUG>) @@ -144,10 +207,10 @@ add_executable(PDCUnit src/PDCUnit/PDCUnitQtClass.cpp src/PDCUnit/PDCUnitSenderClass.cpp src/PDCUnit/qml.qrc - src-gen-desproject/v1/commonapi/IPCManagerSomeIPProxy.cpp - src-gen-desproject/v1/commonapi/IPCManagerSomeIPDeployment.cpp - src-gen-desproject/v1/commonapi/PDCUnitSomeIPStubAdapter.cpp - src-gen-desproject/v1/commonapi/PDCUnitSomeIPDeployment.cpp + src-gen/IPCManager/${SOMEIP_PROXY_PATH}/IPCManagerSomeIPProxy.cpp + src-gen/IPCManager/${SOMEIP_DEPLOYMENT_PATH}/IPCManagerSomeIPDeployment.cpp + src-gen/PDCUnit/${SOMEIP_STUBADAPTER_PATH}/PDCUnitSomeIPStubAdapter.cpp + src-gen/PDCUnit/${SOMEIP_DEPLOYMENT_PATH}/PDCUnitSomeIPDeployment.cpp ) target_compile_definitions(PDCUnit PRIVATE $<$,$>:QT_QML_DEBUG>) @@ -159,10 +222,10 @@ add_executable(IVICompositor src/IVICompositor/IVICompositorStubImpl.cpp src/IVICompositor/IVICompositorQtClass.cpp src/IVICompositor/qml.qrc - src-gen-desproject/v1/commonapi/IPCManagerSomeIPProxy.cpp - src-gen-desproject/v1/commonapi/IPCManagerSomeIPDeployment.cpp - src-gen-desproject/v1/commonapi/IVICompositorSomeIPStubAdapter.cpp - src-gen-desproject/v1/commonapi/IVICompositorSomeIPDeployment.cpp + src-gen/IPCManager/${SOMEIP_PROXY_PATH}/IPCManagerSomeIPProxy.cpp + src-gen/IPCManager/${SOMEIP_DEPLOYMENT_PATH}/IPCManagerSomeIPDeployment.cpp + src-gen/IVICompositor/${SOMEIP_STUBADAPTER_PATH}/IVICompositorSomeIPStubAdapter.cpp + src-gen/IVICompositor/${SOMEIP_DEPLOYMENT_PATH}/IVICompositorSomeIPDeployment.cpp ) target_compile_definitions(IVICompositor PRIVATE $<$,$>:QT_QML_DEBUG>) @@ -173,9 +236,9 @@ add_executable(RemoteSpeaker src/RemoteSpeaker/RemoteSpeaker.cpp src/RemoteSpeaker/RemoteSpeakerStubImpl.cpp src/RemoteSpeaker/DataBuffer.cpp - src-gen-desproject/v1/commonapi/IPCManagerSomeIPProxy.cpp - src-gen-desproject/v1/commonapi/IPCManagerSomeIPDeployment.cpp - src-gen-desproject/v1/commonapi/RemoteSpeakerSomeIPStubAdapter.cpp - src-gen-desproject/v1/commonapi/RemoteSpeakerSomeIPDeployment.cpp + src-gen/IPCManager/${SOMEIP_PROXY_PATH}/IPCManagerSomeIPProxy.cpp + src-gen/IPCManager/${SOMEIP_DEPLOYMENT_PATH}/IPCManagerSomeIPDeployment.cpp + src-gen/RemoteSpeaker/${SOMEIP_STUBADAPTER_PATH}/RemoteSpeakerSomeIPStubAdapter.cpp + src-gen/RemoteSpeaker/${SOMEIP_DEPLOYMENT_PATH}/RemoteSpeakerSomeIPDeployment.cpp ) target_link_libraries(RemoteSpeaker CommonAPI CommonAPI-SomeIP vsomeip3) diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..3b7b82d0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,427 @@ +Attribution-ShareAlike 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More_considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution-ShareAlike 4.0 International Public +License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution-ShareAlike 4.0 International Public License ("Public +License"). To the extent this Public License may be interpreted as a +contract, You are granted the Licensed Rights in consideration of Your +acceptance of these terms and conditions, and the Licensor grants You +such rights in consideration of benefits the Licensor receives from +making the Licensed Material available under these terms and +conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. BY-SA Compatible License means a license listed at + creativecommons.org/compatiblelicenses, approved by Creative + Commons as essentially the equivalent of this Public License. + + d. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + e. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + f. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + g. License Elements means the license attributes listed in the name + of a Creative Commons Public License. The License Elements of this + Public License are Attribution and ShareAlike. + + h. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + i. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + j. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + k. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + l. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + m. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. Additional offer from the Licensor -- Adapted Material. + Every recipient of Adapted Material from You + automatically receives an offer from the Licensor to + exercise the Licensed Rights in the Adapted Material + under the conditions of the Adapter's License You apply. + + c. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + b. ShareAlike. + + In addition to the conditions in Section 3(a), if You Share + Adapted Material You produce, the following conditions also apply. + + 1. The Adapter's License You apply must be a Creative Commons + license with the same License Elements, this version or + later, or a BY-SA Compatible License. + + 2. You must include the text of, or the URI or hyperlink to, the + Adapter's License You apply. You may satisfy this condition + in any reasonable manner based on the medium, means, and + context in which You Share Adapted Material. + + 3. You may not offer or impose any additional or different terms + or conditions on, or apply any Effective Technological + Measures to, Adapted Material that restrict exercise of the + rights granted under the Adapter's License You apply. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material, + + including for purposes of Section 3(b); and + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/README.md b/README.md new file mode 100644 index 00000000..779953fa --- /dev/null +++ b/README.md @@ -0,0 +1,148 @@ +# **In-Vehicle Infotainment** + +--- + +# Result + +https://github.com/SEA-ME-COSS/In-Vehicle-Infotainment/assets/138571365/dcbd66a4-180e-49f2-ae53-7439cfcd650e + + +If you want to check out more clearly, [click me!](https://www.youtube.com/watch?v=rZjfliSumWo) + +# Introduction + + + + + + + +
+ + Yocto Logo + + + + Qt Logo + + + + Covesa Logo + +
+ +This repository presents of developing the In-Vehicle-Infotainment system for the PiRacer vehicle. Through the design of IPC mechanisms, it enables the implementation of functionalities on a Raspberry Pi4 that closely resemble those found in a real vehicle. + +This project is the final compilation of the 'DES Project’. The 'DES Project' stands for Distributed Embedded Systems. The main focus of this In-Vehicle Infotainment project is to create an infotainment system in an environment similar to an actual vehicle using Qt, an embedded GUI development application, and COVESA's vsomeip, an IPC that conforms to the AUTOSAR standard. An essential challenge in this endeavor is to ensure that all of these interactions occur within an operating system developed based on Yocto. + +Therefore, if you want to precisely follow this project, you need to have the exact [hardware setup](./setting/) ready and proceed according to the instructions on the [meta-infotainment page](https://github.com/SEA-ME-COSS/meta-infotainment). Once you've done this, you should burn the final image onto an SD card. By doing so, you too can experience and use our project! + +# Architecture + +software_architecture + +# Setting + +## Requirements + +Detailed information regarding setup and configuration can be found within the [settings folder](./setting/). Following the content within this folder should allow you to reproduce the test environment we have implemented. + +Below are the specifications of the hardware used in the project. + +### Raspberry Pi 4B + +- 2-Channel CAN-BUS(FD) Shield (MCP2518FD) +- PiRacer AI Kit (PiRacer Standard) +- 7.9inch DSI LCD (400 x 1280) +- 7inch HDMI LCD (H) (1028 x 600) +- Gamepad controller + +### Arduino UNO + +- CAN-BUS Shield V2.0 (MCP2515) +- IR infrared Speed Sensor (LM393) +- Raspberry Pi 4 Camera +- Arduino ultrasonic sensor (HY-SRF05) + +hardware_architecture + +# Usage + +To run it on a Yocto-based OS go to our [meta-infotainment](https://github.com/SEA-ME-COSS/meta-infotainment) repo. + +Additionally, for executing it on Raspbian OS after [setting](./setting/), use the following code: + +```bash +mkdir build +cd build +cmake .. +make +./IPCManager + +``` + +# Key Concept + +## Qt +### Brief on Qt +- Qt is a cross-platform C++ framework used for developing both GUI and non-GUI applications. It is popular for creating applications that can run on various operating systems and includes modules for networking, databases, and graphics. + +### Brief on Qt Compositor +- Qt Compositor, part of the Qt framework, is used for developing Wayland compositors. It enables developers to create their custom compositors for managing application windows on the screen, integrating well with Qt's robust graphics capabilities. + +### Why Qt Compositor for Headunit Development + +1. **Modularity**: Enables handling each application as an independent window, simplifying the addition or removal of applications. +2. **Independent Development**: Facilitates developing applications separately and integrating them smoothly. +3. **Enhanced User Experience**: Supports seamless transitions and interactions between applications, vital for driver-focused systems. +4. **Resource Efficiency**: Offers efficient resource management, essential in the resource-constrained environment of automotive systems. + +These strengths of Qt Compositor make it an ideal choice for developing sophisticated and responsive headunit systems. + +## vSomeIP & CommonAPI + +### vSomeIP + +- The SOME/IP protocol is a standard IPC within AUTOSAR, and vSomeIP is its open-source implementation. + +- vSomeIP supports features like service discovery, service-oriented communication, and event notification, making it suitable for complex automotive systems that require reliable and scalable communication solutions. + + +### CommonAPI + +- CommonAPI is one of the developments by the GENIVI Alliance to standardize middleware communication in automotive software. + +- It provides an advanced C++ API for developing applications that communicate between various middleware systems within vehicles, such as SOME/IP, DBus, and others. + +- CommonAPI abstracts the underlying communication mechanisms, allowing developers to focus on the application logic without worrying about the details of the communication protocols. + + +vSomeIP and CommonAPI are crucial parts of modern automotive software architecture, enabling efficient and standardized communication in complex vehicle systems. We have chosen these IPCs for implementing vehicle communication on Raspberry Pi. + +## Yocto Project + +- The Yocto Project is an open-source project designed to create custom Linux-based operating system /media. + +- This project assists developers in easily creating Linux distributions tailored for specific hardware. This enables the development of customized Linux environments suitable for a wide range of platforms including IoT (Internet of Things) devices, embedded systems, automotive applications, and mobile phones. + + +We have utilized the Yocto Project to develop a Linux environment optimized for our IVI (In-Vehicle Infotainment) application. We then created a single image from this environment, making it easily accessible for anyone to download and use this optimized Linux image. + +# References + +- Yocto Project. (2021). Yocto Project. https://www.yoctoproject.org/ +- Qt Project. (2021). Qt Project. https://www.qt.io/ +- Raspberry Pi Foundation. (2021). Raspberry Pi. https://www.raspberrypi.org/ +- [CAN specification documents](http://esd.cs.ucr.edu/webres/can20.pdf): These documents provide detailed information on the CAN (Controller Area Network) protocol and its implementation. +- [VsomIp documents](https://github.com/COVESA/vsomeip/wiki/vsomeip-in-10-minutes): These documents provide information on the Inter-Process Communication (IPC) frameworks VsomIp and Autosar and their implementation in the automotive industry. + +Shield: [![CC BY-NC-SA 4.0][cc-by-nc-sa-shield]][cc-by-nc-sa] + +This work is licensed under a +[Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License][cc-by-nc-sa]. + +[![CC BY-NC-SA 4.0][cc-by-nc-sa-image]][cc-by-nc-sa] + +[cc-by-nc-sa]: http://creativecommons.org/licenses/by-nc-sa/4.0/ +[cc-by-nc-sa-image]: https://licensebuttons.net/l/by-nc-sa/4.0/88x31.png +[cc-by-nc-sa-shield]: https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg diff --git a/arduinocan/README.md b/arduinocan/README.md new file mode 100644 index 00000000..3f8537a7 --- /dev/null +++ b/arduinocan/README.md @@ -0,0 +1,79 @@ +# How does this represent speed & distance? + +## Speed + +Frankly, this code isn't directly measuring "speed." It's measuring the revolutions per minute (RPM), which indicates how many times a wheel rotates in a minute. + +If you know the diameter or circumference of the wheel, you can calculate the actual speed (e.g., km/h or m/s) using the RPM. This calculation would follow the formula: + +Speed=RPM×Circumference + +$$ +Speed = RPM \times Circumference +$$ + +For instance, if the wheel's circumference is 2m and the RPM is 30, the speed would be 3**0 x 2 = 60m/min** or **1m/s**. + +So, while the code doesn't provide speed directly, it offers the foundational rotational data that, combined with additional information (like wheel circumference), can facilitate this. + +If you want to know more about it, go to our "arduino _can" repo + +## Distance + +Using an ultrasonic sensor, this code measures the distance by calculating the time it takes for an ultrasonic signal to bounce back from an object. The calculation is performed as follows: + +- **Time Measurement (`duration`)**: The `pulseIn` function measures the round-trip time (in microseconds) it takes for the ultrasonic pulse to travel to an object and back. +- **Distance Calculation (`distance`)**: The distance is calculated using the measured time (`duration`). The formula is as follows: + +$$ +Distance (cm) = (Time (microseconds) / 29) / 2 +$$ + +This calculation is based on the speed of sound in air, which is approximately 343m/s (or about 34300cm/s). To find the distance traveled by the sound wave in the measured time, the formula is: + +$$ +Distance (cm) = 34300 cm/s / 1000000 * Time (microseconds) +$$ + +Simplifying this gives: + +$$ +Distance (cm) = Time (microseconds) / 29 +$$ + +The division by 2 is necessary because the measured time is for the round trip (to the object and back), and the actual distance to the object is half of this total travel distance. + + +# Arduino + +This Arduino code is designed to transmit RPM and distance measurements using the MCP2515 CAN controller over a CAN (Controller Area Network) bus. + +# **Basic Concepts** + + +### **Controller Area Network (CAN)** + +1. **CAN Message Format**: CAN messages consist of a unique identifier (ID), data length (DLC), and actual data bytes. This structure enables efficient data transmission and error detection. +2. **Bit Shifting**: Used to divide large data into 8-bit units for CAN messages. Although not currently used, it will be useful later for setting the data's factor and offset. + +### **Pulse (RPM Measurement)** + +1. **Pulse**: The sensor used in this code generates a pulse with each rotation. It is assumed here that there are 20 pulses per revolution. This pulse is a digital signal produced a set number of times as the sensor completes one full rotation. +2. **Period**: Refers to the time between two consecutive pulses. For example, if pulses occur every 1ms, then the period is 1ms. +3. **Frequency**: Denotes the number of pulses in a unit of time. It can be calculated as the inverse of the period. For example, if the period is 1ms, then the frequency is 1000Hz or 1kHz. + +### Distance Measurement + +1. **Ultrasonic Sensor**: This code uses an ultrasonic sensor to measure distance. The sensor emits an ultrasonic signal and measures the time it takes for the signal to bounce back from an object. +2. **Distance Calculation**: The distance is calculated using the measured time. This is based on the speed of sound in air and the time taken for the signal to travel to the object and back. + +# **How the Code Works:** + +1. **Detecting Pulses:** The `attachInterrupt()` function is used to detect pulses from the sensor. Every time a pulse is generated, the `Pulse_Event()` function is invoked. +2. **Calculating the Period:** Inside the `Pulse_Event()` function, the time difference between the last and the current pulse is calculated to determine the period. +3. **Calculating Frequency:** Within the `loop()`, the frequency is calculated using the average period. +4. **Calculating RPM:** Knowing the number of pulses per revolution, RPM is determined using the frequency. This frequency is multiplied by 60 to convert it into revolutions per minute. +5. **Time Measurement (`duration`)**: The `pulseIn` function measures the time taken for the ultrasonic signal to return. +6. **Distance Calculation (`distance`)**: The distance is calculated using the measured time. +7. **Preparing CAN Messages:** CAN messages for RPM and distance are prepared by placing data into specific bytes of the CAN frame. Data is bit-shifted to align correctly within the 8-bit structure of the CAN frame data bytes. + - For example, **`canMsg1.data[0] = (RPM & 0xFF00) >> 8;`** shifts the higher byte of the RPM value into the first data byte of the CAN message. **`canMsg1.data[1] = (RPM & 0x00FF);`** places the lower byte of the RPM into the second data byte. diff --git a/ArduinoCAN/ArduinoCAN.ino b/arduinocan/arduinocan.ino similarity index 100% rename from ArduinoCAN/ArduinoCAN.ino rename to arduinocan/arduinocan.ino diff --git a/fidl/CANSender/CANSender.fdepl b/fidl/CANSender/CANSender.fdepl new file mode 100644 index 00000000..3615f6b9 --- /dev/null +++ b/fidl/CANSender/CANSender.fdepl @@ -0,0 +1,14 @@ +import "platform:/plugin/org.genivi.commonapi.someip/deployment/CommonAPI-4-SOMEIP_deployment_spec.fdepl" +import "CANSender.fidl" + + +define org.genivi.commonapi.someip.deployment for interface commonapi.CANSender { + SomeIpServiceID = 1001 +} +define org.genivi.commonapi.someip.deployment for provider as Service { + instance commonapi.CANSender { + InstanceId = "CANSender" + SomeIpInstanceID = 10001 + } +} + diff --git a/fidl/CANSender/CANSender.fidl b/fidl/CANSender/CANSender.fidl new file mode 100644 index 00000000..87c2177d --- /dev/null +++ b/fidl/CANSender/CANSender.fidl @@ -0,0 +1,7 @@ +package commonapi + + +interface CANSender { + version {major 1 minor 0} +} + diff --git a/fidl/DESProject.fdepl b/fidl/DESProject.fdepl deleted file mode 100644 index 720df161..00000000 --- a/fidl/DESProject.fdepl +++ /dev/null @@ -1,183 +0,0 @@ -import "platform:/plugin/org.genivi.commonapi.someip/deployment/CommonAPI-4-SOMEIP_deployment_spec.fdepl" -import "DESProject.fidl" - - -define org.genivi.commonapi.someip.deployment for interface commonapi.CANSender { - SomeIpServiceID = 1000 -} -define org.genivi.commonapi.someip.deployment for provider as Service { - instance commonapi.CANSender { - InstanceId = "CANSender" - SomeIpInstanceID = 10000 - } -} - - -define org.genivi.commonapi.someip.deployment for interface commonapi.PiracerSender { - SomeIpServiceID = 1001 -} -define org.genivi.commonapi.someip.deployment for provider as Service { - instance commonapi.PiracerSender { - InstanceId = "PiracerSender" - SomeIpInstanceID = 10001 - } -} - - -define org.genivi.commonapi.someip.deployment for interface commonapi.PiracerController { - SomeIpServiceID = 1002 -} -define org.genivi.commonapi.someip.deployment for provider as Service { - instance commonapi.PiracerController { - InstanceId = "PiracerController" - SomeIpInstanceID = 10002 - } -} - - -define org.genivi.commonapi.someip.deployment for interface commonapi.IPCManager { - SomeIpServiceID = 1003 - - method setSensorRpm { - SomeIpMethodID = 100 - } - method setBatteryLevel { - SomeIpMethodID = 101 - } - method setGearMode { - SomeIpMethodID = 102 - } - method setDirection { - SomeIpMethodID = 103 - } - method setLight { - SomeIpMethodID = 104 - } - method setThrottle { - SomeIpMethodID = 105 - } - method setSteering { - SomeIpMethodID = 106 - } - method setDistance { - SomeIpMethodID = 107 - } - method getGearMode { - SomeIpMethodID = 108 - } - method getDirection { - SomeIpMethodID = 109 - } - method getLight { - SomeIpMethodID = 110 - } - method getSteering { - SomeIpMethodID = 111 - } -} -define org.genivi.commonapi.someip.deployment for provider as Service { - instance commonapi.IPCManager { - InstanceId = "IPCManager" - SomeIpInstanceID = 10003 - } -} - - -define org.genivi.commonapi.someip.deployment for interface commonapi.InstrumentCluster { - SomeIpServiceID = 1004 - - method setSpeedRpm { - SomeIpMethodID = 112 - } - method setBattery { - SomeIpMethodID = 113 - } - method setGear { - SomeIpMethodID = 114 - } - method setDirection { - SomeIpMethodID = 115 - } - method setLight { - SomeIpMethodID = 116 - } -} -define org.genivi.commonapi.someip.deployment for provider as Service { - instance commonapi.InstrumentCluster { - InstanceId = "InstrumentCluster" - SomeIpInstanceID = 10004 - } -} - - -define org.genivi.commonapi.someip.deployment for interface commonapi.HeadUnit { - SomeIpServiceID = 1005 - - method setSensorRpm { - SomeIpMethodID = 117 - } - method setGear { - SomeIpMethodID = 118 - } - method setDirection { - SomeIpMethodID = 119 - } - method setLight { - SomeIpMethodID = 120 - } -} -define org.genivi.commonapi.someip.deployment for provider as Service { - instance commonapi.HeadUnit { - InstanceId = "HeadUnit" - SomeIpInstanceID = 10005 - } -} - -define org.genivi.commonapi.someip.deployment for interface commonapi.PDCUnit { - SomeIpServiceID = 1006 - - method setDistance { - SomeIpMethodID = 121 - } - method setSteering { - SomeIpMethodID = 122 - } -} -define org.genivi.commonapi.someip.deployment for provider as Service { - instance commonapi.PDCUnit { - InstanceId = "PDCUnit" - SomeIpInstanceID = 10006 - } -} - -define org.genivi.commonapi.someip.deployment for interface commonapi.IVICompositor { - SomeIpServiceID = 1007 - - method setGear { - SomeIpMethodID = 123 - } -} -define org.genivi.commonapi.someip.deployment for provider as Service { - instance commonapi.IVICompositor { - InstanceId = "IVICompositor" - SomeIpInstanceID = 10007 - } -} - -define org.genivi.commonapi.someip.deployment for interface commonapi.RemoteSpeaker { - SomeIpServiceID = 1008 - - method setGear { - SomeIpMethodID = 124 - } - method setDistance { - SomeIpMethodID = 125 - } -} -define org.genivi.commonapi.someip.deployment for provider as Service { - instance commonapi.RemoteSpeaker { - InstanceId = "RemoteSpeaker" - SomeIpInstanceID = 10008 - } -} - diff --git a/fidl/DESProject.fidl b/fidl/DESProject.fidl deleted file mode 100644 index 7f1b08c5..00000000 --- a/fidl/DESProject.fidl +++ /dev/null @@ -1,274 +0,0 @@ -// Define the 'commonapi' package. -package commonapi - - -// Define the 'CANSender' interface. -interface CANSender { - version {major 1 minor 0} // Interface version information. -} - - -// Define the 'PiracerSender' interface. -interface PiracerSender { - version {major 1 minor 0} // Interface version information. -} - - -// Define the 'PiracerController' interface. -interface PiracerController { - version {major 1 minor 0} // Interface version information. -} - - -// Define the 'IPCManager' interface. -interface IPCManager { - version {major 1 minor 0} // Interface version information. - - // Define methods for various functionalities with input and output parameters. - method setSensorRpm { - in { - UInt16 SensorRpm // Input parameter: SensorRpm of type UInt16. - } - out { - String message // Output parameter: message of type String. - } - } - method setBatteryLevel { - in { - UInt16 BatteryLevel // Input parameter: BatteryLevel of type UInt16. - } - out { - String message // Output parameter: message of type String. - } - } - method setGearMode { - in { - UInt16 GearMode // Input parameter: GearMode of type UInt16. - } - out { - String message // Output parameter: message of type String. - } - } - method setDirection { - in { - UInt16 Direction // Input parameter: Direction of type UInt16. - } - out { - String message // Output parameter: message of type String. - } - } - method setLight { - in { - String Light // Input parameter: Light of type String. - } - out { - String message // Output parameter: message of type String. - } - } - method setThrottle { - in { - Double Throttle // Input parameter: Throttle of type Double. - } - out { - String message // Output parameter: message of type String. - } - } - method setSteering { - in { - Double Steering // Input parameter: Steering of type Double. - } - out { - String message // Output parameter: message of type String. - } - } - method setDistance { - in { - UInt16 Distance // Input parameter: Distance of type UInt16. - } - out { - String message // Output parameter: message of type String. - } - } - method getGearMode { - in { - String message1 // Input parameter: message of type String. - } - out { - String message2 // Output parameter: message of type String. - } - } - method getDirection { - in { - String message1 // Input parameter: message of type String. - } - out { - String message2 // Output parameter: message of type String. - } - } - method getLight { - in { - String message1 // Input parameter: message of type String. - } - out { - String message2 // Output parameter: message of type String. - } - } - method getSteering { - in { - String message1 // Input parameter: message of type String. - } - out { - String message2 // Output parameter: message of type String. - } - } -} - - -// Define the 'InstrumentCluster' interface. -interface InstrumentCluster { - version {major 1 minor 0} // Interface version information. - - // Define methods for various functionalities with input and output parameters. - method setSpeedRpm { - in { - UInt16 SensorRpm // Input parameter: SensorRpm of type UInt16. - } - out { - String message // Output parameter: message of type String. - } - } - method setBattery { - in { - UInt16 Battery // Input parameter: Battery of type UInt16. - } - out { - String message // Output parameter: message of type String. - } - } - method setGear { - in { - UInt16 Gear // Input parameter: Gear of type UInt16. - } - out { - String message // Output parameter: message of type String. - } - } - method setDirection { - in { - UInt16 Direction // Input parameter: Direction of type UInt16. - } - out { - String message // Output parameter: message of type String. - } - } - method setLight { - in { - String Light // Input parameter: Light of type String. - } - out { - String message // Output parameter: message of type String. - } - } -} - - -// Define the 'HeadUnit' interface. -interface HeadUnit { - version {major 1 minor 0} // Interface version information. - - // Define methods for various functionalities with input and output parameters. - method setSensorRpm { - in { - UInt16 SensorRpm // Input parameter: SensorRpm of type UInt16. - } - out { - String message // Output parameter: message of type String. - } - } - method setGear { - in { - UInt16 Gear // Input parameter: Gear of type UInt16. - } - out { - String message // Output parameter: message of type String. - } - } - method setDirection { - in { - UInt16 Direction // Input parameter: Direction of type UInt16. - } - out { - String message // Output parameter: message of type String. - } - } - method setLight { - in { - String Light // Input parameter: Light of type String. - } - out { - String message // Output parameter: message of type String. - } - } -} - -// Define the 'PDCUnit' interface. -interface PDCUnit { - version {major 1 minor 0} // Interface version information. - - // Define methods for various functionalities with input and output parameters. - method setDistance { - in { - UInt16 Distance // Input parameter: Distance of type UInt16. - } - out { - String message // Output parameter: message of type String. - } - } - method setSteering { - in { - Double Steering // Input parameter: Steering of type Double. - } - out { - String message // Output parameter: message of type String. - } - } -} - -// Define the 'IVICompositor' interface. -interface IVICompositor { - version {major 1 minor 0} // Interface version information. - - // Define methods for various functionalities with input and output parameters. - method setGear { - in { - UInt16 Gear // Input parameter: Gear of type UInt16. - } - out { - String message // Output parameter: message of type String. - } - } -} - -// Define the 'Speaker' interface. -interface RemoteSpeaker { - version {major 1 minor 0} // Interface version information. - - // Define methods for various functionalities with input and output parameters. - method setGear { - in { - UInt16 Gear // Input parameter: Gear of type UInt16. - } - out { - String message // Output parameter: message of type String. - } - } - method setDistance { - in { - UInt16 Distance // Input parameter: Distance of type UInt16. - } - out { - String message // Output parameter: message of type String. - } - } -} - diff --git a/fidl/HeadUnit/HeadUnit.fdepl b/fidl/HeadUnit/HeadUnit.fdepl new file mode 100644 index 00000000..db13885c --- /dev/null +++ b/fidl/HeadUnit/HeadUnit.fdepl @@ -0,0 +1,27 @@ +import "platform:/plugin/org.genivi.commonapi.someip/deployment/CommonAPI-4-SOMEIP_deployment_spec.fdepl" +import "HeadUnit.fidl" + + +define org.genivi.commonapi.someip.deployment for interface commonapi.HeadUnit { + SomeIpServiceID = 1006 + + method setSensorRpm { + SomeIpMethodID = 600 + } + method setGear { + SomeIpMethodID = 601 + } + method setDirection { + SomeIpMethodID = 602 + } + method setLight { + SomeIpMethodID = 603 + } +} +define org.genivi.commonapi.someip.deployment for provider as Service { + instance commonapi.HeadUnit { + InstanceId = "HeadUnit" + SomeIpInstanceID = 10006 + } +} + diff --git a/fidl/HeadUnit/HeadUnit.fidl b/fidl/HeadUnit/HeadUnit.fidl new file mode 100644 index 00000000..0d494731 --- /dev/null +++ b/fidl/HeadUnit/HeadUnit.fidl @@ -0,0 +1,40 @@ +package commonapi + + +interface HeadUnit { + version {major 1 minor 0} + + method setSensorRpm { + in { + UInt16 SensorRpm + } + out { + String message + } + } + method setGear { + in { + UInt16 Gear + } + out { + String message + } + } + method setDirection { + in { + UInt16 Direction + } + out { + String message + } + } + method setLight { + in { + String Light + } + out { + String message + } + } +} + diff --git a/fidl/IPCManager/IPCManager.fdepl b/fidl/IPCManager/IPCManager.fdepl new file mode 100644 index 00000000..0d606d3d --- /dev/null +++ b/fidl/IPCManager/IPCManager.fdepl @@ -0,0 +1,51 @@ +import "platform:/plugin/org.genivi.commonapi.someip/deployment/CommonAPI-4-SOMEIP_deployment_spec.fdepl" +import "IPCManager.fidl" + + +define org.genivi.commonapi.someip.deployment for interface commonapi.IPCManager { + SomeIpServiceID = 1004 + + method setSensorRpm { + SomeIpMethodID = 400 + } + method setBatteryLevel { + SomeIpMethodID = 401 + } + method setGearMode { + SomeIpMethodID = 402 + } + method setDirection { + SomeIpMethodID = 403 + } + method setLight { + SomeIpMethodID = 404 + } + method setThrottle { + SomeIpMethodID = 405 + } + method setSteering { + SomeIpMethodID = 406 + } + method setDistance { + SomeIpMethodID = 407 + } + method getGearMode { + SomeIpMethodID = 408 + } + method getDirection { + SomeIpMethodID = 409 + } + method getLight { + SomeIpMethodID = 410 + } + method getSteering { + SomeIpMethodID = 411 + } +} +define org.genivi.commonapi.someip.deployment for provider as Service { + instance commonapi.IPCManager { + InstanceId = "IPCManager" + SomeIpInstanceID = 10004 + } +} + diff --git a/fidl/IPCManager/IPCManager.fidl b/fidl/IPCManager/IPCManager.fidl new file mode 100644 index 00000000..a0a3b6ab --- /dev/null +++ b/fidl/IPCManager/IPCManager.fidl @@ -0,0 +1,104 @@ +package commonapi + + +interface IPCManager { + version {major 1 minor 0} + + method setSensorRpm { + in { + UInt16 SensorRpm + } + out { + String messag + } + } + method setBatteryLevel { + in { + UInt16 BatteryLevel + } + out { + String message + } + } + method setGearMode { + in { + UInt16 GearMode + } + out { + String message + } + } + method setDirection { + in { + UInt16 Direction + } + out { + String message + } + } + method setLight { + in { + String Light + } + out { + String message + } + } + method setThrottle { + in { + Double Throttle + } + out { + String message + } + } + method setSteering { + in { + Double Steering + } + out { + String message + } + } + method setDistance { + in { + UInt16 Distance + } + out { + String message + } + } + method getGearMode { + in { + String message1 + } + out { + String message2 + } + } + method getDirection { + in { + String message1 + } + out { + String message2 + } + } + method getLight { + in { + String message1 + } + out { + String message2 + } + } + method getSteering { + in { + String message1 + } + out { + String message2 + } + } +} + diff --git a/fidl/IVICompositor/IVICompositor.fdepl b/fidl/IVICompositor/IVICompositor.fdepl new file mode 100644 index 00000000..3362ef5d --- /dev/null +++ b/fidl/IVICompositor/IVICompositor.fdepl @@ -0,0 +1,18 @@ +import "platform:/plugin/org.genivi.commonapi.someip/deployment/CommonAPI-4-SOMEIP_deployment_spec.fdepl" +import "IVICompositor.fidl" + + +define org.genivi.commonapi.someip.deployment for interface commonapi.IVICompositor { + SomeIpServiceID = 1008 + + method setGear { + SomeIpMethodID = 800 + } +} +define org.genivi.commonapi.someip.deployment for provider as Service { + instance commonapi.IVICompositor { + InstanceId = "IVICompositor" + SomeIpInstanceID = 10008 + } +} + diff --git a/fidl/IVICompositor/IVICompositor.fidl b/fidl/IVICompositor/IVICompositor.fidl new file mode 100644 index 00000000..343c39a2 --- /dev/null +++ b/fidl/IVICompositor/IVICompositor.fidl @@ -0,0 +1,16 @@ +package commonapi + + +interface IVICompositor { + version {major 1 minor 0} + + method setGear { + in { + UInt16 Gear + } + out { + String message + } + } +} + diff --git a/fidl/InstrumentCluster/InstrumentCluster.fdepl b/fidl/InstrumentCluster/InstrumentCluster.fdepl new file mode 100644 index 00000000..9555fdcd --- /dev/null +++ b/fidl/InstrumentCluster/InstrumentCluster.fdepl @@ -0,0 +1,30 @@ +import "platform:/plugin/org.genivi.commonapi.someip/deployment/CommonAPI-4-SOMEIP_deployment_spec.fdepl" +import "InstrumentCluster.fidl" + + +define org.genivi.commonapi.someip.deployment for interface commonapi.InstrumentCluster { + SomeIpServiceID = 1005 + + method setSpeedRpm { + SomeIpMethodID = 500 + } + method setBattery { + SomeIpMethodID = 501 + } + method setGear { + SomeIpMethodID = 502 + } + method setDirection { + SomeIpMethodID = 503 + } + method setLight { + SomeIpMethodID = 504 + } +} +define org.genivi.commonapi.someip.deployment for provider as Service { + instance commonapi.InstrumentCluster { + InstanceId = "InstrumentCluster" + SomeIpInstanceID = 10005 + } +} + diff --git a/fidl/InstrumentCluster/InstrumentCluster.fidl b/fidl/InstrumentCluster/InstrumentCluster.fidl new file mode 100644 index 00000000..0461fc67 --- /dev/null +++ b/fidl/InstrumentCluster/InstrumentCluster.fidl @@ -0,0 +1,48 @@ +package commonapi + + +interface InstrumentCluster { + version {major 1 minor 0} + + method setSpeedRpm { + in { + UInt16 SensorRpm + } + out { + String message + } + } + method setBattery { + in { + UInt16 Battery + } + out { + String message + } + } + method setGear { + in { + UInt16 Gear + } + out { + String message + } + } + method setDirection { + in { + UInt16 Direction + } + out { + String message + } + } + method setLight { + in { + String Light + } + out { + String message + } + } +} + diff --git a/fidl/PDCUnit/PDCUnit.fdepl b/fidl/PDCUnit/PDCUnit.fdepl new file mode 100644 index 00000000..c14121e4 --- /dev/null +++ b/fidl/PDCUnit/PDCUnit.fdepl @@ -0,0 +1,21 @@ +import "platform:/plugin/org.genivi.commonapi.someip/deployment/CommonAPI-4-SOMEIP_deployment_spec.fdepl" +import "PDCUnit.fidl" + + +define org.genivi.commonapi.someip.deployment for interface commonapi.PDCUnit { + SomeIpServiceID = 1007 + + method setDistance { + SomeIpMethodID = 700 + } + method setSteering { + SomeIpMethodID = 701 + } +} +define org.genivi.commonapi.someip.deployment for provider as Service { + instance commonapi.PDCUnit { + InstanceId = "PDCUnit" + SomeIpInstanceID = 10007 + } +} + diff --git a/fidl/PDCUnit/PDCUnit.fidl b/fidl/PDCUnit/PDCUnit.fidl new file mode 100644 index 00000000..b01fd08c --- /dev/null +++ b/fidl/PDCUnit/PDCUnit.fidl @@ -0,0 +1,24 @@ +package commonapi + + +interface PDCUnit { + version {major 1 minor 0} + + method setDistance { + in { + UInt16 Distance + } + out { + String message + } + } + method setSteering { + in { + Double Steering + } + out { + String message + } + } +} + diff --git a/fidl/PiracerController/PiracerController.fdepl b/fidl/PiracerController/PiracerController.fdepl new file mode 100644 index 00000000..8dc97ab4 --- /dev/null +++ b/fidl/PiracerController/PiracerController.fdepl @@ -0,0 +1,14 @@ +import "platform:/plugin/org.genivi.commonapi.someip/deployment/CommonAPI-4-SOMEIP_deployment_spec.fdepl" +import "PiracerController.fidl" + + +define org.genivi.commonapi.someip.deployment for interface commonapi.PiracerController { + SomeIpServiceID = 1003 +} +define org.genivi.commonapi.someip.deployment for provider as Service { + instance commonapi.PiracerController { + InstanceId = "PiracerController" + SomeIpInstanceID = 10003 + } +} + diff --git a/fidl/PiracerController/PiracerController.fidl b/fidl/PiracerController/PiracerController.fidl new file mode 100644 index 00000000..64f368e6 --- /dev/null +++ b/fidl/PiracerController/PiracerController.fidl @@ -0,0 +1,7 @@ +package commonapi + + +interface PiracerController { + version {major 1 minor 0} +} + diff --git a/fidl/PiracerSender/PiracerSender.fdepl b/fidl/PiracerSender/PiracerSender.fdepl new file mode 100644 index 00000000..acf00b77 --- /dev/null +++ b/fidl/PiracerSender/PiracerSender.fdepl @@ -0,0 +1,14 @@ +import "platform:/plugin/org.genivi.commonapi.someip/deployment/CommonAPI-4-SOMEIP_deployment_spec.fdepl" +import "PiracerSender.fidl" + + +define org.genivi.commonapi.someip.deployment for interface commonapi.PiracerSender { + SomeIpServiceID = 1002 +} +define org.genivi.commonapi.someip.deployment for provider as Service { + instance commonapi.PiracerSender { + InstanceId = "PiracerSender" + SomeIpInstanceID = 10002 + } +} + diff --git a/fidl/PiracerSender/PiracerSender.fidl b/fidl/PiracerSender/PiracerSender.fidl new file mode 100644 index 00000000..f47d0a01 --- /dev/null +++ b/fidl/PiracerSender/PiracerSender.fidl @@ -0,0 +1,7 @@ +package commonapi + + +interface PiracerSender { + version {major 1 minor 0} +} + diff --git a/fidl/README.md b/fidl/README.md index 47b73dae..7a2dcc79 100644 --- a/fidl/README.md +++ b/fidl/README.md @@ -2,12 +2,10 @@ Franca IDL is utilized for CommonAPI. In '.fidl' file, interfaces for inter-process communication are defined, along with the methods that will be executed within those interfaces. '.fdepl' files assign unique IDs to objects defined in the .fidl file. -These two files exist for the purpose of code generation and are not required during the compilation phase managed by CMake. Code generation is accomplished through the core-generator and someip-generator, and you can learn more about installing these generators through the instructions provided in the "settings" folder. The following is the command for generating the code. +These two files exist for the purpose of code generation and are not required during the compilation phase managed by CMake. Code generation is accomplished through the core-generator and someip-generator, and you can learn more about installing these generators through the instructions provided in the [setting](../setting/) folder. + +Running the 'src_gen_cmd' script in the main directory will create a folder named 'src-gen' and save the generated code inside it. ```bash -cd .. -~/generator/core-generator/commonapi-core-generator-linux-x86_64 -sk ./fidl/DESProject.fidl -d ./src-gen-desproject -~/generator/someip-generator/commonapi-someip-generator-linux-x86_64 ./fidl/DESProject.fdepl -d ./src-gen-desproject +sh src_gen_cmd.sh ``` - -This command creates a folder named "src-gen-desproject" and saves the generated code inside it. diff --git a/fidl/RemoteSpeaker/RemoteSpeaker.fdepl b/fidl/RemoteSpeaker/RemoteSpeaker.fdepl new file mode 100644 index 00000000..9a47e9f2 --- /dev/null +++ b/fidl/RemoteSpeaker/RemoteSpeaker.fdepl @@ -0,0 +1,21 @@ +import "platform:/plugin/org.genivi.commonapi.someip/deployment/CommonAPI-4-SOMEIP_deployment_spec.fdepl" +import "RemoteSpeaker.fidl" + + +define org.genivi.commonapi.someip.deployment for interface commonapi.RemoteSpeaker { + SomeIpServiceID = 1009 + + method setGear { + SomeIpMethodID = 900 + } + method setDistance { + SomeIpMethodID = 901 + } +} +define org.genivi.commonapi.someip.deployment for provider as Service { + instance commonapi.RemoteSpeaker { + InstanceId = "RemoteSpeaker" + SomeIpInstanceID = 10009 + } +} + diff --git a/fidl/RemoteSpeaker/RemoteSpeaker.fidl b/fidl/RemoteSpeaker/RemoteSpeaker.fidl new file mode 100644 index 00000000..a1d453b0 --- /dev/null +++ b/fidl/RemoteSpeaker/RemoteSpeaker.fidl @@ -0,0 +1,24 @@ +package commonapi + + +interface RemoteSpeaker { + version {major 1 minor 0} + + method setGear { + in { + UInt16 Gear + } + out { + String message + } + } + method setDistance { + in { + UInt16 Distance + } + out { + String message + } + } +} + diff --git a/media/diagram/display_configuration.png b/media/diagram/display_configuration.png new file mode 100644 index 00000000..b28f52ca Binary files /dev/null and b/media/diagram/display_configuration.png differ diff --git a/media/diagram/hardware-architecture.png b/media/diagram/hardware-architecture.png new file mode 100644 index 00000000..ced59813 Binary files /dev/null and b/media/diagram/hardware-architecture.png differ diff --git a/media/diagram/software-architecture.png b/media/diagram/software-architecture.png new file mode 100644 index 00000000..9e2610be Binary files /dev/null and b/media/diagram/software-architecture.png differ diff --git a/media/logo/covesa-logo.png b/media/logo/covesa-logo.png new file mode 100644 index 00000000..50fbceee Binary files /dev/null and b/media/logo/covesa-logo.png differ diff --git a/media/logo/qt-logo.png b/media/logo/qt-logo.png new file mode 100644 index 00000000..16150d0f Binary files /dev/null and b/media/logo/qt-logo.png differ diff --git a/media/logo/yocto-logo.png b/media/logo/yocto-logo.png new file mode 100644 index 00000000..7d009bb4 Binary files /dev/null and b/media/logo/yocto-logo.png differ diff --git a/media/picture/arduino_assembly.jpg b/media/picture/arduino_assembly.jpg new file mode 100644 index 00000000..4b7d78eb Binary files /dev/null and b/media/picture/arduino_assembly.jpg differ diff --git a/media/picture/display_assembly.jpg b/media/picture/display_assembly.jpg new file mode 100644 index 00000000..49caceab Binary files /dev/null and b/media/picture/display_assembly.jpg differ diff --git a/media/picture/final_result.jpg b/media/picture/final_result.jpg new file mode 100644 index 00000000..7678e04e Binary files /dev/null and b/media/picture/final_result.jpg differ diff --git a/media/picture/gamepad_controller.jpg b/media/picture/gamepad_controller.jpg new file mode 100644 index 00000000..d8d27bdb Binary files /dev/null and b/media/picture/gamepad_controller.jpg differ diff --git a/media/picture/overall_hardware_1.jpg b/media/picture/overall_hardware_1.jpg new file mode 100644 index 00000000..6bddbcf5 Binary files /dev/null and b/media/picture/overall_hardware_1.jpg differ diff --git a/media/picture/overall_hardware_2.jpg b/media/picture/overall_hardware_2.jpg new file mode 100644 index 00000000..0b2fec4f Binary files /dev/null and b/media/picture/overall_hardware_2.jpg differ diff --git a/media/picture/overall_hardware_3.jpg b/media/picture/overall_hardware_3.jpg new file mode 100644 index 00000000..9a4327cf Binary files /dev/null and b/media/picture/overall_hardware_3.jpg differ diff --git a/media/picture/pdc_part_assembly.jpg b/media/picture/pdc_part_assembly.jpg new file mode 100644 index 00000000..71dbc6cc Binary files /dev/null and b/media/picture/pdc_part_assembly.jpg differ diff --git a/media/picture/power_bank.jpg b/media/picture/power_bank.jpg new file mode 100644 index 00000000..fd764877 Binary files /dev/null and b/media/picture/power_bank.jpg differ diff --git a/media/picture/power_bank_assembly.jpg b/media/picture/power_bank_assembly.jpg new file mode 100644 index 00000000..9f5533ca Binary files /dev/null and b/media/picture/power_bank_assembly.jpg differ diff --git a/media/picture/speed_sensor_assembly.jpg b/media/picture/speed_sensor_assembly.jpg new file mode 100644 index 00000000..eb06db52 Binary files /dev/null and b/media/picture/speed_sensor_assembly.jpg differ diff --git a/media/video/DEMO_Video.mp4 b/media/video/DEMO_Video.mp4 new file mode 100644 index 00000000..609a3cf9 Binary files /dev/null and b/media/video/DEMO_Video.mp4 differ diff --git a/setting/README.md b/setting/README.md new file mode 100644 index 00000000..46548835 --- /dev/null +++ b/setting/README.md @@ -0,0 +1,240 @@ +# Hardware & Software Setting Guide + +This document provides a guide for hardware assembly, setup, and software environment configuration. All contents of this project have been tested in the environment described below. + +# Requirements + +Before starting this guide, you will need the following components: + +1. Raspberry Pi 4B +2. 2-Channel CAN-BUS(FD) Shield (MCP2518FD) +3. PiRacer AI Kit (PiRacer Standard) +4. 7.9inch DSI LCD (400 x 1280) +5. 7inch HDMI LCD (H) (1028 x 600) +6. Gamepad controller +7. Arduino UNO +8. CAN-BUS Shield V2.0 (MCP2515) +9. IR infrared Speed Sensor (LM393) +10. Ultrasonic sensor (HY-SRF05) +11. RPi Camera + +# Precautions + +- To prevent electric shock, ensure that all assembly procedures are carried out with the power turned off. +- Exercise care when assembling the components, as incorrect assembly may result in damage to the components. +- When not in use, please safeguard the components and power them off. + +--- + +# Hardware Setting + +hardware_architecture + +1. Assemble the Raspberry Pi board with the CAN-BUS shield and a 7.9inch LCD, and then attach it on the PiRacer. +2. Assemble the Arduino board with the CAN-BUS shield and attach it to the front of the PiRacer. + +arduino_assembly + +3. Fix the 7inch LCD onto the PiRacer using a robust material like a metal frame to position it above the Arduino. + +display_assembly + +4. Fix the speed sensor's rotor in a way that it aligns and rotates with the PiRacer's rear tires. + +speed_sensor_assembly + +5. Connect the receiver of the gamepad controller to one of the USB ports on the Raspberry Pi. + +gamepad_controller + +6. (Optional) Install an auxiliary battery to provide additional power during PiRacer operation. Create a case for the auxiliary battery and position it at the rear of the PiRacer vehicle. + +power_bank + +power_bank_assembly + +7. Install RPi Camera and Ultrasonic sensor at the rear of the PiRacer vehicle. + +pdc_part_assembly + +8. Final result. + +overall_hardware + +overall_hardware + +final_result + +--- + +# Software Setting + +This project was conducted in Yocto, so for accurate testing, please refer to our [meta-infotainment](https://github.com/SEA-ME-COSS/meta-infotainment) repo. However, if you wish to test it on Raspbian, please follow the settings below. + +## CommonAPI and vsomeip + +Step 1: Install Boost Library + +```bash +sudo apt-get install libboost-all-dev +``` + +Step 2: Build the CommonAPI Runtime Library + +```bash +cd ~ +mkdir build-commonapi +cd build-commonapi +git clone https://github.com/GENIVI/capicxx-core-runtime.git +cd capicxx-core-runtime/ +git checkout 3.2.0 +mkdir build +cd build +cmake .. +make -j4 +``` + +Step 3: Build the vsomeip Library + +```bash +cd ~ +git clone https://github.com/COVESA/vsomeip.git +cd vsomeip +git checkout 3.1.20.3 +mkdir build +cd build +cmake -DENABLE_SIGNAL_HANDLING=1 -DDIAGNOSIS_ADDRESS=0x10 .. +make -j4 +sudo make install +``` + +Step 4: Build the CommonAPI SOME/IP Runtime Library + +```bash +cd ~/build-commonapi +git clone https://github.com/GENIVI/capicxx-someip-runtime.git +cd capicxx-someip-runtime/ +git checkout 3.2.0 +mkdir build +cd build +cmake -DUSE_INSTALLED_COMMONAPI=OFF .. +make -j4 +``` + +Step 4: Install code generator for Franca files (The architecture of the Raspberry Pi does not support the code generator, so this step must be executed on a laptop.) + +```bash +cd ~ +mkdir generator +cd generator + +wget https://github.com/COVESA/capicxx-core-tools/releases/download/3.2.0.1/commonapi_core_generator.zip +unzip commonapi_core_generator.zip -d core-generator +cd core-generator +chmod +x commonapi-core-generator-linux-x86_64 + +cd ~/generator +wget https://github.com/COVESA/capicxx-someip-tools/releases/download/3.2.0.1/commonapi_someip_generator.zip +unzip commonapi_someip_generator.zip -d someip-generator +cd someip-generator +chmod +x commonapi-someip-generator-linux-x86_64 +``` + +For more detail about CommonAPI and vsomeip, visit [here](https://github.com/COVESA/vsomeip/wiki/vsomeip-in-10-minutes) + +## For the remaining software installation and configuration code, please consult the following link + +- [2-Channel CAN-BUS(FD) Shield (MCP2518FD)](https://www.waveshare.com/wiki/2-CH_CAN_FD_HAT) +- [7.9inch DSI LCD (400 x 1280)](https://www.waveshare.com/wiki/7.9inch_DSI_LCD) +- [7inch HDMI LCD (H) (1028 x 600)](https://www.waveshare.com/wiki/7inch_HDMI_LCD_(H)_(with_case)) +- [CAN-BUS Shield V2.0 (MCP2515)](https://github.com/autowp/arduino-mcp2515) +- [Qt5](https://qengineering.eu/install-qt5-with-opencv-on-raspberry-pi-4.html) +- [GStreamer plug-in](https://qengineering.eu/install-gstreamer-1.18-on-raspberry-pi-4.html) +- [Qt wayland compositor](https://github.com/qt/qtwayland) + +## Display configuration + +In this project, we will be using two platforms, eglfs and linuxfb, to simultaneously interface a DSI display and an HDMI display. After completing the installation as per the above procedure, you may notice that part of the 7.9inch display is not visible. This issue arises because the 7inch display's specifications restrict the screen area. To resolve this, you can modify the code written in /boot/config.txt as follows. + +```bash +hdmi_cvt 1024 1280 60 6 0 0 0 +``` + +Note that the 7inch display's specifications are recognized as larger than the actual hardware, so you may need to adjust the source files to align the application with the visible area. Typically, for applications developed for a 1024 x 600 screen size in Qt, reducing the scale by x0.5 will display the content correctly. + +display_configuration + +## Camera configuration + +Generally, we set up raspi-config in order to use the camera on raspberry pi. However, this method makes it impossible to use two screens at the same time. Therefore write the following directly in /boot/config.txt. + +```bash +start_x=1 +``` + +## Piracer package configuration + +The piracer package can only receive input by two joysticks when first installed, and in order to use other buttons, the code needs to be modified after installing the package. Therefore change code to the following in ~/.local/lib/python3.xx/site-packages/piracer/gamepads.py + +```python3 +class ShanWanGamepadInput: + def __init__(self) -> None: + self.analog_stick_left = Vector3f() + self.analog_stick_right = Vector3f() + self.button_l1 = False + self.button_l2 = False + self.button_r1 = False + self.button_r2 = False + self.button_x = False + self.button_a = False + self.button_b = False + self.button_y = False + self.button_select = False + self.button_start = False + self.button_home = False +``` + +## Gamepad controller configuration + +Several types of gamepad controller have different button recognition. Run the following code to see which buttons give which signal. Modify and use the [ControllerClass.cpp](../src/PiracerController/ControllerClass.cpp) of the PiracerController properly. + +```python3 +from piracer.gamepads import ShanWanGamepad + +if __name__ == '__main__': + + shanwan_gamepad = ShanWanGamepad() + + while True: + gamepad_input = shanwan_gamepad.read_data() + + throttle = gamepad_input.analog_stick_right.y + steering = gamepad_input.analog_stick_left.x + l1 = gamepad_input.button_l1 + l2 = gamepad_input.button_l2 + r1 = gamepad_input.button_r1 + r2 = gamepad_input.button_r2 + x = gamepad_input.button_x + a = gamepad_input.button_a + b = gamepad_input.button_b + y = gamepad_input.button_y + select = gamepad_input.button_select + start = gamepad_input.button_start + home = gamepad_input.button_home + + print('---------------') + print(f'throttle={throttle}') + print(f'steering={steering}') + print(f'l1={l1}') + print(f'l2={l2}') + print(f'r1={r1}') + print(f'r2={r2}') + print(f'x={x}') + print(f'a={a}') + print(f'b={b}') + print(f'y={y}') + print(f'select={select}') + print(f'start={start}') + print(f'home={home}') + print('---------------') +``` diff --git a/src-gen-desproject/v1/commonapi/CANSender.hpp b/src-gen/CANSender/core/common/v1/commonapi/CANSender.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/CANSender.hpp rename to src-gen/CANSender/core/common/v1/commonapi/CANSender.hpp diff --git a/src-gen-desproject/v1/commonapi/CANSenderProxy.hpp b/src-gen/CANSender/core/proxy/v1/commonapi/CANSenderProxy.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/CANSenderProxy.hpp rename to src-gen/CANSender/core/proxy/v1/commonapi/CANSenderProxy.hpp diff --git a/src-gen-desproject/v1/commonapi/CANSenderProxyBase.hpp b/src-gen/CANSender/core/proxy/v1/commonapi/CANSenderProxyBase.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/CANSenderProxyBase.hpp rename to src-gen/CANSender/core/proxy/v1/commonapi/CANSenderProxyBase.hpp diff --git a/src-gen-desproject/v1/commonapi/CANSenderStubDefault.hpp b/src-gen/CANSender/core/skel/v1/commonapi/CANSenderStubDefault.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/CANSenderStubDefault.hpp rename to src-gen/CANSender/core/skel/v1/commonapi/CANSenderStubDefault.hpp diff --git a/src-gen-desproject/v1/commonapi/CANSenderStub.hpp b/src-gen/CANSender/core/stub/v1/commonapi/CANSenderStub.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/CANSenderStub.hpp rename to src-gen/CANSender/core/stub/v1/commonapi/CANSenderStub.hpp diff --git a/src-gen-desproject/v1/commonapi/CANSenderSomeIPDeployment.cpp b/src-gen/CANSender/someip/common/v1/commonapi/CANSenderSomeIPDeployment.cpp similarity index 100% rename from src-gen-desproject/v1/commonapi/CANSenderSomeIPDeployment.cpp rename to src-gen/CANSender/someip/common/v1/commonapi/CANSenderSomeIPDeployment.cpp diff --git a/src-gen-desproject/v1/commonapi/CANSenderSomeIPDeployment.hpp b/src-gen/CANSender/someip/common/v1/commonapi/CANSenderSomeIPDeployment.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/CANSenderSomeIPDeployment.hpp rename to src-gen/CANSender/someip/common/v1/commonapi/CANSenderSomeIPDeployment.hpp diff --git a/src-gen-desproject/v1/commonapi/CANSenderSomeIPProxy.cpp b/src-gen/CANSender/someip/proxy/v1/commonapi/CANSenderSomeIPProxy.cpp similarity index 98% rename from src-gen-desproject/v1/commonapi/CANSenderSomeIPProxy.cpp rename to src-gen/CANSender/someip/proxy/v1/commonapi/CANSenderSomeIPProxy.cpp index fadeb2f0..bc27a703 100644 --- a/src-gen-desproject/v1/commonapi/CANSenderSomeIPProxy.cpp +++ b/src-gen/CANSender/someip/proxy/v1/commonapi/CANSenderSomeIPProxy.cpp @@ -33,7 +33,7 @@ std::shared_ptr createCANSenderSomeIPProxy( void initializeCANSenderSomeIPProxy() { CommonAPI::SomeIP::AddressTranslator::get()->insert( "local:commonapi.CANSender:v1_0:CANSender", - 0x3e8, 0x2710, 1, 0); + 0x3e9, 0x2711, 1, 0); CommonAPI::SomeIP::Factory::get()->registerProxyCreateMethod( "commonapi.CANSender:v1_0", &createCANSenderSomeIPProxy); diff --git a/src-gen-desproject/v1/commonapi/CANSenderSomeIPProxy.hpp b/src-gen/CANSender/someip/proxy/v1/commonapi/CANSenderSomeIPProxy.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/CANSenderSomeIPProxy.hpp rename to src-gen/CANSender/someip/proxy/v1/commonapi/CANSenderSomeIPProxy.hpp diff --git a/src-gen-desproject/v1/commonapi/CANSenderSomeIPStubAdapter.cpp b/src-gen/CANSender/someip/stub/v1/commonapi/CANSenderSomeIPStubAdapter.cpp similarity index 98% rename from src-gen-desproject/v1/commonapi/CANSenderSomeIPStubAdapter.cpp rename to src-gen/CANSender/someip/stub/v1/commonapi/CANSenderSomeIPStubAdapter.cpp index ee0a22de..e61d63d9 100644 --- a/src-gen-desproject/v1/commonapi/CANSenderSomeIPStubAdapter.cpp +++ b/src-gen/CANSender/someip/stub/v1/commonapi/CANSenderSomeIPStubAdapter.cpp @@ -35,7 +35,7 @@ std::shared_ptr createCANSenderSomeIPStubAdapter void initializeCANSenderSomeIPStubAdapter() { CommonAPI::SomeIP::AddressTranslator::get()->insert( "local:commonapi.CANSender:v1_0:CANSender", - 0x3e8, 0x2710, 1, 0); + 0x3e9, 0x2711, 1, 0); CommonAPI::SomeIP::Factory::get()->registerStubAdapterCreateMethod( "commonapi.CANSender:v1_0", &createCANSenderSomeIPStubAdapter); diff --git a/src-gen-desproject/v1/commonapi/CANSenderSomeIPStubAdapter.hpp b/src-gen/CANSender/someip/stub/v1/commonapi/CANSenderSomeIPStubAdapter.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/CANSenderSomeIPStubAdapter.hpp rename to src-gen/CANSender/someip/stub/v1/commonapi/CANSenderSomeIPStubAdapter.hpp diff --git a/src-gen-desproject/v1/commonapi/HeadUnit.hpp b/src-gen/HeadUnit/core/common/v1/commonapi/HeadUnit.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/HeadUnit.hpp rename to src-gen/HeadUnit/core/common/v1/commonapi/HeadUnit.hpp diff --git a/src-gen-desproject/v1/commonapi/HeadUnitProxy.hpp b/src-gen/HeadUnit/core/proxy/v1/commonapi/HeadUnitProxy.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/HeadUnitProxy.hpp rename to src-gen/HeadUnit/core/proxy/v1/commonapi/HeadUnitProxy.hpp diff --git a/src-gen-desproject/v1/commonapi/HeadUnitProxyBase.hpp b/src-gen/HeadUnit/core/proxy/v1/commonapi/HeadUnitProxyBase.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/HeadUnitProxyBase.hpp rename to src-gen/HeadUnit/core/proxy/v1/commonapi/HeadUnitProxyBase.hpp diff --git a/src-gen-desproject/v1/commonapi/HeadUnitStubDefault.hpp b/src-gen/HeadUnit/core/skel/v1/commonapi/HeadUnitStubDefault.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/HeadUnitStubDefault.hpp rename to src-gen/HeadUnit/core/skel/v1/commonapi/HeadUnitStubDefault.hpp diff --git a/src-gen-desproject/v1/commonapi/HeadUnitStub.hpp b/src-gen/HeadUnit/core/stub/v1/commonapi/HeadUnitStub.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/HeadUnitStub.hpp rename to src-gen/HeadUnit/core/stub/v1/commonapi/HeadUnitStub.hpp diff --git a/src-gen-desproject/v1/commonapi/HeadUnitSomeIPDeployment.cpp b/src-gen/HeadUnit/someip/common/v1/commonapi/HeadUnitSomeIPDeployment.cpp similarity index 100% rename from src-gen-desproject/v1/commonapi/HeadUnitSomeIPDeployment.cpp rename to src-gen/HeadUnit/someip/common/v1/commonapi/HeadUnitSomeIPDeployment.cpp diff --git a/src-gen-desproject/v1/commonapi/HeadUnitSomeIPDeployment.hpp b/src-gen/HeadUnit/someip/common/v1/commonapi/HeadUnitSomeIPDeployment.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/HeadUnitSomeIPDeployment.hpp rename to src-gen/HeadUnit/someip/common/v1/commonapi/HeadUnitSomeIPDeployment.hpp diff --git a/src-gen-desproject/v1/commonapi/HeadUnitSomeIPProxy.cpp b/src-gen/HeadUnit/someip/proxy/v1/commonapi/HeadUnitSomeIPProxy.cpp similarity index 96% rename from src-gen-desproject/v1/commonapi/HeadUnitSomeIPProxy.cpp rename to src-gen/HeadUnit/someip/proxy/v1/commonapi/HeadUnitSomeIPProxy.cpp index 338d683e..bf337800 100644 --- a/src-gen-desproject/v1/commonapi/HeadUnitSomeIPProxy.cpp +++ b/src-gen/HeadUnit/someip/proxy/v1/commonapi/HeadUnitSomeIPProxy.cpp @@ -33,7 +33,7 @@ std::shared_ptr createHeadUnitSomeIPProxy( void initializeHeadUnitSomeIPProxy() { CommonAPI::SomeIP::AddressTranslator::get()->insert( "local:commonapi.HeadUnit:v1_0:HeadUnit", - 0x3ed, 0x2715, 1, 0); + 0x3ee, 0x2716, 1, 0); CommonAPI::SomeIP::Factory::get()->registerProxyCreateMethod( "commonapi.HeadUnit:v1_0", &createHeadUnitSomeIPProxy); @@ -74,7 +74,7 @@ void HeadUnitSomeIPProxy::setSensorRpm(uint16_t _SensorRpm, CommonAPI::CallStatu > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x75), + CommonAPI::SomeIP::method_id_t(0x258), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -102,7 +102,7 @@ std::future HeadUnitSomeIPProxy::setSensorRpmAsync(const > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x75), + CommonAPI::SomeIP::method_id_t(0x258), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -132,7 +132,7 @@ void HeadUnitSomeIPProxy::setGear(uint16_t _Gear, CommonAPI::CallStatus &_intern > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x76), + CommonAPI::SomeIP::method_id_t(0x259), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -160,7 +160,7 @@ std::future HeadUnitSomeIPProxy::setGearAsync(const uint1 > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x76), + CommonAPI::SomeIP::method_id_t(0x259), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -190,7 +190,7 @@ void HeadUnitSomeIPProxy::setDirection(uint16_t _Direction, CommonAPI::CallStatu > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x77), + CommonAPI::SomeIP::method_id_t(0x25a), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -218,7 +218,7 @@ std::future HeadUnitSomeIPProxy::setDirectionAsync(const > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x77), + CommonAPI::SomeIP::method_id_t(0x25a), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -248,7 +248,7 @@ void HeadUnitSomeIPProxy::setLight(std::string _Light, CommonAPI::CallStatus &_i > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x78), + CommonAPI::SomeIP::method_id_t(0x25b), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -276,7 +276,7 @@ std::future HeadUnitSomeIPProxy::setLightAsync(const std: > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x78), + CommonAPI::SomeIP::method_id_t(0x25b), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), diff --git a/src-gen-desproject/v1/commonapi/HeadUnitSomeIPProxy.hpp b/src-gen/HeadUnit/someip/proxy/v1/commonapi/HeadUnitSomeIPProxy.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/HeadUnitSomeIPProxy.hpp rename to src-gen/HeadUnit/someip/proxy/v1/commonapi/HeadUnitSomeIPProxy.hpp diff --git a/src-gen-desproject/v1/commonapi/HeadUnitSomeIPStubAdapter.cpp b/src-gen/HeadUnit/someip/stub/v1/commonapi/HeadUnitSomeIPStubAdapter.cpp similarity index 98% rename from src-gen-desproject/v1/commonapi/HeadUnitSomeIPStubAdapter.cpp rename to src-gen/HeadUnit/someip/stub/v1/commonapi/HeadUnitSomeIPStubAdapter.cpp index 786ecd70..953d81e8 100644 --- a/src-gen-desproject/v1/commonapi/HeadUnitSomeIPStubAdapter.cpp +++ b/src-gen/HeadUnit/someip/stub/v1/commonapi/HeadUnitSomeIPStubAdapter.cpp @@ -35,7 +35,7 @@ std::shared_ptr createHeadUnitSomeIPStubAdapter( void initializeHeadUnitSomeIPStubAdapter() { CommonAPI::SomeIP::AddressTranslator::get()->insert( "local:commonapi.HeadUnit:v1_0:HeadUnit", - 0x3ed, 0x2715, 1, 0); + 0x3ee, 0x2716, 1, 0); CommonAPI::SomeIP::Factory::get()->registerStubAdapterCreateMethod( "commonapi.HeadUnit:v1_0", &createHeadUnitSomeIPStubAdapter); diff --git a/src-gen-desproject/v1/commonapi/HeadUnitSomeIPStubAdapter.hpp b/src-gen/HeadUnit/someip/stub/v1/commonapi/HeadUnitSomeIPStubAdapter.hpp similarity index 96% rename from src-gen-desproject/v1/commonapi/HeadUnitSomeIPStubAdapter.hpp rename to src-gen/HeadUnit/someip/stub/v1/commonapi/HeadUnitSomeIPStubAdapter.hpp index 66b24688..32b7732b 100644 --- a/src-gen-desproject/v1/commonapi/HeadUnitSomeIPStubAdapter.hpp +++ b/src-gen/HeadUnit/someip/stub/v1/commonapi/HeadUnitSomeIPStubAdapter.hpp @@ -127,10 +127,10 @@ class HeadUnitSomeIPStubAdapterInternal std::make_tuple(static_cast< CommonAPI::SomeIP::StringDeployment* >(nullptr))) { - HeadUnitSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x75) }, &setSensorRpmStubDispatcher ); - HeadUnitSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x76) }, &setGearStubDispatcher ); - HeadUnitSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x77) }, &setDirectionStubDispatcher ); - HeadUnitSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x78) }, &setLightStubDispatcher ); + HeadUnitSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x258) }, &setSensorRpmStubDispatcher ); + HeadUnitSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x259) }, &setGearStubDispatcher ); + HeadUnitSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x25a) }, &setDirectionStubDispatcher ); + HeadUnitSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x25b) }, &setLightStubDispatcher ); // Provided events/fields } diff --git a/src-gen-desproject/v1/commonapi/IPCManager.hpp b/src-gen/IPCManager/core/common/v1/commonapi/IPCManager.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/IPCManager.hpp rename to src-gen/IPCManager/core/common/v1/commonapi/IPCManager.hpp diff --git a/src-gen-desproject/v1/commonapi/IPCManagerProxy.hpp b/src-gen/IPCManager/core/proxy/v1/commonapi/IPCManagerProxy.hpp similarity index 99% rename from src-gen-desproject/v1/commonapi/IPCManagerProxy.hpp rename to src-gen/IPCManager/core/proxy/v1/commonapi/IPCManagerProxy.hpp index 09f02a67..bbebd638 100644 --- a/src-gen-desproject/v1/commonapi/IPCManagerProxy.hpp +++ b/src-gen/IPCManager/core/proxy/v1/commonapi/IPCManagerProxy.hpp @@ -77,7 +77,7 @@ class IPCManagerProxy * "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus * will be set. */ - virtual void setSensorRpm(uint16_t _SensorRpm, CommonAPI::CallStatus &_internalCallStatus, std::string &_message, const CommonAPI::CallInfo *_info = nullptr); + virtual void setSensorRpm(uint16_t _SensorRpm, CommonAPI::CallStatus &_internalCallStatus, std::string &_messag, const CommonAPI::CallInfo *_info = nullptr); /** * Calls setSensorRpm with asynchronous semantics. * @@ -344,8 +344,8 @@ IPCManagerProxy<_AttributeExtensions...>::~IPCManagerProxy() { } template -void IPCManagerProxy<_AttributeExtensions...>::setSensorRpm(uint16_t _SensorRpm, CommonAPI::CallStatus &_internalCallStatus, std::string &_message, const CommonAPI::CallInfo *_info) { - delegate_->setSensorRpm(_SensorRpm, _internalCallStatus, _message, _info); +void IPCManagerProxy<_AttributeExtensions...>::setSensorRpm(uint16_t _SensorRpm, CommonAPI::CallStatus &_internalCallStatus, std::string &_messag, const CommonAPI::CallInfo *_info) { + delegate_->setSensorRpm(_SensorRpm, _internalCallStatus, _messag, _info); } template diff --git a/src-gen-desproject/v1/commonapi/IPCManagerProxyBase.hpp b/src-gen/IPCManager/core/proxy/v1/commonapi/IPCManagerProxyBase.hpp similarity index 98% rename from src-gen-desproject/v1/commonapi/IPCManagerProxyBase.hpp rename to src-gen/IPCManager/core/proxy/v1/commonapi/IPCManagerProxyBase.hpp index c7901e79..e864146c 100644 --- a/src-gen-desproject/v1/commonapi/IPCManagerProxyBase.hpp +++ b/src-gen/IPCManager/core/proxy/v1/commonapi/IPCManagerProxyBase.hpp @@ -50,7 +50,7 @@ class IPCManagerProxyBase typedef std::function GetLightAsyncCallback; typedef std::function GetSteeringAsyncCallback; - virtual void setSensorRpm(uint16_t _SensorRpm, CommonAPI::CallStatus &_internalCallStatus, std::string &_message, const CommonAPI::CallInfo *_info = nullptr) = 0; + virtual void setSensorRpm(uint16_t _SensorRpm, CommonAPI::CallStatus &_internalCallStatus, std::string &_messag, const CommonAPI::CallInfo *_info = nullptr) = 0; virtual std::future setSensorRpmAsync(const uint16_t &_SensorRpm, SetSensorRpmAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0; virtual void setBatteryLevel(uint16_t _BatteryLevel, CommonAPI::CallStatus &_internalCallStatus, std::string &_message, const CommonAPI::CallInfo *_info = nullptr) = 0; virtual std::future setBatteryLevelAsync(const uint16_t &_BatteryLevel, SetBatteryLevelAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0; diff --git a/src-gen-desproject/v1/commonapi/IPCManagerStubDefault.hpp b/src-gen/IPCManager/core/skel/v1/commonapi/IPCManagerStubDefault.hpp similarity index 99% rename from src-gen-desproject/v1/commonapi/IPCManagerStubDefault.hpp rename to src-gen/IPCManager/core/skel/v1/commonapi/IPCManagerStubDefault.hpp index 4b41200e..3ab228a1 100644 --- a/src-gen-desproject/v1/commonapi/IPCManagerStubDefault.hpp +++ b/src-gen/IPCManager/core/skel/v1/commonapi/IPCManagerStubDefault.hpp @@ -63,8 +63,8 @@ class COMMONAPI_EXPORT_CLASS_EXPLICIT IPCManagerStubDefault COMMONAPI_EXPORT virtual void setSensorRpm(const std::shared_ptr _client, uint16_t _SensorRpm, setSensorRpmReply_t _reply) { (void)_client; (void)_SensorRpm; - std::string message = ""; - _reply(message); + std::string messag = ""; + _reply(messag); } COMMONAPI_EXPORT virtual void setBatteryLevel(const std::shared_ptr _client, uint16_t _BatteryLevel, setBatteryLevelReply_t _reply) { (void)_client; diff --git a/src-gen-desproject/v1/commonapi/IPCManagerStub.hpp b/src-gen/IPCManager/core/stub/v1/commonapi/IPCManagerStub.hpp similarity index 98% rename from src-gen-desproject/v1/commonapi/IPCManagerStub.hpp rename to src-gen/IPCManager/core/stub/v1/commonapi/IPCManagerStub.hpp index b5c53556..89edbf43 100644 --- a/src-gen-desproject/v1/commonapi/IPCManagerStub.hpp +++ b/src-gen/IPCManager/core/stub/v1/commonapi/IPCManagerStub.hpp @@ -88,7 +88,7 @@ class IPCManagerStub : public virtual CommonAPI::Stub { public: - typedef std::function setSensorRpmReply_t; + typedef std::function setSensorRpmReply_t; typedef std::function setBatteryLevelReply_t; typedef std::function setGearModeReply_t; typedef std::function setDirectionReply_t; diff --git a/src-gen-desproject/v1/commonapi/IPCManagerSomeIPDeployment.cpp b/src-gen/IPCManager/someip/common/v1/commonapi/IPCManagerSomeIPDeployment.cpp similarity index 100% rename from src-gen-desproject/v1/commonapi/IPCManagerSomeIPDeployment.cpp rename to src-gen/IPCManager/someip/common/v1/commonapi/IPCManagerSomeIPDeployment.cpp diff --git a/src-gen-desproject/v1/commonapi/IPCManagerSomeIPDeployment.hpp b/src-gen/IPCManager/someip/common/v1/commonapi/IPCManagerSomeIPDeployment.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/IPCManagerSomeIPDeployment.hpp rename to src-gen/IPCManager/someip/common/v1/commonapi/IPCManagerSomeIPDeployment.hpp diff --git a/src-gen-desproject/v1/commonapi/IPCManagerSomeIPProxy.cpp b/src-gen/IPCManager/someip/proxy/v1/commonapi/IPCManagerSomeIPProxy.cpp similarity index 95% rename from src-gen-desproject/v1/commonapi/IPCManagerSomeIPProxy.cpp rename to src-gen/IPCManager/someip/proxy/v1/commonapi/IPCManagerSomeIPProxy.cpp index a9c41636..e2c36570 100644 --- a/src-gen-desproject/v1/commonapi/IPCManagerSomeIPProxy.cpp +++ b/src-gen/IPCManager/someip/proxy/v1/commonapi/IPCManagerSomeIPProxy.cpp @@ -33,7 +33,7 @@ std::shared_ptr createIPCManagerSomeIPProxy( void initializeIPCManagerSomeIPProxy() { CommonAPI::SomeIP::AddressTranslator::get()->insert( "local:commonapi.IPCManager:v1_0:IPCManager", - 0x3eb, 0x2713, 1, 0); + 0x3ec, 0x2714, 1, 0); CommonAPI::SomeIP::Factory::get()->registerProxyCreateMethod( "commonapi.IPCManager:v1_0", &createIPCManagerSomeIPProxy); @@ -56,9 +56,9 @@ IPCManagerSomeIPProxy::~IPCManagerSomeIPProxy() { -void IPCManagerSomeIPProxy::setSensorRpm(uint16_t _SensorRpm, CommonAPI::CallStatus &_internalCallStatus, std::string &_message, const CommonAPI::CallInfo *_info) { +void IPCManagerSomeIPProxy::setSensorRpm(uint16_t _SensorRpm, CommonAPI::CallStatus &_internalCallStatus, std::string &_messag, const CommonAPI::CallInfo *_info) { CommonAPI::Deployable< uint16_t, CommonAPI::SomeIP::IntegerDeployment> deploy_SensorRpm(_SensorRpm, static_cast< CommonAPI::SomeIP::IntegerDeployment* >(nullptr)); - CommonAPI::Deployable< std::string, CommonAPI::SomeIP::StringDeployment> deploy_message(static_cast< CommonAPI::SomeIP::StringDeployment* >(nullptr)); + CommonAPI::Deployable< std::string, CommonAPI::SomeIP::StringDeployment> deploy_messag(static_cast< CommonAPI::SomeIP::StringDeployment* >(nullptr)); CommonAPI::SomeIP::ProxyHelper< CommonAPI::SomeIP::SerializableArguments< CommonAPI::Deployable< @@ -74,19 +74,19 @@ void IPCManagerSomeIPProxy::setSensorRpm(uint16_t _SensorRpm, CommonAPI::CallSta > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x64), + CommonAPI::SomeIP::method_id_t(0x190), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), deploy_SensorRpm, _internalCallStatus, - deploy_message); - _message = deploy_message.getValue(); + deploy_messag); + _messag = deploy_messag.getValue(); } std::future IPCManagerSomeIPProxy::setSensorRpmAsync(const uint16_t &_SensorRpm, SetSensorRpmAsyncCallback _callback, const CommonAPI::CallInfo *_info) { CommonAPI::Deployable< uint16_t, CommonAPI::SomeIP::IntegerDeployment> deploy_SensorRpm(_SensorRpm, static_cast< CommonAPI::SomeIP::IntegerDeployment* >(nullptr)); - CommonAPI::Deployable< std::string, CommonAPI::SomeIP::StringDeployment> deploy_message(static_cast< CommonAPI::SomeIP::StringDeployment* >(nullptr)); + CommonAPI::Deployable< std::string, CommonAPI::SomeIP::StringDeployment> deploy_messag(static_cast< CommonAPI::SomeIP::StringDeployment* >(nullptr)); return CommonAPI::SomeIP::ProxyHelper< CommonAPI::SomeIP::SerializableArguments< CommonAPI::Deployable< @@ -102,16 +102,16 @@ std::future IPCManagerSomeIPProxy::setSensorRpmAsync(cons > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x64), + CommonAPI::SomeIP::method_id_t(0x190), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), deploy_SensorRpm, - [_callback] (CommonAPI::CallStatus _internalCallStatus, CommonAPI::Deployable< std::string, CommonAPI::SomeIP::StringDeployment > _message) { + [_callback] (CommonAPI::CallStatus _internalCallStatus, CommonAPI::Deployable< std::string, CommonAPI::SomeIP::StringDeployment > _messag) { if (_callback) - _callback(_internalCallStatus, _message.getValue()); + _callback(_internalCallStatus, _messag.getValue()); }, - std::make_tuple(deploy_message)); + std::make_tuple(deploy_messag)); } void IPCManagerSomeIPProxy::setBatteryLevel(uint16_t _BatteryLevel, CommonAPI::CallStatus &_internalCallStatus, std::string &_message, const CommonAPI::CallInfo *_info) { @@ -132,7 +132,7 @@ void IPCManagerSomeIPProxy::setBatteryLevel(uint16_t _BatteryLevel, CommonAPI::C > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x65), + CommonAPI::SomeIP::method_id_t(0x191), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -160,7 +160,7 @@ std::future IPCManagerSomeIPProxy::setBatteryLevelAsync(c > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x65), + CommonAPI::SomeIP::method_id_t(0x191), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -190,7 +190,7 @@ void IPCManagerSomeIPProxy::setGearMode(uint16_t _GearMode, CommonAPI::CallStatu > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x66), + CommonAPI::SomeIP::method_id_t(0x192), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -218,7 +218,7 @@ std::future IPCManagerSomeIPProxy::setGearModeAsync(const > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x66), + CommonAPI::SomeIP::method_id_t(0x192), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -248,7 +248,7 @@ void IPCManagerSomeIPProxy::setDirection(uint16_t _Direction, CommonAPI::CallSta > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x67), + CommonAPI::SomeIP::method_id_t(0x193), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -276,7 +276,7 @@ std::future IPCManagerSomeIPProxy::setDirectionAsync(cons > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x67), + CommonAPI::SomeIP::method_id_t(0x193), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -306,7 +306,7 @@ void IPCManagerSomeIPProxy::setLight(std::string _Light, CommonAPI::CallStatus & > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x68), + CommonAPI::SomeIP::method_id_t(0x194), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -334,7 +334,7 @@ std::future IPCManagerSomeIPProxy::setLightAsync(const st > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x68), + CommonAPI::SomeIP::method_id_t(0x194), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -364,7 +364,7 @@ void IPCManagerSomeIPProxy::setThrottle(double _Throttle, CommonAPI::CallStatus > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x69), + CommonAPI::SomeIP::method_id_t(0x195), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -392,7 +392,7 @@ std::future IPCManagerSomeIPProxy::setThrottleAsync(const > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x69), + CommonAPI::SomeIP::method_id_t(0x195), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -422,7 +422,7 @@ void IPCManagerSomeIPProxy::setSteering(double _Steering, CommonAPI::CallStatus > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x6a), + CommonAPI::SomeIP::method_id_t(0x196), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -450,7 +450,7 @@ std::future IPCManagerSomeIPProxy::setSteeringAsync(const > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x6a), + CommonAPI::SomeIP::method_id_t(0x196), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -480,7 +480,7 @@ void IPCManagerSomeIPProxy::setDistance(uint16_t _Distance, CommonAPI::CallStatu > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x6b), + CommonAPI::SomeIP::method_id_t(0x197), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -508,7 +508,7 @@ std::future IPCManagerSomeIPProxy::setDistanceAsync(const > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x6b), + CommonAPI::SomeIP::method_id_t(0x197), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -538,7 +538,7 @@ void IPCManagerSomeIPProxy::getGearMode(std::string _message1, CommonAPI::CallSt > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x6c), + CommonAPI::SomeIP::method_id_t(0x198), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -566,7 +566,7 @@ std::future IPCManagerSomeIPProxy::getGearModeAsync(const > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x6c), + CommonAPI::SomeIP::method_id_t(0x198), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -596,7 +596,7 @@ void IPCManagerSomeIPProxy::getDirection(std::string _message1, CommonAPI::CallS > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x6d), + CommonAPI::SomeIP::method_id_t(0x199), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -624,7 +624,7 @@ std::future IPCManagerSomeIPProxy::getDirectionAsync(cons > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x6d), + CommonAPI::SomeIP::method_id_t(0x199), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -654,7 +654,7 @@ void IPCManagerSomeIPProxy::getLight(std::string _message1, CommonAPI::CallStatu > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x6e), + CommonAPI::SomeIP::method_id_t(0x19a), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -682,7 +682,7 @@ std::future IPCManagerSomeIPProxy::getLightAsync(const st > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x6e), + CommonAPI::SomeIP::method_id_t(0x19a), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -712,7 +712,7 @@ void IPCManagerSomeIPProxy::getSteering(std::string _message1, CommonAPI::CallSt > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x6f), + CommonAPI::SomeIP::method_id_t(0x19b), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -740,7 +740,7 @@ std::future IPCManagerSomeIPProxy::getSteeringAsync(const > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x6f), + CommonAPI::SomeIP::method_id_t(0x19b), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), diff --git a/src-gen-desproject/v1/commonapi/IPCManagerSomeIPProxy.hpp b/src-gen/IPCManager/someip/proxy/v1/commonapi/IPCManagerSomeIPProxy.hpp similarity index 98% rename from src-gen-desproject/v1/commonapi/IPCManagerSomeIPProxy.hpp rename to src-gen/IPCManager/someip/proxy/v1/commonapi/IPCManagerSomeIPProxy.hpp index 6609eccd..1bd8c56b 100644 --- a/src-gen-desproject/v1/commonapi/IPCManagerSomeIPProxy.hpp +++ b/src-gen/IPCManager/someip/proxy/v1/commonapi/IPCManagerSomeIPProxy.hpp @@ -53,7 +53,7 @@ class IPCManagerSomeIPProxy virtual ~IPCManagerSomeIPProxy(); - virtual void setSensorRpm(uint16_t _SensorRpm, CommonAPI::CallStatus &_internalCallStatus, std::string &_message, const CommonAPI::CallInfo *_info); + virtual void setSensorRpm(uint16_t _SensorRpm, CommonAPI::CallStatus &_internalCallStatus, std::string &_messag, const CommonAPI::CallInfo *_info); virtual std::future setSensorRpmAsync(const uint16_t &_SensorRpm, SetSensorRpmAsyncCallback _callback, const CommonAPI::CallInfo *_info); diff --git a/src-gen-desproject/v1/commonapi/IPCManagerSomeIPStubAdapter.cpp b/src-gen/IPCManager/someip/stub/v1/commonapi/IPCManagerSomeIPStubAdapter.cpp similarity index 98% rename from src-gen-desproject/v1/commonapi/IPCManagerSomeIPStubAdapter.cpp rename to src-gen/IPCManager/someip/stub/v1/commonapi/IPCManagerSomeIPStubAdapter.cpp index 4b04c38e..ec3dddc2 100644 --- a/src-gen-desproject/v1/commonapi/IPCManagerSomeIPStubAdapter.cpp +++ b/src-gen/IPCManager/someip/stub/v1/commonapi/IPCManagerSomeIPStubAdapter.cpp @@ -35,7 +35,7 @@ std::shared_ptr createIPCManagerSomeIPStubAdapte void initializeIPCManagerSomeIPStubAdapter() { CommonAPI::SomeIP::AddressTranslator::get()->insert( "local:commonapi.IPCManager:v1_0:IPCManager", - 0x3eb, 0x2713, 1, 0); + 0x3ec, 0x2714, 1, 0); CommonAPI::SomeIP::Factory::get()->registerStubAdapterCreateMethod( "commonapi.IPCManager:v1_0", &createIPCManagerSomeIPStubAdapter); diff --git a/src-gen-desproject/v1/commonapi/IPCManagerSomeIPStubAdapter.hpp b/src-gen/IPCManager/someip/stub/v1/commonapi/IPCManagerSomeIPStubAdapter.hpp similarity index 93% rename from src-gen-desproject/v1/commonapi/IPCManagerSomeIPStubAdapter.hpp rename to src-gen/IPCManager/someip/stub/v1/commonapi/IPCManagerSomeIPStubAdapter.hpp index f0e5fa20..20677576 100644 --- a/src-gen-desproject/v1/commonapi/IPCManagerSomeIPStubAdapter.hpp +++ b/src-gen/IPCManager/someip/stub/v1/commonapi/IPCManagerSomeIPStubAdapter.hpp @@ -255,18 +255,18 @@ class IPCManagerSomeIPStubAdapterInternal std::make_tuple(static_cast< CommonAPI::SomeIP::StringDeployment* >(nullptr))) { - IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x64) }, &setSensorRpmStubDispatcher ); - IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x65) }, &setBatteryLevelStubDispatcher ); - IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x66) }, &setGearModeStubDispatcher ); - IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x67) }, &setDirectionStubDispatcher ); - IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x68) }, &setLightStubDispatcher ); - IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x69) }, &setThrottleStubDispatcher ); - IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x6a) }, &setSteeringStubDispatcher ); - IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x6b) }, &setDistanceStubDispatcher ); - IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x6c) }, &getGearModeStubDispatcher ); - IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x6d) }, &getDirectionStubDispatcher ); - IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x6e) }, &getLightStubDispatcher ); - IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x6f) }, &getSteeringStubDispatcher ); + IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x190) }, &setSensorRpmStubDispatcher ); + IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x191) }, &setBatteryLevelStubDispatcher ); + IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x192) }, &setGearModeStubDispatcher ); + IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x193) }, &setDirectionStubDispatcher ); + IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x194) }, &setLightStubDispatcher ); + IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x195) }, &setThrottleStubDispatcher ); + IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x196) }, &setSteeringStubDispatcher ); + IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x197) }, &setDistanceStubDispatcher ); + IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x198) }, &getGearModeStubDispatcher ); + IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x199) }, &getDirectionStubDispatcher ); + IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x19a) }, &getLightStubDispatcher ); + IPCManagerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x19b) }, &getSteeringStubDispatcher ); // Provided events/fields } diff --git a/src-gen-desproject/v1/commonapi/IVICompositor.hpp b/src-gen/IVICompositor/core/common/v1/commonapi/IVICompositor.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/IVICompositor.hpp rename to src-gen/IVICompositor/core/common/v1/commonapi/IVICompositor.hpp diff --git a/src-gen-desproject/v1/commonapi/IVICompositorProxy.hpp b/src-gen/IVICompositor/core/proxy/v1/commonapi/IVICompositorProxy.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/IVICompositorProxy.hpp rename to src-gen/IVICompositor/core/proxy/v1/commonapi/IVICompositorProxy.hpp diff --git a/src-gen-desproject/v1/commonapi/IVICompositorProxyBase.hpp b/src-gen/IVICompositor/core/proxy/v1/commonapi/IVICompositorProxyBase.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/IVICompositorProxyBase.hpp rename to src-gen/IVICompositor/core/proxy/v1/commonapi/IVICompositorProxyBase.hpp diff --git a/src-gen-desproject/v1/commonapi/IVICompositorStubDefault.hpp b/src-gen/IVICompositor/core/skel/v1/commonapi/IVICompositorStubDefault.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/IVICompositorStubDefault.hpp rename to src-gen/IVICompositor/core/skel/v1/commonapi/IVICompositorStubDefault.hpp diff --git a/src-gen-desproject/v1/commonapi/IVICompositorStub.hpp b/src-gen/IVICompositor/core/stub/v1/commonapi/IVICompositorStub.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/IVICompositorStub.hpp rename to src-gen/IVICompositor/core/stub/v1/commonapi/IVICompositorStub.hpp diff --git a/src-gen-desproject/v1/commonapi/IVICompositorSomeIPDeployment.cpp b/src-gen/IVICompositor/someip/common/v1/commonapi/IVICompositorSomeIPDeployment.cpp similarity index 100% rename from src-gen-desproject/v1/commonapi/IVICompositorSomeIPDeployment.cpp rename to src-gen/IVICompositor/someip/common/v1/commonapi/IVICompositorSomeIPDeployment.cpp diff --git a/src-gen-desproject/v1/commonapi/IVICompositorSomeIPDeployment.hpp b/src-gen/IVICompositor/someip/common/v1/commonapi/IVICompositorSomeIPDeployment.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/IVICompositorSomeIPDeployment.hpp rename to src-gen/IVICompositor/someip/common/v1/commonapi/IVICompositorSomeIPDeployment.hpp diff --git a/src-gen-desproject/v1/commonapi/IVICompositorSomeIPProxy.cpp b/src-gen/IVICompositor/someip/proxy/v1/commonapi/IVICompositorSomeIPProxy.cpp similarity index 97% rename from src-gen-desproject/v1/commonapi/IVICompositorSomeIPProxy.cpp rename to src-gen/IVICompositor/someip/proxy/v1/commonapi/IVICompositorSomeIPProxy.cpp index 0490c7b6..6c70e360 100644 --- a/src-gen-desproject/v1/commonapi/IVICompositorSomeIPProxy.cpp +++ b/src-gen/IVICompositor/someip/proxy/v1/commonapi/IVICompositorSomeIPProxy.cpp @@ -33,7 +33,7 @@ std::shared_ptr createIVICompositorSomeIPProxy( void initializeIVICompositorSomeIPProxy() { CommonAPI::SomeIP::AddressTranslator::get()->insert( "local:commonapi.IVICompositor:v1_0:IVICompositor", - 0x3ef, 0x2717, 1, 0); + 0x3f0, 0x2718, 1, 0); CommonAPI::SomeIP::Factory::get()->registerProxyCreateMethod( "commonapi.IVICompositor:v1_0", &createIVICompositorSomeIPProxy); @@ -74,7 +74,7 @@ void IVICompositorSomeIPProxy::setGear(uint16_t _Gear, CommonAPI::CallStatus &_i > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x7b), + CommonAPI::SomeIP::method_id_t(0x320), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -102,7 +102,7 @@ std::future IVICompositorSomeIPProxy::setGearAsync(const > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x7b), + CommonAPI::SomeIP::method_id_t(0x320), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), diff --git a/src-gen-desproject/v1/commonapi/IVICompositorSomeIPProxy.hpp b/src-gen/IVICompositor/someip/proxy/v1/commonapi/IVICompositorSomeIPProxy.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/IVICompositorSomeIPProxy.hpp rename to src-gen/IVICompositor/someip/proxy/v1/commonapi/IVICompositorSomeIPProxy.hpp diff --git a/src-gen-desproject/v1/commonapi/IVICompositorSomeIPStubAdapter.cpp b/src-gen/IVICompositor/someip/stub/v1/commonapi/IVICompositorSomeIPStubAdapter.cpp similarity index 98% rename from src-gen-desproject/v1/commonapi/IVICompositorSomeIPStubAdapter.cpp rename to src-gen/IVICompositor/someip/stub/v1/commonapi/IVICompositorSomeIPStubAdapter.cpp index d03afeb9..4829f40e 100644 --- a/src-gen-desproject/v1/commonapi/IVICompositorSomeIPStubAdapter.cpp +++ b/src-gen/IVICompositor/someip/stub/v1/commonapi/IVICompositorSomeIPStubAdapter.cpp @@ -35,7 +35,7 @@ std::shared_ptr createIVICompositorSomeIPStubAda void initializeIVICompositorSomeIPStubAdapter() { CommonAPI::SomeIP::AddressTranslator::get()->insert( "local:commonapi.IVICompositor:v1_0:IVICompositor", - 0x3ef, 0x2717, 1, 0); + 0x3f0, 0x2718, 1, 0); CommonAPI::SomeIP::Factory::get()->registerStubAdapterCreateMethod( "commonapi.IVICompositor:v1_0", &createIVICompositorSomeIPStubAdapter); diff --git a/src-gen-desproject/v1/commonapi/IVICompositorSomeIPStubAdapter.hpp b/src-gen/IVICompositor/someip/stub/v1/commonapi/IVICompositorSomeIPStubAdapter.hpp similarity index 98% rename from src-gen-desproject/v1/commonapi/IVICompositorSomeIPStubAdapter.hpp rename to src-gen/IVICompositor/someip/stub/v1/commonapi/IVICompositorSomeIPStubAdapter.hpp index 94d9dbee..720edc7f 100644 --- a/src-gen-desproject/v1/commonapi/IVICompositorSomeIPStubAdapter.hpp +++ b/src-gen/IVICompositor/someip/stub/v1/commonapi/IVICompositorSomeIPStubAdapter.hpp @@ -79,7 +79,7 @@ class IVICompositorSomeIPStubAdapterInternal std::make_tuple(static_cast< CommonAPI::SomeIP::StringDeployment* >(nullptr))) { - IVICompositorSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x7b) }, &setGearStubDispatcher ); + IVICompositorSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x320) }, &setGearStubDispatcher ); // Provided events/fields } diff --git a/src-gen-desproject/v1/commonapi/InstrumentCluster.hpp b/src-gen/InstrumentCluster/core/common/v1/commonapi/InstrumentCluster.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/InstrumentCluster.hpp rename to src-gen/InstrumentCluster/core/common/v1/commonapi/InstrumentCluster.hpp diff --git a/src-gen-desproject/v1/commonapi/InstrumentClusterProxy.hpp b/src-gen/InstrumentCluster/core/proxy/v1/commonapi/InstrumentClusterProxy.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/InstrumentClusterProxy.hpp rename to src-gen/InstrumentCluster/core/proxy/v1/commonapi/InstrumentClusterProxy.hpp diff --git a/src-gen-desproject/v1/commonapi/InstrumentClusterProxyBase.hpp b/src-gen/InstrumentCluster/core/proxy/v1/commonapi/InstrumentClusterProxyBase.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/InstrumentClusterProxyBase.hpp rename to src-gen/InstrumentCluster/core/proxy/v1/commonapi/InstrumentClusterProxyBase.hpp diff --git a/src-gen-desproject/v1/commonapi/InstrumentClusterStubDefault.hpp b/src-gen/InstrumentCluster/core/skel/v1/commonapi/InstrumentClusterStubDefault.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/InstrumentClusterStubDefault.hpp rename to src-gen/InstrumentCluster/core/skel/v1/commonapi/InstrumentClusterStubDefault.hpp diff --git a/src-gen-desproject/v1/commonapi/InstrumentClusterStub.hpp b/src-gen/InstrumentCluster/core/stub/v1/commonapi/InstrumentClusterStub.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/InstrumentClusterStub.hpp rename to src-gen/InstrumentCluster/core/stub/v1/commonapi/InstrumentClusterStub.hpp diff --git a/src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPDeployment.cpp b/src-gen/InstrumentCluster/someip/common/v1/commonapi/InstrumentClusterSomeIPDeployment.cpp similarity index 100% rename from src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPDeployment.cpp rename to src-gen/InstrumentCluster/someip/common/v1/commonapi/InstrumentClusterSomeIPDeployment.cpp diff --git a/src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPDeployment.hpp b/src-gen/InstrumentCluster/someip/common/v1/commonapi/InstrumentClusterSomeIPDeployment.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPDeployment.hpp rename to src-gen/InstrumentCluster/someip/common/v1/commonapi/InstrumentClusterSomeIPDeployment.hpp diff --git a/src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPProxy.cpp b/src-gen/InstrumentCluster/someip/proxy/v1/commonapi/InstrumentClusterSomeIPProxy.cpp similarity index 96% rename from src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPProxy.cpp rename to src-gen/InstrumentCluster/someip/proxy/v1/commonapi/InstrumentClusterSomeIPProxy.cpp index 76746f8c..93fd1a89 100644 --- a/src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPProxy.cpp +++ b/src-gen/InstrumentCluster/someip/proxy/v1/commonapi/InstrumentClusterSomeIPProxy.cpp @@ -33,7 +33,7 @@ std::shared_ptr createInstrumentClusterSomeIPProxy( void initializeInstrumentClusterSomeIPProxy() { CommonAPI::SomeIP::AddressTranslator::get()->insert( "local:commonapi.InstrumentCluster:v1_0:InstrumentCluster", - 0x3ec, 0x2714, 1, 0); + 0x3ed, 0x2715, 1, 0); CommonAPI::SomeIP::Factory::get()->registerProxyCreateMethod( "commonapi.InstrumentCluster:v1_0", &createInstrumentClusterSomeIPProxy); @@ -74,7 +74,7 @@ void InstrumentClusterSomeIPProxy::setSpeedRpm(uint16_t _SensorRpm, CommonAPI::C > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x70), + CommonAPI::SomeIP::method_id_t(0x1f4), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -102,7 +102,7 @@ std::future InstrumentClusterSomeIPProxy::setSpeedRpmAsyn > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x70), + CommonAPI::SomeIP::method_id_t(0x1f4), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -132,7 +132,7 @@ void InstrumentClusterSomeIPProxy::setBattery(uint16_t _Battery, CommonAPI::Call > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x71), + CommonAPI::SomeIP::method_id_t(0x1f5), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -160,7 +160,7 @@ std::future InstrumentClusterSomeIPProxy::setBatteryAsync > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x71), + CommonAPI::SomeIP::method_id_t(0x1f5), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -190,7 +190,7 @@ void InstrumentClusterSomeIPProxy::setGear(uint16_t _Gear, CommonAPI::CallStatus > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x72), + CommonAPI::SomeIP::method_id_t(0x1f6), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -218,7 +218,7 @@ std::future InstrumentClusterSomeIPProxy::setGearAsync(co > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x72), + CommonAPI::SomeIP::method_id_t(0x1f6), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -248,7 +248,7 @@ void InstrumentClusterSomeIPProxy::setDirection(uint16_t _Direction, CommonAPI:: > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x73), + CommonAPI::SomeIP::method_id_t(0x1f7), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -276,7 +276,7 @@ std::future InstrumentClusterSomeIPProxy::setDirectionAsy > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x73), + CommonAPI::SomeIP::method_id_t(0x1f7), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -306,7 +306,7 @@ void InstrumentClusterSomeIPProxy::setLight(std::string _Light, CommonAPI::CallS > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x74), + CommonAPI::SomeIP::method_id_t(0x1f8), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -334,7 +334,7 @@ std::future InstrumentClusterSomeIPProxy::setLightAsync(c > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x74), + CommonAPI::SomeIP::method_id_t(0x1f8), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), diff --git a/src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPProxy.hpp b/src-gen/InstrumentCluster/someip/proxy/v1/commonapi/InstrumentClusterSomeIPProxy.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPProxy.hpp rename to src-gen/InstrumentCluster/someip/proxy/v1/commonapi/InstrumentClusterSomeIPProxy.hpp diff --git a/src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPStubAdapter.cpp b/src-gen/InstrumentCluster/someip/stub/v1/commonapi/InstrumentClusterSomeIPStubAdapter.cpp similarity index 98% rename from src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPStubAdapter.cpp rename to src-gen/InstrumentCluster/someip/stub/v1/commonapi/InstrumentClusterSomeIPStubAdapter.cpp index 85d9eba6..c01d7a85 100644 --- a/src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPStubAdapter.cpp +++ b/src-gen/InstrumentCluster/someip/stub/v1/commonapi/InstrumentClusterSomeIPStubAdapter.cpp @@ -35,7 +35,7 @@ std::shared_ptr createInstrumentClusterSomeIPStu void initializeInstrumentClusterSomeIPStubAdapter() { CommonAPI::SomeIP::AddressTranslator::get()->insert( "local:commonapi.InstrumentCluster:v1_0:InstrumentCluster", - 0x3ec, 0x2714, 1, 0); + 0x3ed, 0x2715, 1, 0); CommonAPI::SomeIP::Factory::get()->registerStubAdapterCreateMethod( "commonapi.InstrumentCluster:v1_0", &createInstrumentClusterSomeIPStubAdapter); diff --git a/src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPStubAdapter.hpp b/src-gen/InstrumentCluster/someip/stub/v1/commonapi/InstrumentClusterSomeIPStubAdapter.hpp similarity index 95% rename from src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPStubAdapter.hpp rename to src-gen/InstrumentCluster/someip/stub/v1/commonapi/InstrumentClusterSomeIPStubAdapter.hpp index c0572354..0da5f074 100644 --- a/src-gen-desproject/v1/commonapi/InstrumentClusterSomeIPStubAdapter.hpp +++ b/src-gen/InstrumentCluster/someip/stub/v1/commonapi/InstrumentClusterSomeIPStubAdapter.hpp @@ -143,11 +143,11 @@ class InstrumentClusterSomeIPStubAdapterInternal std::make_tuple(static_cast< CommonAPI::SomeIP::StringDeployment* >(nullptr))) { - InstrumentClusterSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x70) }, &setSpeedRpmStubDispatcher ); - InstrumentClusterSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x71) }, &setBatteryStubDispatcher ); - InstrumentClusterSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x72) }, &setGearStubDispatcher ); - InstrumentClusterSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x73) }, &setDirectionStubDispatcher ); - InstrumentClusterSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x74) }, &setLightStubDispatcher ); + InstrumentClusterSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x1f4) }, &setSpeedRpmStubDispatcher ); + InstrumentClusterSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x1f5) }, &setBatteryStubDispatcher ); + InstrumentClusterSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x1f6) }, &setGearStubDispatcher ); + InstrumentClusterSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x1f7) }, &setDirectionStubDispatcher ); + InstrumentClusterSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x1f8) }, &setLightStubDispatcher ); // Provided events/fields } diff --git a/src-gen-desproject/v1/commonapi/PDCUnit.hpp b/src-gen/PDCUnit/core/common/v1/commonapi/PDCUnit.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PDCUnit.hpp rename to src-gen/PDCUnit/core/common/v1/commonapi/PDCUnit.hpp diff --git a/src-gen-desproject/v1/commonapi/PDCUnitProxy.hpp b/src-gen/PDCUnit/core/proxy/v1/commonapi/PDCUnitProxy.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PDCUnitProxy.hpp rename to src-gen/PDCUnit/core/proxy/v1/commonapi/PDCUnitProxy.hpp diff --git a/src-gen-desproject/v1/commonapi/PDCUnitProxyBase.hpp b/src-gen/PDCUnit/core/proxy/v1/commonapi/PDCUnitProxyBase.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PDCUnitProxyBase.hpp rename to src-gen/PDCUnit/core/proxy/v1/commonapi/PDCUnitProxyBase.hpp diff --git a/src-gen-desproject/v1/commonapi/PDCUnitStubDefault.hpp b/src-gen/PDCUnit/core/skel/v1/commonapi/PDCUnitStubDefault.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PDCUnitStubDefault.hpp rename to src-gen/PDCUnit/core/skel/v1/commonapi/PDCUnitStubDefault.hpp diff --git a/src-gen-desproject/v1/commonapi/PDCUnitStub.hpp b/src-gen/PDCUnit/core/stub/v1/commonapi/PDCUnitStub.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PDCUnitStub.hpp rename to src-gen/PDCUnit/core/stub/v1/commonapi/PDCUnitStub.hpp diff --git a/src-gen-desproject/v1/commonapi/PDCUnitSomeIPDeployment.cpp b/src-gen/PDCUnit/someip/common/v1/commonapi/PDCUnitSomeIPDeployment.cpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PDCUnitSomeIPDeployment.cpp rename to src-gen/PDCUnit/someip/common/v1/commonapi/PDCUnitSomeIPDeployment.cpp diff --git a/src-gen-desproject/v1/commonapi/PDCUnitSomeIPDeployment.hpp b/src-gen/PDCUnit/someip/common/v1/commonapi/PDCUnitSomeIPDeployment.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PDCUnitSomeIPDeployment.hpp rename to src-gen/PDCUnit/someip/common/v1/commonapi/PDCUnitSomeIPDeployment.hpp diff --git a/src-gen-desproject/v1/commonapi/PDCUnitSomeIPProxy.cpp b/src-gen/PDCUnit/someip/proxy/v1/commonapi/PDCUnitSomeIPProxy.cpp similarity index 97% rename from src-gen-desproject/v1/commonapi/PDCUnitSomeIPProxy.cpp rename to src-gen/PDCUnit/someip/proxy/v1/commonapi/PDCUnitSomeIPProxy.cpp index 3663bbd0..08cc6d45 100644 --- a/src-gen-desproject/v1/commonapi/PDCUnitSomeIPProxy.cpp +++ b/src-gen/PDCUnit/someip/proxy/v1/commonapi/PDCUnitSomeIPProxy.cpp @@ -33,7 +33,7 @@ std::shared_ptr createPDCUnitSomeIPProxy( void initializePDCUnitSomeIPProxy() { CommonAPI::SomeIP::AddressTranslator::get()->insert( "local:commonapi.PDCUnit:v1_0:PDCUnit", - 0x3ee, 0x2716, 1, 0); + 0x3ef, 0x2717, 1, 0); CommonAPI::SomeIP::Factory::get()->registerProxyCreateMethod( "commonapi.PDCUnit:v1_0", &createPDCUnitSomeIPProxy); @@ -74,7 +74,7 @@ void PDCUnitSomeIPProxy::setDistance(uint16_t _Distance, CommonAPI::CallStatus & > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x79), + CommonAPI::SomeIP::method_id_t(0x2bc), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -102,7 +102,7 @@ std::future PDCUnitSomeIPProxy::setDistanceAsync(const ui > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x79), + CommonAPI::SomeIP::method_id_t(0x2bc), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -132,7 +132,7 @@ void PDCUnitSomeIPProxy::setSteering(double _Steering, CommonAPI::CallStatus &_i > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x7a), + CommonAPI::SomeIP::method_id_t(0x2bd), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -160,7 +160,7 @@ std::future PDCUnitSomeIPProxy::setSteeringAsync(const do > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x7a), + CommonAPI::SomeIP::method_id_t(0x2bd), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), diff --git a/src-gen-desproject/v1/commonapi/PDCUnitSomeIPProxy.hpp b/src-gen/PDCUnit/someip/proxy/v1/commonapi/PDCUnitSomeIPProxy.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PDCUnitSomeIPProxy.hpp rename to src-gen/PDCUnit/someip/proxy/v1/commonapi/PDCUnitSomeIPProxy.hpp diff --git a/src-gen-desproject/v1/commonapi/PDCUnitSomeIPStubAdapter.cpp b/src-gen/PDCUnit/someip/stub/v1/commonapi/PDCUnitSomeIPStubAdapter.cpp similarity index 98% rename from src-gen-desproject/v1/commonapi/PDCUnitSomeIPStubAdapter.cpp rename to src-gen/PDCUnit/someip/stub/v1/commonapi/PDCUnitSomeIPStubAdapter.cpp index 22061696..faddb6f1 100644 --- a/src-gen-desproject/v1/commonapi/PDCUnitSomeIPStubAdapter.cpp +++ b/src-gen/PDCUnit/someip/stub/v1/commonapi/PDCUnitSomeIPStubAdapter.cpp @@ -35,7 +35,7 @@ std::shared_ptr createPDCUnitSomeIPStubAdapter( void initializePDCUnitSomeIPStubAdapter() { CommonAPI::SomeIP::AddressTranslator::get()->insert( "local:commonapi.PDCUnit:v1_0:PDCUnit", - 0x3ee, 0x2716, 1, 0); + 0x3ef, 0x2717, 1, 0); CommonAPI::SomeIP::Factory::get()->registerStubAdapterCreateMethod( "commonapi.PDCUnit:v1_0", &createPDCUnitSomeIPStubAdapter); diff --git a/src-gen-desproject/v1/commonapi/PDCUnitSomeIPStubAdapter.hpp b/src-gen/PDCUnit/someip/stub/v1/commonapi/PDCUnitSomeIPStubAdapter.hpp similarity index 97% rename from src-gen-desproject/v1/commonapi/PDCUnitSomeIPStubAdapter.hpp rename to src-gen/PDCUnit/someip/stub/v1/commonapi/PDCUnitSomeIPStubAdapter.hpp index 795954fb..ccd44e08 100644 --- a/src-gen-desproject/v1/commonapi/PDCUnitSomeIPStubAdapter.hpp +++ b/src-gen/PDCUnit/someip/stub/v1/commonapi/PDCUnitSomeIPStubAdapter.hpp @@ -95,8 +95,8 @@ class PDCUnitSomeIPStubAdapterInternal std::make_tuple(static_cast< CommonAPI::SomeIP::StringDeployment* >(nullptr))) { - PDCUnitSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x79) }, &setDistanceStubDispatcher ); - PDCUnitSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x7a) }, &setSteeringStubDispatcher ); + PDCUnitSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x2bc) }, &setDistanceStubDispatcher ); + PDCUnitSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x2bd) }, &setSteeringStubDispatcher ); // Provided events/fields } diff --git a/src-gen-desproject/v1/commonapi/PiracerController.hpp b/src-gen/PiracerController/core/common/v1/commonapi/PiracerController.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PiracerController.hpp rename to src-gen/PiracerController/core/common/v1/commonapi/PiracerController.hpp diff --git a/src-gen-desproject/v1/commonapi/PiracerControllerProxy.hpp b/src-gen/PiracerController/core/proxy/v1/commonapi/PiracerControllerProxy.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PiracerControllerProxy.hpp rename to src-gen/PiracerController/core/proxy/v1/commonapi/PiracerControllerProxy.hpp diff --git a/src-gen-desproject/v1/commonapi/PiracerControllerProxyBase.hpp b/src-gen/PiracerController/core/proxy/v1/commonapi/PiracerControllerProxyBase.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PiracerControllerProxyBase.hpp rename to src-gen/PiracerController/core/proxy/v1/commonapi/PiracerControllerProxyBase.hpp diff --git a/src-gen-desproject/v1/commonapi/PiracerControllerStubDefault.hpp b/src-gen/PiracerController/core/skel/v1/commonapi/PiracerControllerStubDefault.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PiracerControllerStubDefault.hpp rename to src-gen/PiracerController/core/skel/v1/commonapi/PiracerControllerStubDefault.hpp diff --git a/src-gen-desproject/v1/commonapi/PiracerControllerStub.hpp b/src-gen/PiracerController/core/stub/v1/commonapi/PiracerControllerStub.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PiracerControllerStub.hpp rename to src-gen/PiracerController/core/stub/v1/commonapi/PiracerControllerStub.hpp diff --git a/src-gen-desproject/v1/commonapi/PiracerControllerSomeIPDeployment.cpp b/src-gen/PiracerController/someip/common/v1/commonapi/PiracerControllerSomeIPDeployment.cpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PiracerControllerSomeIPDeployment.cpp rename to src-gen/PiracerController/someip/common/v1/commonapi/PiracerControllerSomeIPDeployment.cpp diff --git a/src-gen-desproject/v1/commonapi/PiracerControllerSomeIPDeployment.hpp b/src-gen/PiracerController/someip/common/v1/commonapi/PiracerControllerSomeIPDeployment.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PiracerControllerSomeIPDeployment.hpp rename to src-gen/PiracerController/someip/common/v1/commonapi/PiracerControllerSomeIPDeployment.hpp diff --git a/src-gen-desproject/v1/commonapi/PiracerControllerSomeIPProxy.cpp b/src-gen/PiracerController/someip/proxy/v1/commonapi/PiracerControllerSomeIPProxy.cpp similarity index 98% rename from src-gen-desproject/v1/commonapi/PiracerControllerSomeIPProxy.cpp rename to src-gen/PiracerController/someip/proxy/v1/commonapi/PiracerControllerSomeIPProxy.cpp index 85bb4993..73199441 100644 --- a/src-gen-desproject/v1/commonapi/PiracerControllerSomeIPProxy.cpp +++ b/src-gen/PiracerController/someip/proxy/v1/commonapi/PiracerControllerSomeIPProxy.cpp @@ -33,7 +33,7 @@ std::shared_ptr createPiracerControllerSomeIPProxy( void initializePiracerControllerSomeIPProxy() { CommonAPI::SomeIP::AddressTranslator::get()->insert( "local:commonapi.PiracerController:v1_0:PiracerController", - 0x3ea, 0x2712, 1, 0); + 0x3eb, 0x2713, 1, 0); CommonAPI::SomeIP::Factory::get()->registerProxyCreateMethod( "commonapi.PiracerController:v1_0", &createPiracerControllerSomeIPProxy); diff --git a/src-gen-desproject/v1/commonapi/PiracerControllerSomeIPProxy.hpp b/src-gen/PiracerController/someip/proxy/v1/commonapi/PiracerControllerSomeIPProxy.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PiracerControllerSomeIPProxy.hpp rename to src-gen/PiracerController/someip/proxy/v1/commonapi/PiracerControllerSomeIPProxy.hpp diff --git a/src-gen-desproject/v1/commonapi/PiracerControllerSomeIPStubAdapter.cpp b/src-gen/PiracerController/someip/stub/v1/commonapi/PiracerControllerSomeIPStubAdapter.cpp similarity index 98% rename from src-gen-desproject/v1/commonapi/PiracerControllerSomeIPStubAdapter.cpp rename to src-gen/PiracerController/someip/stub/v1/commonapi/PiracerControllerSomeIPStubAdapter.cpp index 8cc65828..5672bd22 100644 --- a/src-gen-desproject/v1/commonapi/PiracerControllerSomeIPStubAdapter.cpp +++ b/src-gen/PiracerController/someip/stub/v1/commonapi/PiracerControllerSomeIPStubAdapter.cpp @@ -35,7 +35,7 @@ std::shared_ptr createPiracerControllerSomeIPStu void initializePiracerControllerSomeIPStubAdapter() { CommonAPI::SomeIP::AddressTranslator::get()->insert( "local:commonapi.PiracerController:v1_0:PiracerController", - 0x3ea, 0x2712, 1, 0); + 0x3eb, 0x2713, 1, 0); CommonAPI::SomeIP::Factory::get()->registerStubAdapterCreateMethod( "commonapi.PiracerController:v1_0", &createPiracerControllerSomeIPStubAdapter); diff --git a/src-gen-desproject/v1/commonapi/PiracerControllerSomeIPStubAdapter.hpp b/src-gen/PiracerController/someip/stub/v1/commonapi/PiracerControllerSomeIPStubAdapter.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PiracerControllerSomeIPStubAdapter.hpp rename to src-gen/PiracerController/someip/stub/v1/commonapi/PiracerControllerSomeIPStubAdapter.hpp diff --git a/src-gen-desproject/v1/commonapi/PiracerSender.hpp b/src-gen/PiracerSender/core/common/v1/commonapi/PiracerSender.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PiracerSender.hpp rename to src-gen/PiracerSender/core/common/v1/commonapi/PiracerSender.hpp diff --git a/src-gen-desproject/v1/commonapi/PiracerSenderProxy.hpp b/src-gen/PiracerSender/core/proxy/v1/commonapi/PiracerSenderProxy.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PiracerSenderProxy.hpp rename to src-gen/PiracerSender/core/proxy/v1/commonapi/PiracerSenderProxy.hpp diff --git a/src-gen-desproject/v1/commonapi/PiracerSenderProxyBase.hpp b/src-gen/PiracerSender/core/proxy/v1/commonapi/PiracerSenderProxyBase.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PiracerSenderProxyBase.hpp rename to src-gen/PiracerSender/core/proxy/v1/commonapi/PiracerSenderProxyBase.hpp diff --git a/src-gen-desproject/v1/commonapi/PiracerSenderStubDefault.hpp b/src-gen/PiracerSender/core/skel/v1/commonapi/PiracerSenderStubDefault.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PiracerSenderStubDefault.hpp rename to src-gen/PiracerSender/core/skel/v1/commonapi/PiracerSenderStubDefault.hpp diff --git a/src-gen-desproject/v1/commonapi/PiracerSenderStub.hpp b/src-gen/PiracerSender/core/stub/v1/commonapi/PiracerSenderStub.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PiracerSenderStub.hpp rename to src-gen/PiracerSender/core/stub/v1/commonapi/PiracerSenderStub.hpp diff --git a/src-gen-desproject/v1/commonapi/PiracerSenderSomeIPDeployment.cpp b/src-gen/PiracerSender/someip/common/v1/commonapi/PiracerSenderSomeIPDeployment.cpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PiracerSenderSomeIPDeployment.cpp rename to src-gen/PiracerSender/someip/common/v1/commonapi/PiracerSenderSomeIPDeployment.cpp diff --git a/src-gen-desproject/v1/commonapi/PiracerSenderSomeIPDeployment.hpp b/src-gen/PiracerSender/someip/common/v1/commonapi/PiracerSenderSomeIPDeployment.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PiracerSenderSomeIPDeployment.hpp rename to src-gen/PiracerSender/someip/common/v1/commonapi/PiracerSenderSomeIPDeployment.hpp diff --git a/src-gen-desproject/v1/commonapi/PiracerSenderSomeIPProxy.cpp b/src-gen/PiracerSender/someip/proxy/v1/commonapi/PiracerSenderSomeIPProxy.cpp similarity index 98% rename from src-gen-desproject/v1/commonapi/PiracerSenderSomeIPProxy.cpp rename to src-gen/PiracerSender/someip/proxy/v1/commonapi/PiracerSenderSomeIPProxy.cpp index 2dd2b302..0fd328e7 100644 --- a/src-gen-desproject/v1/commonapi/PiracerSenderSomeIPProxy.cpp +++ b/src-gen/PiracerSender/someip/proxy/v1/commonapi/PiracerSenderSomeIPProxy.cpp @@ -33,7 +33,7 @@ std::shared_ptr createPiracerSenderSomeIPProxy( void initializePiracerSenderSomeIPProxy() { CommonAPI::SomeIP::AddressTranslator::get()->insert( "local:commonapi.PiracerSender:v1_0:PiracerSender", - 0x3e9, 0x2711, 1, 0); + 0x3ea, 0x2712, 1, 0); CommonAPI::SomeIP::Factory::get()->registerProxyCreateMethod( "commonapi.PiracerSender:v1_0", &createPiracerSenderSomeIPProxy); diff --git a/src-gen-desproject/v1/commonapi/PiracerSenderSomeIPProxy.hpp b/src-gen/PiracerSender/someip/proxy/v1/commonapi/PiracerSenderSomeIPProxy.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PiracerSenderSomeIPProxy.hpp rename to src-gen/PiracerSender/someip/proxy/v1/commonapi/PiracerSenderSomeIPProxy.hpp diff --git a/src-gen-desproject/v1/commonapi/PiracerSenderSomeIPStubAdapter.cpp b/src-gen/PiracerSender/someip/stub/v1/commonapi/PiracerSenderSomeIPStubAdapter.cpp similarity index 98% rename from src-gen-desproject/v1/commonapi/PiracerSenderSomeIPStubAdapter.cpp rename to src-gen/PiracerSender/someip/stub/v1/commonapi/PiracerSenderSomeIPStubAdapter.cpp index c09efe63..87c3573e 100644 --- a/src-gen-desproject/v1/commonapi/PiracerSenderSomeIPStubAdapter.cpp +++ b/src-gen/PiracerSender/someip/stub/v1/commonapi/PiracerSenderSomeIPStubAdapter.cpp @@ -35,7 +35,7 @@ std::shared_ptr createPiracerSenderSomeIPStubAda void initializePiracerSenderSomeIPStubAdapter() { CommonAPI::SomeIP::AddressTranslator::get()->insert( "local:commonapi.PiracerSender:v1_0:PiracerSender", - 0x3e9, 0x2711, 1, 0); + 0x3ea, 0x2712, 1, 0); CommonAPI::SomeIP::Factory::get()->registerStubAdapterCreateMethod( "commonapi.PiracerSender:v1_0", &createPiracerSenderSomeIPStubAdapter); diff --git a/src-gen-desproject/v1/commonapi/PiracerSenderSomeIPStubAdapter.hpp b/src-gen/PiracerSender/someip/stub/v1/commonapi/PiracerSenderSomeIPStubAdapter.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/PiracerSenderSomeIPStubAdapter.hpp rename to src-gen/PiracerSender/someip/stub/v1/commonapi/PiracerSenderSomeIPStubAdapter.hpp diff --git a/src-gen/README.md b/src-gen/README.md new file mode 100644 index 00000000..850c1a3f --- /dev/null +++ b/src-gen/README.md @@ -0,0 +1,7 @@ +# src-gen codes + +The files in this directory are generated based on the .fidl and .fdepl files in the [fidl folder](../fidl/). These codes are utilized to enable processes to engage in vsomeip communication as either a service or a client. + +Take note of how these codes are included and used in the source code. Also, pay attention to their inclusion in the [CMakeLists.txt](../CMakeLists.txt). + +If you want to understand the specifics of generating these codes, please refer to the [COVESA wiki](https://github.com/COVESA/capicxx-core-tools/wiki/Loading-Bindings-And-Libraries). diff --git a/src-gen-desproject/v1/commonapi/RemoteSpeaker.hpp b/src-gen/RemoteSpeaker/core/common/v1/commonapi/RemoteSpeaker.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/RemoteSpeaker.hpp rename to src-gen/RemoteSpeaker/core/common/v1/commonapi/RemoteSpeaker.hpp diff --git a/src-gen-desproject/v1/commonapi/RemoteSpeakerProxy.hpp b/src-gen/RemoteSpeaker/core/proxy/v1/commonapi/RemoteSpeakerProxy.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/RemoteSpeakerProxy.hpp rename to src-gen/RemoteSpeaker/core/proxy/v1/commonapi/RemoteSpeakerProxy.hpp diff --git a/src-gen-desproject/v1/commonapi/RemoteSpeakerProxyBase.hpp b/src-gen/RemoteSpeaker/core/proxy/v1/commonapi/RemoteSpeakerProxyBase.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/RemoteSpeakerProxyBase.hpp rename to src-gen/RemoteSpeaker/core/proxy/v1/commonapi/RemoteSpeakerProxyBase.hpp diff --git a/src-gen-desproject/v1/commonapi/RemoteSpeakerStubDefault.hpp b/src-gen/RemoteSpeaker/core/skel/v1/commonapi/RemoteSpeakerStubDefault.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/RemoteSpeakerStubDefault.hpp rename to src-gen/RemoteSpeaker/core/skel/v1/commonapi/RemoteSpeakerStubDefault.hpp diff --git a/src-gen-desproject/v1/commonapi/RemoteSpeakerStub.hpp b/src-gen/RemoteSpeaker/core/stub/v1/commonapi/RemoteSpeakerStub.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/RemoteSpeakerStub.hpp rename to src-gen/RemoteSpeaker/core/stub/v1/commonapi/RemoteSpeakerStub.hpp diff --git a/src-gen-desproject/v1/commonapi/RemoteSpeakerSomeIPDeployment.cpp b/src-gen/RemoteSpeaker/someip/common/v1/commonapi/RemoteSpeakerSomeIPDeployment.cpp similarity index 100% rename from src-gen-desproject/v1/commonapi/RemoteSpeakerSomeIPDeployment.cpp rename to src-gen/RemoteSpeaker/someip/common/v1/commonapi/RemoteSpeakerSomeIPDeployment.cpp diff --git a/src-gen-desproject/v1/commonapi/RemoteSpeakerSomeIPDeployment.hpp b/src-gen/RemoteSpeaker/someip/common/v1/commonapi/RemoteSpeakerSomeIPDeployment.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/RemoteSpeakerSomeIPDeployment.hpp rename to src-gen/RemoteSpeaker/someip/common/v1/commonapi/RemoteSpeakerSomeIPDeployment.hpp diff --git a/src-gen-desproject/v1/commonapi/RemoteSpeakerSomeIPProxy.cpp b/src-gen/RemoteSpeaker/someip/proxy/v1/commonapi/RemoteSpeakerSomeIPProxy.cpp similarity index 97% rename from src-gen-desproject/v1/commonapi/RemoteSpeakerSomeIPProxy.cpp rename to src-gen/RemoteSpeaker/someip/proxy/v1/commonapi/RemoteSpeakerSomeIPProxy.cpp index 3dbca95b..e4849dfe 100644 --- a/src-gen-desproject/v1/commonapi/RemoteSpeakerSomeIPProxy.cpp +++ b/src-gen/RemoteSpeaker/someip/proxy/v1/commonapi/RemoteSpeakerSomeIPProxy.cpp @@ -33,7 +33,7 @@ std::shared_ptr createRemoteSpeakerSomeIPProxy( void initializeRemoteSpeakerSomeIPProxy() { CommonAPI::SomeIP::AddressTranslator::get()->insert( "local:commonapi.RemoteSpeaker:v1_0:RemoteSpeaker", - 0x3f0, 0x2718, 1, 0); + 0x3f1, 0x2719, 1, 0); CommonAPI::SomeIP::Factory::get()->registerProxyCreateMethod( "commonapi.RemoteSpeaker:v1_0", &createRemoteSpeakerSomeIPProxy); @@ -74,7 +74,7 @@ void RemoteSpeakerSomeIPProxy::setGear(uint16_t _Gear, CommonAPI::CallStatus &_i > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x7c), + CommonAPI::SomeIP::method_id_t(0x384), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -102,7 +102,7 @@ std::future RemoteSpeakerSomeIPProxy::setGearAsync(const > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x7c), + CommonAPI::SomeIP::method_id_t(0x384), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -132,7 +132,7 @@ void RemoteSpeakerSomeIPProxy::setDistance(uint16_t _Distance, CommonAPI::CallSt > >::callMethodWithReply( *this, - CommonAPI::SomeIP::method_id_t(0x7d), + CommonAPI::SomeIP::method_id_t(0x385), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), @@ -160,7 +160,7 @@ std::future RemoteSpeakerSomeIPProxy::setDistanceAsync(co > >::callMethodAsync( *this, - CommonAPI::SomeIP::method_id_t(0x7d), + CommonAPI::SomeIP::method_id_t(0x385), false, false, (_info ? _info : &CommonAPI::SomeIP::defaultCallInfo), diff --git a/src-gen-desproject/v1/commonapi/RemoteSpeakerSomeIPProxy.hpp b/src-gen/RemoteSpeaker/someip/proxy/v1/commonapi/RemoteSpeakerSomeIPProxy.hpp similarity index 100% rename from src-gen-desproject/v1/commonapi/RemoteSpeakerSomeIPProxy.hpp rename to src-gen/RemoteSpeaker/someip/proxy/v1/commonapi/RemoteSpeakerSomeIPProxy.hpp diff --git a/src-gen-desproject/v1/commonapi/RemoteSpeakerSomeIPStubAdapter.cpp b/src-gen/RemoteSpeaker/someip/stub/v1/commonapi/RemoteSpeakerSomeIPStubAdapter.cpp similarity index 98% rename from src-gen-desproject/v1/commonapi/RemoteSpeakerSomeIPStubAdapter.cpp rename to src-gen/RemoteSpeaker/someip/stub/v1/commonapi/RemoteSpeakerSomeIPStubAdapter.cpp index 70aed3a7..e6a14bba 100644 --- a/src-gen-desproject/v1/commonapi/RemoteSpeakerSomeIPStubAdapter.cpp +++ b/src-gen/RemoteSpeaker/someip/stub/v1/commonapi/RemoteSpeakerSomeIPStubAdapter.cpp @@ -35,7 +35,7 @@ std::shared_ptr createRemoteSpeakerSomeIPStubAda void initializeRemoteSpeakerSomeIPStubAdapter() { CommonAPI::SomeIP::AddressTranslator::get()->insert( "local:commonapi.RemoteSpeaker:v1_0:RemoteSpeaker", - 0x3f0, 0x2718, 1, 0); + 0x3f1, 0x2719, 1, 0); CommonAPI::SomeIP::Factory::get()->registerStubAdapterCreateMethod( "commonapi.RemoteSpeaker:v1_0", &createRemoteSpeakerSomeIPStubAdapter); diff --git a/src-gen-desproject/v1/commonapi/RemoteSpeakerSomeIPStubAdapter.hpp b/src-gen/RemoteSpeaker/someip/stub/v1/commonapi/RemoteSpeakerSomeIPStubAdapter.hpp similarity index 97% rename from src-gen-desproject/v1/commonapi/RemoteSpeakerSomeIPStubAdapter.hpp rename to src-gen/RemoteSpeaker/someip/stub/v1/commonapi/RemoteSpeakerSomeIPStubAdapter.hpp index b30189ec..f22871a3 100644 --- a/src-gen-desproject/v1/commonapi/RemoteSpeakerSomeIPStubAdapter.hpp +++ b/src-gen/RemoteSpeaker/someip/stub/v1/commonapi/RemoteSpeakerSomeIPStubAdapter.hpp @@ -95,8 +95,8 @@ class RemoteSpeakerSomeIPStubAdapterInternal std::make_tuple(static_cast< CommonAPI::SomeIP::StringDeployment* >(nullptr))) { - RemoteSpeakerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x7c) }, &setGearStubDispatcher ); - RemoteSpeakerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x7d) }, &setDistanceStubDispatcher ); + RemoteSpeakerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x384) }, &setGearStubDispatcher ); + RemoteSpeakerSomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x385) }, &setDistanceStubDispatcher ); // Provided events/fields } diff --git a/src/CANSender/CANSender.cpp b/src/CANSender/CANSender.cpp index 3e7dfbde..6b8c473f 100644 --- a/src/CANSender/CANSender.cpp +++ b/src/CANSender/CANSender.cpp @@ -3,20 +3,14 @@ int main () { - // Declare pthread variables. pthread_t readCANThread, sendSomeipThread; - // Create a new thread for the ReadCANThread, which is responsible for reading from CAN. pthread_create(&readCANThread, NULL, ReadCANThread, NULL); - - // Create a new thread for the SendSomeipThread, which sends data using the SomeIP protocol. pthread_create(&sendSomeipThread, NULL, SendSomeipThread, NULL); - // Wait for the speed thread, distance thread and SomeIP thread to finish execution. pthread_join(readCANThread, NULL); pthread_join(sendSomeipThread, NULL); - // Return 0 to indicate successful execution of the program. return 0; } diff --git a/src/CANSender/CANSenderStubImpl.cpp b/src/CANSender/CANSenderStubImpl.cpp index a51a02c2..3a749cce 100644 --- a/src/CANSender/CANSenderStubImpl.cpp +++ b/src/CANSender/CANSenderStubImpl.cpp @@ -1,8 +1,5 @@ #include "CANSenderStubImpl.hpp" -// Constructor for CANSenderStubImpl. CANSenderStubImpl::CANSenderStubImpl() { } - -// Destructor for CANSenderStubImpl. CANSenderStubImpl::~CANSenderStubImpl() { } diff --git a/src/CANSender/CANSenderStubImpl.hpp b/src/CANSender/CANSenderStubImpl.hpp index 280e0968..75193fd9 100644 --- a/src/CANSender/CANSenderStubImpl.hpp +++ b/src/CANSender/CANSenderStubImpl.hpp @@ -1,18 +1,13 @@ #ifndef CANSENDERSTUBIMPL_HPP #define CANSENDERSTUBIMPL_HPP -// Include necessary headers for CommonAPI #include #include -// Define a class called CANSenderStubImpl class CANSenderStubImpl: public v1_0::commonapi::CANSenderStubDefault { public: - // Constructor for CANSenderStubImpl. CANSenderStubImpl(); - - // Destructor for CANSenderStubImpl. virtual ~CANSenderStubImpl(); }; diff --git a/src/CANSender/DistanceBuffer.c b/src/CANSender/DistanceBuffer.c index a6811e39..b8087126 100644 --- a/src/CANSender/DistanceBuffer.c +++ b/src/CANSender/DistanceBuffer.c @@ -1,12 +1,6 @@ -// Include the header file for DistanceBuffer. #include "DistanceBuffer.h" -// Define an array of unsigned 16-bit integers to represent the distance buffer. uint16_t DistanceBuffer[DistanceBuffer_SIZE] = {0}; - -// Initialize an integer variable to keep track of the current index in the distance buffer. int DistanceBufferIndex = 0; -// Initialize a mutex for thread synchronization to protect the distance buffer. pthread_mutex_t DistanceBufferMutex = PTHREAD_MUTEX_INITIALIZER; - diff --git a/src/CANSender/DistanceBuffer.h b/src/CANSender/DistanceBuffer.h index 46d10af0..593ddcc1 100644 --- a/src/CANSender/DistanceBuffer.h +++ b/src/CANSender/DistanceBuffer.h @@ -8,16 +8,11 @@ extern "C" { #include #include -// Define the size of the distance buffer as 10. #define DistanceBuffer_SIZE 10 -// Declare an array of unsigned 16-bit integers to represent the distance buffer. extern uint16_t DistanceBuffer[DistanceBuffer_SIZE]; - -// Declare an integer variable to keep track of the current index in the distance buffer. extern int DistanceBufferIndex; -// Declare a mutex for thread synchronization to protect the distance buffer. extern pthread_mutex_t DistanceBufferMutex; #ifdef __cplusplus @@ -25,4 +20,3 @@ extern pthread_mutex_t DistanceBufferMutex; #endif #endif - diff --git a/src/CANSender/README.md b/src/CANSender/README.md deleted file mode 100644 index e05cf018..00000000 --- a/src/CANSender/README.md +++ /dev/null @@ -1 +0,0 @@ -# CANSender diff --git a/src/CANSender/ReadCANThread.c b/src/CANSender/ReadCANThread.c index a93de9c0..ed21f362 100644 --- a/src/CANSender/ReadCANThread.c +++ b/src/CANSender/ReadCANThread.c @@ -1,7 +1,8 @@ -#include "ReadCANThread.h" #include -int soc; // Socket descriptor for CAN communication +#include "ReadCANThread.h" + +int soc; // Socket descriptor for CAN communication uint16_t speed_sensor_rpm; uint16_t distance; diff --git a/src/CANSender/ReadCANThread.h b/src/CANSender/ReadCANThread.h index dfe7cd98..31c8ddb0 100644 --- a/src/CANSender/ReadCANThread.h +++ b/src/CANSender/ReadCANThread.h @@ -20,10 +20,10 @@ extern "C" { #include "SpeedBuffer.h" #include "DistanceBuffer.h" -int open_port(const char *port); // Function to open and configure the CAN port -void read_port(); // Function to read data from the CAN port -int close_port(); // Function to close the CAN port -void *ReadCANThread(void *arg); // Thread function to read speed data continuously +int open_port(const char *port); +void read_port(); +int close_port(); +void *ReadCANThread(void *arg); #ifdef __cplusplus } diff --git a/src/CANSender/SendSomeipThread.cpp b/src/CANSender/SendSomeipThread.cpp index 0381701c..1f0fb6b9 100644 --- a/src/CANSender/SendSomeipThread.cpp +++ b/src/CANSender/SendSomeipThread.cpp @@ -4,15 +4,14 @@ using namespace v1_0::commonapi; void *SendSomeipThread(void *arg) { - // Initialize runtime and related components std::shared_ptr runtime; std::shared_ptr CANSenderService; - std::shared_ptr> IPCManagertargetProxy; + std::shared_ptr> IPCManagerTargetProxy; runtime = CommonAPI::Runtime::get(); CANSenderService = std::make_shared(); runtime->registerService("local", "CANSender", CANSenderService); - IPCManagertargetProxy = runtime->buildProxy("local", "IPCManager"); + IPCManagerTargetProxy = runtime->buildProxy("local", "IPCManager"); CommonAPI::CallStatus callStatus; std::string returnMessage; @@ -55,7 +54,7 @@ void *SendSomeipThread(void *arg) // Round the filtered speed value and send it to IPCManager uint16_t kf_speed_sensor_rpm = (uint16_t)round(speed_sensor_renewed_e[0]); - IPCManagertargetProxy->setSensorRpm(kf_speed_sensor_rpm, callStatus, returnMessage); + IPCManagerTargetProxy->setSensorRpm(kf_speed_sensor_rpm, callStatus, returnMessage); // (UP) Sending speed data // ================================================== @@ -71,7 +70,7 @@ void *SendSomeipThread(void *arg) uint16_t distance = DistanceBuffer[currentIndex]; pthread_mutex_unlock(&DistanceBufferMutex); - IPCManagertargetProxy->setDistance(distance, callStatus, returnMessage); + IPCManagerTargetProxy->setDistance(distance, callStatus, returnMessage); usleep(300000); // Sleep for 300 ms } @@ -156,4 +155,3 @@ void matrix_multiply(double A[SIZE][SIZE], double B[SIZE][SIZE], double result[S } } } - diff --git a/src/CANSender/SendSomeipThread.hpp b/src/CANSender/SendSomeipThread.hpp index 526b819f..44aadfe1 100644 --- a/src/CANSender/SendSomeipThread.hpp +++ b/src/CANSender/SendSomeipThread.hpp @@ -14,7 +14,6 @@ #define SIZE 2 #define MEASURE_SIZE 1 -// Function declarations void kalmanFilter_(double measuredstate, double estimation[SIZE], double letterP[SIZE][SIZE], double dt, double renewed_e[SIZE], double renewed_P[SIZE][SIZE]); void matrix_multiply(double A[SIZE][SIZE], double B[SIZE][SIZE], double result[SIZE][SIZE]); diff --git a/src/CANSender/SpeedBuffer.c b/src/CANSender/SpeedBuffer.c index be633164..2a8d8127 100644 --- a/src/CANSender/SpeedBuffer.c +++ b/src/CANSender/SpeedBuffer.c @@ -1,12 +1,6 @@ -// Include the header file for SpeedBuffer. #include "SpeedBuffer.h" -// Define an array of unsigned 16-bit integers to represent the speed buffer. uint16_t SpeedBuffer[SpeedBuffer_SIZE] = {0}; - -// Initialize an integer variable to keep track of the current index in the speed buffer. int SpeedBufferIndex = 0; -// Initialize a mutex for thread synchronization to protect the speed buffer. pthread_mutex_t SpeedBufferMutex = PTHREAD_MUTEX_INITIALIZER; - diff --git a/src/CANSender/SpeedBuffer.h b/src/CANSender/SpeedBuffer.h index 050bf19b..38e01e26 100644 --- a/src/CANSender/SpeedBuffer.h +++ b/src/CANSender/SpeedBuffer.h @@ -8,16 +8,11 @@ extern "C" { #include #include -// Define the size of the speed buffer as 10. #define SpeedBuffer_SIZE 10 -// Declare an array of unsigned 16-bit integers to represent the speed buffer. extern uint16_t SpeedBuffer[SpeedBuffer_SIZE]; - -// Declare an integer variable to keep track of the current index in the speed buffer. extern int SpeedBufferIndex; -// Declare a mutex for thread synchronization to protect the speed buffer. extern pthread_mutex_t SpeedBufferMutex; #ifdef __cplusplus diff --git a/src/HeadUnit/HeadUnit.cpp b/src/HeadUnit/HeadUnit.cpp index 29b8ebe6..8be6dd48 100644 --- a/src/HeadUnit/HeadUnit.cpp +++ b/src/HeadUnit/HeadUnit.cpp @@ -11,34 +11,27 @@ using namespace v1_0::commonapi; int main(int argc, char *argv[]) { - // Initialize the CommonAPI runtime and HeadUnitService std::shared_ptr runtime; std::shared_ptr HeadUnitService; - // Create a CommonAPI runtime and register the HeadUnit service runtime = CommonAPI::Runtime::get(); HeadUnitService = std::make_shared(); runtime->registerService("local", "HeadUnit", HeadUnitService); - // Initialize the Qt Application QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication app(argc, argv); QCursor cursor(Qt::BlankCursor); app.setOverrideCursor(cursor); - - // Register the HeadUnitQtClass as a QML type + qmlRegisterType("DataModule", 1, 0, "HeadUnitQtClass"); - // Initialize the QML Application Engine QQmlApplicationEngine engine; engine.rootContext()->setContextProperty("carinfo", &carinfo); - // Load the main QML file from resources const QUrl url(QStringLiteral("qrc:/qml/main.qml")); - // Connect the engine objectCreated signal to handle application exit QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app, [url](QObject *obj, const QUrl &objUrl) { @@ -46,7 +39,6 @@ int main(int argc, char *argv[]) QCoreApplication::exit(-1); }, Qt::QueuedConnection); - // Load the QML file and start the application event loop engine.load(url); HeadUnitSenderClass sender; diff --git a/src/HeadUnit/HeadUnitQtClass.cpp b/src/HeadUnit/HeadUnitQtClass.cpp index bdb121e7..6eafca54 100644 --- a/src/HeadUnit/HeadUnitQtClass.cpp +++ b/src/HeadUnit/HeadUnitQtClass.cpp @@ -1,93 +1,73 @@ #include "HeadUnitQtClass.hpp" -// Constructor for HeadUnitQtClass HeadUnitQtClass::HeadUnitQtClass(QObject *parent) : QObject(parent) { - // Initialize sensorRpm to 0 QsensorRpm = 0; } -// Getter for sensorRpm quint16 HeadUnitQtClass::sensorRpm() const { return QsensorRpm; } -// Getter for gear quint16 HeadUnitQtClass::gear() const { return Qgear; } -// Getter for direction quint16 HeadUnitQtClass::direction() const { return Qdirection; } -// Getter for light QString HeadUnitQtClass::light() const { return Qlight; } -// Setter for sensorRpm void HeadUnitQtClass::setSensorRpm(uint16_t _sensorRpm) { QsensorRpm = _sensorRpm; - // Emit the signal to notify changes to QML emit sensorRpmChanged(); } -// Setter for gear void HeadUnitQtClass::setGear(uint16_t _gear) { Qgear = _gear; - // Emit the signal to notify changes to QML emit gearChanged(); } -// Setter for direction void HeadUnitQtClass::setDirection(uint16_t _direction) { Qdirection = _direction; - // Emit the signal to notify changes to QML emit directionChanged(); } -// Setter for light void HeadUnitQtClass::setLight(QString _light) { Qlight = _light; - // Emit the signal to notify changes to QML emit lightChanged(); } -// QML-invokable method to set the gear using IPCManagerTargetProxy Q_INVOKABLE void HeadUnitQtClass::setIPCManagerGear(quint16 _gear) { sender.IPCManagerTargetProxy->setGearMode(_gear, sender.callStatus, sender.returnMessage); } -// QML-invokable method to set the direction using IPCManagerTargetProxy Q_INVOKABLE void HeadUnitQtClass::setIPCManagerDirection(quint16 _direction) { sender.IPCManagerTargetProxy->setDirection(_direction, sender.callStatus, sender.returnMessage); } -// QML-invokable method to set the light using IPCManagerTargetProxy Q_INVOKABLE void HeadUnitQtClass::setIPCManagerLight(QString _light) { sender.IPCManagerTargetProxy->setLight(_light.toStdString(), sender.callStatus, sender.returnMessage); } -// QML-invokable method to power off the system Q_INVOKABLE void HeadUnitQtClass::poweroff() { - // Execute the system command to power off the system int exitCode = system("sudo poweroff"); } -// Create an instance of HeadUnitQtClass named carinfo HeadUnitQtClass carinfo; diff --git a/src/HeadUnit/HeadUnitQtClass.hpp b/src/HeadUnit/HeadUnitQtClass.hpp index f2e7a9c2..00f15691 100644 --- a/src/HeadUnit/HeadUnitQtClass.hpp +++ b/src/HeadUnit/HeadUnitQtClass.hpp @@ -17,40 +17,40 @@ class HeadUnitQtClass : public QObject Q_PROPERTY(QString light READ light WRITE setLight NOTIFY lightChanged) private: - HeadUnitSenderClass sender; // Create an instance of HeadUnitSenderClass for communication + HeadUnitSenderClass sender; - quint16 QsensorRpm; // Store sensor RPM data - quint16 Qgear; // Gear mode property. - quint16 Qdirection; // Direction property. - QString Qlight; // Light color property. + quint16 QsensorRpm; + quint16 Qgear; + quint16 Qdirection; + QString Qlight; public: explicit HeadUnitQtClass(QObject *parent = nullptr); - quint16 sensorRpm() const; // Getter for sensor RPM + quint16 sensorRpm() const; quint16 gear() const; quint16 direction() const; QString light() const; - void setSensorRpm(uint16_t _sensorRpm); // Setter for sensor RPM + void setSensorRpm(uint16_t _sensorRpm); void setGear(uint16_t _gear); void setDirection(uint16_t _direction); void setLight(QString _light); public Q_SLOTS: - Q_INVOKABLE void setIPCManagerGear(quint16 _gear); // QML-invokable method to set gear - Q_INVOKABLE void setIPCManagerDirection(quint16 _direction); // QML-invokable method to set direction - Q_INVOKABLE void setIPCManagerLight(QString _light); // QML-invokable method to set light - Q_INVOKABLE void poweroff(); // QML-invokable method to power off the system + Q_INVOKABLE void setIPCManagerGear(quint16 _gear); + Q_INVOKABLE void setIPCManagerDirection(quint16 _direction); + Q_INVOKABLE void setIPCManagerLight(QString _light); + Q_INVOKABLE void poweroff(); signals: - void sensorRpmChanged(); // Signal for sensor RPM changes + void sensorRpmChanged(); void gearChanged(); void directionChanged(); void lightChanged(); }; -extern HeadUnitQtClass carinfo; // Create a global instance of HeadUnitQtClass named 'carinfo' +extern HeadUnitQtClass carinfo; #endif diff --git a/src/HeadUnit/HeadUnitSenderClass.cpp b/src/HeadUnit/HeadUnitSenderClass.cpp index 74a9b4f6..24aa05d6 100644 --- a/src/HeadUnit/HeadUnitSenderClass.cpp +++ b/src/HeadUnit/HeadUnitSenderClass.cpp @@ -1,18 +1,13 @@ #include "HeadUnitSenderClass.hpp" -// Import the necessary namespaces using namespace v1_0::commonapi; -// Constructor for the HeadUnitSenderClass HeadUnitSenderClass::HeadUnitSenderClass() { - // Get the CommonAPI runtime instance runtime = CommonAPI::Runtime::get(); - - // Build a proxy to the IPCManager service on the "local" transport with the name "IPCManager" + IPCManagerTargetProxy = runtime->buildProxy("local", "IPCManager"); } -// Destructor for the HeadUnitSenderClass HeadUnitSenderClass::~HeadUnitSenderClass() { } diff --git a/src/HeadUnit/HeadUnitSenderClass.hpp b/src/HeadUnit/HeadUnitSenderClass.hpp index 86bc5c70..f4228b4e 100644 --- a/src/HeadUnit/HeadUnitSenderClass.hpp +++ b/src/HeadUnit/HeadUnitSenderClass.hpp @@ -5,29 +5,19 @@ #include #include -// Import necessary namespaces using namespace v1_0::commonapi; -// Define the HeadUnitSenderClass class HeadUnitSenderClass { public: - // Constructor for HeadUnitSenderClass HeadUnitSenderClass(); - - // Destructor for HeadUnitSenderClass ~HeadUnitSenderClass(); - // Shared pointer to the CommonAPI runtime std::shared_ptr runtime; - // Shared pointer to the IPCManagerProxy for communication std::shared_ptr> IPCManagerTargetProxy; - // Call status for the last communication CommonAPI::CallStatus callStatus; - - // Return message from the last communication std::string returnMessage; }; diff --git a/src/HeadUnit/HeadUnitStubImpl.cpp b/src/HeadUnit/HeadUnitStubImpl.cpp index 35e84287..4099ed77 100644 --- a/src/HeadUnit/HeadUnitStubImpl.cpp +++ b/src/HeadUnit/HeadUnitStubImpl.cpp @@ -1,21 +1,13 @@ #include "HeadUnitStubImpl.hpp" -// Constructor for HeadUnitStubImpl HeadUnitStubImpl::HeadUnitStubImpl() { } - -// Destructor for HeadUnitStubImpl HeadUnitStubImpl::~HeadUnitStubImpl() { } -// Set sensor RPM value void HeadUnitStubImpl::setSensorRpm(const std::shared_ptr _client, uint16_t _sensorRpm, setSensorRpmReply_t _reply) { - // Calculate the sensor RPM based on a formula uint16_t calculatedRpm = (uint16_t)((float)((uint16_t)((float)_sensorRpm / 2.6)) * 3.4); - - // Update the sensor RPM value in the 'carinfo' instance carinfo.setSensorRpm(calculatedRpm); - // Send an empty reply _reply(""); return; @@ -23,10 +15,8 @@ void HeadUnitStubImpl::setSensorRpm(const std::shared_ptr _ void HeadUnitStubImpl::setGear(const std::shared_ptr _client, uint16_t _gear, setGearReply_t _reply) { - // Update the gear mode property in the carinfo object. carinfo.setGear(_gear); - - // Respond to the client's request by invoking the reply callback. + _reply(""); return; @@ -34,10 +24,8 @@ void HeadUnitStubImpl::setGear(const std::shared_ptr _clien void HeadUnitStubImpl::setDirection(const std::shared_ptr _client, uint16_t _direction, setDirectionReply_t _reply) { - // Update the direction property in the carinfo object. carinfo.setDirection(_direction); - // Respond to the client's request by invoking the reply callback. _reply(""); return; @@ -45,10 +33,8 @@ void HeadUnitStubImpl::setDirection(const std::shared_ptr _ void HeadUnitStubImpl::setLight(const std::shared_ptr _client, std::string _light, setLightReply_t _reply) { - // Update the light color property in the carinfo object. carinfo.setLight(QString::fromStdString(_light)); - // Respond to the client's request by invoking the reply callback. _reply(""); return; diff --git a/src/HeadUnit/HeadUnitStubImpl.hpp b/src/HeadUnit/HeadUnitStubImpl.hpp index a6263a71..2ee44f03 100644 --- a/src/HeadUnit/HeadUnitStubImpl.hpp +++ b/src/HeadUnit/HeadUnitStubImpl.hpp @@ -6,26 +6,15 @@ #include "HeadUnitQtClass.hpp" -// Define the HeadUnitStubImpl class, which is derived from HeadUnitStubDefault class HeadUnitStubImpl : public v1_0::commonapi::HeadUnitStubDefault { public: - // Constructor for HeadUnitStubImpl HeadUnitStubImpl(); - - // Destructor for HeadUnitStubImpl virtual ~HeadUnitStubImpl(); - // Override the setSensorRpm function to handle RPM value updates virtual void setSensorRpm(const std::shared_ptr _client, uint16_t _sensorRpm, setSensorRpmReply_t _return); - - // Handle a request to update the gear mode of the Head Unit virtual void setGear(const std::shared_ptr _client, uint16_t _gear, setGearReply_t _return); - - // Handle a request to update the direction indicator of the Head Unit virtual void setDirection(const std::shared_ptr _client, uint16_t _direction, setDirectionReply_t _return); - - // Handle a request to update the light color of the Head Unit virtual void setLight(const std::shared_ptr _client, std::string _light, setLightReply_t _return); }; diff --git a/src/HeadUnit/README.md b/src/HeadUnit/README.md deleted file mode 100644 index 07aa0859..00000000 --- a/src/HeadUnit/README.md +++ /dev/null @@ -1 +0,0 @@ -# HeadUnit diff --git a/src/HeadUnit/qml/ValueSource.qml b/src/HeadUnit/qml/ValueSource.qml index 1c01a3e3..f90cfddf 100644 --- a/src/HeadUnit/qml/ValueSource.qml +++ b/src/HeadUnit/qml/ValueSource.qml @@ -8,7 +8,6 @@ Item { id: manager } - // Properties to manage gear and direction property int gear: carinfo.gear property int direction: carinfo.direction @@ -20,7 +19,6 @@ Item { property bool right_on_off: false property bool initial_delay: !(valueSource.direction === 0) - // Handler for direction changes onDirectionChanged: { valueSource.blink = !(valueSource.direction === 0); valueSource.left_direction = (valueSource.direction === 1 || valueSource.direction === 3); @@ -30,7 +28,6 @@ Item { valueSource.initial_delay = !(valueSource.direction === 0) } - // Function to control the blinking behavior function blinking() { if (valueSource.left_direction) { valueSource.left_on_off = !valueSource.left_on_off @@ -40,7 +37,6 @@ Item { } } - // Timer to trigger the blinking function Timer { interval: 500; running: valueSource.blink; repeat: true onTriggered: { @@ -52,7 +48,6 @@ Item { } } - // RGB color properties to manage the instrument cluster's light property string light: carinfo.light property int red: 0 property int green: 0 @@ -75,7 +70,6 @@ Item { property int mode: 0 - // Property to manage the clock display property var currentTime: 0 property int hours: 0 property int minutes: 0 @@ -83,7 +77,6 @@ Item { property string formattedMinutes: "" property string clock: "00:00" - // Timer to update the clock every second Timer { interval: 1000; running: true; repeat: true onTriggered: { diff --git a/src/HeadUnit/qml/main.qml b/src/HeadUnit/qml/main.qml index f91ecb22..112a1afd 100644 --- a/src/HeadUnit/qml/main.qml +++ b/src/HeadUnit/qml/main.qml @@ -199,7 +199,6 @@ Window { // } } - // Vertical line to separate Rectangle { width: 5 height: parent.height @@ -208,7 +207,6 @@ Window { color: (carinfo.sensorRpm === 0) ? "black" : "#555555" } - // Display the current sensor RPM Text { text: carinfo.sensorRpm font.family: font.name @@ -306,7 +304,6 @@ Window { } } - // Mouse area for handling warning icon interaction MouseArea { anchors.fill: parent onClicked: { @@ -315,7 +312,6 @@ Window { } } - // Vertical line to separate Rectangle { width: 5 height: parent.height @@ -324,7 +320,6 @@ Window { color: (carinfo.sensorRpm === 0) ? "black" : "#555555" } - // Logo image Image { source: "../image/logo.png" width: 320 @@ -334,7 +329,6 @@ Window { y: 80 } - // Seame image Image { source: "../image/seame.png" width: 240 @@ -344,7 +338,6 @@ Window { y: 315 } - // Wolfsberg image Image { source: "../image/wolfsberg.png" width: 220 @@ -354,7 +347,6 @@ Window { y: -40 } - // Clock text display Item { width: 230 height: 70 diff --git a/src/IPCManager/IPCManager.cpp b/src/IPCManager/IPCManager.cpp index c03392bb..0e293efd 100644 --- a/src/IPCManager/IPCManager.cpp +++ b/src/IPCManager/IPCManager.cpp @@ -1,57 +1,49 @@ -#include // Include the unistd.h library for system calls and sleep -#include // Include the cstdlib library for system function -#include // Include the CommonAPI framework +#include +#include +#include -#include "IPCManagerStubImpl.hpp" // Include the IPCManagerStubImpl header -#include "IPCManagerSenderClass.hpp" // Include the IPCManagerSenderClass header +#include "IPCManagerStubImpl.hpp" +#include "IPCManagerSenderClass.hpp" -using namespace v1_0::commonapi; // Use the v1_0::commonapi namespace +using namespace v1_0::commonapi; int main() { - std::shared_ptr runtime; // Create a shared pointer for CommonAPI runtime - std::shared_ptr IPCManagerService; // Create a shared pointer for IPCManagerStubImpl + std::shared_ptr runtime; + std::shared_ptr IPCManagerService; - runtime = CommonAPI::Runtime::get(); // Get the CommonAPI runtime instance - IPCManagerService = std::make_shared(); // Create an instance of IPCManagerStubImpl + runtime = CommonAPI::Runtime::get(); + IPCManagerService = std::make_shared(); runtime->registerService("local", "IPCManager", IPCManagerService); - // Register the IPCManagerService with CommonAPI runtime - IPCManagerSenderClass sender; // Create an instance of IPCManagerSenderClass + IPCManagerSenderClass sender; int exitCode; while (1) { if (!sender.IVICompositorTargetProxy->isAvailable()) { exitCode = system("sh ../reboot_script/reboot_ivi_compositor.sh"); - // Check if IVICompositorTargetProxy is not available and execute a reboot script } if (!sender.CANSenderTargetProxy->isAvailable()) { exitCode = system("sh ../reboot_script/reboot_can_sender.sh"); - // Check if CANSenderTargetProxy is not available and execute a reboot script } if (!sender.PiracerSenderTargetProxy->isAvailable()) { exitCode = system("sh ../reboot_script/reboot_piracer_sender.sh"); - // Check if PiracerSenderTargetProxy is not available and execute a reboot script } if (!sender.PiracerControllerTargetProxy->isAvailable()) { exitCode = system("sh ../reboot_script/reboot_piracer_controller.sh"); - // Check if PiracerControllerTargetProxy is not available and execute a reboot script } if (!sender.InstrumentClusterTargetProxy->isAvailable()) { exitCode = system("sh ../reboot_script/reboot_instrument_cluster.sh"); - // Check if InstrumentClusterTargetProxy is not available and execute a reboot script } if (!sender.HeadUnitTargetProxy->isAvailable()) { exitCode = system("sh ../reboot_script/reboot_head_unit.sh"); - // Check if HeadUnitTargetProxy is not available and execute a reboot script } if (!sender.PDCUnitTargetProxy->isAvailable()) { exitCode = system("sh ../reboot_script/reboot_pdc_unit.sh"); - // Check if PDCUnitTargetProxy is not available and execute a reboot script } - usleep(1000000); // Sleep for one second + usleep(1000000); } return 0; diff --git a/src/IPCManager/IPCManagerSenderClass.cpp b/src/IPCManager/IPCManagerSenderClass.cpp index b0b3b004..50c65c23 100644 --- a/src/IPCManager/IPCManagerSenderClass.cpp +++ b/src/IPCManager/IPCManagerSenderClass.cpp @@ -1,40 +1,20 @@ -#include "IPCManagerSenderClass.hpp" // Include the IPCManagerSenderClass header +#include "IPCManagerSenderClass.hpp" -using namespace v1_0::commonapi; // Use the v1_0::commonapi namespace +using namespace v1_0::commonapi; IPCManagerSenderClass::IPCManagerSenderClass() { - // Get the CommonAPI runtime runtime = CommonAPI::Runtime::get(); - // Build proxies for different services CANSenderTargetProxy = runtime->buildProxy("local", "CANSender"); - // Create a proxy for the CANSender service - PiracerSenderTargetProxy = runtime->buildProxy("local", "PiracerSender"); - // Create a proxy for the PiracerSender service - PiracerControllerTargetProxy = runtime->buildProxy("local", "PiracerController"); - // Create a proxy for the PiracerController service - InstrumentClusterTargetProxy = runtime->buildProxy("local", "InstrumentCluster"); - // Create a proxy for the InstrumentCluster service - HeadUnitTargetProxy = runtime->buildProxy("local", "HeadUnit"); - // Create a proxy for the HeadUnit service - PDCUnitTargetProxy = runtime->buildProxy("local", "PDCUnit"); - // Create a proxy for the PDCUnit service - IVICompositorTargetProxy = runtime->buildProxy("local", "IVICompositor"); - // Create a proxy for the IVICompositor service - RemoteSpeakerTargetProxy = runtime->buildProxy("local", "RemoteSpeaker"); - // Create a proxy for the RemoteSpeaker service } -IPCManagerSenderClass::~IPCManagerSenderClass() -{ - // Destructor -} +IPCManagerSenderClass::~IPCManagerSenderClass() { } diff --git a/src/IPCManager/IPCManagerSenderClass.hpp b/src/IPCManager/IPCManagerSenderClass.hpp index 11513028..c8b3aa0b 100644 --- a/src/IPCManager/IPCManagerSenderClass.hpp +++ b/src/IPCManager/IPCManagerSenderClass.hpp @@ -12,15 +12,14 @@ #include #include -using namespace v1_0::commonapi; // Use the v1_0::commonapi namespace +using namespace v1_0::commonapi; class IPCManagerSenderClass { public: - IPCManagerSenderClass(); // Constructor - ~IPCManagerSenderClass(); // Destructor + IPCManagerSenderClass(); + ~IPCManagerSenderClass(); - // CommonAPI runtime and service proxies std::shared_ptr runtime; std::shared_ptr> CANSenderTargetProxy; std::shared_ptr> PiracerSenderTargetProxy; diff --git a/src/IPCManager/IPCManagerStubImpl.cpp b/src/IPCManager/IPCManagerStubImpl.cpp index 144f657a..cf16a66b 100644 --- a/src/IPCManager/IPCManagerStubImpl.cpp +++ b/src/IPCManager/IPCManagerStubImpl.cpp @@ -1,122 +1,93 @@ #include "IPCManagerStubImpl.hpp" -// Constructor for IPCManagerStubImpl IPCManagerStubImpl::IPCManagerStubImpl() { } - -// Destructor for IPCManagerStubImpl IPCManagerStubImpl::~IPCManagerStubImpl() { } -// Set sensor RPM and relay it to appropriate services void IPCManagerStubImpl::setSensorRpm(const std::shared_ptr _client, uint16_t _sensorRpm, setSensorRpmReply_t _reply) { - // Set sensor rpm to piracer piracer.setSensorRpm(_sensorRpm); - // Relay sensor RPM to InstrumentCluster and HeadUnit services sender.InstrumentClusterTargetProxy->setSpeedRpm(_sensorRpm, sender.callStatus, sender.returnMessage); sender.HeadUnitTargetProxy->setSensorRpm(_sensorRpm, sender.callStatus, sender.returnMessage); - // Reply to the caller _reply(""); return; } -// Set battery level and relay it to the InstrumentCluster service void IPCManagerStubImpl::setBatteryLevel(const std::shared_ptr _client, uint16_t _batteryLevel, setBatteryLevelReply_t _reply) { - // Relay battery level to the InstrumentCluster service sender.InstrumentClusterTargetProxy->setBattery(_batteryLevel, sender.callStatus, sender.returnMessage); - // Reply to the caller _reply(""); return; } -// Set gear mode and relay it to the InstrumentCluster service void IPCManagerStubImpl::setGearMode(const std::shared_ptr _client, uint16_t _gearMode, setGearModeReply_t _reply) { if (piracer.getSensorRpm() == 0) { - // Set gear mode to piracer piracer.setGearMode(_gearMode); - // Relay gear mode to the InstrumentCluster service sender.InstrumentClusterTargetProxy->setGear(_gearMode, sender.callStatus, sender.returnMessage); sender.HeadUnitTargetProxy->setGear(_gearMode, sender.callStatus, sender.returnMessage); sender.IVICompositorTargetProxy->setGear(_gearMode, sender.callStatus, sender.returnMessage); sender.RemoteSpeakerTargetProxy->setGear(_gearMode, sender.callStatus, sender.returnMessage); } - // Reply to the caller _reply(""); return; } -// Set direction and relay it to the InstrumentCluster service void IPCManagerStubImpl::setDirection(const std::shared_ptr _client, uint16_t _direction, setDirectionReply_t _reply) { if (piracer.getDirection() == _direction) { - // Set direction to piracer piracer.setDirection(0); piracer.setFreeDirection(false); - // Relay direction to the InstrumentCluster and HeadUnit services sender.InstrumentClusterTargetProxy->setDirection(0, sender.callStatus, sender.returnMessage); sender.HeadUnitTargetProxy->setDirection(0, sender.callStatus, sender.returnMessage); } else if (piracer.getDirection() != 3) { - // Set direction to piracer piracer.setDirection(_direction); piracer.setFreeDirection(false); - // Relay direction to the InstrumentCluster and HeadUnit services sender.InstrumentClusterTargetProxy->setDirection(_direction, sender.callStatus, sender.returnMessage); sender.HeadUnitTargetProxy->setDirection(_direction, sender.callStatus, sender.returnMessage); } - // Reply to the caller _reply(""); return; } -// Set light status and relay it to the InstrumentCluster service void IPCManagerStubImpl::setLight(const std::shared_ptr _client, std::string _light, setLightReply_t _reply) { - // Set light to piracer piracer.setLight(_light); - // Relay light status to the InstrumentCluster service sender.InstrumentClusterTargetProxy->setLight(_light, sender.callStatus, sender.returnMessage); sender.HeadUnitTargetProxy->setLight(_light, sender.callStatus, sender.returnMessage); - // Reply to the caller _reply(""); return; } -// Set throttle void IPCManagerStubImpl::setThrottle(const std::shared_ptr _client, double _throttle, setThrottleReply_t _reply) { - // Apply throttle to piracer piracer.applyThrottle(_throttle); - // Reply to the caller _reply(""); return; } -// Set steering void IPCManagerStubImpl::setSteering(const std::shared_ptr _client, double _steering, setSteeringReply_t _reply) { - // Apply steering to piracer piracer.applySteering(_steering); piracer.setSteering(_steering); @@ -147,25 +118,21 @@ void IPCManagerStubImpl::setSteering(const std::shared_ptr sender.HeadUnitTargetProxy->setDirection(0, sender.callStatus, sender.returnMessage); } - // Reply to the caller _reply(""); return; } -// Set distance void IPCManagerStubImpl::setDistance(const std::shared_ptr _client, uint16_t _distance, setDistanceReply_t _reply) { sender.PDCUnitTargetProxy->setDistance(_distance, sender.callStatus, sender.returnMessage); sender.RemoteSpeakerTargetProxy->setDistance(_distance, sender.callStatus, sender.returnMessage); - // Reply to the caller _reply(""); return; } -// Get gear mode void IPCManagerStubImpl::getGearMode(const std::shared_ptr _client, std::string _input, getGearModeReply_t _reply) { if (_input == "InstrumentCluster") @@ -185,13 +152,11 @@ void IPCManagerStubImpl::getGearMode(const std::shared_ptr sender.RemoteSpeakerTargetProxy->setGear(piracer.getGearMode(), sender.callStatus, sender.returnMessage); } - // Reply to the caller _reply(""); return; } -// Get direction void IPCManagerStubImpl::getDirection(const std::shared_ptr _client, std::string _input, getDirectionReply_t _reply) { if (_input == "InstrumentCluster") @@ -203,13 +168,11 @@ void IPCManagerStubImpl::getDirection(const std::shared_ptr sender.HeadUnitTargetProxy->setDirection(piracer.getDirection(), sender.callStatus, sender.returnMessage); } - // Reply to the caller _reply(""); return; } -// Get light void IPCManagerStubImpl::getLight(const std::shared_ptr _client, std::string _input, getLightReply_t _reply) { if (_input == "InstrumentCluster") @@ -221,13 +184,11 @@ void IPCManagerStubImpl::getLight(const std::shared_ptr _cl sender.HeadUnitTargetProxy->setLight(piracer.getLight(), sender.callStatus, sender.returnMessage); } - // Reply to the caller _reply(""); return; } -// Get steering void IPCManagerStubImpl::getSteering(const std::shared_ptr _client, std::string _input, getSteeringReply_t _reply) { if (_input == "PDCUnit") @@ -235,9 +196,7 @@ void IPCManagerStubImpl::getSteering(const std::shared_ptr sender.PDCUnitTargetProxy->setSteering(piracer.getSteering(), sender.callStatus, sender.returnMessage); } - // Reply to the caller _reply(""); return; } - diff --git a/src/IPCManager/IPCManagerStubImpl.hpp b/src/IPCManager/IPCManagerStubImpl.hpp index 4c6e19d2..4f91990d 100644 --- a/src/IPCManager/IPCManagerStubImpl.hpp +++ b/src/IPCManager/IPCManagerStubImpl.hpp @@ -2,58 +2,33 @@ #define IPCMANAGERSTUBIMPL_HPP #include -#include // Include the CommonAPI library. -#include // Include the IPCManagerStubDefault interface. -#include "IPCManagerSenderClass.hpp" // Include the IPCManagerSenderClass, which provides communication with other services. +#include +#include + +#include "IPCManagerSenderClass.hpp" #include "PiracerClass.hpp" -// Define a class IPCManagerStubImpl that inherits from IPCManagerStubDefault. class IPCManagerStubImpl : public v1_0::commonapi::IPCManagerStubDefault { private: - IPCManagerSenderClass sender; // Create an instance of IPCManagerSenderClass for communication. - PiracerClass piracer; // Create an instance of PiracerClass for operation + IPCManagerSenderClass sender; + PiracerClass piracer; public: - // Constructor for IPCManagerStubImpl. IPCManagerStubImpl(); - - // Destructor for IPCManagerStubImpl. virtual ~IPCManagerStubImpl(); - // Define a function to set sensor RPM and reply to the caller. virtual void setSensorRpm(const std::shared_ptr _client, uint16_t _sensorRpm, setSensorRpmReply_t _return); - - // Define a function to set battery level and reply to the caller. virtual void setBatteryLevel(const std::shared_ptr _client, uint16_t _batteryLevel, setBatteryLevelReply_t _return); - - // Define a function to set gear mode and relay it to other services, then reply to the caller. virtual void setGearMode(const std::shared_ptr _client, uint16_t _gearMode, setGearModeReply_t _return); - - // Define a function to set direction and relay it to other services, then reply to the caller. virtual void setDirection(const std::shared_ptr _client, uint16_t _direction, setDirectionReply_t _return); - - // Define a function to set light status and relay it to other services, then reply to the caller. virtual void setLight(const std::shared_ptr _client, std::string _light, setLightReply_t _return); - - // Define a function to set throttle and relay it to other services, then reply to the caller. virtual void setThrottle(const std::shared_ptr _client, double _throttle, setThrottleReply_t _return); - - // Define a function to set steering and relay it to other services, then reply to the caller. virtual void setSteering(const std::shared_ptr _client, double _steering, setSteeringReply_t _return); - - // Define a function to set distance and relay it to other services, then reply to the caller. virtual void setDistance(const std::shared_ptr _client, uint16_t _distance, setDistanceReply_t _return); - // Define a function to get gear mode. virtual void getGearMode(const std::shared_ptr _client, std::string _input, getGearModeReply_t _return); - - // Define a function to get direction. virtual void getDirection(const std::shared_ptr _client, std::string _input, getDirectionReply_t _return); - - // Define a function to get light. virtual void getLight(const std::shared_ptr _client, std::string _input, getLightReply_t _return); - - // Define a function to get steering. virtual void getSteering(const std::shared_ptr _client, std::string _input, getSteeringReply_t _return); }; diff --git a/src/IPCManager/PiracerClass.cpp b/src/IPCManager/PiracerClass.cpp index f837b499..d0ef5862 100644 --- a/src/IPCManager/PiracerClass.cpp +++ b/src/IPCManager/PiracerClass.cpp @@ -2,51 +2,51 @@ PiracerClass::PiracerClass() { - Py_Initialize(); // Initialize the Python interpreter - pModule = PyImport_ImportModule("piracer.vehicles"); // Import the Python module "piracer.vehicles" - pClass = PyObject_GetAttrString(pModule, "PiRacerStandard"); // Get the Python class "PiRacerStandard" from the module - pInstance = PyObject_CallObject(pClass, NULL); // Create an instance of the Python class - - sensorRpm = 0; // Initialize the sensor rpm to 0 (default) - gearMode = 0; // Initialize the gear mode to 0 (default) - direction = 0; // Initialize the direction to 0 (default) - light = "#808080"; // Initialize the light to #808080 (default) - freeDirection = false; // Initialize the direction-freeing condition to false (default) + Py_Initialize(); + pModule = PyImport_ImportModule("piracer.vehicles"); + pClass = PyObject_GetAttrString(pModule, "PiRacerStandard"); + pInstance = PyObject_CallObject(pClass, NULL); + + sensorRpm = 0; + gearMode = 0; + direction = 0; + light = "#808080"; + freeDirection = false; steering = 0.0; } PiracerClass::~PiracerClass() { - Py_DECREF(pInstance); // Release the Python instance - Py_DECREF(pClass); // Release the Python class - Py_DECREF(pModule); // Release the Python module - Py_Finalize(); // Finalize the Python interpreter to clean up resources + Py_DECREF(pInstance); + Py_DECREF(pClass); + Py_DECREF(pModule); + Py_Finalize(); } void PiracerClass::setSensorRpm(uint16_t _sensorRpm) { - sensorRpm = _sensorRpm; // Update the sensor rpm + sensorRpm = _sensorRpm; return; } void PiracerClass::setGearMode(uint16_t _gearMode) { - gearMode = _gearMode; // Update the gear mode + gearMode = _gearMode; return; } void PiracerClass::setDirection(uint16_t _direction) { - direction = _direction; // Update the direction + direction = _direction; return; } void PiracerClass::setLight(std::string _light) { - light = _light; // Update the light + light = _light; return; } @@ -100,32 +100,32 @@ void PiracerClass::applyThrottle(double throttle) switch (gearMode) { case 0: // P (Parking) - PyObject_CallMethod(pInstance, "set_throttle_percent", "(f)", 0.0); // Call the Python method "set_throttle_percent" with the throttle value + PyObject_CallMethod(pInstance, "set_throttle_percent", "(f)", 0.0); break; case 1: // R (Reverse) if (throttle <= 0) { - PyObject_CallMethod(pInstance, "set_throttle_percent", "(f)", throttle * 0.4); // Call the Python method "set_throttle_percent" with the throttle value + PyObject_CallMethod(pInstance, "set_throttle_percent", "(f)", throttle * 0.3); } else { - PyObject_CallMethod(pInstance, "set_throttle_percent", "(f)", 0.0); // Call the Python method "set_throttle_percent" with the throttle value + PyObject_CallMethod(pInstance, "set_throttle_percent", "(f)", 0.0); } break; case 2: // N (Neutral) - PyObject_CallMethod(pInstance, "set_throttle_percent", "(f)", 0.0); // Call the Python method "set_throttle_percent" with the throttle value + PyObject_CallMethod(pInstance, "set_throttle_percent", "(f)", 0.0); break; case 3: // D (Drive) if (throttle >= 0) { - PyObject_CallMethod(pInstance, "set_throttle_percent", "(f)", throttle * 0.5); // Call the Python method "set_throttle_percent" with the throttle value + PyObject_CallMethod(pInstance, "set_throttle_percent", "(f)", throttle * 0.5); } else { - PyObject_CallMethod(pInstance, "set_throttle_percent", "(f)", 0.0); // Call the Python method "set_throttle_percent" with the throttle value + PyObject_CallMethod(pInstance, "set_throttle_percent", "(f)", 0.0); } break; } @@ -138,19 +138,19 @@ void PiracerClass::applySteering(double steering) switch (gearMode) { case 0: // P (Parking) - PyObject_CallMethod(pInstance, "set_steering_percent", "(f)", 0.0); // Call the Python method "set_steering_percent" with the steering value + PyObject_CallMethod(pInstance, "set_steering_percent", "(f)", 0.0); break; case 1: // R (Reverse) - PyObject_CallMethod(pInstance, "set_steering_percent", "(f)", steering * -1.0); // Call the Python method "set_steering_percent" with the steering value + PyObject_CallMethod(pInstance, "set_steering_percent", "(f)", steering * -1.0); break; case 2: // N (Neutral) - PyObject_CallMethod(pInstance, "set_steering_percent", "(f)", steering * -1.0); // Call the Python method "set_steering_percent" with the steering value + PyObject_CallMethod(pInstance, "set_steering_percent", "(f)", steering * -1.0); break; case 3: // D (Drive) - PyObject_CallMethod(pInstance, "set_steering_percent", "(f)", steering * -1.0); // Call the Python method "set_steering_percent" with the steering value + PyObject_CallMethod(pInstance, "set_steering_percent", "(f)", steering * -1.0); break; } diff --git a/src/IPCManager/PiracerClass.hpp b/src/IPCManager/PiracerClass.hpp index 85e1fcac..55c63fd9 100644 --- a/src/IPCManager/PiracerClass.hpp +++ b/src/IPCManager/PiracerClass.hpp @@ -5,61 +5,37 @@ #include #include -// Define the PiracerClass class class PiracerClass { private: - PyObject *pModule, *pClass, *pInstance; // Private Python objects and gearMode variable + PyObject *pModule, *pClass, *pInstance; - uint16_t sensorRpm; // Private member variable to store sensor rpm - uint16_t gearMode; // Private member variable to store gear mode - uint16_t direction; // Private member variable to store direction - std::string light; // Private member variable to store light - bool freeDirection; // Private member variable to store direction-freeing condition + uint16_t sensorRpm; + uint16_t gearMode; + uint16_t direction; + std::string light; + bool freeDirection; double steering; public: - PiracerClass(); // Constructor for PiracerClass - ~PiracerClass(); // Destructor for PiracerClass + PiracerClass(); + ~PiracerClass(); - // Method to set the sensor rpm void setSensorRpm(uint16_t _sensorRpm); - - // Method to set the gear mode void setGearMode(uint16_t _gearMode); - - // Method to set the direction void setDirection(uint16_t _direction); - - // Method to set the light void setLight(std::string _light); - - // Method to set the direction-freeing condition void setFreeDirection(bool _freeDirection); - void setSteering(double _steering); - // Method to get the gear mode uint16_t getGearMode(); - - // Method to get the direction uint16_t getDirection(); - - // Method to get the light std::string getLight(); - - // Method to get the direction-freeing condition bool getFreeDirection(); - - // Method to get the sensor rpm uint16_t getSensorRpm(); - double getSteering(); - // Method to apply throttle to the PiRacer vehicle void applyThrottle(double throttle); - - // Method to apply steering to the PiRacer vehicle void applySteering(double steering); }; diff --git a/src/IPCManager/README.md b/src/IPCManager/README.md deleted file mode 100644 index 1d0c84eb..00000000 --- a/src/IPCManager/README.md +++ /dev/null @@ -1 +0,0 @@ -# IPCManager diff --git a/src/IVICompositor/IVICompositor.cpp b/src/IVICompositor/IVICompositor.cpp index 4c2699f1..b2f316a5 100644 --- a/src/IVICompositor/IVICompositor.cpp +++ b/src/IVICompositor/IVICompositor.cpp @@ -14,11 +14,9 @@ using namespace v1_0::commonapi; int main(int argc, char *argv[]) { - // Initialize the CommonAPI runtime and IVICompositorService std::shared_ptr runtime; std::shared_ptr IVICompositorService; - // Create a CommonAPI runtime and register the IVICompositor service runtime = CommonAPI::Runtime::get(); IVICompositorService = std::make_shared(); runtime->registerService("local", "IVICompositor", IVICompositorService); @@ -28,22 +26,18 @@ int main(int argc, char *argv[]) CommonAPI::CallStatus callStatus; std::string returnMessage; - // Initialize the Qt Application QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication app(argc, argv); QCursor cursor(Qt::BlankCursor); app.setOverrideCursor(cursor); - // Initialize the QML Application Engine QQmlApplicationEngine engine; engine.rootContext()->setContextProperty("carinfo", &carinfo); - // Load the main QML file from resources const QUrl url(QStringLiteral("qrc:/qml/main.qml")); - // Connect the engine objectCreated signal to handle application exit QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app, [url](QObject *obj, const QUrl &objUrl) { @@ -51,7 +45,6 @@ int main(int argc, char *argv[]) QCoreApplication::exit(-1); }, Qt::QueuedConnection); - // Load the QML file and start the application event loop engine.load(url); IPCManagerTargetProxy->getGearMode("IVICompositor", callStatus, returnMessage); diff --git a/src/IVICompositor/IVICompositorQtClass.cpp b/src/IVICompositor/IVICompositorQtClass.cpp index 5b0cf002..2faf345a 100644 --- a/src/IVICompositor/IVICompositorQtClass.cpp +++ b/src/IVICompositor/IVICompositorQtClass.cpp @@ -1,23 +1,18 @@ #include "IVICompositorQtClass.hpp" -// Constructor for IVICompositorQtClass IVICompositorQtClass::IVICompositorQtClass(QObject *parent) : QObject(parent) { } -// Getter for gear quint16 IVICompositorQtClass::gear() const { return Qgear; } -// Setter for gear void IVICompositorQtClass::setGear(uint16_t _gear) { Qgear = _gear; - // Emit the signal to notify changes to QML emit gearChanged(); } -// Create an instance of IVICompositorQtClass named carinfo IVICompositorQtClass carinfo; diff --git a/src/IVICompositor/IVICompositorQtClass.hpp b/src/IVICompositor/IVICompositorQtClass.hpp index 76fcca80..d502885f 100644 --- a/src/IVICompositor/IVICompositorQtClass.hpp +++ b/src/IVICompositor/IVICompositorQtClass.hpp @@ -9,7 +9,7 @@ class IVICompositorQtClass : public QObject Q_PROPERTY(quint16 gear READ gear WRITE setGear NOTIFY gearChanged) private: - quint16 Qgear; // Gear mode property. + quint16 Qgear; public: explicit IVICompositorQtClass(QObject *parent = nullptr); @@ -22,7 +22,7 @@ class IVICompositorQtClass : public QObject void gearChanged(); }; -extern IVICompositorQtClass carinfo; // Create a global instance of IVICompositorQtClass named 'carinfo' +extern IVICompositorQtClass carinfo; #endif diff --git a/src/IVICompositor/IVICompositorStubImpl.cpp b/src/IVICompositor/IVICompositorStubImpl.cpp index 223444d3..25a62d77 100644 --- a/src/IVICompositor/IVICompositorStubImpl.cpp +++ b/src/IVICompositor/IVICompositorStubImpl.cpp @@ -1,17 +1,12 @@ #include "IVICompositorStubImpl.hpp" -// Constructor for IVICompositorStubImpl IVICompositorStubImpl::IVICompositorStubImpl() { } - -// Destructor for IVICompositorStubImpl IVICompositorStubImpl::~IVICompositorStubImpl() { } void IVICompositorStubImpl::setGear(const std::shared_ptr _client, uint16_t _gear, setGearReply_t _reply) { - // Update the gear mode property in the carinfo object. carinfo.setGear(_gear); - - // Respond to the client's request by invoking the reply callback. + _reply(""); return; diff --git a/src/IVICompositor/IVICompositorStubImpl.hpp b/src/IVICompositor/IVICompositorStubImpl.hpp index adf90299..54a65cba 100644 --- a/src/IVICompositor/IVICompositorStubImpl.hpp +++ b/src/IVICompositor/IVICompositorStubImpl.hpp @@ -6,17 +6,12 @@ #include "IVICompositorQtClass.hpp" -// Define the IVICompositorStubImpl class, which is derived from IVICompositorStubDefault class IVICompositorStubImpl : public v1_0::commonapi::IVICompositorStubDefault { public: - // Constructor for IVICompositorStubImpl IVICompositorStubImpl(); - - // Destructor for IVICompositorStubImpl virtual ~IVICompositorStubImpl(); - // Handle a request to update the gear mode of the IVI Compositor virtual void setGear(const std::shared_ptr _client, uint16_t _gear, setGearReply_t _return); }; diff --git a/src/IVICompositor/README.md b/src/IVICompositor/README.md deleted file mode 100644 index 4103cb8d..00000000 --- a/src/IVICompositor/README.md +++ /dev/null @@ -1 +0,0 @@ -# IVICompositor diff --git a/src/InstrumentCluster/InstrumentCluster.cpp b/src/InstrumentCluster/InstrumentCluster.cpp index e1dd1b11..3a7b03e5 100644 --- a/src/InstrumentCluster/InstrumentCluster.cpp +++ b/src/InstrumentCluster/InstrumentCluster.cpp @@ -1,51 +1,48 @@ -#include // Include the QGuiApplication for Qt GUI applications. -#include // Include QQmlApplicationEngine for Qt Quick applications. -#include // Include QQmlContext for setting context properties. +#include +#include +#include #include -#include "InstrumentClusterStubImpl.hpp" // Include the InstrumentClusterStubImpl class. -#include "InstrumentClusterQtClass.hpp" // Include the InstrumentClusterQtClass, which provides Qt integration. -#include "InstrumentClusterSenderClass.hpp" // Include the InstrumentClusterSenderClass class. +#include "InstrumentClusterStubImpl.hpp" +#include "InstrumentClusterQtClass.hpp" +#include "InstrumentClusterSenderClass.hpp" -using namespace v1_0::commonapi; // Use the commonapi namespace. +using namespace v1_0::commonapi; int main(int argc, char *argv[]) { - // Initialize CommonAPI runtime and InstrumentCluster service. std::shared_ptr runtime; std::shared_ptr InstrumentClusterService; - runtime = CommonAPI::Runtime::get(); // Get the CommonAPI runtime. - InstrumentClusterService = std::make_shared(); // Create the InstrumentCluster service. - runtime->registerService("local", "InstrumentCluster", InstrumentClusterService); // Register the service. + runtime = CommonAPI::Runtime::get(); + InstrumentClusterService = std::make_shared(); + runtime->registerService("local", "InstrumentCluster", InstrumentClusterService); + + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + QGuiApplication app(argc, argv); - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // Enable high-DPI scaling for Qt application. - QGuiApplication app(argc, argv); // Create a Qt GUI application. - QCursor cursor(Qt::BlankCursor); app.setOverrideCursor(cursor); - QQmlApplicationEngine engine; // Create a Qt Quick Application Engine for QML. + QQmlApplicationEngine engine; - // Set a context property for "carinfo" to interact with the QML application. engine.rootContext()->setContextProperty("carinfo", &carinfo); - const QUrl url(QStringLiteral("qrc:/qml/main.qml")); // Define the URL for the QML interface. + const QUrl url(QStringLiteral("qrc:/qml/main.qml")); - // Connect a lambda function to exit the application if object creation fails. QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app, [url](QObject *obj, const QUrl &objUrl) { if (!obj && url == objUrl) QCoreApplication::exit(-1); }, Qt::QueuedConnection); - engine.load(url); // Load the QML interface from the specified URL. + engine.load(url); InstrumentClusterSenderClass sender; sender.IPCManagerTargetProxy->getGearMode("InstrumentCluster", sender.callStatus, sender.returnMessage); sender.IPCManagerTargetProxy->getDirection("InstrumentCluster", sender.callStatus, sender.returnMessage); sender.IPCManagerTargetProxy->getLight("InstrumentCluster", sender.callStatus, sender.returnMessage); - return app.exec(); // Start the application event loop and return the exit code. + return app.exec(); } diff --git a/src/InstrumentCluster/InstrumentClusterQtClass.cpp b/src/InstrumentCluster/InstrumentClusterQtClass.cpp index 5b9844b4..7c18f44a 100644 --- a/src/InstrumentCluster/InstrumentClusterQtClass.cpp +++ b/src/InstrumentCluster/InstrumentClusterQtClass.cpp @@ -1,90 +1,76 @@ #include "InstrumentClusterQtClass.hpp" -// Constructor for InstrumentClusterQtClass InstrumentClusterQtClass::InstrumentClusterQtClass(QObject *parent) : QObject(parent) { - Qspeed = 0; // Initialize speed to 0. - Qrpm = 0; // Initialize RPM to 0. - Qbattery = 0; // Initialize battery level to 0. + Qspeed = 0; + Qrpm = 0; + Qbattery = 0; } -// Getter for speed quint16 InstrumentClusterQtClass::speed() const { return Qspeed; } -// Getter for RPM quint16 InstrumentClusterQtClass::rpm() const { return Qrpm; } -// Getter for battery level quint16 InstrumentClusterQtClass::battery() const { return Qbattery; } -// Getter for gear mode quint16 InstrumentClusterQtClass::gear() const { return Qgear; } -// Getter for direction quint16 InstrumentClusterQtClass::direction() const { return Qdirection; } -// Getter for light color QString InstrumentClusterQtClass::light() const { return Qlight; } -// Setter for speed void InstrumentClusterQtClass::setSpeed(uint16_t _speed) { Qspeed = _speed; - emit speedChanged(); // Emit a signal to notify that the speed has changed. + emit speedChanged(); } -// Setter for RPM void InstrumentClusterQtClass::setRpm(uint16_t _rpm) { Qrpm = _rpm; - emit rpmChanged(); // Emit a signal to notify that the RPM has changed. + emit rpmChanged(); } -// Setter for battery level void InstrumentClusterQtClass::setBattery(uint16_t _battery) { Qbattery = _battery; - emit batteryChanged(); // Emit a signal to notify that the battery level has changed. + emit batteryChanged(); } -// Setter for gear mode void InstrumentClusterQtClass::setGear(uint16_t _gear) { Qgear = _gear; - emit gearChanged(); // Emit a signal to notify that the gear mode has changed. + emit gearChanged(); } -// Setter for direction void InstrumentClusterQtClass::setDirection(uint16_t _direction) { Qdirection = _direction; - emit directionChanged(); // Emit a signal to notify that the direction has changed. + emit directionChanged(); } -// Setter for light color void InstrumentClusterQtClass::setLight(QString _light) { Qlight = _light; - emit lightChanged(); // Emit a signal to notify that the light color has changed. + emit lightChanged(); } -InstrumentClusterQtClass carinfo; // Create an instance of the InstrumentClusterQtClass. - +InstrumentClusterQtClass carinfo; diff --git a/src/InstrumentCluster/InstrumentClusterQtClass.hpp b/src/InstrumentCluster/InstrumentClusterQtClass.hpp index 5d70016d..ad3be630 100644 --- a/src/InstrumentCluster/InstrumentClusterQtClass.hpp +++ b/src/InstrumentCluster/InstrumentClusterQtClass.hpp @@ -9,9 +9,8 @@ class InstrumentClusterQtClass : public QObject { - Q_OBJECT // Macro that indicates this class uses Qt's object system. - - // Define properties that can be accessed from QML and signal changes. + Q_OBJECT + Q_PROPERTY(quint16 speed READ speed WRITE setSpeed NOTIFY speedChanged) Q_PROPERTY(quint16 rpm READ rpm WRITE setRpm NOTIFY rpmChanged) Q_PROPERTY(quint16 battery READ battery WRITE setBattery NOTIFY batteryChanged) @@ -20,19 +19,18 @@ class InstrumentClusterQtClass : public QObject Q_PROPERTY(QString light READ light WRITE setLight NOTIFY lightChanged) private: - InstrumentClusterSenderClass sender; // Create an instance of InstrumentClusterSenderClass for communication + InstrumentClusterSenderClass sender; - quint16 Qspeed; // Speed property. - quint16 Qrpm; // RPM (Revolutions Per Minute) property. - quint16 Qbattery; // Battery level property. - quint16 Qgear; // Gear mode property. - quint16 Qdirection; // Direction property. - QString Qlight; // Light color property. + quint16 Qspeed; + quint16 Qrpm; + quint16 Qbattery; + quint16 Qgear; + quint16 Qdirection; + QString Qlight; public: explicit InstrumentClusterQtClass(QObject *parent = nullptr); - // Getter methods for properties. quint16 speed() const; quint16 rpm() const; quint16 battery() const; @@ -40,7 +38,6 @@ class InstrumentClusterQtClass : public QObject quint16 direction() const; QString light() const; - // Setter methods for properties. void setSpeed(uint16_t _speed); void setRpm(uint16_t _rpm); void setBattery(uint16_t _battery); @@ -49,7 +46,6 @@ class InstrumentClusterQtClass : public QObject void setLight(QString _light); signals: - // Signals to notify property changes. void speedChanged(); void rpmChanged(); void batteryChanged(); @@ -58,7 +54,6 @@ class InstrumentClusterQtClass : public QObject void lightChanged(); }; -// Declare an external instance of InstrumentClusterQtClass for access. extern InstrumentClusterQtClass carinfo; #endif diff --git a/src/InstrumentCluster/InstrumentClusterSenderClass.cpp b/src/InstrumentCluster/InstrumentClusterSenderClass.cpp index f74fea08..74e6b7f1 100644 --- a/src/InstrumentCluster/InstrumentClusterSenderClass.cpp +++ b/src/InstrumentCluster/InstrumentClusterSenderClass.cpp @@ -1,18 +1,13 @@ #include "InstrumentClusterSenderClass.hpp" -// Import the necessary namespaces using namespace v1_0::commonapi; -// Constructor for the InstrumentClusterSenderClass InstrumentClusterSenderClass::InstrumentClusterSenderClass() { - // Get the CommonAPI runtime instance runtime = CommonAPI::Runtime::get(); - - // Build a proxy to the IPCManager service on the "local" transport with the name "IPCManager" + IPCManagerTargetProxy = runtime->buildProxy("local", "IPCManager"); } -// Destructor for the InstrumentClusterSenderClass InstrumentClusterSenderClass::~InstrumentClusterSenderClass() { } diff --git a/src/InstrumentCluster/InstrumentClusterSenderClass.hpp b/src/InstrumentCluster/InstrumentClusterSenderClass.hpp index a21cb2c0..5a524823 100644 --- a/src/InstrumentCluster/InstrumentClusterSenderClass.hpp +++ b/src/InstrumentCluster/InstrumentClusterSenderClass.hpp @@ -5,26 +5,18 @@ #include #include -// Import necessary namespaces using namespace v1_0::commonapi; -// Define the InstrumentClusterSenderClass class InstrumentClusterSenderClass { public: - // Constructor for InstrumentClusterSenderClass InstrumentClusterSenderClass(); - - // Destructor for InstrumentClusterSenderClass ~InstrumentClusterSenderClass(); - // Shared pointer to the CommonAPI runtime std::shared_ptr runtime; - // Shared pointer to the IPCManagerProxy for communication std::shared_ptr> IPCManagerTargetProxy; - // Call status for the last communication CommonAPI::CallStatus callStatus; std::string returnMessage; }; diff --git a/src/InstrumentCluster/InstrumentClusterStubImpl.cpp b/src/InstrumentCluster/InstrumentClusterStubImpl.cpp index 403f9ed1..417f6403 100644 --- a/src/InstrumentCluster/InstrumentClusterStubImpl.cpp +++ b/src/InstrumentCluster/InstrumentClusterStubImpl.cpp @@ -1,22 +1,16 @@ #include "InstrumentClusterStubImpl.hpp" InstrumentClusterStubImpl::InstrumentClusterStubImpl() { } - InstrumentClusterStubImpl::~InstrumentClusterStubImpl() { } void InstrumentClusterStubImpl::setSpeedRpm(const std::shared_ptr _client, uint16_t _sensorRpm, setSpeedRpmReply_t _reply) { - // Convert sensor RPM to a format suitable for the instrument cluster. temp = (uint16_t)((float)_sensorRpm / 2.6); - - // Update the RPM property in the carinfo object with the converted value. carinfo.setRpm(temp); - // Calculate the speed based on the converted RPM and update the property. temp = (uint16_t)((float)temp * 3.4); carinfo.setSpeed(temp); - // Respond to the client's request by invoking the reply callback. _reply(""); return; @@ -24,10 +18,8 @@ void InstrumentClusterStubImpl::setSpeedRpm(const std::shared_ptr _client, uint16_t _battery, setBatteryReply_t _reply) { - // Update the battery level property in the carinfo object. carinfo.setBattery(_battery); - // Respond to the client's request by invoking the reply callback. _reply(""); return; @@ -35,10 +27,8 @@ void InstrumentClusterStubImpl::setBattery(const std::shared_ptr _client, uint16_t _gear, setGearReply_t _reply) { - // Update the gear mode property in the carinfo object. carinfo.setGear(_gear); - // Respond to the client's request by invoking the reply callback. _reply(""); return; @@ -46,10 +36,8 @@ void InstrumentClusterStubImpl::setGear(const std::shared_ptr _client, uint16_t _direction, setDirectionReply_t _reply) { - // Update the direction property in the carinfo object. carinfo.setDirection(_direction); - // Respond to the client's request by invoking the reply callback. _reply(""); return; @@ -57,10 +45,8 @@ void InstrumentClusterStubImpl::setDirection(const std::shared_ptr _client, std::string _light, setLightReply_t _reply) { - // Update the light color property in the carinfo object. carinfo.setLight(QString::fromStdString(_light)); - // Respond to the client's request by invoking the reply callback. _reply(""); return; diff --git a/src/InstrumentCluster/InstrumentClusterStubImpl.hpp b/src/InstrumentCluster/InstrumentClusterStubImpl.hpp index 0fa3c849..6b4a0a7c 100644 --- a/src/InstrumentCluster/InstrumentClusterStubImpl.hpp +++ b/src/InstrumentCluster/InstrumentClusterStubImpl.hpp @@ -12,27 +12,18 @@ class InstrumentClusterStubImpl : public v1_0::commonapi::InstrumentClusterStubDefault { private: - InstrumentClusterSenderClass sender; // Create an instance of InstrumentClusterSenderClass for communication. + InstrumentClusterSenderClass sender; - uint16_t temp; // Temporary variable used for calculations + uint16_t temp; public: InstrumentClusterStubImpl(); virtual ~InstrumentClusterStubImpl(); - // Handle a request to update the speed and RPM of the instrument cluster virtual void setSpeedRpm(const std::shared_ptr _client, uint16_t _sensorRpm, setSpeedRpmReply_t _return); - - // Handle a request to update the battery level of the instrument cluster virtual void setBattery(const std::shared_ptr _client, uint16_t _battery, setBatteryReply_t _return); - - // Handle a request to update the gear mode of the instrument cluster virtual void setGear(const std::shared_ptr _client, uint16_t _gear, setGearReply_t _return); - - // Handle a request to update the direction indicator of the instrument cluster virtual void setDirection(const std::shared_ptr _client, uint16_t _direction, setDirectionReply_t _return); - - // Handle a request to update the light color of the instrument cluster virtual void setLight(const std::shared_ptr _client, std::string _light, setLightReply_t _return); }; diff --git a/src/InstrumentCluster/README.md b/src/InstrumentCluster/README.md deleted file mode 100644 index 40951b98..00000000 --- a/src/InstrumentCluster/README.md +++ /dev/null @@ -1 +0,0 @@ -# InstrumentCluster diff --git a/src/InstrumentCluster/qml/BasicGaugeStyle.qml b/src/InstrumentCluster/qml/BasicGaugeStyle.qml index 108ecb9b..75d359e5 100644 --- a/src/InstrumentCluster/qml/BasicGaugeStyle.qml +++ b/src/InstrumentCluster/qml/BasicGaugeStyle.qml @@ -53,7 +53,6 @@ import QtQuick.Controls.Styles 1.4 import QtQuick.Extras 1.4 CircularGaugeStyle { - // Define properties for the custom gauge style property real xCenter: outerRadius property real yCenter: outerRadius property real labelStepSize: 0 @@ -72,7 +71,6 @@ CircularGaugeStyle { font.pixelSize: 20 text: styleData.value - // Change label color to red for indexes 8 and 9, otherwise black color: styleData.index === 8 || styleData.index === 9 ? "red" : "black" antialiasing: true } @@ -85,11 +83,9 @@ CircularGaugeStyle { property real yCenter: height / 2 onPaint: { - // Get the canvas context for drawing var ctx = getContext("2d"); ctx.reset(); - // Draw the gauge needle ctx.beginPath(); ctx.moveTo(xCenter, height); ctx.lineTo(xCenter - needleBaseWidth / 2, height - needleBaseWidth / 2); @@ -100,7 +96,6 @@ CircularGaugeStyle { ctx.fillStyle = "red"; ctx.fill(); - // Draw the second part of the needle ctx.beginPath(); ctx.moveTo(xCenter, height) ctx.lineTo(width, height - needleBaseWidth / 2); @@ -112,6 +107,5 @@ CircularGaugeStyle { } } - // Set the foreground to null (no foreground customization) foreground: null } diff --git a/src/InstrumentCluster/qml/BatteryGaugeStyle.qml b/src/InstrumentCluster/qml/BatteryGaugeStyle.qml index 1a5ccfc8..f6b87163 100644 --- a/src/InstrumentCluster/qml/BatteryGaugeStyle.qml +++ b/src/InstrumentCluster/qml/BatteryGaugeStyle.qml @@ -2,50 +2,43 @@ import QtQuick 2.2 import QtQuick.Controls.Styles 1.4 import QtQuick.Extras 1.4 -// Define a BasicGaugeStyle BasicGaugeStyle { - // Set the range of values (angle) for the gauge minimumValueAngle: -60 maximumValueAngle: 60 - // Define tickmark properties - tickmarkStepSize: 25 // The step size between major tickmarks - minorTickmarkCount: 4 // Number of minor tickmarks between major ones + tickmarkStepSize: 25 + minorTickmarkCount: 4 - // Define properties for the gauge needle - needleLength: 70 // Length of the gauge needle - needleBaseWidth: 5 // Width of the base of the needle - needleTipWidth: 1 // Width of the tip of the needle + needleLength: 70 + needleBaseWidth: 5 + needleTipWidth: 1 - halfGauge: true // Configure the gauge as a half-gauge + halfGauge: true - property string icon: "" // A property to specify an icon image + property string icon: "" - // Define the appearance of major tickmarks tickmark: Rectangle { - implicitWidth: 2 // Width of the major tickmarks - antialiasing: true // Enable antialiasing for smoother rendering - implicitHeight: 10 // Height of the major tickmarks - color: "black" // Color of the major tickmarks + implicitWidth: 2 + antialiasing: true + implicitHeight: 10 + color: "black" } - // Define the appearance of minor tickmarks minorTickmark: Rectangle { - implicitWidth: 1 // Width of the minor tickmarks - antialiasing: true // Enable antialiasing for smoother rendering - implicitHeight: 5 // Height of the minor tickmarks - color: "black" // Color of the minor tickmarks + implicitWidth: 1 + antialiasing: true + implicitHeight: 5 + color: "black" } - // Define the background of the gauge background: Item { Image { - source: icon // Set the image source from the 'icon' property - width: 70 // Width of the image - height: 70 // Height of the image - fillMode: Image.PreserveAspectFit // Preserve aspect ratio of the image - anchors.horizontalCenter: parent.horizontalCenter // Center the image horizontally - y: 13 // Vertical position of the image + source: icon + width: 70 + height: 70 + fillMode: Image.PreserveAspectFit + anchors.horizontalCenter: parent.horizontalCenter + y: 13 } } } diff --git a/src/InstrumentCluster/qml/RPMGaugeStyle.qml b/src/InstrumentCluster/qml/RPMGaugeStyle.qml index 6d3d1bc1..3dcbeb9b 100644 --- a/src/InstrumentCluster/qml/RPMGaugeStyle.qml +++ b/src/InstrumentCluster/qml/RPMGaugeStyle.qml @@ -2,65 +2,56 @@ import QtQuick 2.2 import QtQuick.Controls.Styles 1.4 import QtQuick.Extras 1.4 -// Define a BasicGaugeStyle BasicGaugeStyle { - // Set the range of values (angle) for the gauge minimumValueAngle: -135 maximumValueAngle: 135 - // Define tickmark properties - tickmarkStepSize: 25 // The step size between major tickmarks - minorTickmarkCount: 4 // Number of minor tickmarks between major ones + tickmarkStepSize: 25 + minorTickmarkCount: 4 - // Define label properties - labelStepSize: 50 // The step size between labels - labelInset: 45 // Inset of labels from the gauge + labelStepSize: 50 + labelInset: 45 - // Define properties for the gauge needle - needleLength: 165 // Length of the gauge needle - needleBaseWidth: 10 // Width of the base of the needle - needleTipWidth: 1 // Width of the tip of the needle + needleLength: 165 + needleBaseWidth: 10 + needleTipWidth: 1 - // Define the appearance of major tickmarks tickmark: Rectangle { - implicitWidth: 3 // Width of the major tickmarks - antialiasing: true // Enable antialiasing for smoother rendering - implicitHeight: 15 // Height of the major tickmarks - color: "black" // Color of the major tickmarks + implicitWidth: 3 + antialiasing: true + implicitHeight: 15 + color: "black" } - // Define the appearance of minor tickmarks minorTickmark: Rectangle { - implicitWidth: 2 // Width of the minor tickmarks - antialiasing: true // Enable antialiasing for smoother rendering - implicitHeight: 7 // Height of the minor tickmarks - color: "black" // Color of the minor tickmarks + implicitWidth: 2 + antialiasing: true + implicitHeight: 7 + color: "black" } - // Define the background of the gauge using a Canvas background: Canvas { FontLoader { id: font - source: "../font/Nebula-Regular.otf" // Load a custom font + source: "../font/Nebula-Regular.otf" } - // Display the RPM value Text { - text: valueSource.rpm // Bind to the 'rpm' valueSource property - color: "black" // Text color - font.family: font.name // Set the custom font - font.pixelSize: 80 // Text size - anchors.horizontalCenter: parent.horizontalCenter // Center horizontally - y: 170 // Vertical position + text: valueSource.rpm + color: "black" + font.family: font.name + font.pixelSize: 80 + anchors.horizontalCenter: parent.horizontalCenter + y: 170 } - // Display the label "RPM" + Text { - text: "RPM" // Static label text - color: "black" // Text color - font.family: font.name // Set the custom font - font.pixelSize: 30 // Text size - anchors.horizontalCenter: parent.horizontalCenter // Center horizontally - y: 240 // Vertical position + text: "RPM" + color: "black" + font.family: font.name + font.pixelSize: 30 + anchors.horizontalCenter: parent.horizontalCenter + y: 240 } } } diff --git a/src/InstrumentCluster/qml/SpeedGaugeStyle.qml b/src/InstrumentCluster/qml/SpeedGaugeStyle.qml index 8039a99e..44e74e7e 100644 --- a/src/InstrumentCluster/qml/SpeedGaugeStyle.qml +++ b/src/InstrumentCluster/qml/SpeedGaugeStyle.qml @@ -2,65 +2,56 @@ import QtQuick 2.2 import QtQuick.Controls.Styles 1.4 import QtQuick.Extras 1.4 -// Define a custom gauge style based on BasicGaugeStyle BasicGaugeStyle { - // Set the minimum and maximum value angles for the gauge minimumValueAngle: -135 maximumValueAngle: 135 - // Define properties related to tickmarks - tickmarkStepSize: 25 // Step size between major tickmarks - minorTickmarkCount: 4 // Number of minor tickmarks between major ones + tickmarkStepSize: 25 + minorTickmarkCount: 4 - // Define properties for labels - labelStepSize: 50 // Step size between labels - labelInset: 45 // Inset of labels from the gauge + labelStepSize: 50 + labelInset: 45 - // Define properties for the gauge needle - needleLength: 165 // Length of the gauge needle - needleBaseWidth: 10 // Width of the base of the needle - needleTipWidth: 1 // Width of the tip of the needle + needleLength: 165 + needleBaseWidth: 10 + needleTipWidth: 1 - // Define the appearance of major tickmarks tickmark: Rectangle { - implicitWidth: 3 // Width of major tickmarks - antialiasing: true // Enable antialiasing for smoother rendering - implicitHeight: 15 // Height of major tickmarks - color: "black" // Color of major tickmarks + implicitWidth: 3 + antialiasing: true + implicitHeight: 15 + color: "black" } - // Define the appearance of minor tickmarks minorTickmark: Rectangle { - implicitWidth: 2 // Width of minor tickmarks - antialiasing: true // Enable antialiasing for smoother rendering - implicitHeight: 7 // Height of minor tickmarks - color: "black" // Color of minor tickmarks + implicitWidth: 2 + antialiasing: true + implicitHeight: 7 + color: "black" } - // Define the background of the gauge using a Canvas background: Canvas { FontLoader { id: font - source: "../font/Nebula-Regular.otf" // Load a custom font + source: "../font/Nebula-Regular.otf" } - // Display the speed value Text { - text: valueSource.speed // Bind to the 'speed' valueSource property - color: "black" // Text color - font.family: font.name // Set the custom font - font.pixelSize: 80 // Text size - anchors.horizontalCenter: parent.horizontalCenter // Center horizontally - y: 170 // Vertical position + text: valueSource.speed + color: "black" + font.family: font.name + font.pixelSize: 80 + anchors.horizontalCenter: parent.horizontalCenter + y: 170 } - // Display the label "mm/s" + Text { - text: "mm/s" // Static label text - color: "black" // Text color - font.family: font.name // Set the custom font - font.pixelSize: 30 // Text size - anchors.horizontalCenter: parent.horizontalCenter // Center horizontally - y: 240 // Vertical position + text: "mm/s" + color: "black" + font.family: font.name + font.pixelSize: 30 + anchors.horizontalCenter: parent.horizontalCenter + y: 240 } } } diff --git a/src/InstrumentCluster/qml/ValueSource.qml b/src/InstrumentCluster/qml/ValueSource.qml index 485f48b7..6815f34b 100644 --- a/src/InstrumentCluster/qml/ValueSource.qml +++ b/src/InstrumentCluster/qml/ValueSource.qml @@ -1,10 +1,8 @@ import QtQuick 2.2 -// Create an Item named 'valueSource' to hold properties Item { id: valueSource - // Define properties that will be bound to 'carinfo' values property int speed: carinfo.speed property int rpm: carinfo.rpm property int battery: carinfo.battery @@ -12,14 +10,12 @@ Item { property int direction: carinfo.direction property string light: (carinfo.light[0] === '#' ? carinfo.light : "#808080") - // Properties for indicating blink and direction states property bool blink: !(valueSource.direction === 0) property bool left_direction: (valueSource.direction === 1 || valueSource.direction === 3) property bool right_direction: (valueSource.direction === 2 || valueSource.direction === 3) property bool left_on_off: false property bool right_on_off: false - // Handler for direction changes onDirectionChanged: { valueSource.blink = !(valueSource.direction === 0); valueSource.left_direction = (valueSource.direction === 1 || valueSource.direction === 3); @@ -28,7 +24,6 @@ Item { valueSource.right_on_off = false; } - // Define behaviors and animations for specific properties Behavior on speed { NumberAnimation { target: valueSource @@ -54,7 +49,6 @@ Item { } } - // Function to control blinking based on direction function blinking() { if (valueSource.left_direction) { valueSource.left_on_off = !valueSource.left_on_off; @@ -64,7 +58,6 @@ Item { } } - // Timer to trigger the blinking function Timer { interval: 500; running: valueSource.blink; repeat: true onTriggered: valueSource.blinking() diff --git a/src/InstrumentCluster/qml/main.qml b/src/InstrumentCluster/qml/main.qml index fb72c433..365b343b 100644 --- a/src/InstrumentCluster/qml/main.qml +++ b/src/InstrumentCluster/qml/main.qml @@ -4,7 +4,6 @@ import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 import QtQuick.Extras 1.4 -// Create a window named 'root' Window { id: root title: "Instrument Cluster" @@ -17,12 +16,10 @@ Window { source: "../font/Nebula-Regular.otf" } - // Create a value source object ValueSource { id: valueSource } - // Create an item named 'container' to hold the instrument cluster elements Item { id: container width: 1280 @@ -30,7 +27,6 @@ Window { anchors.centerIn: parent rotation: -90 - // Create a background rectangle with a gradient Rectangle { id: background width: 400 @@ -45,7 +41,6 @@ Window { } } - // Display a logo image Image { source: "../image/logo.png" width: 300 @@ -55,7 +50,6 @@ Window { y: 10 } - // Create a circular gauge for speed CircularGauge { value: valueSource.speed maximumValue: 450 @@ -67,7 +61,6 @@ Window { style: SpeedGaugeStyle {} } - // Create a circular gauge for RPM CircularGauge { value: valueSource.rpm maximumValue: 450 @@ -79,7 +72,6 @@ Window { style: RPMGaugeStyle {} } - // Create a circular gauge for battery CircularGauge { value: valueSource.battery maximumValue: 100 @@ -94,7 +86,6 @@ Window { } } - // Display gear-related text labels Text { text: "E F" font.family: font.name @@ -104,7 +95,6 @@ Window { y: 340 } - // Display gear labels Text { text: "P" font.family: font.name @@ -141,7 +131,6 @@ Window { y: 250 } - // Display left and right turn signal indicators Image { source: "../image/turn-icon.png" width: 60 diff --git a/src/PDCUnit/PDCUnit.cpp b/src/PDCUnit/PDCUnit.cpp index a376c7c6..d3e9e91b 100644 --- a/src/PDCUnit/PDCUnit.cpp +++ b/src/PDCUnit/PDCUnit.cpp @@ -12,26 +12,21 @@ using namespace v1_0::commonapi; int main(int argc, char *argv[]) { - // Initialize the CommonAPI runtime and PDCUnitService std::shared_ptr runtime; std::shared_ptr PDCUnitService; - // Create a CommonAPI runtime and register the PDCUnit service runtime = CommonAPI::Runtime::get(); PDCUnitService = std::make_shared(); runtime->registerService("local", "PDCUnit", PDCUnitService); - // Initialize the Qt Application QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication app(argc, argv); QCursor cursor(Qt::BlankCursor); app.setOverrideCursor(cursor); - // Register the PDCUnitQtClass as a QML type qmlRegisterType("DataModule", 1, 0, "PDCUnitQtClass"); - // Initialize the QML Application Engine QQmlApplicationEngine engine; QList cameras = QCameraInfo::availableCameras(); @@ -47,10 +42,8 @@ int main(int argc, char *argv[]) engine.rootContext()->setContextProperty("carinfo", &carinfo); - // Load the main QML file from resources const QUrl url(QStringLiteral("qrc:/qml/main.qml")); - // Connect the engine objectCreated signal to handle application exit QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app, [url](QObject *obj, const QUrl &objUrl) { @@ -58,7 +51,6 @@ int main(int argc, char *argv[]) QCoreApplication::exit(-1); }, Qt::QueuedConnection); - // Load the QML file and start the application event loop engine.load(url); return app.exec(); diff --git a/src/PDCUnit/PDCUnitQtClass.cpp b/src/PDCUnit/PDCUnitQtClass.cpp index 7a9ddba7..df736036 100644 --- a/src/PDCUnit/PDCUnitQtClass.cpp +++ b/src/PDCUnit/PDCUnitQtClass.cpp @@ -1,14 +1,11 @@ #include "PDCUnitQtClass.hpp" -// Constructor for PDCUnitQtClass PDCUnitQtClass::PDCUnitQtClass(QObject *parent) : QObject(parent) { - // Initialize distance to 50 Qdistance = 50; Qsteering = 0.0; } -// Getter for distance quint16 PDCUnitQtClass::distance() const { return Qdistance; @@ -19,18 +16,15 @@ qreal PDCUnitQtClass::steering() const return Qsteering; } -// Setter for distance void PDCUnitQtClass::setDistance(uint16_t _distance) { Qdistance = _distance; - // Emit the signal to notify changes to QML emit distanceChanged(); } void PDCUnitQtClass::setSteering(double _steering) { Qsteering = _steering; - // Emit the signal to notify changes to QML emit steeringChanged(); } @@ -39,6 +33,5 @@ Q_INVOKABLE void PDCUnitQtClass::getIPCManagerSteering() sender.IPCManagerTargetProxy->getSteering("PDCUnit", sender.callStatus, sender.returnMessage); } -// Create an instance of PDCUnitQtClass named carinfo PDCUnitQtClass carinfo; diff --git a/src/PDCUnit/PDCUnitQtClass.hpp b/src/PDCUnit/PDCUnitQtClass.hpp index 57ce902d..9850edaa 100644 --- a/src/PDCUnit/PDCUnitQtClass.hpp +++ b/src/PDCUnit/PDCUnitQtClass.hpp @@ -12,10 +12,10 @@ class PDCUnitQtClass : public QObject Q_PROPERTY(qreal steering READ steering WRITE setSteering NOTIFY steeringChanged) private: - PDCUnitSenderClass sender; // Create an instance of PDCUnitSenderClass for communication + PDCUnitSenderClass sender; - quint16 Qdistance; // Distance property. - qreal Qsteering; // Steering property. + quint16 Qdistance; + qreal Qsteering; public: explicit PDCUnitQtClass(QObject *parent = nullptr); @@ -34,7 +34,7 @@ public Q_SLOTS: void steeringChanged(); }; -extern PDCUnitQtClass carinfo; // Create a global instance of PDCUnitQtClass named 'carinfo' +extern PDCUnitQtClass carinfo; #endif diff --git a/src/PDCUnit/PDCUnitSenderClass.cpp b/src/PDCUnit/PDCUnitSenderClass.cpp index 7e538fa4..f9cfbe60 100644 --- a/src/PDCUnit/PDCUnitSenderClass.cpp +++ b/src/PDCUnit/PDCUnitSenderClass.cpp @@ -1,18 +1,13 @@ #include "PDCUnitSenderClass.hpp" -// Import the necessary namespaces using namespace v1_0::commonapi; -// Constructor for the PDCUnitSenderClass PDCUnitSenderClass::PDCUnitSenderClass() { - // Get the CommonAPI runtime instance runtime = CommonAPI::Runtime::get(); - // Build a proxy to the IPCManager service on the "local" transport with the name "IPCManager" IPCManagerTargetProxy = runtime->buildProxy("local", "IPCManager"); } -// Destructor for the PDCUnitSenderClass PDCUnitSenderClass::~PDCUnitSenderClass() { } diff --git a/src/PDCUnit/PDCUnitSenderClass.hpp b/src/PDCUnit/PDCUnitSenderClass.hpp index b13f0772..1ae42643 100644 --- a/src/PDCUnit/PDCUnitSenderClass.hpp +++ b/src/PDCUnit/PDCUnitSenderClass.hpp @@ -5,26 +5,18 @@ #include #include -// Import necessary namespaces using namespace v1_0::commonapi; -// Define the PDCUnitSenderClass class PDCUnitSenderClass { public: - // Constructor for PDCUnitSenderClass PDCUnitSenderClass(); - - // Destructor for PDCUnitSenderClass ~PDCUnitSenderClass(); - // Shared pointer to the CommonAPI runtime std::shared_ptr runtime; - // Shared pointer to the IPCManagerProxy for communication std::shared_ptr> IPCManagerTargetProxy; - // Call status for the last communication CommonAPI::CallStatus callStatus; std::string returnMessage; }; diff --git a/src/PDCUnit/PDCUnitStubImpl.cpp b/src/PDCUnit/PDCUnitStubImpl.cpp index 1005e726..29e44332 100644 --- a/src/PDCUnit/PDCUnitStubImpl.cpp +++ b/src/PDCUnit/PDCUnitStubImpl.cpp @@ -1,17 +1,12 @@ #include "PDCUnitStubImpl.hpp" -// Constructor for PDCUnitStubImpl PDCUnitStubImpl::PDCUnitStubImpl() { } - -// Destructor for PDCUnitStubImpl PDCUnitStubImpl::~PDCUnitStubImpl() { } void PDCUnitStubImpl::setDistance(const std::shared_ptr _client, uint16_t _distance, setDistanceReply_t _reply) { - // Update the distance property in the carinfo object. carinfo.setDistance(_distance); - // Respond to the client's request by invoking the reply callback. _reply(""); return; @@ -19,10 +14,8 @@ void PDCUnitStubImpl::setDistance(const std::shared_ptr _cl void PDCUnitStubImpl::setSteering(const std::shared_ptr _client, double _steering, setSteeringReply_t _reply) { - // Update the steering property in the carinfo object. carinfo.setSteering(_steering); - // Respond to the client's request by invoking the reply callback. _reply(""); return; diff --git a/src/PDCUnit/PDCUnitStubImpl.hpp b/src/PDCUnit/PDCUnitStubImpl.hpp index b2f4acb3..d7c0a6a8 100644 --- a/src/PDCUnit/PDCUnitStubImpl.hpp +++ b/src/PDCUnit/PDCUnitStubImpl.hpp @@ -6,20 +6,13 @@ #include "PDCUnitQtClass.hpp" -// Define the PDCUnitStubImpl class, which is derived from PDCUnitStubDefault class PDCUnitStubImpl : public v1_0::commonapi::PDCUnitStubDefault { public: - // Constructor for PDCUnitStubImpl PDCUnitStubImpl(); - - // Destructor for PDCUnitStubImpl virtual ~PDCUnitStubImpl(); - // Handle a request to update the distance of the PDC Unit virtual void setDistance(const std::shared_ptr _client, uint16_t _distance, setDistanceReply_t _return); - - // Handle a request to update the steering of the PDC Unit virtual void setSteering(const std::shared_ptr _client, double _steering, setSteeringReply_t _return); }; diff --git a/src/PDCUnit/README.md b/src/PDCUnit/README.md deleted file mode 100644 index 06fc7b65..00000000 --- a/src/PDCUnit/README.md +++ /dev/null @@ -1 +0,0 @@ -# PDCUnit diff --git a/src/PiracerController/ControllerClass.cpp b/src/PiracerController/ControllerClass.cpp index 2c368d80..9794f5fe 100644 --- a/src/PiracerController/ControllerClass.cpp +++ b/src/PiracerController/ControllerClass.cpp @@ -1,19 +1,10 @@ #include "ControllerClass.hpp" -#include -// Constructor for the ControllerClass ControllerClass::ControllerClass() { - // Initialize the Python interpreter Py_Initialize(); - - // Import the "piracer.gamepads" module pModule = PyImport_ImportModule("piracer.gamepads"); - - // Get the "ShanWanGamepad" class from the module pClass = PyObject_GetAttrString(pModule, "ShanWanGamepad"); - - // Create an instance of the "ShanWanGamepad" class pInstance = PyObject_CallObject(pClass, NULL); throttle = 0.0; @@ -39,22 +30,17 @@ ControllerClass::ControllerClass() pre_button_right_turn = false; } -// Destructor for the ControllerClass ControllerClass::~ControllerClass() { - // Release Python objects to avoid memory leaks Py_DECREF(pThrottle); Py_DECREF(pSteering); Py_DECREF(pInput); Py_DECREF(pInstance); Py_DECREF(pClass); Py_DECREF(pModule); - - // Finalize the Python interpreter Py_Finalize(); } -// Read control input from the gamepad void ControllerClass::readControl() { pre_throttle = throttle; @@ -68,31 +54,30 @@ void ControllerClass::readControl() pre_button_left_turn = button_left_turn; pre_button_right_turn = button_right_turn; - // Call the "read_data" method on the gamepad instance pInput = PyObject_CallMethod(pInstance, "read_data", NULL); pThrottle = PyObject_GetAttrString(pInput, "analog_stick_right"); pThrottle = PyObject_GetAttrString(pThrottle, "y"); - throttle = PyFloat_AsDouble(pThrottle); - if ((-0.5 <= throttle) && (throttle < -0.4)) + throttle = PyFloat_AsDouble(pThrottle) * -1.0; + if ((-1.0 <= throttle) && (throttle < -0.8)) { - throttle = -0.5; + throttle = -1.0; } - else if ((-0.4 <= throttle) && (throttle < -0.1)) + else if ((-0.8 <= throttle) && (throttle < -0.2)) { - throttle = -0.25; + throttle = -0.5; } - else if ((-0.1 <= throttle) && (throttle <= 0.1)) + else if ((-0.2 <= throttle) && (throttle <= 0.2)) { throttle = 0.0; } - else if ((0.1 < throttle) && (throttle <= 0.4)) + else if ((0.2 < throttle) && (throttle <= 0.8)) { - throttle = 0.25; + throttle = 0.5; } - else if ((0.4 < throttle) && (throttle <= 0.5)) + else if ((0.8 < throttle) && (throttle <= 1.0)) { - throttle = 0.5; + throttle = 1.0; } pSteering = PyObject_GetAttrString(pInput, "analog_stick_left"); @@ -119,36 +104,32 @@ void ControllerClass::readControl() steering = 1.0; } - button_p = PyObject_IsTrue(PyObject_GetAttrString(pInput, "button_x")); + button_p = PyObject_IsTrue(PyObject_GetAttrString(pInput, "button_a")); button_r = PyObject_IsTrue(PyObject_GetAttrString(pInput, "button_y")); button_n = PyObject_IsTrue(PyObject_GetAttrString(pInput, "button_b")); - button_d = PyObject_IsTrue(PyObject_GetAttrString(pInput, "button_l1")); + button_d = PyObject_IsTrue(PyObject_GetAttrString(pInput, "button_x")); - button_left_turn = PyObject_IsTrue(PyObject_GetAttrString(pInput, "button_l2")); - button_right_turn = PyObject_IsTrue(PyObject_GetAttrString(pInput, "button_r2")); + button_left_turn = PyObject_IsTrue(PyObject_GetAttrString(pInput, "button_l1")); + button_right_turn = PyObject_IsTrue(PyObject_GetAttrString(pInput, "button_r1")); return; } -// Get the current throttle value double ControllerClass::getThrottle() { return throttle; } -// Get the current steering value double ControllerClass::getSteering() { return steering; } -// Get the previous throttle value double ControllerClass::getPreThrottle() { return pre_throttle; } -// Get the previous steering value double ControllerClass::getPreSteering() { return pre_steering; diff --git a/src/PiracerController/ControllerClass.hpp b/src/PiracerController/ControllerClass.hpp index 50ef81f7..a5878ed3 100644 --- a/src/PiracerController/ControllerClass.hpp +++ b/src/PiracerController/ControllerClass.hpp @@ -8,11 +8,11 @@ class ControllerClass private: PyObject *pModule, *pClass, *pInstance, *pInput, *pThrottle, *pSteering; - double throttle; // Stores the throttle value - double steering; // Stores the steering value + double throttle; + double steering; - double pre_throttle; // Stores the previous throttle value - double pre_steering; // Stores the previous steering value + double pre_throttle; + double pre_steering; bool button_p; bool button_r; @@ -31,25 +31,14 @@ class ControllerClass bool pre_button_right_turn; public: - // Constructor for the ControllerClass ControllerClass(); - - // Destructor for the ControllerClass ~ControllerClass(); - // Read control input from the gamepad void readControl(); - // Get the current throttle value double getThrottle(); - - // Get the current steering value double getSteering(); - - // Get the previous throttle value double getPreThrottle(); - - // Get the previous steering value double getPreSteering(); bool getButtonP(); diff --git a/src/PiracerController/PiracerController.cpp b/src/PiracerController/PiracerController.cpp index 68e9b2a3..461534fb 100644 --- a/src/PiracerController/PiracerController.cpp +++ b/src/PiracerController/PiracerController.cpp @@ -8,19 +8,15 @@ using namespace v1_0::commonapi; int main() { - // Initialize the CommonAPI runtime std::shared_ptr runtime; std::shared_ptr PiracerControllerService; - std::shared_ptr> IPCManagertargetProxy; + std::shared_ptr> IPCManagerTargetProxy; runtime = CommonAPI::Runtime::get(); - - // Create the Piracer Controller service PiracerControllerService = std::make_shared(); runtime->registerService("local", "PiracerController", PiracerControllerService); - IPCManagertargetProxy = runtime->buildProxy("local", "IPCManager"); + IPCManagerTargetProxy = runtime->buildProxy("local", "IPCManager"); - // Initialize the controller class for interacting with the game controller ControllerClass controller; CommonAPI::CallStatus callStatus; @@ -28,41 +24,39 @@ int main() while (1) { - // Read control input from the game controller controller.readControl(); - // Send control data to IPCManager - if (controller.getPreThrottle() != controller.getThrottle()) - { - IPCManagertargetProxy->setThrottle(controller.getThrottle(), callStatus, returnMessage); - } - if (controller.getPreSteering() != controller.getSteering()) - { - IPCManagertargetProxy->setSteering(controller.getSteering(), callStatus, returnMessage); + if (controller.getPreThrottle() != controller.getThrottle()) + { + IPCManagerTargetProxy->setThrottle(controller.getThrottle(), callStatus, returnMessage); + } + if (controller.getPreSteering() != controller.getSteering()) + { + IPCManagerTargetProxy->setSteering(controller.getSteering(), callStatus, returnMessage); } if (controller.getPreButtonP() != controller.getButtonP()) - { - IPCManagertargetProxy->setGearMode(0, callStatus, returnMessage); + { + IPCManagerTargetProxy->setGearMode(0, callStatus, returnMessage); } if (controller.getPreButtonR() != controller.getButtonR()) - { - IPCManagertargetProxy->setGearMode(1, callStatus, returnMessage); + { + IPCManagerTargetProxy->setGearMode(1, callStatus, returnMessage); } if (controller.getPreButtonN() != controller.getButtonN()) - { - IPCManagertargetProxy->setGearMode(2, callStatus, returnMessage); + { + IPCManagerTargetProxy->setGearMode(2, callStatus, returnMessage); } if (controller.getPreButtonD() != controller.getButtonD()) - { - IPCManagertargetProxy->setGearMode(3, callStatus, returnMessage); + { + IPCManagerTargetProxy->setGearMode(3, callStatus, returnMessage); } if ((!controller.getPreButtonLeftTurn()) && (controller.getButtonLeftTurn())) - { - IPCManagertargetProxy->setDirection(1, callStatus, returnMessage); + { + IPCManagerTargetProxy->setDirection(1, callStatus, returnMessage); } if ((!controller.getPreButtonRightTurn()) && (controller.getButtonRightTurn())) - { - IPCManagertargetProxy->setDirection(2, callStatus, returnMessage); + { + IPCManagerTargetProxy->setDirection(2, callStatus, returnMessage); } } diff --git a/src/PiracerController/PiracerControllerStubImpl.cpp b/src/PiracerController/PiracerControllerStubImpl.cpp index ef293fb4..9a6ac504 100644 --- a/src/PiracerController/PiracerControllerStubImpl.cpp +++ b/src/PiracerController/PiracerControllerStubImpl.cpp @@ -1,8 +1,5 @@ #include "PiracerControllerStubImpl.hpp" -// Constructor for PiracerControllerStubImpl PiracerControllerStubImpl::PiracerControllerStubImpl() { } - -// Destructor for PiracerControllerStubImpl PiracerControllerStubImpl::~PiracerControllerStubImpl() { } diff --git a/src/PiracerController/PiracerControllerStubImpl.hpp b/src/PiracerController/PiracerControllerStubImpl.hpp index aecd85d2..b5ee2f55 100644 --- a/src/PiracerController/PiracerControllerStubImpl.hpp +++ b/src/PiracerController/PiracerControllerStubImpl.hpp @@ -4,13 +4,9 @@ #include #include -// Declaration of the PiracerControllerStubImpl class class PiracerControllerStubImpl : public v1_0::commonapi::PiracerControllerStubDefault { public: - // Constructor for PiracerControllerStubImpl PiracerControllerStubImpl(); - - // Destructor for PiracerControllerStubImpl virtual ~PiracerControllerStubImpl(); }; diff --git a/src/PiracerController/README.md b/src/PiracerController/README.md deleted file mode 100644 index 8f6e11f0..00000000 --- a/src/PiracerController/README.md +++ /dev/null @@ -1 +0,0 @@ -# PiracerController diff --git a/src/PiracerSender/PiracerClass.cpp b/src/PiracerSender/PiracerClass.cpp index b2b0a60a..75f85b9d 100644 --- a/src/PiracerSender/PiracerClass.cpp +++ b/src/PiracerSender/PiracerClass.cpp @@ -2,22 +2,14 @@ PiracerClass::PiracerClass() { - // Initialize the Python interpreter Py_Initialize(); - - // Import the Python module "piracer.vehicles" pModule = PyImport_ImportModule("piracer.vehicles"); - - // Get the Python class "PiRacerStandard" from the module pClass = PyObject_GetAttrString(pModule, "PiRacerStandard"); - - // Create an instance of the Python class pInstance = PyObject_CallObject(pClass, NULL); } PiracerClass::~PiracerClass() { - // Release Python objects and finalize the Python interpreter Py_DECREF(pVoltage); Py_DECREF(pInstance); Py_DECREF(pClass); @@ -27,13 +19,8 @@ PiracerClass::~PiracerClass() uint16_t PiracerClass::getBatteryLevel() { - // Call the Python method "get_battery_voltage" on the Python instance pVoltage = PyObject_CallMethod(pInstance, "get_battery_voltage", NULL); - - // Convert the Python float to a C++ double voltageLevel = PyFloat_AsDouble(pVoltage); - - // Calculate the battery level as a percentage batteryLevel = (uint16_t) ((voltageLevel - 2.8 * 3.0) / (12.3 - 2.8 * 3.0) * 100.0); return batteryLevel; diff --git a/src/PiracerSender/PiracerClass.hpp b/src/PiracerSender/PiracerClass.hpp index fc7b5dfc..5aeebe50 100644 --- a/src/PiracerSender/PiracerClass.hpp +++ b/src/PiracerSender/PiracerClass.hpp @@ -12,13 +12,9 @@ class PiracerClass uint16_t batteryLevel; public: - // Constructor: Initializes the Python interpreter, imports a module, and creates an instance PiracerClass(); - - // Destructor: Releases Python objects and finalizes the Python interpreter ~PiracerClass(); - // Method to get the battery level by calling a Python method uint16_t getBatteryLevel(); }; diff --git a/src/PiracerSender/PiracerSender.cpp b/src/PiracerSender/PiracerSender.cpp index 51336177..a68b5ff2 100644 --- a/src/PiracerSender/PiracerSender.cpp +++ b/src/PiracerSender/PiracerSender.cpp @@ -10,33 +10,21 @@ using namespace v1_0::commonapi; int main() { - // Create a CommonAPI runtime instance std::shared_ptr runtime; runtime = CommonAPI::Runtime::get(); - - // Create a PiracerSenderStubImpl service std::shared_ptr PiracerSenderService = std::make_shared(); - // Register the service with CommonAPI runtime->registerService("local", "PiracerSender", PiracerSenderService); - - // Create an IPCManagerProxy for communication with IPCManager std::shared_ptr> IPCManagerTargetProxy = runtime->buildProxy("local", "IPCManager"); - // Create a PiracerClass instance for battery level retrieval PiracerClass piracer; - - // Set up variables for CommonAPI call status and return messages CommonAPI::CallStatus callStatus; std::string returnMessage; - // Enter an infinite loop for continuous operation while (1) { - // Use the IPCManager proxy to call the setBatteryLevel method and send the battery level to the IPCManager IPCManagerTargetProxy->setBatteryLevel(piracer.getBatteryLevel(), callStatus, returnMessage); - // Sleep for 500,000 microseconds (500 ms) before the next iteration usleep(500000); } diff --git a/src/PiracerSender/PiracerSenderStubImpl.cpp b/src/PiracerSender/PiracerSenderStubImpl.cpp index 6d25bcb2..580761c4 100644 --- a/src/PiracerSender/PiracerSenderStubImpl.cpp +++ b/src/PiracerSender/PiracerSenderStubImpl.cpp @@ -1,8 +1,5 @@ #include "PiracerSenderStubImpl.hpp" -// Constructor for PiracerSenderStubImpl PiracerSenderStubImpl::PiracerSenderStubImpl() { } - -// Destructor for PiracerSenderStubImpl PiracerSenderStubImpl::~PiracerSenderStubImpl() { } diff --git a/src/PiracerSender/PiracerSenderStubImpl.hpp b/src/PiracerSender/PiracerSenderStubImpl.hpp index b38a233a..88eba0e7 100644 --- a/src/PiracerSender/PiracerSenderStubImpl.hpp +++ b/src/PiracerSender/PiracerSenderStubImpl.hpp @@ -4,15 +4,10 @@ #include #include -// Declaration of the PiracerSenderStubImpl class class PiracerSenderStubImpl : public v1_0::commonapi::PiracerSenderStubDefault { public: - // Constructor for PiracerSenderStubImpl PiracerSenderStubImpl(); - - // Destructor for PiracerSenderStubImpl virtual ~PiracerSenderStubImpl(); }; #endif - diff --git a/src/PiracerSender/README.md b/src/PiracerSender/README.md deleted file mode 100644 index d5aac976..00000000 --- a/src/PiracerSender/README.md +++ /dev/null @@ -1 +0,0 @@ -# PiracerSender diff --git a/src/README.md b/src/README.md new file mode 100644 index 00000000..5c083725 --- /dev/null +++ b/src/README.md @@ -0,0 +1,67 @@ +# Source code + +Each directory represents an independent process, and these processes exchange data through vsomeip communication. Here is a list outlining the basic operational principles and purposes of each process. + +--- + +## [CANSender](./CANSender/) +CANSender is designed to process both vehicle speed data and distance data from a rear distance sensor, relaying the refined information to the IPCManager after filtering. + + +This system employs two threads to manage the processing tasks. In the first thread, vehicle speed and rear distance data is captured from an external source through the CAN shield and stored in a circular queue buffer. Concurrently, the second thread periodically retrieves the latest data from this buffer. Especially for the speed data, it undergoes a Kalman filter to enhance accuracy. Finally, speed and distance value is forwarded to the IPCManager. + +The external data source for both speed and distance information is CAN signals originating from an Arduino. The circular buffer plays a crucial role in managing and storing this data, serving as a mechanism to address potential delays resulting from communication speed discrepancies and the filtering process. Additionally, mutual exclusion, implemented through mutexes, ensures seamless coordination between the two threads when accessing and manipulating the shared circular queue buffer. + +## [HeadUnit](./HeadUnit/) +HeadUnit, as part of the In-Vehicle Infotainment system, features a Qt-based GUI that facilitates various user interactions related to vehicle functions, such as ambient light color selection and media playback. + + +The screen of the Head Unit is composed using the wayland compositor in Qt. This Qt-based screen operates on the wayland platform, providing a seamless and responsive user experience within the vehicle's infotainment system. It derives data on speed from the IPCManager. Concurrently, it relays data about ambient lighting preferences. One of its distinctive features is allowing users to power off the OS, analogous to switching off a vehicle. + +## [IPCManager](./IPCManager/) +IPCManager functions as a conduit, ensuring seamless data exchange between all processes. + + +Primarily, the IPCManager ensures the correct flow of data amongst all processes. It is adept at asynchronously disseminating data. A noteworthy feature is its capability to monitor the connectivity of other processes. If it detects a malfunction or disconnect, it can swiftly terminate the erring process and initiate a restart via reboot scripts(only in rasbian version). + +In addition to its role in managing data flow and process connectivity, the IPCManager also acts as a repository for storing vital information. Analogous to the engine of a vehicle, it utilizes this stored information to control hardware components. This dual functionality underscores the IPCManager's importance, not only in maintaining seamless communication among processes but also in leveraging stored data to effectively control hardware, resembling the way a vehicle's engine manages and regulates various components. + +## [IVICompositor](./IVICompositor/) +IVICompositor is a Qt-based GUI provisioning process designed for constructing In-Vehicle Infotainment systems. + + +Utilizing the Qt Wayland Compositor, IVICompositor can concurrently display screens from multiple processes. Screens from both HeadUnit and PDCUnit are utilized and managed as layers. Depending on the gear mode, with selections like P (Park), N (Neutral), and D (Drive), the HeadUnit screen takes precedence when displayed. However, when the gear mode transitions to R (Reverse), activating the Parking Distance Control (PDC) feature, the PDCUnit screen appears above the HeadUnit screen. This layered management ensures dynamic visibility based on the vehicle's gear mode, enhancing the user interface for both HeadUnit and PDCUnit functionalities. + +## [InstrumentCluster](./InstrumentCluster/) +InstrumentCluster is a Qt-based interface that displays crucial vehicle data to the user in real-time. + + +Built using Qt, this GUI presents the vehicle's speed, RPM, battery level, and current gear mode status to the user. An additional feature is its ability to dynamically adjust ambient lighting based on user inputs sourced from the HeadUnit. + +## [PDCUnit](./PDCUnit/) +Similar to the HeadUnit, the PDCUnit is also part of the In-Vehicle Infotainment system, featuring a Qt-based GUI. + + +It serves the functionality of displaying the rearview camera's perspective during reverse parking on the screen. The GUI operates on the wayland platform in Qt, ensuring a smooth and responsive user experience within the vehicle's infotainment system. The display incorporates color-coded indicators, with green, yellow, and red signals appearing on the screen based on the distance from rear objects. This visual representation assists the driver in perceiving distances accurately and enhances overall awareness during reverse parking scenarios. + +## [PiracerController](./PiracerController/) +PiracerController serves as a bridge between hardware control and controller input, delivering controller input information to the IPC Manager without directly manipulating the hardware. The IPC Manager receives this information and utilizes it to control the vehicle's hardware components. + + +In achieving this functionality, PiracerController seamlessly integrates the piracer-py Python package with vsomeip communication. This integration involves incorporating Python within a C++ framework. + +## [PiracerSender](./PiracerSender/) +PiracerSender gauges the vehicle's battery voltage, computes the remaining charge, and communicates this data to the IPCManager. + + +This process, integrating the piracer-py Python package with vsomeip communication, is devised by embedding Python within C++. It periodically measures the vehicle's battery voltage, derives the remaining battery percentage, and subsequently forwards this critical information to the IPCManager. + +## [RemoteSpeaker](./RemoteSpeaker/) +RemoteSpeaker is specifically designed for the Parking Distance Control (PDC) functionality, serving as a process that provides users with audio alerts based on data from the rear distance sensor. It receives distance information from the IPC Manager and delivers alerts at varying speeds depending on the distance range. + + +The method by which RemoteSpeaker generates sound is quite unique. Since there is no onboard speaker on Raspberry Pi and no additional speaker components are attached, an innovative approach is taken. A personal laptop is used to remotely connect to the Raspberry Pi, essentially functioning as an external speaker for the Raspberry Pi. The sound production method involves outputting the '\a' character in the terminal, which emits a beep sound. + +To set up and experience this, one needs to establish an SSH connection to the Raspberry Pi from a laptop and then run RemoteSpeaker executable file. Although the RemoteSpeaker process is running within the Raspberry Pi, the output results appear on the laptop's terminal, allowing users to hear the sound. + +It's important to note that the beep sound can be tested on the laptop's terminal by pressing the Tab key. If the beep sound is not produced, proper settings may need to be configured first. diff --git a/src/RemoteSpeaker/DataBuffer.hpp b/src/RemoteSpeaker/DataBuffer.hpp index 3ab6bb54..8d7f5fa0 100644 --- a/src/RemoteSpeaker/DataBuffer.hpp +++ b/src/RemoteSpeaker/DataBuffer.hpp @@ -1,13 +1,9 @@ #ifndef DATABUFFER_H #define DATABUFFER_H - #include - extern uint16_t GearBuffer; extern uint16_t DistanceBuffer; - #endif - diff --git a/src/RemoteSpeaker/RemoteSpeaker.cpp b/src/RemoteSpeaker/RemoteSpeaker.cpp index 584bc168..21f486ca 100644 --- a/src/RemoteSpeaker/RemoteSpeaker.cpp +++ b/src/RemoteSpeaker/RemoteSpeaker.cpp @@ -35,19 +35,20 @@ int main(int argc, char *argv[]) if (DistanceBuffer < 15) { std::cout << '\a' << std::endl; - usleep(250000); } else if (DistanceBuffer < 30) { std::cout << '\a' << std::endl; - usleep(500000); + usleep(250000); } else if (DistanceBuffer < 50) { std::cout << '\a' << std::endl; - usleep(750000); - } + usleep(500000); + } } + + usleep(250000); } return 0; diff --git a/src/RemoteSpeaker/RemoteSpeakerStubImpl.hpp b/src/RemoteSpeaker/RemoteSpeakerStubImpl.hpp index daa2ae46..5590b371 100644 --- a/src/RemoteSpeaker/RemoteSpeakerStubImpl.hpp +++ b/src/RemoteSpeaker/RemoteSpeakerStubImpl.hpp @@ -1,7 +1,6 @@ #ifndef REMOTESPEAKERSTUBIMPL_HPP #define REMOTESPEAKERSTUBIMPL_HPP - #include #include diff --git a/src_gen_cmd.sh b/src_gen_cmd.sh new file mode 100644 index 00000000..fd72d006 --- /dev/null +++ b/src_gen_cmd.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +~/generator/core-generator/commonapi-core-generator-linux-x86_64 --skel --dest-common ./src-gen/CANSender/core/common --dest-proxy ./src-gen/CANSender/core/proxy --dest-stub ./src-gen/CANSender/core/stub --dest-skel ./src-gen/CANSender/core/skel ./fidl/CANSender/CANSender.fidl + +~/generator/someip-generator/commonapi-someip-generator-linux-x86_64 --dest-common ./src-gen/CANSender/someip/common --dest-proxy ./src-gen/CANSender/someip/proxy --dest-stub ./src-gen/CANSender/someip/stub ./fidl/CANSender/CANSender.fdepl + + +~/generator/core-generator/commonapi-core-generator-linux-x86_64 --skel --dest-common ./src-gen/PiracerSender/core/common --dest-proxy ./src-gen/PiracerSender/core/proxy --dest-stub ./src-gen/PiracerSender/core/stub --dest-skel ./src-gen/PiracerSender/core/skel ./fidl/PiracerSender/PiracerSender.fidl + +~/generator/someip-generator/commonapi-someip-generator-linux-x86_64 --dest-common ./src-gen/PiracerSender/someip/common --dest-proxy ./src-gen/PiracerSender/someip/proxy --dest-stub ./src-gen/PiracerSender/someip/stub ./fidl/PiracerSender/PiracerSender.fdepl + + +~/generator/core-generator/commonapi-core-generator-linux-x86_64 --skel --dest-common ./src-gen/PiracerController/core/common --dest-proxy ./src-gen/PiracerController/core/proxy --dest-stub ./src-gen/PiracerController/core/stub --dest-skel ./src-gen/PiracerController/core/skel ./fidl/PiracerController/PiracerController.fidl + +~/generator/someip-generator/commonapi-someip-generator-linux-x86_64 --dest-common ./src-gen/PiracerController/someip/common --dest-proxy ./src-gen/PiracerController/someip/proxy --dest-stub ./src-gen/PiracerController/someip/stub ./fidl/PiracerController/PiracerController.fdepl + + +~/generator/core-generator/commonapi-core-generator-linux-x86_64 --skel --dest-common ./src-gen/IPCManager/core/common --dest-proxy ./src-gen/IPCManager/core/proxy --dest-stub ./src-gen/IPCManager/core/stub --dest-skel ./src-gen/IPCManager/core/skel ./fidl/IPCManager/IPCManager.fidl + +~/generator/someip-generator/commonapi-someip-generator-linux-x86_64 --dest-common ./src-gen/IPCManager/someip/common --dest-proxy ./src-gen/IPCManager/someip/proxy --dest-stub ./src-gen/IPCManager/someip/stub ./fidl/IPCManager/IPCManager.fdepl + + +~/generator/core-generator/commonapi-core-generator-linux-x86_64 --skel --dest-common ./src-gen/InstrumentCluster/core/common --dest-proxy ./src-gen/InstrumentCluster/core/proxy --dest-stub ./src-gen/InstrumentCluster/core/stub --dest-skel ./src-gen/InstrumentCluster/core/skel ./fidl/InstrumentCluster/InstrumentCluster.fidl + +~/generator/someip-generator/commonapi-someip-generator-linux-x86_64 --dest-common ./src-gen/InstrumentCluster/someip/common --dest-proxy ./src-gen/InstrumentCluster/someip/proxy --dest-stub ./src-gen/InstrumentCluster/someip/stub ./fidl/InstrumentCluster/InstrumentCluster.fdepl + + +~/generator/core-generator/commonapi-core-generator-linux-x86_64 --skel --dest-common ./src-gen/HeadUnit/core/common --dest-proxy ./src-gen/HeadUnit/core/proxy --dest-stub ./src-gen/HeadUnit/core/stub --dest-skel ./src-gen/HeadUnit/core/skel ./fidl/HeadUnit/HeadUnit.fidl + +~/generator/someip-generator/commonapi-someip-generator-linux-x86_64 --dest-common ./src-gen/HeadUnit/someip/common --dest-proxy ./src-gen/HeadUnit/someip/proxy --dest-stub ./src-gen/HeadUnit/someip/stub ./fidl/HeadUnit/HeadUnit.fdepl + + +~/generator/core-generator/commonapi-core-generator-linux-x86_64 --skel --dest-common ./src-gen/PDCUnit/core/common --dest-proxy ./src-gen/PDCUnit/core/proxy --dest-stub ./src-gen/PDCUnit/core/stub --dest-skel ./src-gen/PDCUnit/core/skel ./fidl/PDCUnit/PDCUnit.fidl + +~/generator/someip-generator/commonapi-someip-generator-linux-x86_64 --dest-common ./src-gen/PDCUnit/someip/common --dest-proxy ./src-gen/PDCUnit/someip/proxy --dest-stub ./src-gen/PDCUnit/someip/stub ./fidl/PDCUnit/PDCUnit.fdepl + + +~/generator/core-generator/commonapi-core-generator-linux-x86_64 --skel --dest-common ./src-gen/IVICompositor/core/common --dest-proxy ./src-gen/IVICompositor/core/proxy --dest-stub ./src-gen/IVICompositor/core/stub --dest-skel ./src-gen/IVICompositor/core/skel ./fidl/IVICompositor/IVICompositor.fidl + +~/generator/someip-generator/commonapi-someip-generator-linux-x86_64 --dest-common ./src-gen/IVICompositor/someip/common --dest-proxy ./src-gen/IVICompositor/someip/proxy --dest-stub ./src-gen/IVICompositor/someip/stub ./fidl/IVICompositor/IVICompositor.fdepl + + +~/generator/core-generator/commonapi-core-generator-linux-x86_64 --skel --dest-common ./src-gen/RemoteSpeaker/core/common --dest-proxy ./src-gen/RemoteSpeaker/core/proxy --dest-stub ./src-gen/RemoteSpeaker/core/stub --dest-skel ./src-gen/RemoteSpeaker/core/skel ./fidl/RemoteSpeaker/RemoteSpeaker.fidl + +~/generator/someip-generator/commonapi-someip-generator-linux-x86_64 --dest-common ./src-gen/RemoteSpeaker/someip/common --dest-proxy ./src-gen/RemoteSpeaker/someip/proxy --dest-stub ./src-gen/RemoteSpeaker/someip/stub ./fidl/RemoteSpeaker/RemoteSpeaker.fdepl +