mirror of
https://github.com/eclipse-openvehicle-api/openvehicle-api.git
synced 2026-08-30 12:15:12 +00:00
add roadmap information file (#16)
This commit is contained in:
committed by
GitHub
parent
f900e8dff5
commit
5118aaf379
30
ROADMAP.md
Normal file
30
ROADMAP.md
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
|
||||||
|
# Project Roadmap
|
||||||
|
|
||||||
|
The project is currently under active development and does not yet have a planned release date.
|
||||||
|
The roadmap is organized around development milestones rather than a fixed timeline.
|
||||||
|
|
||||||
|
## Current Status
|
||||||
|
|
||||||
|
The Open Vehicle API is already being used in several projects, and feedback from these projects is continuously incorporated into the development process.
|
||||||
|
|
||||||
|
### Existing Functionality
|
||||||
|
|
||||||
|
Examples are available demonstrating different deployment scenarios:
|
||||||
|
|
||||||
|
- Running as a standalone application.
|
||||||
|
- Running a core instance with one or more attached applications.
|
||||||
|
|
||||||
|
## Milestone 1: Support for Separate ASIL B and QM Instances
|
||||||
|
|
||||||
|
This milestone introduces the ability to run vehicle functions in separate ASIL B and QM contexts, enabling the deployment of safety-related and non-safety-related functionality in independent instances.
|
||||||
|
|
||||||
|
## Milestone 2: Project Restructuring
|
||||||
|
|
||||||
|
The project currently relies on several build-time configuration options and requires developers to build the entire codebase, even when working on a specific application.
|
||||||
|
|
||||||
|
To reduce complexity and improve usability, the project will be restructured into three separate components. Application developers should be able to develop and build their applications without needing to build the core framework itself.
|
||||||
|
|
||||||
|
## Goal: First Release
|
||||||
|
|
||||||
|
Once Milestone 1 and Milestone 2 are completed, the project will be prepared for its first public release.
|
||||||
@@ -84,18 +84,22 @@ CConsole::~CConsole()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConsole::PrintHeader(uint32_t uiInstance)
|
void CConsole::PrintHeader(bool bSimulate, uint32_t uiInstance)
|
||||||
{
|
{
|
||||||
// Clear the screen...
|
// Clear the screen...
|
||||||
std::cout << "\x1b[2J";
|
std::cout << "\x1b[2J";
|
||||||
|
|
||||||
std::string subTtitle = "Standalone application!";
|
std::string subTtitle = "Standalone application!";
|
||||||
if (uiInstance != 0)
|
if (uiInstance > 1)
|
||||||
{
|
{
|
||||||
subTtitle = "Connected to core instance ";
|
subTtitle = "Connected to core instance ";
|
||||||
subTtitle.append(std::to_string(uiInstance));
|
subTtitle.append(std::to_string(uiInstance));
|
||||||
subTtitle.append(" (not all interfaces available)");
|
subTtitle.append(" (not all interfaces available)");
|
||||||
}
|
}
|
||||||
|
else if (bSimulate)
|
||||||
|
{
|
||||||
|
subTtitle.append(" simulation mode");
|
||||||
|
}
|
||||||
// Print the titles
|
// Print the titles
|
||||||
PrintText(g_sTitle, "Open Trunk example: Open trunk when vehicle is not moving");
|
PrintText(g_sTitle, "Open Trunk example: Open trunk when vehicle is not moving");
|
||||||
PrintText(g_sSubTitle, subTtitle);
|
PrintText(g_sSubTitle, subTtitle);
|
||||||
|
|||||||
@@ -64,9 +64,11 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Print the header.
|
* @brief Print the header.
|
||||||
|
* @param[in] bSimulate used in case it is running as a standalone application
|
||||||
|
* if false an asc file is used for setting the input speed, otherwise a simulation thread
|
||||||
* @param[in] uiInstance Instance number the application will connect to. 0 will start a standalone application
|
* @param[in] uiInstance Instance number the application will connect to. 0 will start a standalone application
|
||||||
*/
|
*/
|
||||||
void PrintHeader(uint32_t uiInstance);
|
void PrintHeader(bool bSimulate, uint32_t uiInstance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Prepare the data consumers..
|
* @brief Prepare the data consumers..
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ bool CTrunkControl::IsSDVFrameworkEnvironmentSet()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CTrunkControl::Initialize(uint32_t uiInstance)
|
bool CTrunkControl::Initialize(bool bSimulate, uint32_t uiInstance)
|
||||||
{
|
{
|
||||||
if (m_bInitialized)
|
if (m_bInitialized)
|
||||||
return true;
|
return true;
|
||||||
@@ -54,7 +54,7 @@ bool CTrunkControl::Initialize(uint32_t uiInstance)
|
|||||||
m_appcontrol.SetFrameworkRuntimeDirectory("../../bin");
|
m_appcontrol.SetFrameworkRuntimeDirectory("../../bin");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (uiInstance != 0)
|
if (uiInstance != 0 && !bSimulate)
|
||||||
{
|
{
|
||||||
std::stringstream sstreamAppConfig;
|
std::stringstream sstreamAppConfig;
|
||||||
sstreamAppConfig << "[Application]" << std::endl;
|
sstreamAppConfig << "[Application]" << std::endl;
|
||||||
@@ -76,8 +76,17 @@ bool CTrunkControl::Initialize(uint32_t uiInstance)
|
|||||||
bool bResult = LoadConfigFile("Load dispatch service: ", "data_dispatch_trunk.toml");
|
bool bResult = LoadConfigFile("Load dispatch service: ", "data_dispatch_trunk.toml");
|
||||||
bResult &= LoadConfigFile("Load task_timer_trunk: ", "task_timer_trunk.toml");
|
bResult &= LoadConfigFile("Load task_timer_trunk: ", "task_timer_trunk.toml");
|
||||||
|
|
||||||
|
if (bSimulate)
|
||||||
|
{
|
||||||
|
sdv::core::CDispatchService dispatch;
|
||||||
|
m_signalSpeed = dispatch.RegisterRxSignal("CAN_Input.Speed");
|
||||||
|
m_signalTrunk = dispatch.RegisterTxSignal("CAN_Output.OpenTrunk", 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
bResult &= LoadConfigFile("Load can_com_simulation_trunk: ", "can_com_simulation_trunk.toml");
|
bResult &= LoadConfigFile("Load can_com_simulation_trunk: ", "can_com_simulation_trunk.toml");
|
||||||
bResult &= LoadConfigFile("Load data_link_trunk: ", "data_link_trunk.toml");
|
bResult &= LoadConfigFile("Load data_link_trunk: ", "data_link_trunk.toml");
|
||||||
|
}
|
||||||
|
|
||||||
bResult &= LoadConfigFile("Load trunk_vehicle_device_and_basic_service: ", "trunk_vehicle_device_and_basic_service.toml");
|
bResult &= LoadConfigFile("Load trunk_vehicle_device_and_basic_service: ", "trunk_vehicle_device_and_basic_service.toml");
|
||||||
//bResult &= LoadConfigFile("Load trunk service (complex service): ", "complex_service_trunk.toml");
|
//bResult &= LoadConfigFile("Load trunk service (complex service): ", "complex_service_trunk.toml");
|
||||||
@@ -96,6 +105,19 @@ bool CTrunkControl::Initialize(uint32_t uiInstance)
|
|||||||
|
|
||||||
void CTrunkControl::Shutdown()
|
void CTrunkControl::Shutdown()
|
||||||
{
|
{
|
||||||
|
m_bSimulateRunning = false;
|
||||||
|
if (m_threadSimulate.joinable())
|
||||||
|
m_threadSimulate.join();
|
||||||
|
|
||||||
|
if (m_signalSpeed)
|
||||||
|
{
|
||||||
|
m_signalSpeed.Reset();
|
||||||
|
};
|
||||||
|
if (m_signalTrunk)
|
||||||
|
{
|
||||||
|
m_signalTrunk.Reset();
|
||||||
|
};
|
||||||
|
|
||||||
if (!m_bInitialized)
|
if (!m_bInitialized)
|
||||||
m_appcontrol.Shutdown();
|
m_appcontrol.Shutdown();
|
||||||
m_bInitialized = false;
|
m_bInitialized = false;
|
||||||
@@ -105,4 +127,35 @@ void CTrunkControl::SetRunningMode()
|
|||||||
{
|
{
|
||||||
m_appcontrol.SetRunningMode();
|
m_appcontrol.SetRunningMode();
|
||||||
}
|
}
|
||||||
|
void CTrunkControl::StartSimulation()
|
||||||
|
{
|
||||||
|
m_bSimulateRunning = true;
|
||||||
|
m_threadSimulate = sdv::core::secure_thread(&CTrunkControl::SimulateThreadFunction, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CTrunkControl::SimulateThreadFunction()
|
||||||
|
{
|
||||||
|
bool bIsMoving = true;
|
||||||
|
uint32_t maxLoopCount = 20;
|
||||||
|
m_signalSpeed.Write(0);
|
||||||
|
|
||||||
|
while (m_bSimulateRunning)
|
||||||
|
{
|
||||||
|
uint32_t loop = 0;
|
||||||
|
uint32_t speed = 0;
|
||||||
|
while (loop < maxLoopCount && m_bSimulateRunning)
|
||||||
|
{
|
||||||
|
if (bIsMoving)
|
||||||
|
{
|
||||||
|
speed = loop * 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_signalSpeed.Write(speed);
|
||||||
|
loop++;
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(300));
|
||||||
|
}
|
||||||
|
|
||||||
|
bIsMoving = !bIsMoving;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -22,10 +22,12 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Start and initialize the application control and load vehicle devices and basic services
|
* @brief Start and initialize the application control and load vehicle devices and basic services
|
||||||
|
* @param[in] bSimulate used in case it is running as a standalone application
|
||||||
|
* if false an asc file is used for setting the input speed, otherwise a simulation thread
|
||||||
* @param[in] uiInstance Instance number the application will connect to. 0 will start a standalone application
|
* @param[in] uiInstance Instance number the application will connect to. 0 will start a standalone application
|
||||||
* @return Return true on success otherwise false
|
* @return Return true on success otherwise false
|
||||||
*/
|
*/
|
||||||
bool Initialize(uint32_t uiInstance);
|
bool Initialize(bool bSimulate, uint32_t uiInstance);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief After initialization/configuration the system mode needs to be set to running mode
|
* @brief After initialization/configuration the system mode needs to be set to running mode
|
||||||
@@ -37,6 +39,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Starts a thread to set the speed value.
|
||||||
|
*/
|
||||||
|
void StartSimulation();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -45,6 +52,11 @@ private:
|
|||||||
*/
|
*/
|
||||||
bool IsSDVFrameworkEnvironmentSet();
|
bool IsSDVFrameworkEnvironmentSet();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Provide simulated signals until m_bRunning is disabled.
|
||||||
|
*/
|
||||||
|
void SimulateThreadFunction();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Load config file and register vehicle device and basic service.
|
* @brief Load 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] inputMsg message string to be printed on console in case of success and failure
|
||||||
@@ -53,6 +65,11 @@ private:
|
|||||||
*/
|
*/
|
||||||
bool LoadConfigFile(const std::string& inputMsg, const std::string& configFileName);
|
bool LoadConfigFile(const std::string& inputMsg, const std::string& configFileName);
|
||||||
|
|
||||||
sdv::app::CAppControl m_appcontrol; ///< App-control of SDV V-API.
|
sdv::app::CAppControl m_appcontrol; ///< App-control of Eclipse Open Vehicle-API.
|
||||||
bool m_bInitialized = false; ///< Set when initialized.
|
bool m_bInitialized = false; ///< Set when initialized.
|
||||||
|
|
||||||
|
sdv::core::CSignal m_signalSpeed; ///< Vehicle speed signal (input) - simulated datalink
|
||||||
|
sdv::core::CSignal m_signalTrunk; ///< Trunk signal (output) - simulated datalink
|
||||||
|
std::atomic_bool m_bSimulateRunning = false; ///< When set, the simulation thread is running.
|
||||||
|
sdv::core::secure_thread m_threadSimulate; ///< Simulation datalink thread.
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -16,15 +16,20 @@
|
|||||||
#if defined(_WIN32) && defined(_UNICODE)
|
#if defined(_WIN32) && defined(_UNICODE)
|
||||||
extern "C" int wmain(int argc, wchar_t* argv[])
|
extern "C" int wmain(int argc, wchar_t* argv[])
|
||||||
{
|
{
|
||||||
|
bool bSimulate = false;
|
||||||
uint32_t uiInstance = 0;
|
uint32_t uiInstance = 0;
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
{
|
{
|
||||||
std::cout << "Missing instance number to connect to, '0' will run as standalone application" << std::endl;
|
std::cout << "Parameter (instance number to connect to) missing. 0 or 1 will run a standalone application." << std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
uiInstance = std::stoi(argv[1]);
|
uiInstance = std::stoi(argv[1]);
|
||||||
|
if (uiInstance == 1)
|
||||||
|
{
|
||||||
|
bSimulate = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (const std::exception& )
|
catch (const std::exception& )
|
||||||
{
|
{
|
||||||
@@ -34,15 +39,20 @@ extern "C" int wmain(int argc, wchar_t* argv[])
|
|||||||
#else
|
#else
|
||||||
extern "C" int main(int argc, char* argv[])
|
extern "C" int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
bool bSimulate = false;
|
||||||
uint32_t uiInstance = 0;
|
uint32_t uiInstance = 0;
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
{
|
{
|
||||||
std::cout << "Missing instance number to connect to, '0' will run as standalone application" << std::endl;
|
std::cout << "Parameter (instance number to connect to) missing. 0 or 1 will run a standalone application." << std::endl;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
uiInstance = std::stoi(argv[1]);
|
uiInstance = std::stoi(argv[1]);
|
||||||
|
if (uiInstance == 1)
|
||||||
|
{
|
||||||
|
bSimulate = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (const std::exception& )
|
catch (const std::exception& )
|
||||||
{
|
{
|
||||||
@@ -50,20 +60,27 @@ extern "C" int main(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
CTrunkControl appobj;
|
CTrunkControl appobj;
|
||||||
if (!appobj.Initialize(uiInstance))
|
if (!appobj.Initialize(bSimulate, uiInstance))
|
||||||
{
|
{
|
||||||
std::cout << "ERROR: Failed to initialize application control." << std::endl;
|
std::cout << "ERROR: Failed to initialize application control." << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
CConsole visual_obj;
|
CConsole visual_obj;
|
||||||
visual_obj.PrintHeader(uiInstance);
|
visual_obj.PrintHeader(bSimulate, uiInstance);
|
||||||
visual_obj.PrepareDataConsumers();
|
visual_obj.PrepareDataConsumers();
|
||||||
|
|
||||||
appobj.SetRunningMode();
|
appobj.SetRunningMode();
|
||||||
|
if (bSimulate)
|
||||||
|
{
|
||||||
|
appobj.StartSimulation();
|
||||||
|
visual_obj.RunUntilBreak();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
visual_obj.RunUntilBreak();
|
visual_obj.RunUntilBreak();
|
||||||
|
|
||||||
visual_obj.ResetSignals();
|
visual_obj.ResetSignals();
|
||||||
|
}
|
||||||
|
|
||||||
appobj.Shutdown();
|
appobj.Shutdown();
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user