ZSD2023-ZBus the lightweight and flexible Zephyr bus.pdf

編號:144834 PDF 43頁 874.24KB 下載積分:VIP專享
下載報告請您先登錄!

ZSD2023-ZBus the lightweight and flexible Zephyr bus.pdf

1、ZBus-the lightweight and flexible Zephyr message busRodrigo Peixoto,Edge-UFAL/Citriniorodrigopex1MotivationThread AThread BONE-TO-ONEFIFOLIFOStackMessage queueMailboxPipe2MotivationThread AThread BThread CThread DFIFOLIFOStackMessage queueMailboxPipeONE-TO-MANY3MotivationThread AThread BThread CThre

2、ad DThread EMANY-TO-MANYFIFOLIFOStackMessage queueMailboxPipe4Solution ideaMessage busThread AThread BThread CThread DThread EFIFOLIFOStackMessage queueMailboxPipeBus5Bus topologies6ONE-TO-ONEONE-TO-MANYMANY-TO-MANYEmbedded systems challenges Memory constraints Processing limitations Battery-powered

3、 devices7 ZBusChan 1Chan 2Chan 3Chan N8Thread AThread BThread CSubscribersAsynchronous ZBusChan 1Chan 2Chan 3Chan NDecoupled9TimeSpaceSynchronizationThread AThread BThread CCallback DCallback ESubscribersListenersAsynchronousSynchronousTimeSpaceSynchronizationDecoupledCoupled ZBusChan 1Chan 2Chan 3C

4、han N1011ThreadReadChannelAvailable actions12ThreadPublishNotify*ChannelAvailable actionsSubscriber Notification queue Listener Callbackexecuteput13Channel AChannel BMessage:“Hi!”Subscribers:Thread 2Listeners:listener1()listener2()Channel CChannel DBusEvent DispatcherThread 2Thread 1void listener1()

5、void listener2()125346Virtual Distributed Event DispatcherVDED is the bus logic responsible for sending notifications about message publications to the channels observers.There is no central entity that acts as an event dispatcher on ZBus.14Virtual Distributed Event Dispatcher ZBusThread 1Chan AThre

6、ad 2BroadcastexampleListener 1Listener 2Thread 3Thread 415Virtual Distributed Event Dispatcher16Virtual Distributed Event Dispatcher ZBusThread 1Chan AThread 2Chan BThread 4Thread 3High priority contextLow priority context1718ThreadClaim/FinishChannelAvailable actionsExample19ExampleButton20Example2

7、1StorageButtonExample22StorageBluetoothButtonExample23StorageBluetoothMockButtonExample24StorageBluetoothMockButtonNB-IoTExample25StorageBluetoothMockButtonNB-IoTUsage considerationsPROSPromotes event-driven architectureUnified way to make threads talk and share dataCode decoupling(time,space,and sy

8、nchronization)*Promotes reuseIncrease testability(+controllability+observability)Extensible(claim/finish+user_data)CONSTake time to master itToo many possibilitiesNot for intensive byte streamingNo delivery guarantees for subscribers26ZBus Features Backlog 27ZBus async APIs28 Run inside an ISR could

9、 be possible Would avoid using work queues Dedicated ZBus thread ZBus omni subscriber29 The omni subscriber will listen to all the channels It can be used to extend the bus featuresIntegration and samples30 Make ZBus an Input subsys event distributor backend Add samples(Bluetooth,Sensors,FSM,etc.)ZB

10、us for multi-core31ZBus for multi-target32TARGET#1(ARM)TARGET#2(RISCV)BluetoothZBus desktop33+ZBus Discord Channel 34ZBus Roadmap topic at Zephyr Discord channelTips and tricks35 Avoid excessive use of them,they are running during the publishing processListeners36 Think of them as an ISR.They must r

11、un as quickly as possible Do not sleep inside listeners.It will increase the publishing latencyListeners37 Use zbus_chan_const_msg inside listeners.The channels are already locked!Use a work queue or separated thread instead of executing something heavy inside a listener Do not use subscribers when

12、losses and duplications cannot be toleratedSubscribers38 PR with confirmed channels sample submitted Use listeners in conjunction with message queues Take care with publishing loopsUndesired loops39 Avoid loops on the bus diagram Observer 1Chan AObserver 2Chan BUndesired loops40 Take care with chain

13、ed publishing loops Observer 1Chan AObserver 3Chan BObserver 2Observer 4Chan CChan D Do not use ZBus functions inside an ISRISR41 Postpone that by using work queues insteadExtras42 The channels can be used as a concurrent property system Isolate the hardware code using channels Use channels as modules interface in/outQuestions&Answers43Thank you!

友情提示

1、下載報告失敗解決辦法
2、PDF文件下載后,可能會被瀏覽器默認打開,此種情況可以點擊瀏覽器菜單,保存網頁到桌面,就可以正常下載了。
3、本站不支持迅雷下載,請使用電腦自帶的IE瀏覽器,或者360瀏覽器、谷歌瀏覽器下載即可。
4、本站報告下載后的文檔和圖紙-無水印,預覽文檔經過壓縮,下載后原文更清晰。

本文(ZSD2023-ZBus the lightweight and flexible Zephyr bus.pdf)為本站 (2200) 主動上傳,三個皮匠報告文庫僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對上載內容本身不做任何修改或編輯。 若此文所含內容侵犯了您的版權或隱私,請立即通知三個皮匠報告文庫(點擊聯系客服),我們立即給予刪除!

溫馨提示:如果因為網速或其他原因下載失敗請重新下載,重復下載不扣分。
客服
商務合作
小程序
服務號
折疊
午夜网日韩中文字幕,日韩Av中文字幕久久,亚洲中文字幕在线一区二区,最新中文字幕在线视频网站