এই পৃষ্ঠায় বাধ্যতামূলক ও ঐচ্ছিক পরিষেবা বান্ডেল মেটাডেটা ফিল্ড কীভাবে ব্যবহার করতে হয় তা ব্যাখ্যা করা হয়েছে।
বাধ্যতামূলক মেটাডেটা
পরিষেবা বান্ডেল এক্সিকিউশন মডেলের জন্য প্রতিটি পরিষেবা বান্ডেলকে নিম্নলিখিত মেটাডেটা সংজ্ঞায়িত করতে হবে:
- 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 প্রোভাইডার মেটাডেটা যুক্ত করতে,
ঐচ্ছিক vsidl_schemas_path / diagnostics_config_path /
(শুধুমাত্র SOME/IP কনফিগারেশন APEX) external_service_bundle_metadata_path ফিল্ডে জেনারেট করা মেটাডেটা ফাইল সহ
prebuilt_etc ফাইলের পাথ প্রদান করুন:
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"
}
}