mirror of
https://github.com/eclipse-openvehicle-api/openvehicle-api.git
synced 2026-04-19 10:58:16 +00:00
Update sdv_packager (#6)
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
#*******************************************************************************
|
||||
# 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
|
||||
#
|
||||
# Contributors:
|
||||
# Erik Verhoeven - initial API and implementation
|
||||
#*******************************************************************************
|
||||
|
||||
# Define project
|
||||
project (sdv_control VERSION 1.0 LANGUAGES CXX)
|
||||
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/********************************************************************************
|
||||
* 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
|
||||
*
|
||||
* Contributors:
|
||||
* Erik Verhoeven - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
#ifndef CONTEXT_H
|
||||
#define CONTEXT_H
|
||||
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/********************************************************************************
|
||||
* 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
|
||||
*
|
||||
* Contributors:
|
||||
* Erik Verhoeven - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
#include "installation.h"
|
||||
#include "../../global/cmdlnparser/cmdlnparser.h"
|
||||
#include <interfaces/process.h>
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/********************************************************************************
|
||||
* 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
|
||||
*
|
||||
* Contributors:
|
||||
* Erik Verhoeven - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
#ifndef INSTALLATION_H
|
||||
#define INSTALLATION_H
|
||||
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/********************************************************************************
|
||||
* 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
|
||||
*
|
||||
* Contributors:
|
||||
* Erik Verhoeven - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
#include "list_elements.h"
|
||||
#include "print_table.h"
|
||||
#include <interfaces/config.h>
|
||||
@@ -211,23 +224,6 @@ int ListClasses(const SContext& rsContext, const sdv::TObjectPtr& rptrRepository
|
||||
return MODULE_CONTROL_SERVICE_ACCESS_ERROR;
|
||||
}
|
||||
|
||||
// Class type
|
||||
auto fnPrintClassType = [](sdv::EObjectType eType)
|
||||
{
|
||||
switch (eType)
|
||||
{
|
||||
case sdv::EObjectType::SystemObject: return "SystemObject";
|
||||
case sdv::EObjectType::Device: return "Device";
|
||||
case sdv::EObjectType::BasicService: return "BasicService";
|
||||
case sdv::EObjectType::ComplexService: return "ComplexService";
|
||||
case sdv::EObjectType::Application: return "Application";
|
||||
case sdv::EObjectType::Proxy: return "Proxy";
|
||||
case sdv::EObjectType::Stub: return "Stub";
|
||||
case sdv::EObjectType::Utility: return "Utility";
|
||||
default: return "Unknown";
|
||||
}
|
||||
};
|
||||
|
||||
// Class flags
|
||||
auto fnPrintClassFlags = [](uint32_t uiFlags)
|
||||
{
|
||||
@@ -263,7 +259,7 @@ int ListClasses(const SContext& rsContext, const sdv::TObjectPtr& rptrRepository
|
||||
{
|
||||
sdv::sequence<sdv::SClassInfo> seqClasses = pModuleInfo->GetClassList(rsModuleInfo.tModuleID);
|
||||
for (const sdv::SClassInfo& rsClassInfo : seqClasses)
|
||||
vecShortClassList.push_back({ rsClassInfo.ssClassName, fnPrintList(rsClassInfo.seqClassAliases) });
|
||||
vecShortClassList.push_back({ rsClassInfo.ssName, fnPrintList(rsClassInfo.seqClassAliases) });
|
||||
}
|
||||
|
||||
// Print the module list
|
||||
@@ -279,10 +275,10 @@ int ListClasses(const SContext& rsContext, const sdv::TObjectPtr& rptrRepository
|
||||
sdv::sequence<sdv::SClassInfo> seqClasses = pModuleInfo->GetClassList(rsModuleInfo.tModuleID);
|
||||
for (const sdv::SClassInfo& rsClassInfo : seqClasses)
|
||||
vecClassList.push_back({
|
||||
rsClassInfo.ssClassName,
|
||||
rsClassInfo.ssName,
|
||||
fnPrintList(rsClassInfo.seqClassAliases),
|
||||
rsClassInfo.ssDefaultObjectName,
|
||||
fnPrintClassType(rsClassInfo.eType),
|
||||
sdv::ObjectType2String(rsClassInfo.eType),
|
||||
fnPrintClassFlags(rsClassInfo.uiFlags),
|
||||
std::to_string(static_cast<int64_t>(rsModuleInfo.tModuleID)),
|
||||
fnPrintList(rsClassInfo.seqDependencies) });
|
||||
@@ -309,23 +305,6 @@ int ListComponents(const SContext& rsContext, const sdv::TObjectPtr& rptrReposit
|
||||
return REPOSITORY_SERVICE_ACCESS_ERROR;
|
||||
}
|
||||
|
||||
// Class type
|
||||
auto fnPrintClassType = [](sdv::EObjectType eType)
|
||||
{
|
||||
switch (eType)
|
||||
{
|
||||
case sdv::EObjectType::SystemObject: return "SystemObject";
|
||||
case sdv::EObjectType::Device: return "Device";
|
||||
case sdv::EObjectType::BasicService: return "BasicService";
|
||||
case sdv::EObjectType::ComplexService: return "ComplexService";
|
||||
case sdv::EObjectType::Application: return "Application";
|
||||
case sdv::EObjectType::Proxy: return "Proxy";
|
||||
case sdv::EObjectType::Stub: return "Stub";
|
||||
case sdv::EObjectType::Utility: return "Utility";
|
||||
default: return "Unknown";
|
||||
}
|
||||
};
|
||||
|
||||
// Object flags
|
||||
auto fnPrintObjectFlags = [](uint32_t uiFlags)
|
||||
{
|
||||
@@ -369,9 +348,9 @@ int ListComponents(const SContext& rsContext, const sdv::TObjectPtr& rptrReposit
|
||||
for (const sdv::core::SObjectInfo& rsObjectInfo : seqObjects)
|
||||
vecObjectList.push_back({
|
||||
std::to_string(static_cast<int64_t>(rsObjectInfo.tModuleID)),
|
||||
rsObjectInfo.sClassInfo.ssClassName,
|
||||
rsObjectInfo.sClassInfo.ssName,
|
||||
rsObjectInfo.ssObjectName,
|
||||
fnPrintClassType(rsObjectInfo.sClassInfo.eType),
|
||||
sdv::ObjectType2String(rsObjectInfo.sClassInfo.eType),
|
||||
fnPrintObjectFlags(rsObjectInfo.uiFlags),
|
||||
std::to_string(static_cast<int64_t>(rsObjectInfo.tModuleID)) });
|
||||
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/********************************************************************************
|
||||
* 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
|
||||
*
|
||||
* Contributors:
|
||||
* Erik Verhoeven - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
#ifndef LIST_ELEMENTS_H
|
||||
#define LIST_ELEMENTS_H
|
||||
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/********************************************************************************
|
||||
* 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
|
||||
*
|
||||
* Contributors:
|
||||
* Erik Verhoeven - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
#include "../../global/process_watchdog.h"
|
||||
#include <support/sdv_core.h>
|
||||
#include "../../global/cmdlnparser/cmdlnparser.cpp"
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/********************************************************************************
|
||||
* 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
|
||||
*
|
||||
* Contributors:
|
||||
* Erik Verhoeven - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
#ifndef TABLE_H
|
||||
#define TABLE_H
|
||||
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/********************************************************************************
|
||||
* 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
|
||||
*
|
||||
* Contributors:
|
||||
* Erik Verhoeven - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
#include "start_stop_service.h"
|
||||
#include "../../global/cmdlnparser/cmdlnparser.h"
|
||||
#include <interfaces/process.h>
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/********************************************************************************
|
||||
* 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
|
||||
*
|
||||
* Contributors:
|
||||
* Erik Verhoeven - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
#ifndef START_STOP_SERVICE_H
|
||||
#define START_STOP_SERVICE_H
|
||||
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/********************************************************************************
|
||||
* 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
|
||||
*
|
||||
* Contributors:
|
||||
* Erik Verhoeven - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
#include "startup_shutdown.h"
|
||||
#include "../../global/cmdlnparser/cmdlnparser.h"
|
||||
#include <interfaces/process.h>
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
/********************************************************************************
|
||||
* 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
|
||||
*
|
||||
* Contributors:
|
||||
* Erik Verhoeven - initial API and implementation
|
||||
********************************************************************************/
|
||||
|
||||
#ifndef STARTUP_SHUTDOWN_H
|
||||
#define STARTUP_SHUTDOWN_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user