mirror of
https://github.com/eclipse-openvehicle-api/openvehicle-api.git
synced 2026-04-13 08:58:17 +00:00
remove unused files (#7)
This commit is contained in:
@@ -1,49 +0,0 @@
|
||||
# Enforce CMake version 3.20 or newer needed for path function
|
||||
cmake_minimum_required (VERSION 3.20)
|
||||
|
||||
# Use new policy for project version settings and default warning level
|
||||
cmake_policy(SET CMP0048 NEW) # requires CMake 3.14
|
||||
cmake_policy(SET CMP0092 NEW) # requires CMake 3.15
|
||||
|
||||
# Define project
|
||||
project(doors_bs_frontdoorleft VERSION 1.0 LANGUAGES CXX)
|
||||
|
||||
# Use C++17 support
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
# Libary symbols are hidden by default
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
|
||||
# Set target name.
|
||||
set(TARGET_NAME doors_bs_frontdoorleft)
|
||||
|
||||
# Set the SDV_FRAMEWORK_DEV_INCLUDE if not defined yet
|
||||
if (NOT DEFINED SDV_FRAMEWORK_DEV_INCLUDE)
|
||||
if (NOT DEFINED ENV{SDV_FRAMEWORK_DEV_INCLUDE})
|
||||
message( FATAL_ERROR "The environment variable SDV_FRAMEWORK_DEV_INCLUDE needs to be pointing to the SDV V-API development include files location!")
|
||||
endif()
|
||||
set (SDV_FRAMEWORK_DEV_INCLUDE "$ENV{SDV_FRAMEWORK_DEV_INCLUDE}")
|
||||
endif()
|
||||
|
||||
# Include link to export directory of SDV V-API development include files location
|
||||
include_directories(${SDV_FRAMEWORK_DEV_INCLUDE})
|
||||
include_directories(../../interfaces)
|
||||
|
||||
# Set platform specific compile flags
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
add_compile_options(/W4 /WX /wd4996 /wd4100 /permissive- /Zc:rvalueCast)
|
||||
else()
|
||||
add_compile_options(-Werror -Wall -Wextra -Wshadow -Wpedantic -Wunreachable-code -fno-common)
|
||||
endif()
|
||||
|
||||
# Add the dynamic library
|
||||
add_library(${TARGET_NAME} SHARED
|
||||
bs_front_door_left.h
|
||||
bs_front_door_left.cpp)
|
||||
|
||||
# Set extension to .sdv
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES PREFIX "")
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".sdv")
|
||||
|
||||
# TODO: set target name.
|
||||
#add_dependencies(${TARGET_NAME} <add_cmake_target_this_depends_on>)
|
||||
@@ -1,115 +0,0 @@
|
||||
/**
|
||||
* @file bs_front_door_left.cpp
|
||||
* @date 2025-07-11 12:57:18
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include <iostream>
|
||||
#include "bs_front_door_left.h"
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
CBasicServiceFrontDoorLeft::CBasicServiceFrontDoorLeft()
|
||||
{
|
||||
auto leftDoorIsOpen01Device = sdv::core::GetObject("Vehicle.Chassis.Door.Axle01.Left_Device").GetInterface<vss::Vehicle::Chassis::Door::Axle01::LeftDevice::IVSS_IsOpen>();
|
||||
if (!leftDoorIsOpen01Device)
|
||||
{
|
||||
SDV_LOG_ERROR("Could not get interface 'IVSS_IsOpen': [CBasicServiceFrontDoorLeft]");
|
||||
throw std::runtime_error("Vehicle.Chassis.Door.Axle01.Left mode device not found");
|
||||
}
|
||||
leftDoorIsOpen01Device->RegisterIsOpenEvent(dynamic_cast<vss::Vehicle::Chassis::Door::Axle01::LeftDevice::IVSS_WriteIsOpen_Event*> (this));
|
||||
|
||||
m_ptrLock = sdv::core::GetObject("Vehicle.Chassis.Door.Axle01.Left_Device").GetInterface<vss::Vehicle::Chassis::Door::Axle01::LeftDevice::IVSS_WriteLock>();
|
||||
if (!m_ptrLock)
|
||||
{
|
||||
SDV_LOG_ERROR("Could not get interface 'IVSS_WriteLock': [CBasicServiceFrontDoorLeft]");
|
||||
throw std::runtime_error("Lock device not found");
|
||||
}
|
||||
|
||||
SDV_LOG_TRACE("CBasicServiceFrontDoorLeft created: [Vehicle.Chassis.Door.Axle01.Left_Device]");
|
||||
m_leftDoorIsOpen01 = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief User-Defined Destructor
|
||||
*/
|
||||
CBasicServiceFrontDoorLeft::~CBasicServiceFrontDoorLeft()
|
||||
{
|
||||
auto leftDoorIsOpen01Device = sdv::core::GetObject("Vehicle.Chassis.Door.Axle01.Left_Device").GetInterface<vss::Vehicle::Chassis::Door::Axle01::LeftDevice::IVSS_IsOpen>();
|
||||
if (leftDoorIsOpen01Device)
|
||||
{
|
||||
leftDoorIsOpen01Device->UnregisterIsOpenEvent(dynamic_cast<vss::Vehicle::Chassis::Door::Axle01::LeftDevice::IVSS_WriteIsOpen_Event*> (this));
|
||||
}
|
||||
leftDoorIsOpen01Device = nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set leftDoorIsOpen
|
||||
* @param[in] value leftDoorIsOpen
|
||||
*/
|
||||
void CBasicServiceFrontDoorLeft::SetIsOpenL1(bool value)
|
||||
{
|
||||
m_leftDoorIsOpen01 = value;
|
||||
std::lock_guard<std::mutex> lock(m_leftDoorIsOpen01MutexCallbacks);
|
||||
for (auto callback : m_leftDoorIsOpen01Callbacks)
|
||||
{
|
||||
callback->SetIsOpenL1(value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Write leftDoorIsOpen
|
||||
* @param[in] value leftDoorIsOpen
|
||||
*/
|
||||
void CBasicServiceFrontDoorLeft::WriteIsOpen(bool value)
|
||||
{
|
||||
SetIsOpenL1(value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get leftDoorIsOpen
|
||||
* @return Returns the leftDoorIsOpen
|
||||
*/
|
||||
bool CBasicServiceFrontDoorLeft::GetIsOpen() const
|
||||
{
|
||||
return m_leftDoorIsOpen01;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Register Callback on signal change
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void CBasicServiceFrontDoorLeft::RegisterOnSignalChangeOfLeftDoorIsOpen01(vss::Vehicle::Chassis::Door::Axle01::LeftService::IVSS_SetIsOpen_Event* leftDoorIsOpen01Callback)
|
||||
{
|
||||
if ( leftDoorIsOpen01Callback)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_leftDoorIsOpen01MutexCallbacks);
|
||||
m_leftDoorIsOpen01Callbacks.insert(leftDoorIsOpen01Callback);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Unregister Callback
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void CBasicServiceFrontDoorLeft::UnregisterOnSignalChangeOfLeftDoorIsOpen01(vss::Vehicle::Chassis::Door::Axle01::LeftService::IVSS_SetIsOpen_Event* leftDoorIsOpen01Callback)
|
||||
{
|
||||
if (leftDoorIsOpen01Callback)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_leftDoorIsOpen01MutexCallbacks);
|
||||
m_leftDoorIsOpen01Callbacks.erase(leftDoorIsOpen01Callback);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Lock
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
bool CBasicServiceFrontDoorLeft::SetLock(bool value)
|
||||
{
|
||||
return m_ptrLock->WriteLock(value);
|
||||
}
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
/**
|
||||
* @file bs_front_door_left.h
|
||||
* @date 2025-07-11 12:57:18
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#ifndef __VSS_GENERATED__BS_FRONTDOORLEFT_H_20250711_125718_601__
|
||||
#define __VSS_GENERATED__BS_FRONTDOORLEFT_H_20250711_125718_601__
|
||||
|
||||
#include <iostream>
|
||||
#include <set>
|
||||
#include <support/component_impl.h>
|
||||
#include <support/signal_support.h>
|
||||
#include "vss_vehiclechassisdooraxle01left_bs_rx.h"
|
||||
#include "vss_vehiclechassisdooraxle01left_vd_tx.h"
|
||||
#include "vss_vehiclechassisdooraxle01left_bs_tx.h"
|
||||
|
||||
/**
|
||||
* @brief Basic Service Vehicle.Chassis.Door.Axle01.Left
|
||||
*/
|
||||
class CBasicServiceFrontDoorLeft
|
||||
: public sdv::CSdvObject
|
||||
, public vss::Vehicle::Chassis::Door::Axle01::LeftService::IVSS_GetIsOpen
|
||||
, public vss::Vehicle::Chassis::Door::Axle01::LeftService::IVSS_SetIsOpen_Event
|
||||
, public vss::Vehicle::Chassis::Door::Axle01::LeftDevice::IVSS_WriteIsOpen_Event
|
||||
, public vss::Vehicle::Chassis::Door::Axle01::LeftService::IVSS_SetLock
|
||||
{
|
||||
public:
|
||||
|
||||
BEGIN_SDV_INTERFACE_MAP()
|
||||
SDV_INTERFACE_ENTRY(vss::Vehicle::Chassis::Door::Axle01::LeftService::IVSS_GetIsOpen)
|
||||
SDV_INTERFACE_ENTRY(vss::Vehicle::Chassis::Door::Axle01::LeftService::IVSS_SetLock)
|
||||
END_SDV_INTERFACE_MAP()
|
||||
|
||||
DECLARE_OBJECT_CLASS_TYPE(sdv::EObjectType::BasicService)
|
||||
DECLARE_OBJECT_CLASS_NAME("Vehicle.Chassis.Door.Axle01.Left_Service")
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
CBasicServiceFrontDoorLeft();
|
||||
|
||||
/**
|
||||
* @brief User-Defined Destructor
|
||||
*/
|
||||
~CBasicServiceFrontDoorLeft();
|
||||
|
||||
/**
|
||||
* @brief Set leftDoorIsOpen signal
|
||||
* @param[in] value leftDoorIsOpen
|
||||
*/
|
||||
void SetIsOpenL1(bool value) override;
|
||||
|
||||
/**
|
||||
* @brief Get leftDoorIsOpen
|
||||
* @return Returns the leftDoorIsOpen
|
||||
*/
|
||||
bool GetIsOpen() const override;
|
||||
|
||||
/**
|
||||
* @brief Write leftDoorIsOpen signal
|
||||
* @param[in] value leftDoorIsOpen
|
||||
*/
|
||||
void WriteIsOpen(bool value) override;
|
||||
|
||||
/**
|
||||
* @brief Set leftLatch signal
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
bool SetLock(bool value) override;
|
||||
|
||||
/**
|
||||
* @brief Register CallBack function on signal change
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void RegisterOnSignalChangeOfLeftDoorIsOpen01(vss::Vehicle::Chassis::Door::Axle01::LeftService::IVSS_SetIsOpen_Event* callback) override;
|
||||
|
||||
/**
|
||||
* @brief Unregister CallBack function on signal change
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void UnregisterOnSignalChangeOfLeftDoorIsOpen01(vss::Vehicle::Chassis::Door::Axle01::LeftService::IVSS_SetIsOpen_Event* callback) override;
|
||||
|
||||
private:
|
||||
|
||||
bool m_leftDoorIsOpen01 { 0 }; ///< open&close state of the door
|
||||
mutable std::mutex m_leftDoorIsOpen01MutexCallbacks; ///< Mutex protecting m_leftDoorIsOpen01Callbacks
|
||||
std::set<vss::Vehicle::Chassis::Door::Axle01::LeftService::IVSS_SetIsOpen_Event*> m_leftDoorIsOpen01Callbacks; ///< collection of events to be called
|
||||
vss::Vehicle::Chassis::Door::Axle01::LeftDevice::IVSS_WriteLock* m_ptrLock = nullptr; ///< Interface pointer to lock/unlock the door
|
||||
};
|
||||
|
||||
DEFINE_SDV_OBJECT(CBasicServiceFrontDoorLeft)
|
||||
|
||||
#endif // !define __VSS_GENERATED__BS_FRONTDOORLEFT_H_20250711_125718_601__
|
||||
@@ -1,49 +0,0 @@
|
||||
# Enforce CMake version 3.20 or newer needed for path function
|
||||
cmake_minimum_required (VERSION 3.20)
|
||||
|
||||
# Use new policy for project version settings and default warning level
|
||||
cmake_policy(SET CMP0048 NEW) # requires CMake 3.14
|
||||
cmake_policy(SET CMP0092 NEW) # requires CMake 3.15
|
||||
|
||||
# Define project
|
||||
project(doors_bs_frontdoorright VERSION 1.0 LANGUAGES CXX)
|
||||
|
||||
# Use C++17 support
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
# Libary symbols are hidden by default
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
|
||||
# Set target name.
|
||||
set(TARGET_NAME doors_bs_frontdoorright)
|
||||
|
||||
# Set the SDV_FRAMEWORK_DEV_INCLUDE if not defined yet
|
||||
if (NOT DEFINED SDV_FRAMEWORK_DEV_INCLUDE)
|
||||
if (NOT DEFINED ENV{SDV_FRAMEWORK_DEV_INCLUDE})
|
||||
message( FATAL_ERROR "The environment variable SDV_FRAMEWORK_DEV_INCLUDE needs to be pointing to the SDV V-API development include files location!")
|
||||
endif()
|
||||
set (SDV_FRAMEWORK_DEV_INCLUDE "$ENV{SDV_FRAMEWORK_DEV_INCLUDE}")
|
||||
endif()
|
||||
|
||||
# Include link to export directory of SDV V-API development include files location
|
||||
include_directories(${SDV_FRAMEWORK_DEV_INCLUDE})
|
||||
include_directories(../../interfaces)
|
||||
|
||||
# Set platform specific compile flags
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
add_compile_options(/W4 /WX /wd4996 /wd4100 /permissive- /Zc:rvalueCast)
|
||||
else()
|
||||
add_compile_options(-Werror -Wall -Wextra -Wshadow -Wpedantic -Wunreachable-code -fno-common)
|
||||
endif()
|
||||
|
||||
# Add the dynamic library
|
||||
add_library(${TARGET_NAME} SHARED
|
||||
bs_front_door_right.h
|
||||
bs_front_door_right.cpp)
|
||||
|
||||
# Set extension to .sdv
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES PREFIX "")
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".sdv")
|
||||
|
||||
# TODO: set target name.
|
||||
#add_dependencies(${TARGET_NAME} <add_cmake_target_this_depends_on>)
|
||||
@@ -1,115 +0,0 @@
|
||||
/**
|
||||
* @file bs_front_door_right.cpp
|
||||
* @date 2025-07-11 12:57:18
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include <iostream>
|
||||
#include "bs_front_door_right.h"
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
CBasicServiceFrontDoorRight::CBasicServiceFrontDoorRight()
|
||||
{
|
||||
auto rightDoorIsOpen01Device = sdv::core::GetObject("Vehicle.Chassis.Door.Axle01.Right_Device").GetInterface<vss::Vehicle::Chassis::Door::Axle01::RightDevice::IVSS_IsOpen>();
|
||||
if (!rightDoorIsOpen01Device)
|
||||
{
|
||||
SDV_LOG_ERROR("Could not get interface 'IVSS_IsOpen': [CBasicServiceFrontDoorRight]");
|
||||
throw std::runtime_error("Vehicle.Chassis.Door.Axle01.Right mode device not found");
|
||||
}
|
||||
rightDoorIsOpen01Device->RegisterIsOpenEvent(dynamic_cast<vss::Vehicle::Chassis::Door::Axle01::RightDevice::IVSS_WriteIsOpen_Event*> (this));
|
||||
|
||||
m_ptrLock = sdv::core::GetObject("Vehicle.Chassis.Door.Axle01.Right_Device").GetInterface<vss::Vehicle::Chassis::Door::Axle01::RightDevice::IVSS_WriteLock>();
|
||||
if (!m_ptrLock)
|
||||
{
|
||||
SDV_LOG_ERROR("Could not get interface 'IVSS_WriteLock': [CBasicServiceFrontDoorRight]");
|
||||
throw std::runtime_error("Lock device not found");
|
||||
}
|
||||
|
||||
SDV_LOG_TRACE("CBasicServiceFrontDoorRight created: [Vehicle.Chassis.Door.Axle01.Right_Device]");
|
||||
m_rightDoorIsOpen01 = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief User-Defined Destructor
|
||||
*/
|
||||
CBasicServiceFrontDoorRight::~CBasicServiceFrontDoorRight()
|
||||
{
|
||||
auto rightDoorIsOpen01Device = sdv::core::GetObject("Vehicle.Chassis.Door.Axle01.Right_Device").GetInterface<vss::Vehicle::Chassis::Door::Axle01::RightDevice::IVSS_IsOpen>();
|
||||
if (rightDoorIsOpen01Device)
|
||||
{
|
||||
rightDoorIsOpen01Device->UnregisterIsOpenEvent(dynamic_cast<vss::Vehicle::Chassis::Door::Axle01::RightDevice::IVSS_WriteIsOpen_Event*> (this));
|
||||
}
|
||||
rightDoorIsOpen01Device = nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set rightDoorIsOpen
|
||||
* @param[in] value rightDoorIsOpen
|
||||
*/
|
||||
void CBasicServiceFrontDoorRight::SetIsOpenR1(bool value)
|
||||
{
|
||||
m_rightDoorIsOpen01 = value;
|
||||
std::lock_guard<std::mutex> lock(m_rightDoorIsOpen01MutexCallbacks);
|
||||
for (auto callback : m_rightDoorIsOpen01Callbacks)
|
||||
{
|
||||
callback->SetIsOpenR1(value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Write rightDoorIsOpen
|
||||
* @param[in] value rightDoorIsOpen
|
||||
*/
|
||||
void CBasicServiceFrontDoorRight::WriteIsOpen(bool value)
|
||||
{
|
||||
SetIsOpenR1(value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get rightDoorIsOpen
|
||||
* @return Returns the rightDoorIsOpen
|
||||
*/
|
||||
bool CBasicServiceFrontDoorRight::GetIsOpen() const
|
||||
{
|
||||
return m_rightDoorIsOpen01;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Register Callback on signal change
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void CBasicServiceFrontDoorRight::RegisterOnSignalChangeOfRightDoorIsOpen01(vss::Vehicle::Chassis::Door::Axle01::RightService::IVSS_SetIsOpen_Event* rightDoorIsOpen01Callback)
|
||||
{
|
||||
if ( rightDoorIsOpen01Callback)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_rightDoorIsOpen01MutexCallbacks);
|
||||
m_rightDoorIsOpen01Callbacks.insert(rightDoorIsOpen01Callback);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Unregister Callback
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void CBasicServiceFrontDoorRight::UnregisterOnSignalChangeOfRightDoorIsOpen01(vss::Vehicle::Chassis::Door::Axle01::RightService::IVSS_SetIsOpen_Event* rightDoorIsOpen01Callback)
|
||||
{
|
||||
if (rightDoorIsOpen01Callback)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_rightDoorIsOpen01MutexCallbacks);
|
||||
m_rightDoorIsOpen01Callbacks.erase(rightDoorIsOpen01Callback);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Lock
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
bool CBasicServiceFrontDoorRight::SetLock(bool value)
|
||||
{
|
||||
return m_ptrLock->WriteLock(value);
|
||||
}
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
/**
|
||||
* @file bs_front_door_right.h
|
||||
* @date 2025-07-11 12:57:18
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#ifndef __VSS_GENERATED__BS_FRONTDOORRIGHT_H_20250711_125718_606__
|
||||
#define __VSS_GENERATED__BS_FRONTDOORRIGHT_H_20250711_125718_606__
|
||||
|
||||
#include <iostream>
|
||||
#include <set>
|
||||
#include <support/component_impl.h>
|
||||
#include <support/signal_support.h>
|
||||
#include "vss_vehiclechassisdooraxle01right_bs_rx.h"
|
||||
#include "vss_vehiclechassisdooraxle01right_vd_tx.h"
|
||||
#include "vss_vehiclechassisdooraxle01right_bs_tx.h"
|
||||
|
||||
/**
|
||||
* @brief Basic Service Vehicle.Chassis.Door.Axle01.Right
|
||||
*/
|
||||
class CBasicServiceFrontDoorRight
|
||||
: public sdv::CSdvObject
|
||||
, public vss::Vehicle::Chassis::Door::Axle01::RightService::IVSS_GetIsOpen
|
||||
, public vss::Vehicle::Chassis::Door::Axle01::RightService::IVSS_SetIsOpen_Event
|
||||
, public vss::Vehicle::Chassis::Door::Axle01::RightDevice::IVSS_WriteIsOpen_Event
|
||||
, public vss::Vehicle::Chassis::Door::Axle01::RightService::IVSS_SetLock
|
||||
{
|
||||
public:
|
||||
|
||||
BEGIN_SDV_INTERFACE_MAP()
|
||||
SDV_INTERFACE_ENTRY(vss::Vehicle::Chassis::Door::Axle01::RightService::IVSS_GetIsOpen)
|
||||
SDV_INTERFACE_ENTRY(vss::Vehicle::Chassis::Door::Axle01::RightService::IVSS_SetLock)
|
||||
END_SDV_INTERFACE_MAP()
|
||||
|
||||
DECLARE_OBJECT_CLASS_TYPE(sdv::EObjectType::BasicService)
|
||||
DECLARE_OBJECT_CLASS_NAME("Vehicle.Chassis.Door.Axle01.Right_Service")
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
CBasicServiceFrontDoorRight();
|
||||
|
||||
/**
|
||||
* @brief User-Defined Destructor
|
||||
*/
|
||||
~CBasicServiceFrontDoorRight();
|
||||
|
||||
/**
|
||||
* @brief Set rightDoorIsOpen signal
|
||||
* @param[in] value rightDoorIsOpen
|
||||
*/
|
||||
void SetIsOpenR1(bool value) override;
|
||||
|
||||
/**
|
||||
* @brief Set signal
|
||||
* @param[in] value rightLatche
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
bool SetLock(bool value) override;
|
||||
|
||||
/**
|
||||
* @brief Get rightDoorIsOpen
|
||||
* @return Returns the rightDoorIsOpen
|
||||
*/
|
||||
bool GetIsOpen() const override;
|
||||
|
||||
/**
|
||||
* @brief Write rightDoorIsOpen signal
|
||||
* @param[in] value rightDoorIsOpen
|
||||
*/
|
||||
void WriteIsOpen(bool value) override;
|
||||
|
||||
/**
|
||||
* @brief Register CallBack function on signal change
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void RegisterOnSignalChangeOfRightDoorIsOpen01(vss::Vehicle::Chassis::Door::Axle01::RightService::IVSS_SetIsOpen_Event* callback) override;
|
||||
|
||||
/**
|
||||
* @brief Unregister CallBack function on signal change
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void UnregisterOnSignalChangeOfRightDoorIsOpen01(vss::Vehicle::Chassis::Door::Axle01::RightService::IVSS_SetIsOpen_Event* callback) override;
|
||||
|
||||
private:
|
||||
|
||||
bool m_rightDoorIsOpen01 { 0 }; ///< open&close state of the door
|
||||
mutable std::mutex m_rightDoorIsOpen01MutexCallbacks; ///< Mutex protecting m_rightDoorIsOpen01Callbacks
|
||||
std::set<vss::Vehicle::Chassis::Door::Axle01::RightService::IVSS_SetIsOpen_Event*> m_rightDoorIsOpen01Callbacks; ///< collection of events to be called
|
||||
vss::Vehicle::Chassis::Door::Axle01::RightDevice::IVSS_WriteLock* m_ptrLock = nullptr; ///< Interface pointer to lock/unlock the door
|
||||
};
|
||||
|
||||
DEFINE_SDV_OBJECT(CBasicServiceFrontDoorRight)
|
||||
|
||||
#endif // !define __VSS_GENERATED__BS_FRONTDOORRIGHT_H_20250711_125718_606__
|
||||
@@ -1,49 +0,0 @@
|
||||
# Enforce CMake version 3.20 or newer needed for path function
|
||||
cmake_minimum_required (VERSION 3.20)
|
||||
|
||||
# Use new policy for project version settings and default warning level
|
||||
cmake_policy(SET CMP0048 NEW) # requires CMake 3.14
|
||||
cmake_policy(SET CMP0092 NEW) # requires CMake 3.15
|
||||
|
||||
# Define project
|
||||
project(doors_bs_reardoorleft VERSION 1.0 LANGUAGES CXX)
|
||||
|
||||
# Use C++17 support
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
# Libary symbols are hidden by default
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
|
||||
# Set target name.
|
||||
set(TARGET_NAME doors_bs_reardoorleft)
|
||||
|
||||
# Set the SDV_FRAMEWORK_DEV_INCLUDE if not defined yet
|
||||
if (NOT DEFINED SDV_FRAMEWORK_DEV_INCLUDE)
|
||||
if (NOT DEFINED ENV{SDV_FRAMEWORK_DEV_INCLUDE})
|
||||
message( FATAL_ERROR "The environment variable SDV_FRAMEWORK_DEV_INCLUDE needs to be pointing to the SDV V-API development include files location!")
|
||||
endif()
|
||||
set (SDV_FRAMEWORK_DEV_INCLUDE "$ENV{SDV_FRAMEWORK_DEV_INCLUDE}")
|
||||
endif()
|
||||
|
||||
# Include link to export directory of SDV V-API development include files location
|
||||
include_directories(${SDV_FRAMEWORK_DEV_INCLUDE})
|
||||
include_directories(../../interfaces)
|
||||
|
||||
# Set platform specific compile flags
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
add_compile_options(/W4 /WX /wd4996 /wd4100 /permissive- /Zc:rvalueCast)
|
||||
else()
|
||||
add_compile_options(-Werror -Wall -Wextra -Wshadow -Wpedantic -Wunreachable-code -fno-common)
|
||||
endif()
|
||||
|
||||
# Add the dynamic library
|
||||
add_library(${TARGET_NAME} SHARED
|
||||
bs_rear_door_left.h
|
||||
bs_rear_door_left.cpp)
|
||||
|
||||
# Set extension to .sdv
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES PREFIX "")
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".sdv")
|
||||
|
||||
# TODO: set target name.
|
||||
#add_dependencies(${TARGET_NAME} <add_cmake_target_this_depends_on>)
|
||||
@@ -1,115 +0,0 @@
|
||||
/**
|
||||
* @file bs_rear_door_left.cpp
|
||||
* @date 2025-07-11 12:57:18
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include <iostream>
|
||||
#include "bs_rear_door_left.h"
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
CBasicServiceRearDoorLeft::CBasicServiceRearDoorLeft()
|
||||
{
|
||||
auto leftDoorIsOpen02Device = sdv::core::GetObject("Vehicle.Chassis.Door.Axle02.Left_Device").GetInterface<vss::Vehicle::Chassis::Door::Axle02::LeftDevice::IVSS_IsOpen>();
|
||||
if (!leftDoorIsOpen02Device)
|
||||
{
|
||||
SDV_LOG_ERROR("Could not get interface 'IVSS_IsOpen': [CBasicServiceRearDoorLeft]");
|
||||
throw std::runtime_error("Vehicle.Chassis.Door.Axle02.Left mode device not found");
|
||||
}
|
||||
leftDoorIsOpen02Device->RegisterIsOpenEvent(dynamic_cast<vss::Vehicle::Chassis::Door::Axle02::LeftDevice::IVSS_WriteIsOpen_Event*> (this));
|
||||
|
||||
m_ptrLock = sdv::core::GetObject("Vehicle.Chassis.Door.Axle02.Left_Device").GetInterface<vss::Vehicle::Chassis::Door::Axle02::LeftDevice::IVSS_WriteLock>();
|
||||
if (!m_ptrLock)
|
||||
{
|
||||
SDV_LOG_ERROR("Could not get interface 'IVSS_WriteLock': [CBasicServiceRearDoorLeft]");
|
||||
throw std::runtime_error("Lock device not found");
|
||||
}
|
||||
|
||||
SDV_LOG_TRACE("CBasicServiceRearDoorLeft created: [Vehicle.Chassis.Door.Axle02.Left_Device]");
|
||||
m_leftDoorIsOpen02 = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief User-Defined Destructor
|
||||
*/
|
||||
CBasicServiceRearDoorLeft::~CBasicServiceRearDoorLeft()
|
||||
{
|
||||
auto leftDoorIsOpen02Device = sdv::core::GetObject("Vehicle.Chassis.Door.Axle02.Left_Device").GetInterface<vss::Vehicle::Chassis::Door::Axle02::LeftDevice::IVSS_IsOpen>();
|
||||
if (leftDoorIsOpen02Device)
|
||||
{
|
||||
leftDoorIsOpen02Device->UnregisterIsOpenEvent(dynamic_cast<vss::Vehicle::Chassis::Door::Axle02::LeftDevice::IVSS_WriteIsOpen_Event*> (this));
|
||||
}
|
||||
leftDoorIsOpen02Device = nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set rightDoorIsOpen
|
||||
* @param[in] value rightDoorIsOpen
|
||||
*/
|
||||
void CBasicServiceRearDoorLeft::SetIsOpenL2(bool value)
|
||||
{
|
||||
m_leftDoorIsOpen02 = value;
|
||||
std::lock_guard<std::mutex> lock(m_leftDoorIsOpen02MutexCallbacks);
|
||||
for (auto callback : m_leftDoorIsOpen02Callbacks)
|
||||
{
|
||||
callback->SetIsOpenL2(value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Write rightDoorIsOpen
|
||||
* @param[in] value rightDoorIsOpen
|
||||
*/
|
||||
void CBasicServiceRearDoorLeft::WriteIsOpen(bool value)
|
||||
{
|
||||
SetIsOpenL2(value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get rightDoorIsOpen
|
||||
* @return Returns the rightDoorIsOpen
|
||||
*/
|
||||
bool CBasicServiceRearDoorLeft::GetIsOpen() const
|
||||
{
|
||||
return m_leftDoorIsOpen02;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Register Callback on signal change
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void CBasicServiceRearDoorLeft::RegisterOnSignalChangeOfLeftDoorIsOpen02(vss::Vehicle::Chassis::Door::Axle02::LeftService::IVSS_SetIsOpen_Event* leftDoorIsOpen02Callback)
|
||||
{
|
||||
if ( leftDoorIsOpen02Callback)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_leftDoorIsOpen02MutexCallbacks);
|
||||
m_leftDoorIsOpen02Callbacks.insert(leftDoorIsOpen02Callback);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Unregister Callback
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void CBasicServiceRearDoorLeft::UnregisterOnSignalChangeOfLeftDoorIsOpen02(vss::Vehicle::Chassis::Door::Axle02::LeftService::IVSS_SetIsOpen_Event* leftDoorIsOpen02Callback)
|
||||
{
|
||||
if (leftDoorIsOpen02Callback)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_leftDoorIsOpen02MutexCallbacks);
|
||||
m_leftDoorIsOpen02Callbacks.erase(leftDoorIsOpen02Callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Lock
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
bool CBasicServiceRearDoorLeft::SetLock(bool value)
|
||||
{
|
||||
return m_ptrLock->WriteLock(value);
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
/**
|
||||
* @file bs_rear_door_left.h
|
||||
* @date 2025-07-11 12:57:18
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#ifndef __VSS_GENERATED__BS_REARDOORLEFT_H_20250711_125718_611__
|
||||
#define __VSS_GENERATED__BS_REARDOORLEFT_H_20250711_125718_611__
|
||||
|
||||
#include <iostream>
|
||||
#include <set>
|
||||
#include <support/component_impl.h>
|
||||
#include <support/signal_support.h>
|
||||
#include "vss_vehiclechassisdooraxle02left_bs_rx.h"
|
||||
#include "vss_vehiclechassisdooraxle02left_vd_tx.h"
|
||||
#include "vss_vehiclechassisdooraxle02left_bs_tx.h"
|
||||
|
||||
/**
|
||||
* @brief Basic Service Vehicle.Chassis.Door.Axle02.Left
|
||||
*/
|
||||
class CBasicServiceRearDoorLeft
|
||||
: public sdv::CSdvObject
|
||||
, public vss::Vehicle::Chassis::Door::Axle02::LeftService::IVSS_GetIsOpen
|
||||
, public vss::Vehicle::Chassis::Door::Axle02::LeftService::IVSS_SetIsOpen_Event
|
||||
, public vss::Vehicle::Chassis::Door::Axle02::LeftDevice::IVSS_WriteIsOpen_Event
|
||||
, public vss::Vehicle::Chassis::Door::Axle02::LeftService::IVSS_SetLock
|
||||
{
|
||||
public:
|
||||
|
||||
BEGIN_SDV_INTERFACE_MAP()
|
||||
SDV_INTERFACE_ENTRY(vss::Vehicle::Chassis::Door::Axle02::LeftService::IVSS_GetIsOpen)
|
||||
SDV_INTERFACE_ENTRY(vss::Vehicle::Chassis::Door::Axle02::LeftService::IVSS_SetLock)
|
||||
END_SDV_INTERFACE_MAP()
|
||||
|
||||
DECLARE_OBJECT_CLASS_TYPE(sdv::EObjectType::BasicService)
|
||||
DECLARE_OBJECT_CLASS_NAME("Vehicle.Chassis.Door.Axle02.Left_Service")
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
CBasicServiceRearDoorLeft();
|
||||
|
||||
/**
|
||||
* @brief User-Defined Destructor
|
||||
*/
|
||||
~CBasicServiceRearDoorLeft();
|
||||
|
||||
/**
|
||||
* @brief Set rightDoorIsOpen signal
|
||||
* @param[in] value rightDoorIsOpen
|
||||
*/
|
||||
void SetIsOpenL2(bool value) override;
|
||||
|
||||
/**
|
||||
* @brief Set leftLatch02 signal
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
bool SetLock(bool value) override;
|
||||
|
||||
/**
|
||||
* @brief Get rightDoorIsOpen
|
||||
* @return Returns the rightDoorIsOpen
|
||||
*/
|
||||
bool GetIsOpen() const override;
|
||||
|
||||
/**
|
||||
* @brief Write rightDoorIsOpen signal
|
||||
* @param[in] value rightDoorIsOpen
|
||||
*/
|
||||
void WriteIsOpen(bool value) override;
|
||||
|
||||
/**
|
||||
* @brief Register CallBack function on signal change
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void RegisterOnSignalChangeOfLeftDoorIsOpen02(vss::Vehicle::Chassis::Door::Axle02::LeftService::IVSS_SetIsOpen_Event* callback) override;
|
||||
|
||||
/**
|
||||
* @brief Unregister CallBack function on signal change
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void UnregisterOnSignalChangeOfLeftDoorIsOpen02(vss::Vehicle::Chassis::Door::Axle02::LeftService::IVSS_SetIsOpen_Event* callback) override;
|
||||
|
||||
private:
|
||||
|
||||
bool m_leftDoorIsOpen02 { 0 }; ///< open&close state of the door
|
||||
mutable std::mutex m_leftDoorIsOpen02MutexCallbacks; ///< Mutex protecting m_leftDoorIsOpen02Callbacks
|
||||
std::set<vss::Vehicle::Chassis::Door::Axle02::LeftService::IVSS_SetIsOpen_Event*> m_leftDoorIsOpen02Callbacks; ///< collection of events to be called
|
||||
vss::Vehicle::Chassis::Door::Axle02::LeftDevice::IVSS_WriteLock* m_ptrLock = nullptr; ///< Interface pointer to lock/unlock the door
|
||||
};
|
||||
|
||||
DEFINE_SDV_OBJECT(CBasicServiceRearDoorLeft)
|
||||
|
||||
#endif // !define __VSS_GENERATED__BS_REARDOORLEFT_H_20250711_125718_611__
|
||||
@@ -1,49 +0,0 @@
|
||||
# Enforce CMake version 3.20 or newer needed for path function
|
||||
cmake_minimum_required (VERSION 3.20)
|
||||
|
||||
# Use new policy for project version settings and default warning level
|
||||
cmake_policy(SET CMP0048 NEW) # requires CMake 3.14
|
||||
cmake_policy(SET CMP0092 NEW) # requires CMake 3.15
|
||||
|
||||
# Define project
|
||||
project(doors_bs_reardoorright VERSION 1.0 LANGUAGES CXX)
|
||||
|
||||
# Use C++17 support
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
# Libary symbols are hidden by default
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
|
||||
# Set target name.
|
||||
set(TARGET_NAME doors_bs_reardoorright)
|
||||
|
||||
# Set the SDV_FRAMEWORK_DEV_INCLUDE if not defined yet
|
||||
if (NOT DEFINED SDV_FRAMEWORK_DEV_INCLUDE)
|
||||
if (NOT DEFINED ENV{SDV_FRAMEWORK_DEV_INCLUDE})
|
||||
message( FATAL_ERROR "The environment variable SDV_FRAMEWORK_DEV_INCLUDE needs to be pointing to the SDV V-API development include files location!")
|
||||
endif()
|
||||
set (SDV_FRAMEWORK_DEV_INCLUDE "$ENV{SDV_FRAMEWORK_DEV_INCLUDE}")
|
||||
endif()
|
||||
|
||||
# Include link to export directory of SDV V-API development include files location
|
||||
include_directories(${SDV_FRAMEWORK_DEV_INCLUDE})
|
||||
include_directories(../../interfaces)
|
||||
|
||||
# Set platform specific compile flags
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
add_compile_options(/W4 /WX /wd4996 /wd4100 /permissive- /Zc:rvalueCast)
|
||||
else()
|
||||
add_compile_options(-Werror -Wall -Wextra -Wshadow -Wpedantic -Wunreachable-code -fno-common)
|
||||
endif()
|
||||
|
||||
# Add the dynamic library
|
||||
add_library(${TARGET_NAME} SHARED
|
||||
bs_rear_door_right.h
|
||||
bs_rear_door_right.cpp)
|
||||
|
||||
# Set extension to .sdv
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES PREFIX "")
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".sdv")
|
||||
|
||||
# TODO: set target name.
|
||||
#add_dependencies(${TARGET_NAME} <add_cmake_target_this_depends_on>)
|
||||
@@ -1,115 +0,0 @@
|
||||
/**
|
||||
* @file bs_rear_door_right.cpp
|
||||
* @date 2025-07-11 12:57:18
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include <iostream>
|
||||
#include "bs_rear_door_right.h"
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
CBasicServiceRearDoorRight::CBasicServiceRearDoorRight()
|
||||
{
|
||||
auto rightDoorIsOpen02Device = sdv::core::GetObject("Vehicle.Chassis.Door.Axle02.Right_Device").GetInterface<vss::Vehicle::Chassis::Door::Axle02::RightDevice::IVSS_IsOpen>();
|
||||
if (!rightDoorIsOpen02Device)
|
||||
{
|
||||
SDV_LOG_ERROR("Could not get interface 'IVSS_IsOpen': [CBasicServiceRearDoorRight]");
|
||||
throw std::runtime_error("Vehicle.Chassis.Door.Axle02.Right mode device not found");
|
||||
}
|
||||
rightDoorIsOpen02Device->RegisterIsOpenEvent(dynamic_cast<vss::Vehicle::Chassis::Door::Axle02::RightDevice::IVSS_WriteIsOpen_Event*> (this));
|
||||
|
||||
m_ptrLock = sdv::core::GetObject("Vehicle.Chassis.Door.Axle02.Right_Device").GetInterface<vss::Vehicle::Chassis::Door::Axle02::RightDevice::IVSS_WriteLock>();
|
||||
if (!m_ptrLock)
|
||||
{
|
||||
SDV_LOG_ERROR("Could not get interface 'IVSS_WriteLock': [CBasicServiceRearDoorRight]");
|
||||
throw std::runtime_error("Lock device not found");
|
||||
}
|
||||
|
||||
SDV_LOG_TRACE("CBasicServiceRearDoorRight created: [Vehicle.Chassis.Door.Axle02.Right_Device]");
|
||||
m_rightDoorIsOpen02 = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief User-Defined Destructor
|
||||
*/
|
||||
CBasicServiceRearDoorRight::~CBasicServiceRearDoorRight()
|
||||
{
|
||||
auto rightDoorIsOpen02Device = sdv::core::GetObject("Vehicle.Chassis.Door.Axle02.Right_Device").GetInterface<vss::Vehicle::Chassis::Door::Axle02::RightDevice::IVSS_IsOpen>();
|
||||
if (rightDoorIsOpen02Device)
|
||||
{
|
||||
rightDoorIsOpen02Device->UnregisterIsOpenEvent(dynamic_cast<vss::Vehicle::Chassis::Door::Axle02::RightDevice::IVSS_WriteIsOpen_Event*> (this));
|
||||
}
|
||||
rightDoorIsOpen02Device = nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set rightDoorIsOpen
|
||||
* @param[in] value rightDoorIsOpen
|
||||
*/
|
||||
void CBasicServiceRearDoorRight::SetIsOpenR2(bool value)
|
||||
{
|
||||
m_rightDoorIsOpen02 = value;
|
||||
std::lock_guard<std::mutex> lock(m_rightDoorIsOpen02MutexCallbacks);
|
||||
for (auto callback : m_rightDoorIsOpen02Callbacks)
|
||||
{
|
||||
callback->SetIsOpenR2(value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Write rightDoorIsOpen
|
||||
* @param[in] value rightDoorIsOpen
|
||||
*/
|
||||
void CBasicServiceRearDoorRight::WriteIsOpen(bool value)
|
||||
{
|
||||
SetIsOpenR2(value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get rightDoorIsOpen
|
||||
* @return Returns the rightDoorIsOpen
|
||||
*/
|
||||
bool CBasicServiceRearDoorRight::GetIsOpen() const
|
||||
{
|
||||
return m_rightDoorIsOpen02;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Register Callback on signal change
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void CBasicServiceRearDoorRight::RegisterOnSignalChangeOfRightDoorIsOpen02(vss::Vehicle::Chassis::Door::Axle02::RightService::IVSS_SetIsOpen_Event* rightDoorIsOpen02Callback)
|
||||
{
|
||||
if ( rightDoorIsOpen02Callback)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_rightDoorIsOpen02MutexCallbacks);
|
||||
m_rightDoorIsOpen02Callbacks.insert(rightDoorIsOpen02Callback);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Unregister Callback
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void CBasicServiceRearDoorRight::UnregisterOnSignalChangeOfRightDoorIsOpen02(vss::Vehicle::Chassis::Door::Axle02::RightService::IVSS_SetIsOpen_Event* rightDoorIsOpen02Callback)
|
||||
{
|
||||
if (rightDoorIsOpen02Callback)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_rightDoorIsOpen02MutexCallbacks);
|
||||
m_rightDoorIsOpen02Callbacks.erase(rightDoorIsOpen02Callback);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Lock
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
bool CBasicServiceRearDoorRight::SetLock(bool value)
|
||||
{
|
||||
return m_ptrLock->WriteLock(value);
|
||||
}
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
/**
|
||||
* @file bs_rear_door_right.h
|
||||
* @date 2025-07-11 12:57:18
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#ifndef __VSS_GENERATED__BS_REARDOORRIGHT_H_20250711_125718_616__
|
||||
#define __VSS_GENERATED__BS_REARDOORRIGHT_H_20250711_125718_616__
|
||||
|
||||
#include <iostream>
|
||||
#include <set>
|
||||
#include <support/component_impl.h>
|
||||
#include <support/signal_support.h>
|
||||
#include "vss_vehiclechassisdooraxle02right_bs_rx.h"
|
||||
#include "vss_vehiclechassisdooraxle02right_vd_tx.h"
|
||||
#include "vss_vehiclechassisdooraxle02right_bs_tx.h"
|
||||
|
||||
/**
|
||||
* @brief Basic Service Vehicle.Chassis.Door.Axle02.Right
|
||||
*/
|
||||
class CBasicServiceRearDoorRight
|
||||
: public sdv::CSdvObject
|
||||
, public vss::Vehicle::Chassis::Door::Axle02::RightService::IVSS_GetIsOpen
|
||||
, public vss::Vehicle::Chassis::Door::Axle02::RightService::IVSS_SetIsOpen_Event
|
||||
, public vss::Vehicle::Chassis::Door::Axle02::RightDevice::IVSS_WriteIsOpen_Event
|
||||
, public vss::Vehicle::Chassis::Door::Axle02::RightService::IVSS_SetLock
|
||||
{
|
||||
public:
|
||||
|
||||
BEGIN_SDV_INTERFACE_MAP()
|
||||
SDV_INTERFACE_ENTRY(vss::Vehicle::Chassis::Door::Axle02::RightService::IVSS_GetIsOpen)
|
||||
SDV_INTERFACE_ENTRY(vss::Vehicle::Chassis::Door::Axle02::RightService::IVSS_SetLock)
|
||||
END_SDV_INTERFACE_MAP()
|
||||
|
||||
DECLARE_OBJECT_CLASS_TYPE(sdv::EObjectType::BasicService)
|
||||
DECLARE_OBJECT_CLASS_NAME("Vehicle.Chassis.Door.Axle02.Right_Service")
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
CBasicServiceRearDoorRight();
|
||||
|
||||
/**
|
||||
* @brief User-Defined Destructor
|
||||
*/
|
||||
~CBasicServiceRearDoorRight();
|
||||
|
||||
/**
|
||||
* @brief Set rightDoorIsOpen signal
|
||||
* @param[in] value rightDoorIsOpen
|
||||
*/
|
||||
void SetIsOpenR2(bool value) override;
|
||||
|
||||
/**
|
||||
* @brief Set rightLatch02 signal
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
bool SetLock(bool value) override;
|
||||
|
||||
/**
|
||||
* @brief Get rightDoorIsOpen
|
||||
* @return Returns the rightDoorIsOpen
|
||||
*/
|
||||
bool GetIsOpen() const override;
|
||||
|
||||
/**
|
||||
* @brief Write rightDoorIsOpen signal
|
||||
* @param[in] value rightDoorIsOpen
|
||||
*/
|
||||
void WriteIsOpen(bool value) override;
|
||||
|
||||
/**
|
||||
* @brief Register CallBack function on signal change
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void RegisterOnSignalChangeOfRightDoorIsOpen02(vss::Vehicle::Chassis::Door::Axle02::RightService::IVSS_SetIsOpen_Event* callback) override;
|
||||
|
||||
/**
|
||||
* @brief Unregister CallBack function on signal change
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void UnregisterOnSignalChangeOfRightDoorIsOpen02(vss::Vehicle::Chassis::Door::Axle02::RightService::IVSS_SetIsOpen_Event* callback) override;
|
||||
|
||||
private:
|
||||
|
||||
bool m_rightDoorIsOpen02 { 0 }; ///< open&close state of the door
|
||||
mutable std::mutex m_rightDoorIsOpen02MutexCallbacks; ///< Mutex protecting m_rightDoorIsOpen02Callbacks
|
||||
std::set<vss::Vehicle::Chassis::Door::Axle02::RightService::IVSS_SetIsOpen_Event*> m_rightDoorIsOpen02Callbacks; ///< collection of events to be called
|
||||
vss::Vehicle::Chassis::Door::Axle02::RightDevice::IVSS_WriteLock* m_ptrLock = nullptr; ///< Interface pointer to lock/unlock the door
|
||||
};
|
||||
|
||||
DEFINE_SDV_OBJECT(CBasicServiceRearDoorRight)
|
||||
|
||||
#endif // !define __VSS_GENERATED__BS_REARDOORRIGHT_H_20250711_125718_616__
|
||||
@@ -1,42 +0,0 @@
|
||||
# Enforce CMake version 3.20 or newer needed for path function
|
||||
cmake_minimum_required (VERSION 3.20)
|
||||
|
||||
# Use new policy for project version settings and default warning level
|
||||
cmake_policy(SET CMP0048 NEW) # requires CMake 3.14
|
||||
cmake_policy(SET CMP0092 NEW) # requires CMake 3.15
|
||||
|
||||
# Define project
|
||||
project(can_dl_door VERSION 1.0 LANGUAGES CXX)
|
||||
|
||||
# Use C++17 support
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
# Library symbols are hidden by default
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
|
||||
# Set the SDV_FRAMEWORK_DEV_INCLUDE if not defined yet
|
||||
if (NOT DEFINED SDV_FRAMEWORK_DEV_INCLUDE)
|
||||
if (NOT DEFINED ENV{SDV_FRAMEWORK_DEV_INCLUDE})
|
||||
message( FATAL_ERROR "The environment variable SDV_FRAMEWORK_DEV_INCLUDE needs to be pointing to the SDV V-API development include files location!")
|
||||
endif()
|
||||
set (SDV_FRAMEWORK_DEV_INCLUDE "$ENV{SDV_FRAMEWORK_DEV_INCLUDE}")
|
||||
endif()
|
||||
|
||||
# Include link to export directory of SDV V-API development include files location
|
||||
include_directories(${SDV_FRAMEWORK_DEV_INCLUDE})
|
||||
|
||||
# Set platform specific compile flags
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
add_compile_options(/W4 /WX /wd4996 /wd4100 /permissive- /Zc:rvalueCast)
|
||||
else()
|
||||
add_compile_options(-Werror -Wall -Wextra -Wshadow -Wpedantic -Wunreachable-code -fno-common)
|
||||
endif()
|
||||
|
||||
# Add the dynamic library
|
||||
add_library(can_dl_door SHARED
|
||||
datalink.cpp
|
||||
datalink.h)
|
||||
|
||||
# Set extension to .sdv
|
||||
set_target_properties(can_dl_door PROPERTIES PREFIX "")
|
||||
set_target_properties(can_dl_door PROPERTIES SUFFIX ".sdv")
|
||||
@@ -1,412 +0,0 @@
|
||||
/**
|
||||
* @file datalink.cpp
|
||||
* @date 2025-09-06 08:00:37
|
||||
* This file implements the data link object between CAN and the V-API devices.
|
||||
* This file was generated by the DBC utility from:
|
||||
* "", "datalink_4doors_example.dbc"
|
||||
* DBC file version: 1.0.0.1
|
||||
*/
|
||||
#include "datalink.h"
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef min
|
||||
#undef min
|
||||
#endif
|
||||
#ifdef max
|
||||
#undef max
|
||||
#endif
|
||||
#endif
|
||||
|
||||
CDataLink::CDataLink() :
|
||||
m_sRxMsgCAN_Input_L1(m_dispatch),
|
||||
m_sRxMsgCAN_Input_R1(m_dispatch),
|
||||
m_sRxMsgCAN_Input_L2(m_dispatch),
|
||||
m_sRxMsgCAN_Input_R2(m_dispatch),
|
||||
m_sTxMsgCAN_Output(m_dispatch)
|
||||
{}
|
||||
|
||||
CDataLink::~CDataLink()
|
||||
{
|
||||
Shutdown(); // Just in case
|
||||
}
|
||||
|
||||
void CDataLink::Initialize(const sdv::u8string& /*ssObjectConfig*/)
|
||||
{
|
||||
if (m_eStatus != sdv::EObjectStatus::initialization_pending) return;
|
||||
|
||||
// Get the CAN communication object.
|
||||
sdv::TInterfaceAccessPtr ptrCANObject = sdv::core::GetObject("CAN_Communication_Object");
|
||||
if (!ptrCANObject)
|
||||
{
|
||||
SDV_LOG_ERROR("CDataLink::Initialize() failure, 'CAN_Communication_Object' not found");
|
||||
m_eStatus = sdv::EObjectStatus::initialization_failure;
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the CAN receiver registration interface.
|
||||
m_pRegister = ptrCANObject.GetInterface<sdv::can::IRegisterReceiver>();
|
||||
if (!m_pRegister)
|
||||
{
|
||||
SDV_LOG_ERROR("CDataLink::Initialize() failure, 'sdv::can::IRegisterReceiver' interface not found");
|
||||
m_eStatus = sdv::EObjectStatus::initialization_failure;
|
||||
return;
|
||||
}
|
||||
m_pRegister->RegisterReceiver(static_cast<sdv::can::IReceive*>(this));
|
||||
|
||||
// Get the CAN transmit interface
|
||||
m_pSend = ptrCANObject.GetInterface<sdv::can::ISend>();
|
||||
if (!m_pSend)
|
||||
{
|
||||
SDV_LOG_ERROR("CDataLink::Initialize() failure, 'sdv::can::ISend' interface not found");
|
||||
m_eStatus = sdv::EObjectStatus::initialization_failure;
|
||||
return;
|
||||
}
|
||||
|
||||
// Initialize messages
|
||||
bool bSuccess = true;
|
||||
bSuccess &= m_sRxMsgCAN_Input_L1.Init();
|
||||
bSuccess &= m_sRxMsgCAN_Input_R1.Init();
|
||||
bSuccess &= m_sRxMsgCAN_Input_L2.Init();
|
||||
bSuccess &= m_sRxMsgCAN_Input_R2.Init();
|
||||
bSuccess &= m_sTxMsgCAN_Output.Init(m_pSend);
|
||||
|
||||
m_eStatus = bSuccess ? sdv::EObjectStatus::initialized : sdv::EObjectStatus::initialization_failure;
|
||||
}
|
||||
|
||||
sdv::EObjectStatus CDataLink::GetStatus() const
|
||||
{
|
||||
return m_eStatus;
|
||||
}
|
||||
|
||||
void CDataLink::SetOperationMode(sdv::EOperationMode eMode)
|
||||
{
|
||||
switch (eMode)
|
||||
{
|
||||
case sdv::EOperationMode::configuring:
|
||||
if (m_eStatus == sdv::EObjectStatus::running || m_eStatus == sdv::EObjectStatus::initialized)
|
||||
m_eStatus = sdv::EObjectStatus::configuring;
|
||||
break;
|
||||
case sdv::EOperationMode::running:
|
||||
if (m_eStatus == sdv::EObjectStatus::configuring || m_eStatus == sdv::EObjectStatus::initialized)
|
||||
m_eStatus = sdv::EObjectStatus::running;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CDataLink::Shutdown()
|
||||
{
|
||||
m_eStatus = sdv::EObjectStatus::shutdown_in_progress;
|
||||
|
||||
// Unregister receiver interface.
|
||||
if (m_pRegister) m_pRegister->UnregisterReceiver(static_cast<sdv::can::IReceive*>(this));
|
||||
m_pRegister = nullptr;
|
||||
|
||||
m_pSend = nullptr;
|
||||
|
||||
// Terminate messages
|
||||
m_sRxMsgCAN_Input_L1.Term();
|
||||
m_sRxMsgCAN_Input_R1.Term();
|
||||
m_sRxMsgCAN_Input_L2.Term();
|
||||
m_sRxMsgCAN_Input_R2.Term();
|
||||
m_sTxMsgCAN_Output.Term();
|
||||
|
||||
// Update the status
|
||||
m_eStatus = sdv::EObjectStatus::destruction_pending;
|
||||
}
|
||||
|
||||
void CDataLink::Receive(/*in*/ [[maybe_unused]] const sdv::can::SMessage& sMsg, /*in*/ uint32_t uiIfcIndex)
|
||||
{
|
||||
if (static_cast<size_t>(uiIfcIndex) != m_nIfcIndex) return;
|
||||
|
||||
switch (sMsg.uiID)
|
||||
{
|
||||
case 1: // CAN_Input_L1
|
||||
m_sRxMsgCAN_Input_L1.Process(sMsg.seqData);
|
||||
break;
|
||||
case 2: // CAN_Input_R1
|
||||
m_sRxMsgCAN_Input_R1.Process(sMsg.seqData);
|
||||
break;
|
||||
case 3: // CAN_Input_L2
|
||||
m_sRxMsgCAN_Input_L2.Process(sMsg.seqData);
|
||||
break;
|
||||
case 4: // CAN_Input_R2
|
||||
m_sRxMsgCAN_Input_R2.Process(sMsg.seqData);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CDataLink::Error(/*in*/ [[maybe_unused]] const sdv::can::SErrorFrame& sError, /*in*/ uint32_t uiIfcIndex)
|
||||
{
|
||||
if (static_cast<size_t>(uiIfcIndex) != m_nIfcIndex) return;
|
||||
|
||||
// TODO: Currently no error frame handling...
|
||||
}
|
||||
|
||||
|
||||
CDataLink::SRxMsg_CAN_Input_L1::SRxMsg_CAN_Input_L1(sdv::core::CDispatchService& rdispatch) :
|
||||
m_rdispatch(rdispatch)
|
||||
{}
|
||||
|
||||
bool CDataLink::SRxMsg_CAN_Input_L1::Init()
|
||||
{
|
||||
// Register signals
|
||||
[[maybe_unused]] bool bSuccess = true;
|
||||
m_sigDoor01LeftIsOpen = m_rdispatch.RegisterRxSignal("CAN_Input_L1.Door01LeftIsOpen");
|
||||
bSuccess &= m_sigDoor01LeftIsOpen ? true : false;
|
||||
return bSuccess;
|
||||
}
|
||||
|
||||
void CDataLink::SRxMsg_CAN_Input_L1::Term()
|
||||
{
|
||||
// Unregister signals
|
||||
m_sigDoor01LeftIsOpen.Reset();
|
||||
}
|
||||
|
||||
void CDataLink::SRxMsg_CAN_Input_L1::Process(const sdv::sequence<uint8_t>& rseqData)
|
||||
{
|
||||
// Check for the correct size.
|
||||
if (rseqData.size() != 1)
|
||||
{
|
||||
// TODO: Error. Delivered data has different size as compared to the specification.
|
||||
return;
|
||||
}
|
||||
|
||||
// Helper variable
|
||||
[[maybe_unused]] UValueHelper uValueHelper;
|
||||
|
||||
// Start a transaction
|
||||
sdv::core::CTransaction transaction = m_rdispatch.CreateTransaction();
|
||||
|
||||
// Process CAN_Input_L1.Door01LeftIsOpen
|
||||
uValueHelper.uiUint64Value = rseqData[0] & 3;
|
||||
uValueHelper.uiUint64Value >>= 1;
|
||||
m_sigDoor01LeftIsOpen.Write(std::min(std::max(uValueHelper.s32.u32.uiValue, 0u), 1u), transaction);
|
||||
|
||||
// Finalize the transaction
|
||||
transaction.Finish();
|
||||
}
|
||||
|
||||
CDataLink::SRxMsg_CAN_Input_R1::SRxMsg_CAN_Input_R1(sdv::core::CDispatchService& rdispatch) :
|
||||
m_rdispatch(rdispatch)
|
||||
{}
|
||||
|
||||
bool CDataLink::SRxMsg_CAN_Input_R1::Init()
|
||||
{
|
||||
// Register signals
|
||||
[[maybe_unused]] bool bSuccess = true;
|
||||
m_sigDoor01RightIsOpen = m_rdispatch.RegisterRxSignal("CAN_Input_R1.Door01RightIsOpen");
|
||||
bSuccess &= m_sigDoor01RightIsOpen ? true : false;
|
||||
return bSuccess;
|
||||
}
|
||||
|
||||
void CDataLink::SRxMsg_CAN_Input_R1::Term()
|
||||
{
|
||||
// Unregister signals
|
||||
m_sigDoor01RightIsOpen.Reset();
|
||||
}
|
||||
|
||||
void CDataLink::SRxMsg_CAN_Input_R1::Process(const sdv::sequence<uint8_t>& rseqData)
|
||||
{
|
||||
// Check for the correct size.
|
||||
if (rseqData.size() != 1)
|
||||
{
|
||||
// TODO: Error. Delivered data has different size as compared to the specification.
|
||||
return;
|
||||
}
|
||||
|
||||
// Helper variable
|
||||
[[maybe_unused]] UValueHelper uValueHelper;
|
||||
|
||||
// Start a transaction
|
||||
sdv::core::CTransaction transaction = m_rdispatch.CreateTransaction();
|
||||
|
||||
// Process CAN_Input_R1.Door01RightIsOpen
|
||||
uValueHelper.uiUint64Value = rseqData[0] & 15;
|
||||
uValueHelper.uiUint64Value >>= 3;
|
||||
m_sigDoor01RightIsOpen.Write(std::min(std::max(uValueHelper.s32.u32.uiValue, 0u), 1u), transaction);
|
||||
|
||||
// Finalize the transaction
|
||||
transaction.Finish();
|
||||
}
|
||||
|
||||
CDataLink::SRxMsg_CAN_Input_L2::SRxMsg_CAN_Input_L2(sdv::core::CDispatchService& rdispatch) :
|
||||
m_rdispatch(rdispatch)
|
||||
{}
|
||||
|
||||
bool CDataLink::SRxMsg_CAN_Input_L2::Init()
|
||||
{
|
||||
// Register signals
|
||||
[[maybe_unused]] bool bSuccess = true;
|
||||
m_sigDoor02LeftIsOpen = m_rdispatch.RegisterRxSignal("CAN_Input_L2.Door02LeftIsOpen");
|
||||
bSuccess &= m_sigDoor02LeftIsOpen ? true : false;
|
||||
return bSuccess;
|
||||
}
|
||||
|
||||
void CDataLink::SRxMsg_CAN_Input_L2::Term()
|
||||
{
|
||||
// Unregister signals
|
||||
m_sigDoor02LeftIsOpen.Reset();
|
||||
}
|
||||
|
||||
void CDataLink::SRxMsg_CAN_Input_L2::Process(const sdv::sequence<uint8_t>& rseqData)
|
||||
{
|
||||
// Check for the correct size.
|
||||
if (rseqData.size() != 1)
|
||||
{
|
||||
// TODO: Error. Delivered data has different size as compared to the specification.
|
||||
return;
|
||||
}
|
||||
|
||||
// Helper variable
|
||||
[[maybe_unused]] UValueHelper uValueHelper;
|
||||
|
||||
// Start a transaction
|
||||
sdv::core::CTransaction transaction = m_rdispatch.CreateTransaction();
|
||||
|
||||
// Process CAN_Input_L2.Door02LeftIsOpen
|
||||
uValueHelper.uiUint64Value = rseqData[0] & 63;
|
||||
uValueHelper.uiUint64Value >>= 5;
|
||||
m_sigDoor02LeftIsOpen.Write(std::min(std::max(uValueHelper.s32.u32.uiValue, 0u), 1u), transaction);
|
||||
|
||||
// Finalize the transaction
|
||||
transaction.Finish();
|
||||
}
|
||||
|
||||
CDataLink::SRxMsg_CAN_Input_R2::SRxMsg_CAN_Input_R2(sdv::core::CDispatchService& rdispatch) :
|
||||
m_rdispatch(rdispatch)
|
||||
{}
|
||||
|
||||
bool CDataLink::SRxMsg_CAN_Input_R2::Init()
|
||||
{
|
||||
// Register signals
|
||||
[[maybe_unused]] bool bSuccess = true;
|
||||
m_sigDoor02RightIsOpen = m_rdispatch.RegisterRxSignal("CAN_Input_R2.Door02RightIsOpen");
|
||||
bSuccess &= m_sigDoor02RightIsOpen ? true : false;
|
||||
return bSuccess;
|
||||
}
|
||||
|
||||
void CDataLink::SRxMsg_CAN_Input_R2::Term()
|
||||
{
|
||||
// Unregister signals
|
||||
m_sigDoor02RightIsOpen.Reset();
|
||||
}
|
||||
|
||||
void CDataLink::SRxMsg_CAN_Input_R2::Process(const sdv::sequence<uint8_t>& rseqData)
|
||||
{
|
||||
// Check for the correct size.
|
||||
if (rseqData.size() != 1)
|
||||
{
|
||||
// TODO: Error. Delivered data has different size as compared to the specification.
|
||||
return;
|
||||
}
|
||||
|
||||
// Helper variable
|
||||
[[maybe_unused]] UValueHelper uValueHelper;
|
||||
|
||||
// Start a transaction
|
||||
sdv::core::CTransaction transaction = m_rdispatch.CreateTransaction();
|
||||
|
||||
// Process CAN_Input_R2.Door02RightIsOpen
|
||||
uValueHelper.uiUint64Value = rseqData[0];
|
||||
uValueHelper.uiUint64Value >>= 7;
|
||||
m_sigDoor02RightIsOpen.Write(std::min(std::max(uValueHelper.s32.u32.uiValue, 0u), 1u), transaction);
|
||||
|
||||
// Finalize the transaction
|
||||
transaction.Finish();
|
||||
}
|
||||
|
||||
CDataLink::STxMsg_CAN_Output::STxMsg_CAN_Output(sdv::core::CDispatchService& rdispatch) :
|
||||
m_rdispatch(rdispatch)
|
||||
{}
|
||||
|
||||
bool CDataLink::STxMsg_CAN_Output::Init(sdv::can::ISend* pSend)
|
||||
{
|
||||
if (!pSend) return false;
|
||||
m_pSend = pSend;
|
||||
|
||||
// Register signals
|
||||
bool bSuccess = true;
|
||||
m_sigLockDoor02Right = m_rdispatch.RegisterTxSignal("CAN_Output.LockDoor02Right", sdv::any_t());
|
||||
bSuccess &= m_sigLockDoor02Right ? true : false;
|
||||
m_sigLockDoor02Left = m_rdispatch.RegisterTxSignal("CAN_Output.LockDoor02Left", sdv::any_t());
|
||||
bSuccess &= m_sigLockDoor02Left ? true : false;
|
||||
m_sigLockDoor01Right = m_rdispatch.RegisterTxSignal("CAN_Output.LockDoor01Right", sdv::any_t());
|
||||
bSuccess &= m_sigLockDoor01Right ? true : false;
|
||||
m_sigLockDoor01Left = m_rdispatch.RegisterTxSignal("CAN_Output.LockDoor01Left", sdv::any_t());
|
||||
bSuccess &= m_sigLockDoor01Left ? true : false;
|
||||
|
||||
// Initialize the trigger
|
||||
m_trigger = m_rdispatch.CreateTxTrigger([&] { Transmit(); }, false, 0, 10, false);
|
||||
m_trigger.AddSignal(m_sigLockDoor02Right);
|
||||
m_trigger.AddSignal(m_sigLockDoor02Left);
|
||||
m_trigger.AddSignal(m_sigLockDoor01Right);
|
||||
m_trigger.AddSignal(m_sigLockDoor01Left);
|
||||
bSuccess &= m_trigger;
|
||||
|
||||
return bSuccess;
|
||||
}
|
||||
|
||||
void CDataLink::STxMsg_CAN_Output::Term()
|
||||
{
|
||||
// Reset the trigger
|
||||
m_trigger.Reset();
|
||||
|
||||
// Unregister signals
|
||||
m_sigLockDoor02Right.Reset();
|
||||
m_sigLockDoor02Left.Reset();
|
||||
m_sigLockDoor01Right.Reset();
|
||||
m_sigLockDoor01Left.Reset();
|
||||
}
|
||||
|
||||
void CDataLink::STxMsg_CAN_Output::Transmit()
|
||||
{
|
||||
if (!m_pSend) return;
|
||||
|
||||
// Compose CAN message
|
||||
sdv::can::SMessage msg;
|
||||
msg.uiID = 5;
|
||||
msg.bExtended = false;
|
||||
msg.bCanFd = false; // TODO: Currently not supported
|
||||
msg.seqData.resize(1);
|
||||
std::fill(msg.seqData.begin(), msg.seqData.end(), static_cast<uint8_t>(0));
|
||||
|
||||
// Helper variable
|
||||
[[maybe_unused]] UValueHelper uValueHelper;
|
||||
|
||||
// Start a transaction
|
||||
sdv::core::CTransaction transaction = m_rdispatch.CreateTransaction();
|
||||
|
||||
// Compose CAN_Output.LockDoor02Right
|
||||
uValueHelper.s32.u32.uiValue = static_cast<uint32_t>(std::min(std::max(static_cast<long long int>(m_sigLockDoor02Right.Read(transaction)), 0ll), 1ll));
|
||||
uValueHelper.uiUint64Value <<= 7;
|
||||
msg.seqData[0] |= uValueHelper.uiUint64Value & 0xff;
|
||||
|
||||
// Compose CAN_Output.LockDoor02Left
|
||||
uValueHelper.s32.u32.uiValue = static_cast<uint32_t>(std::min(std::max(static_cast<long long int>(m_sigLockDoor02Left.Read(transaction)), 0ll), 1ll));
|
||||
uValueHelper.uiUint64Value <<= 5;
|
||||
msg.seqData[0] |= uValueHelper.uiUint64Value & 63;
|
||||
|
||||
// Compose CAN_Output.LockDoor01Right
|
||||
uValueHelper.s32.u32.uiValue = static_cast<uint32_t>(std::min(std::max(static_cast<long long int>(m_sigLockDoor01Right.Read(transaction)), 0ll), 1ll));
|
||||
uValueHelper.uiUint64Value <<= 3;
|
||||
msg.seqData[0] |= uValueHelper.uiUint64Value & 15;
|
||||
|
||||
// Compose CAN_Output.LockDoor01Left
|
||||
uValueHelper.s32.u32.uiValue = static_cast<uint32_t>(std::min(std::max(static_cast<long long int>(m_sigLockDoor01Left.Read(transaction)), 0ll), 1ll));
|
||||
uValueHelper.uiUint64Value <<= 1;
|
||||
msg.seqData[0] |= uValueHelper.uiUint64Value & 3;
|
||||
|
||||
// Finalize the transaction
|
||||
transaction.Finish();
|
||||
|
||||
// Transmit the message
|
||||
// TODO: Determine CAN interface index...
|
||||
m_pSend->Send(msg, 0);
|
||||
}
|
||||
|
||||
@@ -1,300 +0,0 @@
|
||||
/**
|
||||
* @file datalink.h
|
||||
* @date 2025-09-06 08:00:37
|
||||
* This file defines the data link object between CAN and the V-API devices.
|
||||
* This file was generated by the DBC utility from:
|
||||
* "", "datalink_4doors_example.dbc"
|
||||
* DBC file version: 1.0.0.1
|
||||
*/
|
||||
#ifndef __DBC_GENERATED__DATALINK_H__20250906_080037_856__
|
||||
#define __DBC_GENERATED__DATALINK_H__20250906_080037_856__
|
||||
|
||||
#include <support/component_impl.h>
|
||||
#include <interfaces/can.h>
|
||||
#include <support/interface_ptr.h>
|
||||
#include <support/signal_support.h>
|
||||
|
||||
/**
|
||||
* @brief Data link class.
|
||||
*/
|
||||
class CDataLink : public sdv::CSdvObject, public sdv::IObjectControl, public sdv::can::IReceive
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
CDataLink();
|
||||
|
||||
/**
|
||||
* @brief Destructor
|
||||
*/
|
||||
~CDataLink();
|
||||
|
||||
// Interface map
|
||||
BEGIN_SDV_INTERFACE_MAP()
|
||||
SDV_INTERFACE_ENTRY(sdv::IObjectControl)
|
||||
SDV_INTERFACE_ENTRY(sdv::can::IReceive)
|
||||
END_SDV_INTERFACE_MAP()
|
||||
|
||||
// Declarations
|
||||
DECLARE_OBJECT_CLASS_TYPE(sdv::EObjectType::Device)
|
||||
DECLARE_OBJECT_CLASS_NAME("CAN_data_link")
|
||||
DECLARE_DEFAULT_OBJECT_NAME("DataLink")
|
||||
DECLARE_OBJECT_SINGLETON()
|
||||
|
||||
/**
|
||||
* @brief Initialize the object. Overload of sdv::IObjectControl::Initialize.
|
||||
* @param[in] ssObjectConfig Optional configuration string.
|
||||
*/
|
||||
void Initialize(const sdv::u8string& ssObjectConfig) override;
|
||||
|
||||
/**
|
||||
* @brief Get the current status of the object. Overload of sdv::IObjectControl::GetStatus.
|
||||
* @return Return the current status of the object.
|
||||
*/
|
||||
sdv::EObjectStatus GetStatus() const override;
|
||||
|
||||
/**
|
||||
* @brief Set the component operation mode. Overload of sdv::IObjectControl::SetOperationMode.
|
||||
* @param[in] eMode The operation mode, the component should run in.
|
||||
*/
|
||||
void SetOperationMode(sdv::EOperationMode eMode) override;
|
||||
|
||||
/**
|
||||
* @brief Shutdown called before the object is destroyed. Overload of sdv::IObjectControl::Shutdown.
|
||||
*/
|
||||
void Shutdown() override;
|
||||
|
||||
/**
|
||||
* @brief Process a receive a CAN message. Overload of sdv::can::IReceive::Receive.
|
||||
* @param[in] sMsg Message that was received.
|
||||
* @param[in] uiIfcIndex Interface index of the received message.
|
||||
*/
|
||||
virtual void Receive(/*in*/ const sdv::can::SMessage& sMsg, /*in*/ uint32_t uiIfcIndex) override;
|
||||
|
||||
/**
|
||||
* @brief Process an error frame. Overload of sdv::can::IReceive::Error.
|
||||
* @param[in] sError Error frame that was received.
|
||||
* @param[in] uiIfcIndex Interface index of the received message.
|
||||
*/
|
||||
virtual void Error(/*in*/ const sdv::can::SErrorFrame& sError, /*in*/ uint32_t uiIfcIndex) override;
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief Union containing all the compound values needed to convert between the DBC defined types.
|
||||
*/
|
||||
union UValueHelper
|
||||
{
|
||||
uint64_t uiUint64Value; ///< The 64-bit unsingned value.
|
||||
int64_t iInt64Value; ///< The 64-bit signed value.
|
||||
|
||||
/**
|
||||
* @brief The structure mapping the 32-bit value types into the 64-bit.
|
||||
*/
|
||||
struct S32
|
||||
{
|
||||
#if (!defined(_MSC_VER) || defined(__clang__)) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
|
||||
uint32_t uiPadding; ///< Padding for big endian byte ordering (MSB)
|
||||
#endif
|
||||
/**
|
||||
* @brief The 32-bit union containing the possible 32-bit values.
|
||||
*/
|
||||
union U32Value
|
||||
{
|
||||
int32_t iValue; ///< 32-bit signed integer.
|
||||
uint32_t uiValue; ///< 32-bit unsigned integer.
|
||||
float fValue; ///< 32-bit floating point number.
|
||||
} u32; ///< 32-bit union instance.
|
||||
|
||||
#if (defined(_MSC_VER) && !defined(__clang__)) && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
|
||||
uint32_t uiPadding; ///< Padding for little endian byte ordering (MSB)
|
||||
#endif
|
||||
} s32;
|
||||
|
||||
double dValue; ///< 64-bit double precision floating point number.
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief RX CAN message definition of: CAN_Input_L1 [id=1]
|
||||
*/
|
||||
struct SRxMsg_CAN_Input_L1
|
||||
{
|
||||
/**
|
||||
* @brief Constructor
|
||||
* @param[in] rdispatch Reference to the dispatch service.
|
||||
*/
|
||||
SRxMsg_CAN_Input_L1(sdv::core::CDispatchService& rdispatch);
|
||||
|
||||
/**
|
||||
* @brief Initialize the message by registering all signals.
|
||||
*/
|
||||
bool Init();
|
||||
|
||||
/**
|
||||
* @brief Terminate the message by unregistering all signals.
|
||||
*/
|
||||
void Term();
|
||||
|
||||
/**
|
||||
* @brief Process received data.
|
||||
* @param[in] rseqData Reference to the message data to process.
|
||||
*/
|
||||
void Process(const sdv::sequence<uint8_t>& rseqData);
|
||||
|
||||
sdv::core::CDispatchService& m_rdispatch; ///< Reference to the dispatch service.
|
||||
|
||||
/// Signal Door01LeftIsOpen with unit
|
||||
sdv::core::CSignal m_sigDoor01LeftIsOpen;
|
||||
} m_sRxMsgCAN_Input_L1;
|
||||
|
||||
/**
|
||||
* @brief RX CAN message definition of: CAN_Input_R1 [id=2]
|
||||
*/
|
||||
struct SRxMsg_CAN_Input_R1
|
||||
{
|
||||
/**
|
||||
* @brief Constructor
|
||||
* @param[in] rdispatch Reference to the dispatch service.
|
||||
*/
|
||||
SRxMsg_CAN_Input_R1(sdv::core::CDispatchService& rdispatch);
|
||||
|
||||
/**
|
||||
* @brief Initialize the message by registering all signals.
|
||||
*/
|
||||
bool Init();
|
||||
|
||||
/**
|
||||
* @brief Terminate the message by unregistering all signals.
|
||||
*/
|
||||
void Term();
|
||||
|
||||
/**
|
||||
* @brief Process received data.
|
||||
* @param[in] rseqData Reference to the message data to process.
|
||||
*/
|
||||
void Process(const sdv::sequence<uint8_t>& rseqData);
|
||||
|
||||
sdv::core::CDispatchService& m_rdispatch; ///< Reference to the dispatch service.
|
||||
|
||||
/// Signal Door01RightIsOpen with unit
|
||||
sdv::core::CSignal m_sigDoor01RightIsOpen;
|
||||
} m_sRxMsgCAN_Input_R1;
|
||||
|
||||
/**
|
||||
* @brief RX CAN message definition of: CAN_Input_L2 [id=3]
|
||||
*/
|
||||
struct SRxMsg_CAN_Input_L2
|
||||
{
|
||||
/**
|
||||
* @brief Constructor
|
||||
* @param[in] rdispatch Reference to the dispatch service.
|
||||
*/
|
||||
SRxMsg_CAN_Input_L2(sdv::core::CDispatchService& rdispatch);
|
||||
|
||||
/**
|
||||
* @brief Initialize the message by registering all signals.
|
||||
*/
|
||||
bool Init();
|
||||
|
||||
/**
|
||||
* @brief Terminate the message by unregistering all signals.
|
||||
*/
|
||||
void Term();
|
||||
|
||||
/**
|
||||
* @brief Process received data.
|
||||
* @param[in] rseqData Reference to the message data to process.
|
||||
*/
|
||||
void Process(const sdv::sequence<uint8_t>& rseqData);
|
||||
|
||||
sdv::core::CDispatchService& m_rdispatch; ///< Reference to the dispatch service.
|
||||
|
||||
/// Signal Door02LeftIsOpen with unit
|
||||
sdv::core::CSignal m_sigDoor02LeftIsOpen;
|
||||
} m_sRxMsgCAN_Input_L2;
|
||||
|
||||
/**
|
||||
* @brief RX CAN message definition of: CAN_Input_R2 [id=4]
|
||||
*/
|
||||
struct SRxMsg_CAN_Input_R2
|
||||
{
|
||||
/**
|
||||
* @brief Constructor
|
||||
* @param[in] rdispatch Reference to the dispatch service.
|
||||
*/
|
||||
SRxMsg_CAN_Input_R2(sdv::core::CDispatchService& rdispatch);
|
||||
|
||||
/**
|
||||
* @brief Initialize the message by registering all signals.
|
||||
*/
|
||||
bool Init();
|
||||
|
||||
/**
|
||||
* @brief Terminate the message by unregistering all signals.
|
||||
*/
|
||||
void Term();
|
||||
|
||||
/**
|
||||
* @brief Process received data.
|
||||
* @param[in] rseqData Reference to the message data to process.
|
||||
*/
|
||||
void Process(const sdv::sequence<uint8_t>& rseqData);
|
||||
|
||||
sdv::core::CDispatchService& m_rdispatch; ///< Reference to the dispatch service.
|
||||
|
||||
/// Signal Door02RightIsOpen with unit
|
||||
sdv::core::CSignal m_sigDoor02RightIsOpen;
|
||||
} m_sRxMsgCAN_Input_R2;
|
||||
|
||||
/**
|
||||
* @brief TX CAN message definition of: CAN_Output [id=5]
|
||||
*/
|
||||
struct STxMsg_CAN_Output
|
||||
{
|
||||
/**
|
||||
* @brief Constructor
|
||||
* @param[in] rdispatch Reference to the dispatch service.
|
||||
*/
|
||||
STxMsg_CAN_Output(sdv::core::CDispatchService& rdispatch);
|
||||
|
||||
/**
|
||||
* @brief Initialize the message by registering all signals.
|
||||
* @param[in] pSend The send-interface of the CAN.
|
||||
*/
|
||||
bool Init(sdv::can::ISend* pSend);
|
||||
|
||||
/**
|
||||
* @brief Terminate the message by unregistering all signals.
|
||||
*/
|
||||
void Term();
|
||||
|
||||
/**
|
||||
* @brief Transmit data.
|
||||
* @param[in] pCanSend Pointer to the CAN send interface.
|
||||
*/
|
||||
void Transmit();
|
||||
|
||||
sdv::core::CDispatchService& m_rdispatch; ///< Reference to the dispatch service.
|
||||
sdv::core::CTrigger m_trigger; ///< Message trigger being called by the dispatch service.
|
||||
sdv::can::ISend* m_pSend = nullptr; ///< Message sending interface.
|
||||
|
||||
/// Signal LockDoor02Right with unit
|
||||
sdv::core::CSignal m_sigLockDoor02Right;
|
||||
/// Signal LockDoor02Left with unit
|
||||
sdv::core::CSignal m_sigLockDoor02Left;
|
||||
/// Signal LockDoor01Right with unit
|
||||
sdv::core::CSignal m_sigLockDoor01Right;
|
||||
/// Signal LockDoor01Left with unit
|
||||
sdv::core::CSignal m_sigLockDoor01Left;
|
||||
} m_sTxMsgCAN_Output;
|
||||
|
||||
sdv::EObjectStatus m_eStatus = sdv::EObjectStatus::initialization_pending; ///< Keep track of the object status.
|
||||
size_t m_nIfcIndex = 0; ///< CAN Interface index.
|
||||
sdv::can::IRegisterReceiver* m_pRegister = nullptr; ///< CAN receiver registration interface.
|
||||
sdv::can::ISend* m_pSend = nullptr; ///< CAN sender interface.
|
||||
sdv::core::CDispatchService m_dispatch; ///< Dispatch service
|
||||
};
|
||||
|
||||
DEFINE_SDV_OBJECT(CDataLink)
|
||||
|
||||
#endif // !defined __DBC_GENERATED__DATALINK_H__20250906_080037_856__
|
||||
@@ -1,10 +0,0 @@
|
||||
[Configuration]
|
||||
Version = 100
|
||||
|
||||
[[Component]]
|
||||
Path = "door_complex_service.sdv"
|
||||
Class = "Doors Example Service"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
[Configuration]
|
||||
Version = 100
|
||||
|
||||
[[Component]]
|
||||
Path = "door_complex_service.sdv"
|
||||
Class = "Doors Example Service"
|
||||
Name = "Doors Example Service"
|
||||
|
||||
[[Module]]
|
||||
Path = "doors_service_proxystub.sdv"
|
||||
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
# Settings file
|
||||
[Settings]
|
||||
Version = 100
|
||||
|
||||
# The system config array can contain zero or more configurations that are loaded at the time
|
||||
# the system ist started. It is advisable to split the configurations in:
|
||||
# platform config - containing all the components needed to interact with the OS,
|
||||
# middleware, vehicle bus, Ethernet.
|
||||
# vehicle interface - containing the vehicle bus interpretation components like data link
|
||||
# based on DBC and devices for their abstraction.
|
||||
# vehicle abstraction - containing the basic services
|
||||
# Load the system configurations by providing the "SystemConfig" keyword as an array of strings.
|
||||
# A relative path is relative to the installation directory (being "exe_location/instance_id").
|
||||
#
|
||||
# Example:
|
||||
# SystemConfig = [ "platform.toml", "vehicle_ifc.toml", "vehicle_abstract.toml" ]
|
||||
|
||||
SystemConfig = [ "platform.toml", "vehicle_ifc.toml", "vehicle_abstract.toml"]
|
||||
|
||||
# The application config contains the configuration file that can be updated when services and
|
||||
# apps are being added to the system (or being removed from the system). Load the application
|
||||
# config by providing the "AppConfig" keyword as a string value. A relative path is relative to
|
||||
# the installation directory (being "exe_location/instance_id").
|
||||
#
|
||||
# Example
|
||||
# AppConfig = "app_config.toml"
|
||||
#
|
||||
AppConfig = "door_demo.toml"
|
||||
@@ -1,26 +0,0 @@
|
||||
[Configuration]
|
||||
Version = 100
|
||||
|
||||
[[Component]]
|
||||
Path = "doors_bs_frontdoorleft.sdv"
|
||||
Class = "Vehicle.Chassis.Door.Axle01.Left_Service"
|
||||
Name = "Vehicle.Chassis.Door.Axle01.Left_Service"
|
||||
|
||||
[[Component]]
|
||||
Path = "doors_bs_frontdoorright.sdv"
|
||||
Class = "Vehicle.Chassis.Door.Axle01.Right_Service"
|
||||
Name = "Vehicle.Chassis.Door.Axle01.Right_Service"
|
||||
|
||||
[[Component]]
|
||||
Path = "doors_bs_reardoorleft.sdv"
|
||||
Class = "Vehicle.Chassis.Door.Axle02.Left_Service"
|
||||
Name = "Vehicle.Chassis.Door.Axle02.Left_Service"
|
||||
|
||||
[[Component]]
|
||||
Path = "doors_bs_reardoorright.sdv"
|
||||
Class = "Vehicle.Chassis.Door.Axle02.Right_Service"
|
||||
Name = "Vehicle.Chassis.Door.Axle02.Right_Service"
|
||||
|
||||
[[Module]]
|
||||
Path = "doors_proxystub.sdv"
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
[Configuration]
|
||||
Version = 100
|
||||
|
||||
[[Component]]
|
||||
Path = "can_dl_door.sdv"
|
||||
Class = "CAN_data_link"
|
||||
Name = "DataLink"
|
||||
[[Component]]
|
||||
Path = "doors_vd_frontdoorleft.sdv"
|
||||
Class = "Vehicle.Chassis.Door.Axle01.Left_Device"
|
||||
Name = "Vehicle.Chassis.Door.Axle01.Left_Device"
|
||||
|
||||
[[Component]]
|
||||
Path = "doors_vd_frontdoorright.sdv"
|
||||
Class = "Vehicle.Chassis.Door.Axle01.Right_Device"
|
||||
Name = "Vehicle.Chassis.Door.Axle01.Right_Device"
|
||||
|
||||
[[Component]]
|
||||
Path = "doors_vd_reardoorleft.sdv"
|
||||
Class = "Vehicle.Chassis.Door.Axle02.Left_Device"
|
||||
Name = "Vehicle.Chassis.Door.Axle02.Left_Device"
|
||||
|
||||
[[Component]]
|
||||
Path = "doors_vd_reardoorright.sdv"
|
||||
Class = "Vehicle.Chassis.Door.Axle02.Right_Device"
|
||||
Name = "Vehicle.Chassis.Door.Axle02.Right_Device"
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
[Configuration]
|
||||
Version = 100
|
||||
|
||||
[[Component]]
|
||||
Path = "door_complex_service.sdv"
|
||||
Class = "Doors Example Service"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
[Configuration]
|
||||
Version = 100
|
||||
|
||||
[[Component]]
|
||||
Path = "door_complex_service.sdv"
|
||||
Class = "Doors Example Service"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
/**
|
||||
* @file signal_identifier.h
|
||||
* @date 2025-07-11 11:03:55
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#ifndef __VSS_GENERATED__SIGNALIDENTIFIER_H_20250711_110355_840__
|
||||
#define __VSS_GENERATED__SIGNALIDENTIFIER_H_20250711_110355_840__
|
||||
|
||||
namespace doors
|
||||
{
|
||||
// Data Dispatch Service signal names to dbc variable names C-type RX/TX vss name space
|
||||
static std::string dsLeftDoorIsOpen01 = "CAN_Input_L1.Door01LeftIsOpen"; ///< bool RX Vehicle.Chassis.Door.Axle01.Left
|
||||
static std::string dsRightDoorIsOpen01 = "CAN_Input_R1.Door01RightIsOpen"; ///< bool RX Vehicle.Chassis.Door.Axle01.Right
|
||||
static std::string dsLeftDoorIsOpen02 = "CAN_Input_L2.Door02LeftIsOpen"; ///< bool RX Vehicle.Chassis.Door.Axle02.Left
|
||||
static std::string dsRightDoorIsOpen02 = "CAN_Input_R2.Door02RightIsOpen"; ///< bool RX Vehicle.Chassis.Door.Axle02.Right
|
||||
static std::string dsLeftLatch01 = "CAN_Output.LockDoor01Left" ; ///< bool TX Vehicle.Chassis.TX.Door.Axle01.Left
|
||||
static std::string dsRightLatch01 = "CAN_Output.LockDoor01Right"; ///< bool TX Vehicle.Chassis.TX.Door.Axle01.Right
|
||||
static std::string dsLeftLatch02 = "CAN_Output.LockDoor02Left" ; ///< bool TX Vehicle.Chassis.TX.Door.Axle02.Left
|
||||
static std::string dsRightLatch02 = "CAN_Output.LockDoor02Right"; ///< bool TX Vehicle.Chassis.TX.Door.Axle02.Right
|
||||
} // doors
|
||||
|
||||
#endif // __VSS_GENERATED__SIGNALIDENTIFIER_H_20250711_110355_840__
|
||||
@@ -1,63 +0,0 @@
|
||||
/**
|
||||
* @file vss_vehiclechassisdooraxle01left_bs_rx.idl
|
||||
* @date 2025-07-11 11:03:55
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include "interfaces/core.idl"
|
||||
#include "vss_vehiclechassisdooraxle01left_vd_rx.idl"
|
||||
|
||||
module vss
|
||||
{
|
||||
module Vehicle
|
||||
{
|
||||
module Chassis
|
||||
{
|
||||
module Door
|
||||
{
|
||||
module Axle01
|
||||
{
|
||||
module LeftService
|
||||
{
|
||||
/**
|
||||
* @brief IVSS_SetIsOpen event interface
|
||||
*/
|
||||
interface IVSS_SetIsOpen_Event
|
||||
{
|
||||
/**
|
||||
* @brief Set leftDoorIsOpen signal
|
||||
* @param[in] value rightDoorIsOpen
|
||||
*/
|
||||
void SetIsOpenL1(in boolean value);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief IVSS_GetIsOpen Service interface
|
||||
*/
|
||||
interface IVSS_GetIsOpen
|
||||
{
|
||||
/**
|
||||
* @brief Get rightDoorIsOpen signal
|
||||
* @return Returns the rightDoorIsOpen
|
||||
*/
|
||||
boolean GetIsOpen() const;
|
||||
|
||||
/**
|
||||
* @brief Register Callback on signal change
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void RegisterOnSignalChangeOfLeftDoorIsOpen01(in vss::Vehicle::Chassis::Door::Axle01::LeftService::IVSS_SetIsOpen_Event callback);
|
||||
|
||||
/**
|
||||
* @brief Unregister Callback
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void UnregisterOnSignalChangeOfLeftDoorIsOpen01(in vss::Vehicle::Chassis::Door::Axle01::LeftService::IVSS_SetIsOpen_Event callback);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
* @file vss_vehiclechassisdooraxle01left_bs_tx.idl
|
||||
* @date 2025-07-11 11:03:55
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include <interfaces/core.idl>
|
||||
|
||||
module vss
|
||||
{
|
||||
module Vehicle
|
||||
{
|
||||
module Chassis
|
||||
{
|
||||
module Door
|
||||
{
|
||||
module Axle01
|
||||
{
|
||||
module LeftService
|
||||
{
|
||||
/**
|
||||
* @brief IVSS_SetLock Service interface
|
||||
*/
|
||||
interface IVSS_SetLock
|
||||
{
|
||||
/**
|
||||
* @brief Set leftLatch02 signal
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
boolean SetLock(in boolean value);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
/**
|
||||
* @file vss_vehiclechassisdooraxle01left_vd_rx.idl
|
||||
* @date 2025-07-11 11:03:55
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include "interfaces/core.idl"
|
||||
|
||||
module vss
|
||||
{
|
||||
module Vehicle
|
||||
{
|
||||
module Chassis
|
||||
{
|
||||
module Door
|
||||
{
|
||||
module Axle01
|
||||
{
|
||||
module LeftDevice
|
||||
{
|
||||
/**
|
||||
* @brief IVSS_WriteIsOpen event interface
|
||||
*/
|
||||
interface IVSS_WriteIsOpen_Event
|
||||
{
|
||||
/**
|
||||
* @brief Write leftDoorIsOpen signal
|
||||
* @param[in] value leftDoorIsOpen
|
||||
*/
|
||||
void WriteIsOpen(in boolean value);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief IVSS_IsOpen abstract Device interface
|
||||
*/
|
||||
interface IVSS_IsOpen
|
||||
{
|
||||
/**
|
||||
* @brief Register WriteIsOpen event on signal change
|
||||
* Register all events and call them on signal change
|
||||
* @param[in] event function
|
||||
*/
|
||||
void RegisterIsOpenEvent(in IVSS_WriteIsOpen_Event event);
|
||||
|
||||
/**
|
||||
* @brief Unregister IsOpen event
|
||||
* @param[in] event function
|
||||
*/
|
||||
void UnregisterIsOpenEvent(in IVSS_WriteIsOpen_Event event);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
* @file vss_vehiclechassisdooraxle01left_vd_tx.idl
|
||||
* @date 2025-07-11 11:03:55
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include <interfaces/core.idl>
|
||||
|
||||
module vss
|
||||
{
|
||||
module Vehicle
|
||||
{
|
||||
module Chassis
|
||||
{
|
||||
module Door
|
||||
{
|
||||
module Axle01
|
||||
{
|
||||
module LeftDevice
|
||||
{
|
||||
/**
|
||||
* @brief IVSS_WriteLock Device interface
|
||||
*/
|
||||
interface IVSS_WriteLock
|
||||
{
|
||||
/**
|
||||
* @brief Write leftLatch01 signal
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
boolean WriteLock(in boolean value);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
|
||||
/**
|
||||
* @file vss_vehiclechassisdooraxle01right_bs_rx.idl
|
||||
* @date 2025-07-11 11:03:55
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include "interfaces/core.idl"
|
||||
#include "vss_vehiclechassisdooraxle01right_vd_rx.idl"
|
||||
|
||||
module vss
|
||||
{
|
||||
module Vehicle
|
||||
{
|
||||
module Chassis
|
||||
{
|
||||
module Door
|
||||
{
|
||||
module Axle01
|
||||
{
|
||||
module RightService
|
||||
{
|
||||
/**
|
||||
* @brief IVSS_SetIsOpen event interface
|
||||
*/
|
||||
interface IVSS_SetIsOpen_Event
|
||||
{
|
||||
/**
|
||||
* @brief Set rightDoorIsOpen signal
|
||||
* @param[in] value rightDoorIsOpen
|
||||
*/
|
||||
void SetIsOpenR1(in boolean value);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief IVSS_GetIsOpen Service interface
|
||||
*/
|
||||
interface IVSS_GetIsOpen
|
||||
{
|
||||
/**
|
||||
* @brief Get rightDoorIsOpen signal
|
||||
* @return Returns the rightDoorIsOpen
|
||||
*/
|
||||
boolean GetIsOpen() const;
|
||||
|
||||
/**
|
||||
* @brief Register Callback on signal change
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void RegisterOnSignalChangeOfRightDoorIsOpen01(in vss::Vehicle::Chassis::Door::Axle01::RightService::IVSS_SetIsOpen_Event callback);
|
||||
|
||||
/**
|
||||
* @brief Unregister Callback
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void UnregisterOnSignalChangeOfRightDoorIsOpen01(in vss::Vehicle::Chassis::Door::Axle01::RightService::IVSS_SetIsOpen_Event callback);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
* @file vss_vehiclechassisdooraxle01right_bs_tx.idl
|
||||
* @date 2025-07-11 11:03:55
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include <interfaces/core.idl>
|
||||
|
||||
module vss
|
||||
{
|
||||
module Vehicle
|
||||
{
|
||||
module Chassis
|
||||
{
|
||||
module Door
|
||||
{
|
||||
module Axle01
|
||||
{
|
||||
module RightService
|
||||
{
|
||||
/**
|
||||
* @brief IVSS_SetLock Service interface
|
||||
*/
|
||||
interface IVSS_SetLock
|
||||
{
|
||||
/**
|
||||
* @brief Set rightLatch signal
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
boolean SetLock(in boolean value);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
|
||||
/**
|
||||
* @file vss_vehiclechassisdooraxle01right_vd_rx.idl
|
||||
* @date 2025-07-11 11:03:55
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include "interfaces/core.idl"
|
||||
|
||||
module vss
|
||||
{
|
||||
module Vehicle
|
||||
{
|
||||
module Chassis
|
||||
{
|
||||
module Door
|
||||
{
|
||||
module Axle01
|
||||
{
|
||||
module RightDevice
|
||||
{
|
||||
/**
|
||||
* @brief IVSS_WriteIsOpen event interface
|
||||
*/
|
||||
interface IVSS_WriteIsOpen_Event
|
||||
{
|
||||
/**
|
||||
* @brief Write rightDoorIsOpen signal
|
||||
* @param[in] value rightDoorIsOpen
|
||||
*/
|
||||
void WriteIsOpen(in boolean value);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief IVSS_IsOpen abstract Device interface
|
||||
*/
|
||||
interface IVSS_IsOpen
|
||||
{
|
||||
/**
|
||||
* @brief Register WriteIsOpen event on signal change
|
||||
* Register all events and call them on signal change
|
||||
* @param[in] event function
|
||||
*/
|
||||
void RegisterIsOpenEvent(in IVSS_WriteIsOpen_Event event);
|
||||
|
||||
/**
|
||||
* @brief Unregister IsOpen event
|
||||
* @param[in] event function
|
||||
*/
|
||||
void UnregisterIsOpenEvent(in IVSS_WriteIsOpen_Event event);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
* @file vss_vehiclechassisdooraxle01right_vd_tx.idl
|
||||
* @date 2025-07-11 11:03:55
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include <interfaces/core.idl>
|
||||
|
||||
module vss
|
||||
{
|
||||
module Vehicle
|
||||
{
|
||||
module Chassis
|
||||
{
|
||||
module Door
|
||||
{
|
||||
module Axle01
|
||||
{
|
||||
module RightDevice
|
||||
{
|
||||
/**
|
||||
* @brief IVSS_WriteLock Device interface
|
||||
*/
|
||||
interface IVSS_WriteLock
|
||||
{
|
||||
/**
|
||||
* @brief Write rightLatch signal
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
boolean WriteLock(in boolean value);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
/**
|
||||
* @file vss_vehiclechassisdooraxle02left_bs_rx.idl
|
||||
* @date 2025-07-11 11:03:55
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include "interfaces/core.idl"
|
||||
#include "vss_vehiclechassisdooraxle02left_vd_rx.idl"
|
||||
|
||||
module vss
|
||||
{
|
||||
module Vehicle
|
||||
{
|
||||
module Chassis
|
||||
{
|
||||
module Door
|
||||
{
|
||||
module Axle02
|
||||
{
|
||||
module LeftService
|
||||
{
|
||||
/**
|
||||
* @brief IVSS_SetIsOpen event interface
|
||||
*/
|
||||
interface IVSS_SetIsOpen_Event
|
||||
{
|
||||
/**
|
||||
* @brief Set leftDoorIsOpen signal
|
||||
* @param[in] value rightDoorIsOpen
|
||||
*/
|
||||
void SetIsOpenL2(in boolean value);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief IVSS_GetIsOpen Service interface
|
||||
*/
|
||||
interface IVSS_GetIsOpen
|
||||
{
|
||||
/**
|
||||
* @brief Get rightDoorIsOpen signal
|
||||
* @return Returns the rightDoorIsOpen
|
||||
*/
|
||||
boolean GetIsOpen() const;
|
||||
|
||||
/**
|
||||
* @brief Register Callback on signal change
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void RegisterOnSignalChangeOfLeftDoorIsOpen02(in vss::Vehicle::Chassis::Door::Axle02::LeftService::IVSS_SetIsOpen_Event callback);
|
||||
|
||||
/**
|
||||
* @brief Unregister Callback
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void UnregisterOnSignalChangeOfLeftDoorIsOpen02(in vss::Vehicle::Chassis::Door::Axle02::LeftService::IVSS_SetIsOpen_Event callback);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
* @file vss_vehiclechassisdooraxle02left_bs_tx.idl
|
||||
* @date 2025-07-11 11:03:55
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include <interfaces/core.idl>
|
||||
|
||||
module vss
|
||||
{
|
||||
module Vehicle
|
||||
{
|
||||
module Chassis
|
||||
{
|
||||
module Door
|
||||
{
|
||||
module Axle02
|
||||
{
|
||||
module LeftService
|
||||
{
|
||||
/**
|
||||
* @brief IVSS_SetLock Service interface
|
||||
*/
|
||||
interface IVSS_SetLock
|
||||
{
|
||||
/**
|
||||
* @brief Set leftLatch02 signal
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
boolean SetLock(in boolean value);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
/**
|
||||
* @file vss_vehiclechassisdooraxle02left_vd_rx.idl
|
||||
* @date 2025-07-11 11:03:55
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include "interfaces/core.idl"
|
||||
|
||||
module vss
|
||||
{
|
||||
module Vehicle
|
||||
{
|
||||
module Chassis
|
||||
{
|
||||
module Door
|
||||
{
|
||||
module Axle02
|
||||
{
|
||||
module LeftDevice
|
||||
{
|
||||
/**
|
||||
* @brief IVSS_WriteIsOpen event interface
|
||||
*/
|
||||
interface IVSS_WriteIsOpen_Event
|
||||
{
|
||||
/**
|
||||
* @brief Write leftDoorIsOpen signal
|
||||
* @param[in] value leftDoorIsOpen
|
||||
*/
|
||||
void WriteIsOpen(in boolean value);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief IVSS_IsOpen abstract Device interface
|
||||
*/
|
||||
interface IVSS_IsOpen
|
||||
{
|
||||
/**
|
||||
* @brief Register WriteIsOpen event on signal change
|
||||
* Register all events and call them on signal change
|
||||
* @param[in] event function
|
||||
*/
|
||||
void RegisterIsOpenEvent(in IVSS_WriteIsOpen_Event event);
|
||||
|
||||
/**
|
||||
* @brief Unregister IsOpen event
|
||||
* @param[in] event function
|
||||
*/
|
||||
void UnregisterIsOpenEvent(in IVSS_WriteIsOpen_Event event);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
* @file vss_vehiclechassisdooraxle02left_vd_tx.idl
|
||||
* @date 2025-07-11 11:03:55
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include <interfaces/core.idl>
|
||||
|
||||
module vss
|
||||
{
|
||||
module Vehicle
|
||||
{
|
||||
module Chassis
|
||||
{
|
||||
module Door
|
||||
{
|
||||
module Axle02
|
||||
{
|
||||
module LeftDevice
|
||||
{
|
||||
/**
|
||||
* @brief IVSS_WriteLock Device interface
|
||||
*/
|
||||
interface IVSS_WriteLock
|
||||
{
|
||||
/**
|
||||
* @brief Write leftLatch02 signal
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
boolean WriteLock(in boolean value);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
|
||||
/**
|
||||
* @file vss_vehiclechassisdooraxle02right_bs_rx.idl
|
||||
* @date 2025-07-11 11:03:55
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include "interfaces/core.idl"
|
||||
#include "vss_vehiclechassisdooraxle02right_vd_rx.idl"
|
||||
|
||||
module vss
|
||||
{
|
||||
module Vehicle
|
||||
{
|
||||
module Chassis
|
||||
{
|
||||
module Door
|
||||
{
|
||||
module Axle02
|
||||
{
|
||||
module RightService
|
||||
{
|
||||
/**
|
||||
* @brief IVSS_SetIsOpen event interface
|
||||
*/
|
||||
interface IVSS_SetIsOpen_Event
|
||||
{
|
||||
/**
|
||||
* @brief Set rightDoorIsOpen signal
|
||||
* @param[in] value rightDoorIsOpen
|
||||
*/
|
||||
void SetIsOpenR2(in boolean value);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief IVSS_GetIsOpen Service interface
|
||||
*/
|
||||
interface IVSS_GetIsOpen
|
||||
{
|
||||
/**
|
||||
* @brief Get rightDoorIsOpen signal
|
||||
* @return Returns the rightDoorIsOpen
|
||||
*/
|
||||
boolean GetIsOpen() const;
|
||||
|
||||
/**
|
||||
* @brief Register Callback on signal change
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void RegisterOnSignalChangeOfRightDoorIsOpen02(in vss::Vehicle::Chassis::Door::Axle02::RightService::IVSS_SetIsOpen_Event callback);
|
||||
|
||||
/**
|
||||
* @brief Unregister Callback
|
||||
* @param[in] callback function
|
||||
*/
|
||||
void UnregisterOnSignalChangeOfRightDoorIsOpen02(in vss::Vehicle::Chassis::Door::Axle02::RightService::IVSS_SetIsOpen_Event callback);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
* @file vss_vehiclechassisdooraxle02right_bs_tx.idl
|
||||
* @date 2025-07-11 11:03:55
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include <interfaces/core.idl>
|
||||
|
||||
module vss
|
||||
{
|
||||
module Vehicle
|
||||
{
|
||||
module Chassis
|
||||
{
|
||||
module Door
|
||||
{
|
||||
module Axle02
|
||||
{
|
||||
module RightService
|
||||
{
|
||||
/**
|
||||
* @brief IVSS_SetLock Service interface
|
||||
*/
|
||||
interface IVSS_SetLock
|
||||
{
|
||||
/**
|
||||
* @brief Set rightLatch02 signal
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
boolean SetLock(in boolean value);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
|
||||
/**
|
||||
* @file vss_vehiclechassisdooraxle02right_vd_rx.idl
|
||||
* @date 2025-07-11 11:03:55
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include "interfaces/core.idl"
|
||||
|
||||
module vss
|
||||
{
|
||||
module Vehicle
|
||||
{
|
||||
module Chassis
|
||||
{
|
||||
module Door
|
||||
{
|
||||
module Axle02
|
||||
{
|
||||
module RightDevice
|
||||
{
|
||||
/**
|
||||
* @brief IVSS_WriteIsOpen event interface
|
||||
*/
|
||||
interface IVSS_WriteIsOpen_Event
|
||||
{
|
||||
/**
|
||||
* @brief Write rightDoorIsOpen signal
|
||||
* @param[in] value rightDoorIsOpen
|
||||
*/
|
||||
void WriteIsOpen(in boolean value);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief IVSS_IsOpen abstract Device interface
|
||||
*/
|
||||
interface IVSS_IsOpen
|
||||
{
|
||||
/**
|
||||
* @brief Register WriteIsOpen event on signal change
|
||||
* Register all events and call them on signal change
|
||||
* @param[in] event function
|
||||
*/
|
||||
void RegisterIsOpenEvent(in IVSS_WriteIsOpen_Event event);
|
||||
|
||||
/**
|
||||
* @brief Unregister IsOpen event
|
||||
* @param[in] event function
|
||||
*/
|
||||
void UnregisterIsOpenEvent(in IVSS_WriteIsOpen_Event event);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
* @file vss_vehiclechassisdooraxle02right_vd_tx.idl
|
||||
* @date 2025-07-11 11:03:55
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include <interfaces/core.idl>
|
||||
|
||||
module vss
|
||||
{
|
||||
module Vehicle
|
||||
{
|
||||
module Chassis
|
||||
{
|
||||
module Door
|
||||
{
|
||||
module Axle02
|
||||
{
|
||||
module RightDevice
|
||||
{
|
||||
/**
|
||||
* @brief IVSS_WriteLock Device interface
|
||||
*/
|
||||
interface IVSS_WriteLock
|
||||
{
|
||||
/**
|
||||
* @brief Write rightLatch02 signal
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
boolean WriteLock(in boolean value);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
# Enforce CMake version 3.20 or newer needed for path function
|
||||
cmake_minimum_required (VERSION 3.20)
|
||||
|
||||
# Use new policy for project version settings and default warning level
|
||||
cmake_policy(SET CMP0048 NEW) # requires CMake 3.14
|
||||
cmake_policy(SET CMP0092 NEW) # requires CMake 3.15
|
||||
|
||||
# Define project
|
||||
project(doors_vd_frontdoorleft VERSION 1.0 LANGUAGES CXX)
|
||||
|
||||
# Use C++17 support
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
# Libary symbols are hidden by default
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
|
||||
# Set target name.
|
||||
set(TARGET_NAME doors_vd_frontdoorleft)
|
||||
|
||||
# Set the SDV_FRAMEWORK_DEV_INCLUDE if not defined yet
|
||||
if (NOT DEFINED SDV_FRAMEWORK_DEV_INCLUDE)
|
||||
if (NOT DEFINED ENV{SDV_FRAMEWORK_DEV_INCLUDE})
|
||||
message( FATAL_ERROR "The environment variable SDV_FRAMEWORK_DEV_INCLUDE needs to be pointing to the SDV V-API development include files location!")
|
||||
endif()
|
||||
set (SDV_FRAMEWORK_DEV_INCLUDE "$ENV{SDV_FRAMEWORK_DEV_INCLUDE}")
|
||||
endif()
|
||||
|
||||
# Include link to export directory of SDV V-API development include files location
|
||||
include_directories(${SDV_FRAMEWORK_DEV_INCLUDE})
|
||||
include_directories(../../interfaces)
|
||||
|
||||
|
||||
# Set platform specific compile flags
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
add_compile_options(/W4 /WX /wd4996 /wd4100 /permissive- /Zc:rvalueCast)
|
||||
else()
|
||||
add_compile_options(-Werror -Wall -Wextra -Wshadow -Wpedantic -Wunreachable-code -fno-common)
|
||||
endif()
|
||||
|
||||
# Add the dynamic library
|
||||
add_library(${TARGET_NAME} SHARED
|
||||
vd_front_door_left.h
|
||||
vd_front_door_left.cpp)
|
||||
|
||||
# Set extension to .sdv
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES PREFIX "")
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".sdv")
|
||||
|
||||
# TODO: set target name.
|
||||
#add_dependencies(${TARGET_NAME} <add_cmake_target_this_depends_on>)
|
||||
@@ -1,151 +0,0 @@
|
||||
/**
|
||||
* @file vd_front_door_left.cpp
|
||||
* @date 2025-07-11 12:43:52
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include <iostream>
|
||||
#include "vd_front_door_left.h"
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
CVehicleDeviceFrontDoorLeft::CVehicleDeviceFrontDoorLeft()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief initialize device to get the object name or use the default.
|
||||
* @param[in] objectConfig Configuration containing the object name
|
||||
*/
|
||||
void CVehicleDeviceFrontDoorLeft::Initialize(const sdv::u8string&)
|
||||
{
|
||||
if (m_status != sdv::EObjectStatus::initialization_pending)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
sdv::core::CDispatchService dispatch;
|
||||
m_leftDoorIsOpen01Signal = dispatch.Subscribe(doors::dsLeftDoorIsOpen01, [&](sdv::any_t value) { ExecuteAllCallBacksForLeftDoorIsOpen01( value ); });
|
||||
if (!m_leftDoorIsOpen01Signal)
|
||||
{
|
||||
SDV_LOG_ERROR("Could not get signal: ", doors::dsLeftDoorIsOpen01, " [CVehicleDeviceFrontDoorLeft]");
|
||||
m_status = sdv::EObjectStatus::initialization_failure;
|
||||
return;
|
||||
}
|
||||
|
||||
m_leftLatch01 = dispatch.AddPublisher(doors::dsLeftLatch01);
|
||||
if (!m_leftLatch01)
|
||||
{
|
||||
SDV_LOG_ERROR("Could not get signal: ", doors::dsLeftLatch01, " [CVehicleDevice]");
|
||||
m_status = sdv::EObjectStatus::initialization_failure;
|
||||
return;
|
||||
}
|
||||
|
||||
m_status = sdv::EObjectStatus::initialized;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Gets the current status of the object
|
||||
* @return EObjectStatus The current status of the object
|
||||
*/
|
||||
sdv::EObjectStatus CVehicleDeviceFrontDoorLeft::GetStatus() const
|
||||
{
|
||||
return m_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the component operation mode. Overlovd of sdv::IObjectControl::SetOperationMode.
|
||||
* @param[in] eMode The operation mode, the component should run in.
|
||||
*/
|
||||
void CVehicleDeviceFrontDoorLeft::SetOperationMode(/*in*/ sdv::EOperationMode eMode)
|
||||
{
|
||||
switch (eMode)
|
||||
{
|
||||
case sdv::EOperationMode::configuring:
|
||||
if (m_status == sdv::EObjectStatus::running || m_status == sdv::EObjectStatus::initialized)
|
||||
m_status = sdv::EObjectStatus::configuring;
|
||||
break;
|
||||
case sdv::EOperationMode::running:
|
||||
if (m_status == sdv::EObjectStatus::configuring || m_status == sdv::EObjectStatus::initialized)
|
||||
m_status = sdv::EObjectStatus::running;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Shutdown function is to shutdown the execution of request thread
|
||||
*/
|
||||
void CVehicleDeviceFrontDoorLeft::Shutdown()
|
||||
{
|
||||
m_leftDoorIsOpen01Signal.Reset();
|
||||
|
||||
std::lock_guard<std::mutex> lock(m_leftDoorIsOpen01MutexCallbacks);
|
||||
for (auto callback : m_leftDoorIsOpen01Callbacks)
|
||||
{
|
||||
UnregisterIsOpenEvent(callback);
|
||||
}
|
||||
m_leftDoorIsOpen01Callbacks.clear();
|
||||
|
||||
m_status = sdv::EObjectStatus::destruction_pending;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Register IsOpen event on signal change
|
||||
* Collect all events and call them on signal change
|
||||
* @param[in] event function
|
||||
*/
|
||||
void CVehicleDeviceFrontDoorLeft::RegisterIsOpenEvent(vss::Vehicle::Chassis::Door::Axle01::LeftDevice::IVSS_WriteIsOpen_Event* event)
|
||||
{
|
||||
if (event)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_leftDoorIsOpen01MutexCallbacks);
|
||||
m_leftDoorIsOpen01Callbacks.insert(event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Unregister IsOpen event
|
||||
* @param[in] event function
|
||||
*/
|
||||
void CVehicleDeviceFrontDoorLeft::UnregisterIsOpenEvent(vss::Vehicle::Chassis::Door::Axle01::LeftDevice::IVSS_WriteIsOpen_Event* event)
|
||||
{
|
||||
if (event)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_leftDoorIsOpen01MutexCallbacks);
|
||||
m_leftDoorIsOpen01Callbacks.erase(event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Execute all callbacks
|
||||
*/
|
||||
void CVehicleDeviceFrontDoorLeft::ExecuteAllCallBacksForLeftDoorIsOpen01(sdv::any_t value)
|
||||
{
|
||||
bool leftDoorIsOpen = value.get<bool>();
|
||||
|
||||
std::lock_guard<std::mutex> lock(m_leftDoorIsOpen01MutexCallbacks);
|
||||
for (auto callback : m_leftDoorIsOpen01Callbacks)
|
||||
{
|
||||
callback->WriteIsOpen(leftDoorIsOpen);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Lock
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
bool CVehicleDeviceFrontDoorLeft::WriteLock(bool value)
|
||||
{
|
||||
if (m_leftLatch01)
|
||||
{
|
||||
m_leftLatch01.Write(value);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
/**
|
||||
* @file vd_front_door_left.h
|
||||
* @date 2025-07-11 12:43:52
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#ifndef __VSS_GENERATED__VD_FRONTDOORLEFT_H_20250711_124352_681__
|
||||
#define __VSS_GENERATED__VD_FRONTDOORLEFT_H_20250711_124352_681__
|
||||
|
||||
#include <iostream>
|
||||
#include <set>
|
||||
#include <support/component_impl.h>
|
||||
#include <support/signal_support.h>
|
||||
#include "vss_vehiclechassisdooraxle01left_vd_rx.h"
|
||||
#include "vss_vehiclechassisdooraxle01left_vd_tx.h"
|
||||
#include "signal_identifier.h"
|
||||
|
||||
/**
|
||||
* @brief Vehicle device Vehicle.Chassis.Door.Axle01.Left
|
||||
*/
|
||||
class CVehicleDeviceFrontDoorLeft
|
||||
: public sdv::CSdvObject
|
||||
, public sdv::IObjectControl
|
||||
, public vss::Vehicle::Chassis::Door::Axle01::LeftDevice::IVSS_IsOpen
|
||||
, public vss::Vehicle::Chassis::Door::Axle01::LeftDevice::IVSS_WriteLock
|
||||
{
|
||||
public:
|
||||
|
||||
BEGIN_SDV_INTERFACE_MAP()
|
||||
SDV_INTERFACE_ENTRY(sdv::IObjectControl)
|
||||
SDV_INTERFACE_ENTRY(vss::Vehicle::Chassis::Door::Axle01::LeftDevice::IVSS_IsOpen)
|
||||
SDV_INTERFACE_ENTRY(vss::Vehicle::Chassis::Door::Axle01::LeftDevice::IVSS_WriteLock)
|
||||
END_SDV_INTERFACE_MAP()
|
||||
|
||||
DECLARE_OBJECT_CLASS_TYPE(sdv::EObjectType::Device)
|
||||
DECLARE_OBJECT_CLASS_NAME("Vehicle.Chassis.Door.Axle01.Left_Device")
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
CVehicleDeviceFrontDoorLeft();
|
||||
|
||||
/**
|
||||
* @brief initialize device to get the object name or use the default.
|
||||
* @param[in] objectConfig Configuration containing the object name
|
||||
*/
|
||||
void Initialize(const sdv::u8string& objectConfig) override;
|
||||
|
||||
/**
|
||||
* @brief Gets the current status of the object
|
||||
* @return EObjectStatus The current status of the object
|
||||
*/
|
||||
sdv::EObjectStatus GetStatus() const override;
|
||||
|
||||
/**
|
||||
* @brief Set the component operation mode. Overlovd of sdv::IObjectControl::SetOperationMode.
|
||||
* @param[in] eMode The operation mode, the component should run in.
|
||||
*/
|
||||
void SetOperationMode(/*in*/ sdv::EOperationMode eMode) override;
|
||||
|
||||
/**
|
||||
* @brief Shutdown function is to shutdown the execution of request thread
|
||||
*/
|
||||
void Shutdown() override;
|
||||
|
||||
/**
|
||||
* @brief Set leftLatch signal
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
bool WriteLock(bool value) override;
|
||||
|
||||
/**
|
||||
* @brief Register IVSS_WriteIsOpen_Event on signal change
|
||||
* Collect all events and call them on signal change
|
||||
* @param[in] event function
|
||||
*/
|
||||
void RegisterIsOpenEvent(vss::Vehicle::Chassis::Door::Axle01::LeftDevice::IVSS_WriteIsOpen_Event* event) override;
|
||||
|
||||
/**
|
||||
* @brief Unregister IVSS_IsOpen_Event
|
||||
* @param[in] event function
|
||||
*/
|
||||
void UnregisterIsOpenEvent(vss::Vehicle::Chassis::Door::Axle01::LeftDevice::IVSS_WriteIsOpen_Event* event) override;
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* @brief Execute all callbacks
|
||||
*/
|
||||
void ExecuteAllCallBacksForLeftDoorIsOpen01(sdv::any_t value);
|
||||
|
||||
sdv::core::CSignal m_leftLatch01; ///< Signal to lock/unlock the door
|
||||
sdv::core::CSignal m_leftDoorIsOpen01Signal; ///< Open/close signal of the vehicle device
|
||||
mutable std::mutex m_leftDoorIsOpen01MutexCallbacks; ///< Mutex protecting m_leftDoorIsOpen01Callbacks
|
||||
std::set<vss::Vehicle::Chassis::Door::Axle01::LeftDevice::IVSS_WriteIsOpen_Event*> m_leftDoorIsOpen01Callbacks; ///< collection of events to be called
|
||||
|
||||
std::atomic<sdv::EObjectStatus> m_status = { sdv::EObjectStatus::initialization_pending }; ///< To update the object status when it changes.
|
||||
};
|
||||
|
||||
DEFINE_SDV_OBJECT(CVehicleDeviceFrontDoorLeft)
|
||||
|
||||
#endif // !define __VSS_GENERATED__VD_FRONTDOORLEFT_H_20250711_124352_681__
|
||||
@@ -1,49 +0,0 @@
|
||||
# Enforce CMake version 3.20 or newer needed for path function
|
||||
cmake_minimum_required (VERSION 3.20)
|
||||
|
||||
# Use new policy for project version settings and default warning level
|
||||
cmake_policy(SET CMP0048 NEW) # requires CMake 3.14
|
||||
cmake_policy(SET CMP0092 NEW) # requires CMake 3.15
|
||||
|
||||
# Define project
|
||||
project(doors_vd_frontdoorright VERSION 1.0 LANGUAGES CXX)
|
||||
|
||||
# Use C++17 support
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
# Libary symbols are hidden by default
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
|
||||
# Set target name.
|
||||
set(TARGET_NAME doors_vd_frontdoorright)
|
||||
|
||||
# Set the SDV_FRAMEWORK_DEV_INCLUDE if not defined yet
|
||||
if (NOT DEFINED SDV_FRAMEWORK_DEV_INCLUDE)
|
||||
if (NOT DEFINED ENV{SDV_FRAMEWORK_DEV_INCLUDE})
|
||||
message( FATAL_ERROR "The environment variable SDV_FRAMEWORK_DEV_INCLUDE needs to be pointing to the SDV V-API development include files location!")
|
||||
endif()
|
||||
set (SDV_FRAMEWORK_DEV_INCLUDE "$ENV{SDV_FRAMEWORK_DEV_INCLUDE}")
|
||||
endif()
|
||||
|
||||
# Include link to export directory of SDV V-API development include files location
|
||||
include_directories(${SDV_FRAMEWORK_DEV_INCLUDE})
|
||||
include_directories(../../interfaces)
|
||||
|
||||
# Set platform specific compile flags
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
add_compile_options(/W4 /WX /wd4996 /wd4100 /permissive- /Zc:rvalueCast)
|
||||
else()
|
||||
add_compile_options(-Werror -Wall -Wextra -Wshadow -Wpedantic -Wunreachable-code -fno-common)
|
||||
endif()
|
||||
|
||||
# Add the dynamic library
|
||||
add_library(${TARGET_NAME} SHARED
|
||||
vd_front_door_right.h
|
||||
vd_front_door_right.cpp)
|
||||
|
||||
# Set extension to .sdv
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES PREFIX "")
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".sdv")
|
||||
|
||||
# TODO: set target name.
|
||||
#add_dependencies(${TARGET_NAME} <add_cmake_target_this_depends_on>)
|
||||
@@ -1,151 +0,0 @@
|
||||
/**
|
||||
* @file vd_front_door_right.cpp
|
||||
* @date 2025-07-11 12:43:52
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include <iostream>
|
||||
#include "vd_front_door_right.h"
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
CVehicleDeviceFrontDoorRight::CVehicleDeviceFrontDoorRight()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief initialize device to get the object name or use the default.
|
||||
* @param[in] objectConfig Configuration containing the object name
|
||||
*/
|
||||
void CVehicleDeviceFrontDoorRight::Initialize(const sdv::u8string&)
|
||||
{
|
||||
if (m_status != sdv::EObjectStatus::initialization_pending)
|
||||
{
|
||||
return;
|
||||
}
|
||||
sdv::core::CDispatchService dispatch;
|
||||
|
||||
m_rightDoorIsOpen01Signal = dispatch.Subscribe(doors::dsRightDoorIsOpen01, [&](sdv::any_t value) { ExecuteAllCallBacksForRightDoorIsOpen01( value ); });
|
||||
if (!m_rightDoorIsOpen01Signal)
|
||||
{
|
||||
SDV_LOG_ERROR("Could not get signal: ", doors::dsRightDoorIsOpen01, " [CVehicleDeviceFrontDoorRight]");
|
||||
m_status = sdv::EObjectStatus::initialization_failure;
|
||||
return;
|
||||
}
|
||||
|
||||
m_rightLatch01 = dispatch.AddPublisher(doors::dsRightLatch01);
|
||||
if (!m_rightLatch01)
|
||||
{
|
||||
SDV_LOG_ERROR("Could not get signal: ", doors::dsRightLatch01, " [CVehicleDevice]");
|
||||
m_status = sdv::EObjectStatus::initialization_failure;
|
||||
return;
|
||||
}
|
||||
|
||||
m_status = sdv::EObjectStatus::initialized;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Gets the current status of the object
|
||||
* @return EObjectStatus The current status of the object
|
||||
*/
|
||||
sdv::EObjectStatus CVehicleDeviceFrontDoorRight::GetStatus() const
|
||||
{
|
||||
return m_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the component operation mode. Overlovd of sdv::IObjectControl::SetOperationMode.
|
||||
* @param[in] eMode The operation mode, the component should run in.
|
||||
*/
|
||||
void CVehicleDeviceFrontDoorRight::SetOperationMode(/*in*/ sdv::EOperationMode eMode)
|
||||
{
|
||||
switch (eMode)
|
||||
{
|
||||
case sdv::EOperationMode::configuring:
|
||||
if (m_status == sdv::EObjectStatus::running || m_status == sdv::EObjectStatus::initialized)
|
||||
m_status = sdv::EObjectStatus::configuring;
|
||||
break;
|
||||
case sdv::EOperationMode::running:
|
||||
if (m_status == sdv::EObjectStatus::configuring || m_status == sdv::EObjectStatus::initialized)
|
||||
m_status = sdv::EObjectStatus::running;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Shutdown function is to shutdown the execution of request thread
|
||||
*/
|
||||
void CVehicleDeviceFrontDoorRight::Shutdown()
|
||||
{
|
||||
m_rightDoorIsOpen01Signal.Reset();
|
||||
|
||||
std::lock_guard<std::mutex> lock(m_rightDoorIsOpen01MutexCallbacks);
|
||||
for (auto callback : m_rightDoorIsOpen01Callbacks)
|
||||
{
|
||||
UnregisterIsOpenEvent(callback);
|
||||
}
|
||||
m_rightDoorIsOpen01Callbacks.clear();
|
||||
|
||||
m_status = sdv::EObjectStatus::destruction_pending;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Register IsOpen event on signal change
|
||||
* Collect all events and call them on signal change
|
||||
* @param[in] event function
|
||||
*/
|
||||
void CVehicleDeviceFrontDoorRight::RegisterIsOpenEvent(vss::Vehicle::Chassis::Door::Axle01::RightDevice::IVSS_WriteIsOpen_Event* event)
|
||||
{
|
||||
if (event)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_rightDoorIsOpen01MutexCallbacks);
|
||||
m_rightDoorIsOpen01Callbacks.insert(event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Unregister IsOpen event
|
||||
* @param[in] event function
|
||||
*/
|
||||
void CVehicleDeviceFrontDoorRight::UnregisterIsOpenEvent(vss::Vehicle::Chassis::Door::Axle01::RightDevice::IVSS_WriteIsOpen_Event* event)
|
||||
{
|
||||
if (event)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_rightDoorIsOpen01MutexCallbacks);
|
||||
m_rightDoorIsOpen01Callbacks.erase(event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Execute all callbacks
|
||||
*/
|
||||
void CVehicleDeviceFrontDoorRight::ExecuteAllCallBacksForRightDoorIsOpen01(sdv::any_t value)
|
||||
{
|
||||
bool rightDoorIsOpen = value.get<bool>();
|
||||
|
||||
std::lock_guard<std::mutex> lock(m_rightDoorIsOpen01MutexCallbacks);
|
||||
for (auto callback : m_rightDoorIsOpen01Callbacks)
|
||||
{
|
||||
callback->WriteIsOpen(rightDoorIsOpen);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Lock
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
bool CVehicleDeviceFrontDoorRight::WriteLock(bool value)
|
||||
{
|
||||
if (m_rightLatch01)
|
||||
{
|
||||
m_rightLatch01.Write(value);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
/**
|
||||
* @file vd_front_door_right.h
|
||||
* @date 2025-07-11 12:43:52
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#ifndef __VSS_GENERATED__VD_FRONTDOORRIGHT_H_20250711_124352_693__
|
||||
#define __VSS_GENERATED__VD_FRONTDOORRIGHT_H_20250711_124352_693__
|
||||
|
||||
#include <iostream>
|
||||
#include <set>
|
||||
#include <support/component_impl.h>
|
||||
#include <support/signal_support.h>
|
||||
#include "vss_vehiclechassisdooraxle01right_vd_rx.h"
|
||||
#include "vss_vehiclechassisdooraxle01right_vd_tx.h"
|
||||
#include "signal_identifier.h"
|
||||
|
||||
/**
|
||||
* @brief Vehicle device Vehicle.Chassis.Door.Axle01.Right
|
||||
*/
|
||||
class CVehicleDeviceFrontDoorRight
|
||||
: public sdv::CSdvObject
|
||||
, public sdv::IObjectControl
|
||||
, public vss::Vehicle::Chassis::Door::Axle01::RightDevice::IVSS_IsOpen
|
||||
, public vss::Vehicle::Chassis::Door::Axle01::RightDevice::IVSS_WriteLock
|
||||
{
|
||||
public:
|
||||
|
||||
BEGIN_SDV_INTERFACE_MAP()
|
||||
SDV_INTERFACE_ENTRY(sdv::IObjectControl)
|
||||
SDV_INTERFACE_ENTRY(vss::Vehicle::Chassis::Door::Axle01::RightDevice::IVSS_IsOpen)
|
||||
SDV_INTERFACE_ENTRY(vss::Vehicle::Chassis::Door::Axle01::RightDevice::IVSS_WriteLock)
|
||||
END_SDV_INTERFACE_MAP()
|
||||
|
||||
DECLARE_OBJECT_CLASS_TYPE(sdv::EObjectType::Device)
|
||||
DECLARE_OBJECT_CLASS_NAME("Vehicle.Chassis.Door.Axle01.Right_Device")
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
CVehicleDeviceFrontDoorRight();
|
||||
|
||||
/**
|
||||
* @brief initialize device to get the object name or use the default.
|
||||
* @param[in] objectConfig Configuration containing the object name
|
||||
*/
|
||||
void Initialize(const sdv::u8string& objectConfig) override;
|
||||
|
||||
/**
|
||||
* @brief Gets the current status of the object
|
||||
* @return EObjectStatus The current status of the object
|
||||
*/
|
||||
sdv::EObjectStatus GetStatus() const override;
|
||||
|
||||
/**
|
||||
* @brief Set the component operation mode. Overlovd of sdv::IObjectControl::SetOperationMode.
|
||||
* @param[in] eMode The operation mode, the component should run in.
|
||||
*/
|
||||
void SetOperationMode(/*in*/ sdv::EOperationMode eMode) override;
|
||||
|
||||
/**
|
||||
* @brief Shutdown function is to shutdown the execution of request thread
|
||||
*/
|
||||
void Shutdown() override;
|
||||
|
||||
/**
|
||||
* @brief Set rightLatch signal
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
bool WriteLock(bool value) override;
|
||||
|
||||
/**
|
||||
* @brief Register IVSS_WriteIsOpen_Event on signal change
|
||||
* Collect all events and call them on signal change
|
||||
* @param[in] event function
|
||||
*/
|
||||
void RegisterIsOpenEvent(vss::Vehicle::Chassis::Door::Axle01::RightDevice::IVSS_WriteIsOpen_Event* event) override;
|
||||
|
||||
/**
|
||||
* @brief Unregister IVSS_IsOpen_Event
|
||||
* @param[in] event function
|
||||
*/
|
||||
void UnregisterIsOpenEvent(vss::Vehicle::Chassis::Door::Axle01::RightDevice::IVSS_WriteIsOpen_Event* event) override;
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* @brief Execute all callbacks
|
||||
*/
|
||||
void ExecuteAllCallBacksForRightDoorIsOpen01(sdv::any_t value);
|
||||
|
||||
sdv::core::CSignal m_rightLatch01; ///< Signal to lock/unlock the door
|
||||
sdv::core::CSignal m_rightDoorIsOpen01Signal; ///< Open/close signal of the vehicle device
|
||||
mutable std::mutex m_rightDoorIsOpen01MutexCallbacks; ///< Mutex protecting m_rightDoorIsOpen01Callbacks
|
||||
std::set<vss::Vehicle::Chassis::Door::Axle01::RightDevice::IVSS_WriteIsOpen_Event*> m_rightDoorIsOpen01Callbacks; ///< collection of events to be called
|
||||
|
||||
std::atomic<sdv::EObjectStatus> m_status = { sdv::EObjectStatus::initialization_pending }; ///< To update the object status when it changes.
|
||||
};
|
||||
|
||||
DEFINE_SDV_OBJECT(CVehicleDeviceFrontDoorRight)
|
||||
|
||||
#endif // !define __VSS_GENERATED__VD_FRONTDOORRIGHT_H_20250711_124352_693__
|
||||
@@ -1,49 +0,0 @@
|
||||
# Enforce CMake version 3.20 or newer needed for path function
|
||||
cmake_minimum_required (VERSION 3.20)
|
||||
|
||||
# Use new policy for project version settings and default warning level
|
||||
cmake_policy(SET CMP0048 NEW) # requires CMake 3.14
|
||||
cmake_policy(SET CMP0092 NEW) # requires CMake 3.15
|
||||
|
||||
# Define project
|
||||
project(doors_vd_reardoorleft VERSION 1.0 LANGUAGES CXX)
|
||||
|
||||
# Use C++17 support
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
# Libary symbols are hidden by default
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
|
||||
# Set target name.
|
||||
set(TARGET_NAME doors_vd_reardoorleft)
|
||||
|
||||
# Set the SDV_FRAMEWORK_DEV_INCLUDE if not defined yet
|
||||
if (NOT DEFINED SDV_FRAMEWORK_DEV_INCLUDE)
|
||||
if (NOT DEFINED ENV{SDV_FRAMEWORK_DEV_INCLUDE})
|
||||
message( FATAL_ERROR "The environment variable SDV_FRAMEWORK_DEV_INCLUDE needs to be pointing to the SDV V-API development include files location!")
|
||||
endif()
|
||||
set (SDV_FRAMEWORK_DEV_INCLUDE "$ENV{SDV_FRAMEWORK_DEV_INCLUDE}")
|
||||
endif()
|
||||
|
||||
# Include link to export directory of SDV V-API development include files location
|
||||
include_directories(${SDV_FRAMEWORK_DEV_INCLUDE})
|
||||
include_directories(../../interfaces)
|
||||
|
||||
# Set platform specific compile flags
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
add_compile_options(/W4 /WX /wd4996 /wd4100 /permissive- /Zc:rvalueCast)
|
||||
else()
|
||||
add_compile_options(-Werror -Wall -Wextra -Wshadow -Wpedantic -Wunreachable-code -fno-common)
|
||||
endif()
|
||||
|
||||
# Add the dynamic library
|
||||
add_library(${TARGET_NAME} SHARED
|
||||
vd_rear_door_left.h
|
||||
vd_rear_door_left.cpp)
|
||||
|
||||
# Set extension to .sdv
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES PREFIX "")
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".sdv")
|
||||
|
||||
# TODO: set target name.
|
||||
#add_dependencies(${TARGET_NAME} <add_cmake_target_this_depends_on>)
|
||||
@@ -1,152 +0,0 @@
|
||||
/**
|
||||
* @file vd_rear_door_left.cpp
|
||||
* @date 2025-07-11 12:43:52
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include <iostream>
|
||||
#include "vd_rear_door_left.h"
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
CVehicleDeviceRearDoorLeft::CVehicleDeviceRearDoorLeft()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief initialize device to get the object name or use the default.
|
||||
* @param[in] objectConfig Configuration containing the object name
|
||||
*/
|
||||
void CVehicleDeviceRearDoorLeft::Initialize(const sdv::u8string&)
|
||||
{
|
||||
if (m_status != sdv::EObjectStatus::initialization_pending)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
sdv::core::CDispatchService dispatch;
|
||||
m_leftDoorIsOpen02Signal = dispatch.Subscribe(doors::dsLeftDoorIsOpen02, [&](sdv::any_t value) { ExecuteAllCallBacksForLeftDoorIsOpen02( value ); });
|
||||
if (!m_leftDoorIsOpen02Signal)
|
||||
{
|
||||
SDV_LOG_ERROR("Could not get signal: ", doors::dsLeftDoorIsOpen02, " [CVehicleDeviceRearDoorLeft]");
|
||||
m_status = sdv::EObjectStatus::initialization_failure;
|
||||
return;
|
||||
}
|
||||
|
||||
m_leftLatch02 = dispatch.AddPublisher(doors::dsLeftLatch02);
|
||||
if (!m_leftLatch02)
|
||||
{
|
||||
SDV_LOG_ERROR("Could not get signal: ", doors::dsLeftLatch02, " [CVehicleDevice]");
|
||||
m_status = sdv::EObjectStatus::initialization_failure;
|
||||
return;
|
||||
}
|
||||
|
||||
m_status = sdv::EObjectStatus::initialized;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Gets the current status of the object
|
||||
* @return EObjectStatus The current status of the object
|
||||
*/
|
||||
sdv::EObjectStatus CVehicleDeviceRearDoorLeft::GetStatus() const
|
||||
{
|
||||
return m_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the component operation mode. Overlovd of sdv::IObjectControl::SetOperationMode.
|
||||
* @param[in] eMode The operation mode, the component should run in.
|
||||
*/
|
||||
void CVehicleDeviceRearDoorLeft::SetOperationMode(/*in*/ sdv::EOperationMode eMode)
|
||||
{
|
||||
switch (eMode)
|
||||
{
|
||||
case sdv::EOperationMode::configuring:
|
||||
if (m_status == sdv::EObjectStatus::running || m_status == sdv::EObjectStatus::initialized)
|
||||
m_status = sdv::EObjectStatus::configuring;
|
||||
break;
|
||||
case sdv::EOperationMode::running:
|
||||
if (m_status == sdv::EObjectStatus::configuring || m_status == sdv::EObjectStatus::initialized)
|
||||
m_status = sdv::EObjectStatus::running;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Shutdown function is to shutdown the execution of request thread
|
||||
*/
|
||||
void CVehicleDeviceRearDoorLeft::Shutdown()
|
||||
{
|
||||
m_leftDoorIsOpen02Signal.Reset();
|
||||
|
||||
std::lock_guard<std::mutex> lock(m_leftDoorIsOpen02MutexCallbacks);
|
||||
for (auto callback : m_leftDoorIsOpen02Callbacks)
|
||||
{
|
||||
UnregisterIsOpenEvent(callback);
|
||||
}
|
||||
m_leftDoorIsOpen02Callbacks.clear();
|
||||
|
||||
m_status = sdv::EObjectStatus::destruction_pending;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Register IsOpen event on signal change
|
||||
* Collect all events and call them on signal change
|
||||
* @param[in] event function
|
||||
*/
|
||||
void CVehicleDeviceRearDoorLeft::RegisterIsOpenEvent(vss::Vehicle::Chassis::Door::Axle02::LeftDevice::IVSS_WriteIsOpen_Event* event)
|
||||
{
|
||||
if (event)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_leftDoorIsOpen02MutexCallbacks);
|
||||
m_leftDoorIsOpen02Callbacks.insert(event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Unregister IsOpen event
|
||||
* @param[in] event function
|
||||
*/
|
||||
void CVehicleDeviceRearDoorLeft::UnregisterIsOpenEvent(vss::Vehicle::Chassis::Door::Axle02::LeftDevice::IVSS_WriteIsOpen_Event* event)
|
||||
{
|
||||
if (event)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_leftDoorIsOpen02MutexCallbacks);
|
||||
m_leftDoorIsOpen02Callbacks.erase(event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Execute all callbacks
|
||||
*/
|
||||
void CVehicleDeviceRearDoorLeft::ExecuteAllCallBacksForLeftDoorIsOpen02(sdv::any_t value)
|
||||
{
|
||||
bool rightDoorIsOpen = value.get<bool>();
|
||||
|
||||
std::lock_guard<std::mutex> lock(m_leftDoorIsOpen02MutexCallbacks);
|
||||
for (auto callback : m_leftDoorIsOpen02Callbacks)
|
||||
{
|
||||
callback->WriteIsOpen(rightDoorIsOpen);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Lock
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
bool CVehicleDeviceRearDoorLeft::WriteLock(bool value)
|
||||
{
|
||||
if (m_leftLatch02)
|
||||
{
|
||||
m_leftLatch02.Write(value);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
/**
|
||||
* @file vd_rear_door_left.h
|
||||
* @date 2025-07-11 12:43:52
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#ifndef __VSS_GENERATED__VD_REARDOORLEFT_H_20250711_124352_704__
|
||||
#define __VSS_GENERATED__VD_REARDOORLEFT_H_20250711_124352_704__
|
||||
|
||||
#include <iostream>
|
||||
#include <set>
|
||||
#include <support/component_impl.h>
|
||||
#include <support/signal_support.h>
|
||||
#include "vss_vehiclechassisdooraxle02left_vd_rx.h"
|
||||
#include "vss_vehiclechassisdooraxle02left_vd_tx.h"
|
||||
#include "signal_identifier.h"
|
||||
|
||||
/**
|
||||
* @brief Vehicle device Vehicle.Chassis.Door.Axle02.Left
|
||||
*/
|
||||
class CVehicleDeviceRearDoorLeft
|
||||
: public sdv::CSdvObject
|
||||
, public sdv::IObjectControl
|
||||
, public vss::Vehicle::Chassis::Door::Axle02::LeftDevice::IVSS_IsOpen
|
||||
, public vss::Vehicle::Chassis::Door::Axle02::LeftDevice::IVSS_WriteLock
|
||||
{
|
||||
public:
|
||||
|
||||
BEGIN_SDV_INTERFACE_MAP()
|
||||
SDV_INTERFACE_ENTRY(sdv::IObjectControl)
|
||||
SDV_INTERFACE_ENTRY(vss::Vehicle::Chassis::Door::Axle02::LeftDevice::IVSS_IsOpen)
|
||||
SDV_INTERFACE_ENTRY(vss::Vehicle::Chassis::Door::Axle02::LeftDevice::IVSS_WriteLock)
|
||||
END_SDV_INTERFACE_MAP()
|
||||
|
||||
DECLARE_OBJECT_CLASS_TYPE(sdv::EObjectType::Device)
|
||||
DECLARE_OBJECT_CLASS_NAME("Vehicle.Chassis.Door.Axle02.Left_Device")
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
CVehicleDeviceRearDoorLeft();
|
||||
|
||||
/**
|
||||
* @brief initialize device to get the object name or use the default.
|
||||
* @param[in] objectConfig Configuration containing the object name
|
||||
*/
|
||||
void Initialize(const sdv::u8string& objectConfig) override;
|
||||
|
||||
/**
|
||||
* @brief Gets the current status of the object
|
||||
* @return EObjectStatus The current status of the object
|
||||
*/
|
||||
sdv::EObjectStatus GetStatus() const override;
|
||||
|
||||
/**
|
||||
* @brief Set the component operation mode. Overlovd of sdv::IObjectControl::SetOperationMode.
|
||||
* @param[in] eMode The operation mode, the component should run in.
|
||||
*/
|
||||
void SetOperationMode(/*in*/ sdv::EOperationMode eMode) override;
|
||||
|
||||
/**
|
||||
* @brief Shutdown function is to shutdown the execution of request thread
|
||||
*/
|
||||
void Shutdown() override;
|
||||
|
||||
/**
|
||||
* @brief Set leftLatch02 signal
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
bool WriteLock(bool value) override;
|
||||
|
||||
/**
|
||||
* @brief Register IVSS_WriteIsOpen_Event on signal change
|
||||
* Collect all events and call them on signal change
|
||||
* @param[in] event function
|
||||
*/
|
||||
void RegisterIsOpenEvent(vss::Vehicle::Chassis::Door::Axle02::LeftDevice::IVSS_WriteIsOpen_Event* event) override;
|
||||
|
||||
/**
|
||||
* @brief Unregister IVSS_IsOpen_Event
|
||||
* @param[in] event function
|
||||
*/
|
||||
void UnregisterIsOpenEvent(vss::Vehicle::Chassis::Door::Axle02::LeftDevice::IVSS_WriteIsOpen_Event* event) override;
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* @brief Execute all callbacks
|
||||
*/
|
||||
void ExecuteAllCallBacksForLeftDoorIsOpen02(sdv::any_t value);
|
||||
|
||||
sdv::core::CSignal m_leftLatch02; ///< Signal to lock/unlock the door
|
||||
sdv::core::CSignal m_leftDoorIsOpen02Signal; ///< Open/close signal of the vehicle device
|
||||
mutable std::mutex m_leftDoorIsOpen02MutexCallbacks; ///< Mutex protecting m_leftDoorIsOpen02Callbacks
|
||||
std::set<vss::Vehicle::Chassis::Door::Axle02::LeftDevice::IVSS_WriteIsOpen_Event*> m_leftDoorIsOpen02Callbacks; ///< collection of events to be called
|
||||
|
||||
std::atomic<sdv::EObjectStatus> m_status = { sdv::EObjectStatus::initialization_pending }; ///< To update the object status when it changes.
|
||||
};
|
||||
|
||||
DEFINE_SDV_OBJECT(CVehicleDeviceRearDoorLeft)
|
||||
|
||||
#endif // !define __VSS_GENERATED__VD_REARDOORLEFT_H_20250711_124352_704__
|
||||
@@ -1,49 +0,0 @@
|
||||
# Enforce CMake version 3.20 or newer needed for path function
|
||||
cmake_minimum_required (VERSION 3.20)
|
||||
|
||||
# Use new policy for project version settings and default warning level
|
||||
cmake_policy(SET CMP0048 NEW) # requires CMake 3.14
|
||||
cmake_policy(SET CMP0092 NEW) # requires CMake 3.15
|
||||
|
||||
# Define project
|
||||
project(doors_vd_reardoorright VERSION 1.0 LANGUAGES CXX)
|
||||
|
||||
# Use C++17 support
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
# Libary symbols are hidden by default
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
|
||||
# Set target name.
|
||||
set(TARGET_NAME doors_vd_reardoorright)
|
||||
|
||||
# Set the SDV_FRAMEWORK_DEV_INCLUDE if not defined yet
|
||||
if (NOT DEFINED SDV_FRAMEWORK_DEV_INCLUDE)
|
||||
if (NOT DEFINED ENV{SDV_FRAMEWORK_DEV_INCLUDE})
|
||||
message( FATAL_ERROR "The environment variable SDV_FRAMEWORK_DEV_INCLUDE needs to be pointing to the SDV V-API development include files location!")
|
||||
endif()
|
||||
set (SDV_FRAMEWORK_DEV_INCLUDE "$ENV{SDV_FRAMEWORK_DEV_INCLUDE}")
|
||||
endif()
|
||||
|
||||
# Include link to export directory of SDV V-API development include files location
|
||||
include_directories(${SDV_FRAMEWORK_DEV_INCLUDE})
|
||||
include_directories(../../interfaces)
|
||||
|
||||
# Set platform specific compile flags
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
add_compile_options(/W4 /WX /wd4996 /wd4100 /permissive- /Zc:rvalueCast)
|
||||
else()
|
||||
add_compile_options(-Werror -Wall -Wextra -Wshadow -Wpedantic -Wunreachable-code -fno-common)
|
||||
endif()
|
||||
|
||||
# Add the dynamic library
|
||||
add_library(${TARGET_NAME} SHARED
|
||||
vd_rear_door_right.h
|
||||
vd_rear_door_right.cpp)
|
||||
|
||||
# Set extension to .sdv
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES PREFIX "")
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ".sdv")
|
||||
|
||||
# TODO: set target name.
|
||||
#add_dependencies(${TARGET_NAME} <add_cmake_target_this_depends_on>)
|
||||
@@ -1,153 +0,0 @@
|
||||
/**
|
||||
* @file vd_rear_door_right.cpp
|
||||
* @date 2025-07-11 12:43:52
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#include <iostream>
|
||||
#include "vd_rear_door_right.h"
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
CVehicleDeviceRearDoorRight::CVehicleDeviceRearDoorRight()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief initialize device to get the object name or use the default.
|
||||
* @param[in] objectConfig Configuration containing the object name
|
||||
*/
|
||||
void CVehicleDeviceRearDoorRight::Initialize(const sdv::u8string&)
|
||||
{
|
||||
if (m_status != sdv::EObjectStatus::initialization_pending)
|
||||
{
|
||||
return;
|
||||
}
|
||||
sdv::core::CDispatchService dispatch;
|
||||
|
||||
m_rightDoorIsOpen02Signal = dispatch.Subscribe(doors::dsRightDoorIsOpen02, [&](sdv::any_t value) { ExecuteAllCallBacksForRightDoorIsOpen02( value ); });
|
||||
if (!m_rightDoorIsOpen02Signal)
|
||||
{
|
||||
SDV_LOG_ERROR("Could not get signal: ", doors::dsRightDoorIsOpen02, " [CVehicleDeviceRearDoorRight]");
|
||||
m_status = sdv::EObjectStatus::initialization_failure;
|
||||
return;
|
||||
}
|
||||
|
||||
m_rightLatch02 = dispatch.AddPublisher(doors::dsRightLatch02);
|
||||
if (!m_rightLatch02)
|
||||
{
|
||||
SDV_LOG_ERROR("Could not get signal: ", doors::dsRightLatch02, " [CVehicleDevice]");
|
||||
m_status = sdv::EObjectStatus::initialization_failure;
|
||||
return;
|
||||
}
|
||||
|
||||
m_status = sdv::EObjectStatus::initialized;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Gets the current status of the object
|
||||
* @return EObjectStatus The current status of the object
|
||||
*/
|
||||
sdv::EObjectStatus CVehicleDeviceRearDoorRight::GetStatus() const
|
||||
{
|
||||
return m_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the component operation mode. Overlovd of sdv::IObjectControl::SetOperationMode.
|
||||
* @param[in] eMode The operation mode, the component should run in.
|
||||
*/
|
||||
void CVehicleDeviceRearDoorRight::SetOperationMode(/*in*/ sdv::EOperationMode eMode)
|
||||
{
|
||||
switch (eMode)
|
||||
{
|
||||
case sdv::EOperationMode::configuring:
|
||||
if (m_status == sdv::EObjectStatus::running || m_status == sdv::EObjectStatus::initialized)
|
||||
m_status = sdv::EObjectStatus::configuring;
|
||||
break;
|
||||
case sdv::EOperationMode::running:
|
||||
if (m_status == sdv::EObjectStatus::configuring || m_status == sdv::EObjectStatus::initialized)
|
||||
m_status = sdv::EObjectStatus::running;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Shutdown function is to shutdown the execution of request thread
|
||||
*/
|
||||
void CVehicleDeviceRearDoorRight::Shutdown()
|
||||
{
|
||||
m_rightDoorIsOpen02Signal.Reset();
|
||||
|
||||
std::lock_guard<std::mutex> lock(m_rightDoorIsOpen02MutexCallbacks);
|
||||
for (auto callback : m_rightDoorIsOpen02Callbacks)
|
||||
{
|
||||
UnregisterIsOpenEvent(callback);
|
||||
}
|
||||
m_rightDoorIsOpen02Callbacks.clear();
|
||||
|
||||
m_status = sdv::EObjectStatus::destruction_pending;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Register IsOpen event on signal change
|
||||
* Collect all events and call them on signal change
|
||||
* @param[in] event function
|
||||
*/
|
||||
void CVehicleDeviceRearDoorRight::RegisterIsOpenEvent(vss::Vehicle::Chassis::Door::Axle02::RightDevice::IVSS_WriteIsOpen_Event* event)
|
||||
{
|
||||
if (event)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_rightDoorIsOpen02MutexCallbacks);
|
||||
m_rightDoorIsOpen02Callbacks.insert(event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Unregister IsOpen event
|
||||
* @param[in] event function
|
||||
*/
|
||||
void CVehicleDeviceRearDoorRight::UnregisterIsOpenEvent(vss::Vehicle::Chassis::Door::Axle02::RightDevice::IVSS_WriteIsOpen_Event* event)
|
||||
{
|
||||
if (event)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_rightDoorIsOpen02MutexCallbacks);
|
||||
m_rightDoorIsOpen02Callbacks.erase(event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Execute all callbacks
|
||||
*/
|
||||
void CVehicleDeviceRearDoorRight::ExecuteAllCallBacksForRightDoorIsOpen02(sdv::any_t value)
|
||||
{
|
||||
bool rightDoorIsOpen = value.get<bool>();
|
||||
|
||||
std::lock_guard<std::mutex> lock(m_rightDoorIsOpen02MutexCallbacks);
|
||||
for (auto callback : m_rightDoorIsOpen02Callbacks)
|
||||
{
|
||||
callback->WriteIsOpen(rightDoorIsOpen);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Lock
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
bool CVehicleDeviceRearDoorRight::WriteLock(bool value)
|
||||
{
|
||||
if (m_rightLatch02)
|
||||
{
|
||||
m_rightLatch02.Write(value);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
/**
|
||||
* @file vd_rear_door_right.h
|
||||
* @date 2025-07-11 12:43:52
|
||||
* File is auto generated from VSS utility.
|
||||
* VSS Version:1.0.0.1
|
||||
*/
|
||||
#ifndef __VSS_GENERATED__VD_REARDOORRIGHT_H_20250711_124352_715__
|
||||
#define __VSS_GENERATED__VD_REARDOORRIGHT_H_20250711_124352_715__
|
||||
|
||||
#include <iostream>
|
||||
#include <set>
|
||||
#include <support/component_impl.h>
|
||||
#include <support/signal_support.h>
|
||||
#include "vss_vehiclechassisdooraxle02right_vd_rx.h"
|
||||
#include "vss_vehiclechassisdooraxle02right_vd_tx.h"
|
||||
#include "signal_identifier.h"
|
||||
|
||||
/**
|
||||
* @brief Vehicle device Vehicle.Chassis.Door.Axle02.Right
|
||||
*/
|
||||
class CVehicleDeviceRearDoorRight
|
||||
: public sdv::CSdvObject
|
||||
, public sdv::IObjectControl
|
||||
, public vss::Vehicle::Chassis::Door::Axle02::RightDevice::IVSS_IsOpen
|
||||
, public vss::Vehicle::Chassis::Door::Axle02::RightDevice::IVSS_WriteLock
|
||||
{
|
||||
public:
|
||||
|
||||
BEGIN_SDV_INTERFACE_MAP()
|
||||
SDV_INTERFACE_ENTRY(sdv::IObjectControl)
|
||||
SDV_INTERFACE_ENTRY(vss::Vehicle::Chassis::Door::Axle02::RightDevice::IVSS_IsOpen)
|
||||
SDV_INTERFACE_ENTRY(vss::Vehicle::Chassis::Door::Axle02::RightDevice::IVSS_WriteLock)
|
||||
END_SDV_INTERFACE_MAP()
|
||||
|
||||
DECLARE_OBJECT_CLASS_TYPE(sdv::EObjectType::Device)
|
||||
DECLARE_OBJECT_CLASS_NAME("Vehicle.Chassis.Door.Axle02.Right_Device")
|
||||
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
CVehicleDeviceRearDoorRight();
|
||||
|
||||
/**
|
||||
* @brief initialize device to get the object name or use the default.
|
||||
* @param[in] objectConfig Configuration containing the object name
|
||||
*/
|
||||
void Initialize(const sdv::u8string& objectConfig) override;
|
||||
|
||||
/**
|
||||
* @brief Gets the current status of the object
|
||||
* @return EObjectStatus The current status of the object
|
||||
*/
|
||||
sdv::EObjectStatus GetStatus() const override;
|
||||
|
||||
/**
|
||||
* @brief Set the component operation mode. Overlovd of sdv::IObjectControl::SetOperationMode.
|
||||
* @param[in] eMode The operation mode, the component should run in.
|
||||
*/
|
||||
void SetOperationMode(/*in*/ sdv::EOperationMode eMode) override;
|
||||
|
||||
/**
|
||||
* @brief Shutdown function is to shutdown the execution of request thread
|
||||
*/
|
||||
void Shutdown() override;
|
||||
|
||||
/**
|
||||
* @brief Set rightLatch02 signal
|
||||
* @param[in] value
|
||||
* @return true on success otherwise false
|
||||
*/
|
||||
bool WriteLock(bool value) override;
|
||||
|
||||
/**
|
||||
* @brief Register IVSS_WriteIsOpen_Event on signal change
|
||||
* Collect all events and call them on signal change
|
||||
* @param[in] event function
|
||||
*/
|
||||
void RegisterIsOpenEvent(vss::Vehicle::Chassis::Door::Axle02::RightDevice::IVSS_WriteIsOpen_Event* event) override;
|
||||
|
||||
/**
|
||||
* @brief Unregister IVSS_IsOpen_Event
|
||||
* @param[in] event function
|
||||
*/
|
||||
void UnregisterIsOpenEvent(vss::Vehicle::Chassis::Door::Axle02::RightDevice::IVSS_WriteIsOpen_Event* event) override;
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* @brief Execute all callbacks
|
||||
*/
|
||||
void ExecuteAllCallBacksForRightDoorIsOpen02(sdv::any_t value);
|
||||
|
||||
sdv::core::CSignal m_rightLatch02; ///< Signal to lock/unlock the door
|
||||
sdv::core::CSignal m_rightDoorIsOpen02Signal; ///< Open/close signal of the vehicle device
|
||||
mutable std::mutex m_rightDoorIsOpen02MutexCallbacks; ///< Mutex protecting m_rightDoorIsOpen02Callbacks
|
||||
std::set<vss::Vehicle::Chassis::Door::Axle02::RightDevice::IVSS_WriteIsOpen_Event*> m_rightDoorIsOpen02Callbacks; ///< collection of events to be called
|
||||
|
||||
std::atomic<sdv::EObjectStatus> m_status = { sdv::EObjectStatus::initialization_pending }; ///< To update the object status when it changes.
|
||||
};
|
||||
|
||||
DEFINE_SDV_OBJECT(CVehicleDeviceRearDoorRight)
|
||||
|
||||
#endif // !define __VSS_GENERATED__VD_REARDOORRIGHT_H_20250711_124352_715__
|
||||
@@ -1,28 +0,0 @@
|
||||
# Settings file
|
||||
[Settings]
|
||||
Version = 100
|
||||
|
||||
# The system config array can contain zero or more configurations that are loaded at the time
|
||||
# the system ist started. It is advisable to split the configurations in:
|
||||
# platform config - containing all the components needed to interact with the OS,
|
||||
# middleware, vehicle bus, Ethernet.
|
||||
# vehicle interface - containing the vehicle bus interpretation components like data link
|
||||
# based on DBC and devices for their abstraction.
|
||||
# vehicle abstraction - containing the basic services
|
||||
# Load the system configurations by providing the "SystemConfig" keyword as an array of strings.
|
||||
# A relative path is relative to the installation directory (being "exe_location/instance_id").
|
||||
#
|
||||
# Example:
|
||||
# SystemConfig = [ "platform.toml", "vehicle_ifc.toml", "vehicle_abstract.toml" ]
|
||||
#
|
||||
SystemConfig = [ "platform.toml", "vehicle_ifc.toml", "vehicle_abstract.toml" ]
|
||||
|
||||
# The application config contains the configuration file that can be updated when services and
|
||||
# apps are being added to the system (or being removed from the system). Load the application
|
||||
# config by providing the "AppConfig" keyword as a string value. A relative path is relative to
|
||||
# the installation directory (being "exe_location/instance_id").
|
||||
#
|
||||
# Example
|
||||
# AppConfig = "app_config.toml"
|
||||
#
|
||||
AppConfig = "trunk.toml"
|
||||
@@ -1,20 +0,0 @@
|
||||
[Configuration]
|
||||
Version = 100
|
||||
|
||||
[[Component]]
|
||||
Path = "trunk_complex_service.sdv"
|
||||
Class = "Open Trunk Service"
|
||||
Name = "Open Trunk Service"
|
||||
|
||||
[[Module]]
|
||||
Path = "trunk_service_proxystub.sdv"
|
||||
|
||||
[[Module.Component]]
|
||||
Class = "Proxy_13181601229896482092"
|
||||
Aliases = ["Proxy_ITrunkKitService"]
|
||||
Type = "Proxy"
|
||||
|
||||
[[Module.Component]]
|
||||
Class = "Stub_13181601229896482092"
|
||||
Aliases = ["Stub_ITrunkKitService"]
|
||||
Type = "Stub"
|
||||
@@ -1,19 +0,0 @@
|
||||
[Configuration]
|
||||
Version = 100
|
||||
|
||||
[[Component]]
|
||||
Path = "trunk_bs_vehiclespeed_rx.sdv"
|
||||
Class = "Vehicle.Speed_Service"
|
||||
Name = "Vehicle.Speed_Service"
|
||||
|
||||
[[Component]]
|
||||
Path = "trunk_bs_vehicletrunk_tx.sdv"
|
||||
Class = "Vehicle.Body.Trunk_Service"
|
||||
Name = "Vehicle.Body.Trunk_Service"
|
||||
|
||||
|
||||
[[Module]]
|
||||
Path = "trunk_proxystub.sdv"
|
||||
|
||||
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
[Configuration]
|
||||
Version = 100
|
||||
|
||||
[[Component]]
|
||||
Path = "can_dl_trunk.sdv"
|
||||
Class = "CAN_data_link"
|
||||
Name = "DataLink"
|
||||
|
||||
[[Component]]
|
||||
Path = "trunk_vd_vehiclespeed_rx.sdv"
|
||||
Class = "Vehicle.Speed_Device"
|
||||
Name = "Vehicle.Speed_Device"
|
||||
|
||||
[[Component]]
|
||||
Path = "trunk_vd_vehicletrunk_tx.sdv"
|
||||
Class = "Vehicle.Body.Trunk_Device"
|
||||
Name = "Vehicle.Body.Trunk_Device"
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
[Configuration]
|
||||
Version = 100
|
||||
|
||||
[[Component]]
|
||||
Path = "demo_complex_service.sdv"
|
||||
Class = "Counter Steering Example Service"
|
||||
Name = "Counter Steering Example Service"
|
||||
|
||||
[[Module]]
|
||||
Path = "example_service_proxystub.sdv"
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
# Settings file
|
||||
[Settings]
|
||||
Version = 100
|
||||
|
||||
# The system config array can contain zero or more configurations that are loaded at the time
|
||||
# the system ist started. It is advisable to split the configurations in:
|
||||
# platform config - containing all the components needed to interact with the OS,
|
||||
# middleware, vehicle bus, Ethernet.
|
||||
# vehicle interface - containing the vehicle bus interpretation components like data link
|
||||
# based on DBC and devices for their abstraction.
|
||||
# vehicle abstraction - containing the basic services
|
||||
# Load the system configurations by providing the "SystemConfig" keyword as an array of strings.
|
||||
# A relative path is relative to the installation directory (being "exe_location/instance_id").
|
||||
#
|
||||
# Example:
|
||||
# SystemConfig = [ "platform.toml", "vehicle_ifc.toml", "vehicle_abstract.toml" ]
|
||||
#
|
||||
SystemConfig = [ "platform.toml", "vehicle_ifc.toml", "vehicle_abstract.toml" ]
|
||||
|
||||
# The application config contains the configuration file that can be updated when services and
|
||||
# apps are being added to the system (or being removed from the system). Load the application
|
||||
# config by providing the "AppConfig" keyword as a string value. A relative path is relative to
|
||||
# the installation directory (being "exe_location/instance_id").
|
||||
#
|
||||
# Example
|
||||
# AppConfig = "app_config.toml"
|
||||
#
|
||||
AppConfig = "Demo.toml"
|
||||
@@ -1,26 +0,0 @@
|
||||
[Configuration]
|
||||
Version = 100
|
||||
|
||||
[[Component]]
|
||||
Path = "demo_bs_isactivecounter_tx.sdv"
|
||||
Class = "Vehicle.Software.Application.IsActiveCounter_Service"
|
||||
Name = "Vehicle.Software.Application.IsActiveCounter_Service"
|
||||
|
||||
[[Component]]
|
||||
Path = "demo_bs_steeringwheel_rx.sdv"
|
||||
Class = "Vehicle.Chassis.SteeringWheel.Angle_Service"
|
||||
Name = "Vehicle.Chassis.SteeringWheel.Angle_Service"
|
||||
|
||||
[[Component]]
|
||||
Path = "demo_bs_vehiclechassisaxle_tx.sdv"
|
||||
Class = "Vehicle.Chassis.RearAxle.Row.Wheel_Service"
|
||||
Name = "Vehicle.Chassis.RearAxle.Row.Wheel_Service"
|
||||
|
||||
[[Component]]
|
||||
Path = "demo_bs_vehiclespeed_rx.sdv"
|
||||
Class = "Vehicle.Speed_Service"
|
||||
Name = "Vehicle.Speed_Service"
|
||||
|
||||
[[Module]]
|
||||
Path = "demo_proxystub.sdv"
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
[Configuration]
|
||||
Version = 100
|
||||
|
||||
[[Component]]
|
||||
Path = "can_dl_example.sdv"
|
||||
Class = "CAN_data_link"
|
||||
Name = "DataLink"
|
||||
|
||||
[[Component]]
|
||||
Path = "demo_vd_isactivecounter_tx.sdv"
|
||||
Class = "Vehicle.Software.Application.IsActiveCounter_Device"
|
||||
Name = "Vehicle.Software.Application.IsActiveCounter_Device"
|
||||
|
||||
[[Component]]
|
||||
Path = "demo_vd_steeringwheel_rx.sdv"
|
||||
Class = "Vehicle.Chassis.SteeringWheel.Angle_Device"
|
||||
Name = "Vehicle.Chassis.SteeringWheel.Angle_Device"
|
||||
|
||||
[[Component]]
|
||||
Path = "demo_vd_vehiclechassisaxle_tx.sdv"
|
||||
Class = "Vehicle.Chassis.RearAxle.Row.Wheel_Device"
|
||||
Name = "Vehicle.Chassis.RearAxle.Row.Wheel_Device"
|
||||
|
||||
[[Component]]
|
||||
Path = "demo_vd_vehiclespeed_rx.sdv"
|
||||
Class = "Vehicle.Speed_Device"
|
||||
Name = "Vehicle.Speed_Device"
|
||||
|
||||
Reference in New Issue
Block a user