Program Listing for File core.idl#
↰ Return to documentation for file (interfaces\core.idl)
/********************************************************************************
* 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
*
* This file provides the core interface definitions of the core SDV framework.
*
* Contributors:
* Erik Verhoeven - initial API and implementation
********************************************************************************/
#include "core_types.idl"
#verbatim #include "../support/pointer.h"
#verbatim #include "../support/iterator.h"
#verbatim #include "../support/string.h"
#verbatim #include "../support/sequence.h"
#verbatim #include "../support/any.h"
#verbatim_begin
#if defined(_WIN32) && defined(GetClassInfo)
#undef GetClassinfo
#endif
#ifdef _MSC_VER
#pragma warning(disable: 4190) // Disable C-linkage warning when using C++ objects.
#endif
#verbatim_end
module sdv
{
interface IInterfaceAccess
{
interface_t GetInterface(in interface_id idInterface);
#verbatim_begin
template <typename TInterface>
TInterface* GetInterface()
{
return GetInterface(sdv::GetInterfaceId<TInterface>()).template get<TInterface>();
}
#verbatim_end
};
enum EObjectType : uint32
{
undefined = 0,
system_object = 1,
device = 10,
platform_abstraction = 11,
vehicle_bus = 12,
basic_service = 20,
sensor = 21,
actuator = 22,
complex_service = 30,
vehicle_function = 31,
application = 50,
proxy = 100,
stub = 101,
utility = 1000,
};
enum EObjectFlags : uint32
{
singleton = 256,
};
struct SClassInfo
{
u8string ssModulePath;
u8string ssName;
sequence<u8string> seqClassAliases;
u8string ssDefaultObjectName;
u8string ssDefaultConfig;
EObjectType eType;
uint32 uiFlags;
sequence<u8string> seqDependencies;
};
interface IObjectFactory
{
sequence<u8string> GetClassNames() const;
SClassInfo GetClassInfo(in u8string ssClassName) const;
IInterfaceAccess CreateObject(in u8string ssClassName);
void DestroyObject(in IInterfaceAccess sdvObject);
void DestroyAllObjects();
};
enum EObjectState : uint32
{
initialization_pending = 0,
initializing = 10,
initialization_failure = 11,
initialized = 12,
configuring = 20,
config_error = 21,
running = 30,
runtime_error = 31,
shutdown_in_progress = 90,
destruction_pending = 99,
};
enum EOperationMode : uint32
{
configuring = 20,
running = 30,
};
interface IObjectControl
{
void Initialize(in u8string ssObjectConfig);
EObjectState GetObjectState() const;
void SetOperationMode(in EOperationMode eMode);
u8string GetObjectConfig() const;
void Shutdown();
};
interface IObjectDestroy
{
void DestroyObject();
};
interface IObjectLifetime
{
void Increment();
boolean Decrement();
uint32 GetCount() const;
};
enum EAttributeFlags : uint32
{
read_only = 0x100,
};
interface IAttributes
{
sequence<u8string> GetNames() const;
any Get(in u8string ssAttribute) const;
boolean Set(in u8string ssAttribute, in any anyAttribute);
uint32 GetFlags(in u8string ssAttribute) const;
};
}; // module sdv
#verbatim_begin
extern "C" SDV_SYMBOL_PUBLIC bool HasActiveObjects();
extern "C" SDV_SYMBOL_PUBLIC sdv::IInterfaceAccess* GetModuleFactory(uint32_t interfaceVersion);
extern "C" SDV_SYMBOL_PUBLIC const char* GetManifest();
#verbatim_end
#include "mem.idl"