mirror of
https://github.com/eclipse-openvehicle-api/openvehicle-api.git
synced 2026-04-13 17:18:16 +00:00
60 lines
1.9 KiB
C++
60 lines
1.9 KiB
C++
/********************************************************************************
|
|
* Copyright (c) 2025-2026 ZF Friedrichshafen AG
|
|
*
|
|
* This program and the accompanying materials are made available under the
|
|
* terms of the Apache License Version 2.0 which is available at
|
|
* https://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
********************************************************************************/
|
|
|
|
#include <string>
|
|
#include <support/app_control.h>
|
|
#include <support/signal_support.h>
|
|
#include "vss_vehiclespeed_bs_rx.h"
|
|
|
|
|
|
/**
|
|
* @brief Application Class of the open trunk example
|
|
*/
|
|
class CTrunkControl
|
|
{
|
|
public:
|
|
|
|
/**
|
|
* @brief Start and initialize the application control and load vehicle devices and basic services
|
|
* @param[in] uiInstance Instance number the application will connect to. 0 will start a standalone application
|
|
* @return Return true on success otherwise false
|
|
*/
|
|
bool Initialize(uint32_t uiInstance);
|
|
|
|
/**
|
|
* @brief After initialization/configuration the system mode needs to be set to running mode
|
|
*/
|
|
void SetRunningMode();
|
|
|
|
/**
|
|
* @brief Shutdown the system.
|
|
*/
|
|
void Shutdown();
|
|
|
|
private:
|
|
|
|
/**
|
|
* @brief check if SDV_FRAMEWORK_RUNTIME environment variable exists
|
|
* @return Return true if environment variable is found otherwise false
|
|
*/
|
|
bool IsSDVFrameworkEnvironmentSet();
|
|
|
|
/**
|
|
* @brief Loac config file and register vehicle device and basic service.
|
|
* @param[in] inputMsg message string to be printed on console in case of success and failure
|
|
* @param[in] configFileName config toml file name
|
|
* @return Return true on success otherwise false
|
|
*/
|
|
bool LoadConfigFile(const std::string& inputMsg, const std::string& configFileName);
|
|
|
|
sdv::app::CAppControl m_appcontrol; ///< App-control of SDV V-API.
|
|
bool m_bInitialized = false; ///< Set when initialized.
|
|
};
|