SOME/IP স্ট্যাক একটি অ্যান্ড্রয়েড ইন্টারফেস ডেফিনিশন ল্যাঙ্গুয়েজ (AIDL) ইন্টারফেসের মাধ্যমে নিম্ন-স্তরের SOME/IP ট্রান্সপোর্ট লজিক পরিচালনা করে। এই স্ট্যাকটি SOME/IP ইভেন্ট এবং রিমোট প্রসিডিউর কল (RPC) প্রেরণ ও গ্রহণ করে। এই ডকুমেন্টটিতে নিম্নলিখিত ধারণাগুলো বর্ণনা করা হয়েছে:
Reference implementation: SDV provides a non-production reference sample implementation for a SOME/IP stack.
Binder API: The
ISomeIpStackinterface defines methods for interacting with a SOME/IP stack instance.SELinux: A sample SELinux configuration for the reference stack enables binder communication and granular file system access.
While this stack reads the SOME/IP wire format, it leaves the payload as opaque binary blobs and forwards the payload to the SOME/IP broker.
SOME/IP স্ট্যান্ডার্ডে স্ট্যাক বা স্ট্যাক এপিআই লেয়ারের কোনো সংজ্ঞা দেওয়া নেই। SDV একটি AIDL এপিআই প্রদান করে যা স্ট্যান্ডার্ডটির পরিচিত সংজ্ঞাগুলোর মধ্যেই কাজ করে এবং বিদ্যমান স্ট্যাকগুলোকে অভিযোজিত করার জন্য ন্যূনতম পরিমাণ কোডের প্রয়োজন হয়।
This API lets you select different implementations of the stack and simplifies the integration of the stack with other components in the system.
রেফারেন্স বাস্তবায়ন
SDV provides a non-production reference sample implementation for a SOME/IP stack, and consists of a thin wrapper atop the open source COVESA vsomeip library. The system deploys the reference stack only to sdv_core_cf and sdv_core_arm64 targets, and init.rc starts it on the VM with CID=3 .
on property:dev.bootcomplete=1 && property:ro.sdv.vsock_local_cid=3
start sdv_someip_stack_agent
Define the production deployment configuration for your OEM-defined stack. To learn more, see Integrate SOME/IP with SDV .
কনফিগারেশন
রেফারেন্স স্ট্যাকটি vSomeIP লাইব্রেরির জন্য একটি কনফিগারেশন ঘোষণা করে। কনফিগারেশন কাঠামোর বিবরণের জন্য ‘কনফিগারেশন ফাইল কাঠামো’ দেখুন। কনফিগারেশনের অংশ হিসেবে, আমরা SOME/IP SD প্যারামিটারগুলো নির্দিষ্ট করি, যেমন একটি মাল্টিকাস্ট অ্যাড্রেস এবং স্ট্যাক দ্বারা ব্যবহৃত পোর্ট।
বাইন্ডার এপিআই
ISomeIpStack ইন্টারফেসটি core_services/some_ip/aidl/google/sdv/someip এ ঘোষিত হয়েছে। ISomeIpStack ইন্টারফেসটি একটি SOME/IP স্ট্যাক ইনস্ট্যান্সের সাথে ইন্টারঅ্যাক্ট করার জন্য মেথডসমূহ সংজ্ঞায়িত করে এবং এই আইটেমগুলোর জন্য প্রয়োজনীয় বৈশিষ্ট্যসমূহ প্রদান করে।
পরিষেবার প্রাপ্যতা
register_availability_callbackRegisters a callback for service availability changes.monitor_serviceInstructs the stack to monitor a specific service's availability.unregister_availability_callbackUnregisters the availability callback.on_sdv_service_availabilityIndicates a change in SDV service availability.
রিমোট প্রসিডিউর কল (RPC)
আপনি নিম্নলিখিত উপায়ে একটি RPC অনুরোধ পাঠাতে পারেন:
- প্রতিক্রিয়ার জন্য অপেক্ষা করতে
rpc_transact - প্রতিক্রিয়ার জন্য অপেক্ষা না করার জন্য
rpc_oneway
RPC অনুরোধ পরিচালনার জন্য:
register_rpc_request_callbackRegisters a callback for incoming RPC requests.unregister_rpc_request_callbackUnregisters the RPC request callback.
ইভেন্ট বিজ্ঞপ্তি
register_event_notification_callbackRegisters a callback for subscribed event notifications.unregister_event_notification_callbackUnregisters the event notification callback.on_sdv_topic_availabilityIndicates a change in SDV topic availability.subscribeSubscribes to a specific event from an event group.unsubscribeUnsubscribes from a specific event.publishপ্রদত্ত পেলোড সহ একটি ইভেন্ট প্রকাশ করে।
SELinux
The device/google/sdv/sdv_core_base/sepolicy/samples/vendor/ folder contains a sample SELinux configuration for the reference stack:
sdv_someip_stack_default.tedefines thesdv_someip_stack_defaulttype and maps it to attributes and contexts.file_contextsmaps binary and data folders to appropriate contexts.
The configuration enables Binder communication between the stack and the broker, allowing access to networking qualities and granular access to the file system of the device.