পরিষেবা বান্ডেল মেটাডেটা

এই পৃষ্ঠায় বাধ্যতামূলক এবং ঐচ্ছিক সার্ভিস বান্ডেল মেটাডেটা ফিল্ডগুলো কীভাবে ব্যবহার করতে হয় তা ব্যাখ্যা করা হয়েছে।

বাধ্যতামূলক মেটাডেটা

সার্ভিস বান্ডেল এক্সিকিউশন মডেল অনুযায়ী প্রতিটি সার্ভিস বান্ডেলকে নিম্নলিখিত মেটাডেটা সংজ্ঞায়িত করতে হয়:

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 সক্ষমতা সমর্থন করে।

অর্কেস্ট্রেশন মেটাডেটা

এসডিভি অর্কেস্ট্রেশন কনফিগারেশন সার্ভিস বান্ডেলের স্টার্টআপ এবং শাটডাউন আচরণ নিয়ন্ত্রণের জন্য একটি প্রক্রিয়া প্রদান করে। এসডিভি অর্কেস্ট্রেশন কনফিগারেশন একগুচ্ছ নিয়ম নির্ধারণ করে, যা ঠিক করে সার্ভিস বান্ডেল ইনস্ট্যান্সগুলোর উপর কখন এবং কীভাবে বিভিন্ন অ্যাকশন সম্পাদিত হবে। এই নিয়মগুলো ভেহিকেল, পাওয়ার এবং কাস্টম মোডের উপর ভিত্তি করে তৈরি।

সার্ভিস বান্ডেলের সাথে একটি অর্কেস্ট্রেশন কনফিগারেশন যুক্ত করতে, ঐচ্ছিক 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"
}

অনুমোদন নীতি পথ

এসডিভি অনুমোদন নীতি সার্ভিস বান্ডেলের জন্য অনুমতি ঘোষণার একটি পদ্ধতি প্রদান করে। এই অনুমোদন নীতি নির্ধারণ করে যে সার্ভিস বান্ডেলটি কী কী কাজ সম্পাদন করতে পারবে (যেমন পাবলিশ, সাবস্ক্রাইব, সার্ভ বা কল)।

সার্ভিস বান্ডেলের সাথে একটি অনুমোদন নীতি সংযুক্ত করতে, ঐচ্ছিক 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"
  }
}

তথ্যসূত্র