이 페이지에서는 필수 및 선택적 서비스 번들 메타데이터 필드를 사용하는 방법을 설명합니다.
필수 메타데이터
서비스 번들 실행 모델에서는 각 서비스 번들이 다음 메타데이터를 정의해야 합니다.
- SDV 이름 지정 규칙에 따른 서비스 이름
- 서비스 번들 버전의 정수 및 문자열 표현
- 서비스 번들 라이브러리의 경로
sdv_service_bundle_metadata {
# Name of the service bundle.
#
# Must follow SDV service naming convention rules.
# Ref: https:/automotive/sdv/core-areas/naming-conventions
#
# When using VSIDL catalog and middleware generation, this name must be
# equal to the service bundle name defined in the catalog.
name: "TheNameOfTheServiceBundle"
# Service Bundle Version Number.
# Must be non-negative number.
version_number: 1
# Service Bundle Version Name.
# Must be non-empty string.
version_name: "1.0 alpha"
# Path to the native library to be loaded as service bundle.
# Must be the relative path from the APEX root directory
native_library_path: "lib64/libservice_bundle.so"
}
# Service bundle one.
sdv_service_bundle_metadata {
name: "ServiceBundleOne"
...
}
# Service bundle two.
sdv_service_bundle_metadata {
name: "ServiceBundleTwo"
...
}
선택사항 메타데이터
선택적 메타데이터는 특정 SDV 기능을 지원합니다.
오케스트레이션 메타데이터
SDV 오케스트레이션 구성은 서비스 번들 시작 및 종료 동작을 제어하는 메커니즘을 제공합니다. SDV 조정 구성은 서비스 번들 인스턴스에서 작업이 언제 어떻게 실행되는지 결정하는 규칙 집합을 정의합니다. 이러한 규칙은 차량, 전원, 맞춤 모드를 기반으로 합니다.
조정 구성을 서비스 번들에 연결하려면 선택사항인 orchestration_config_path 필드에 prebuilt_etc 모듈의 경로를 제공합니다.
sdv_service_bundle_metadata {
...
# Path to the orchestration config file.
# Warning: Shall be relative path to the APEX root directory.
orchestration_config_path: "etc/configuration/orchestration/configuration.textproto"
}
승인 정책 경로
SDV 승인 정책은 서비스 번들의 권한을 선언하는 메커니즘을 제공합니다. 승인 정책은 서비스 번들이 수행할 수 있는 작업 (예: 게시, 구독, 제공, 호출)을 정의합니다.
승인 정책을 서비스 번들에 연결하려면 선택사항인 authorization_policy_path 필드에 prebuilt_etc 모듈의 경로를 제공하세요.
sdv_service_bundle_metadata {
...
# Path to the authorization policy file.
# Warning: Shall be relative path to the APEX root directory.
authorization_policy_path: "etc/authz/permissions.textproto"
}
VSIDL 제공업체 메타데이터
VSIDL 제공업체 메타데이터는 서비스 번들을 진단 및 SOME/IP 플랫폼 에이전트와 통합하는 메커니즘의 일부입니다.
VSIDL 제공자 메타데이터를 서비스 번들과 연결하려면 생성된 메타데이터 파일이 포함된 prebuilt_etc 파일의 경로를 선택적 vsidl_schemas_path / diagnostics_config_path/(SOME/IP 구성 APEX만 해당) external_service_bundle_metadata_path 필드에 제공하세요.
sdv_service_bundle_metadata {
...
# Path to the file with protobuf schemas extracted from bundle's VSIDL definition.
# Warning: Must be relative path to the APEX root directory.
vsidl_schemas_path: "etc/vsidl_provider/TheNameOfTheServiceBundle-vsidl-config.binpb"
# Path to the diagnostics config file.
# Warning: Shall be relative path to the APEX root directory.
diagnostics_config_path: "etc/vsidl_provider/TheNameOfTheServiceBundle-diag-config.binpb"
# Path to the SOME/IP config file. To be used in SOME/IP configuration apex only.
# Warning: Must be relative path to the APEX root directory.
external_protocol_mapping_path: "etc/vsidl_provider/someip-config.binpb"
}
자세한 내용은 VSIDL 프로바이더 전체보기를 참고하세요.
로그 태그 메타데이터
로그 태그 속성은 서비스 번들에서 생성된 로그의 고유 식별자를 지정합니다. 이 속성이 정의되지 않은 경우 패키지 이름, 서비스 번들 이름, 인스턴스 이름을 사용하여 기본 태그가 자동으로 생성됩니다. 명확성을 극대화하려면 간결하고 고유한 로그 태그를 정의하세요.
커스텀 메타데이터
맞춤 메타데이터를 사용하면 OEM과 공급업체가 특정 서비스 번들 메타데이터를 정의할 수 있습니다.
sdv_service_bundle_metadata {
...
# Custom service bundle metadata map.
# Key is a string, value is a string.
#
# 1st custom metadata value.
custom_metadata {
key: "question"
value: "Answer to the Ultimate Question of Life, the Universe, and Everything"
}
# 2nd custom metadata value.
custom_metadata {
key: "answer" value: "42"
}
}
sdv_service_bundle_metadata {
...
# Custom metadata values are stored in etc/.
custom_metadata {
key: "path_to_custom_metadata"
value: "etc/configuration/file"
}
}
전체 예
# proto-file: //system/software_defined_vehicle/core_services/service_bundles_registry/proto/sdv_service_bundles_manifest.proto
# proto-message: SdvServiceBundleManifestEntry
# SDV service bundle.
sdv_service_bundle_metadata {
# Name of the service bundle.
# Must follow SDV service naming convention rules.
name: "TheNameOfTheServiceBundle"
# Service Bundle Version Number.
# Must be non-negative number.
version_number: 42
# Service Bundle Version Name.
# Must be non-empty string.
version_name: "42.0.beta"
# Path to the native library to be loaded as service bundle.
# Must be the relative path from the APEX root directory.
native_library_path: "lib64/libservice_bundle.so"
# The log tag used for Android logging for the service bundle.
# If not specified, a tag derived from service bundle FQIN will be used.
log_tag: "current_service_bundle"
# Path to the orchestration config file.
# Warning: Shall be relative path to the APEX root directory.
orchestration_config_path: "etc/configuration/orchestration/configuration.textproto"
# Path to the file with protobuf schemas extracted from bundle's VSIDL definition.
# Warning: Must be relative path to the APEX root directory.
vsidl_schemas_path: "etc/vsidl_provider/TheNameOfTheServiceBundle-vsidl-config.binpb"
# Path to the diagnostics config file.
# Warning: Must be relative path to the APEX root directory.
diagnostics_config_path: "etc/vsidl_provider/TheNameOfTheServiceBundle-diag-config.binpb"
# Path to the SOME/IP config file. To be used in SOME/IP configuration apex only.
# Warning: Must be relative path to the APEX root directory.
external_protocol_mapping_path: "etc/vsidl_provider/someip-config.binpb"
# Custom service bundle metadata string.
# Key is a string, value is a string.
custom_metadata {
key: "key" value: "value"
}
# Custom metadata values are stored in etc/.
custom_metadata {
key: "path_to_custom_metadata"
value: "etc/configuration/file"
}
}