Event Bus
Lab 2: Event Bus Integration (EventBus + Advanced IPC)
Part 4 - IPC & Event Bus
1. โครงสร้างภาพรวม (Overview)
Why? - ทำไมต้องเรียนรู้เรื่องนี้
What? - จะได้เรียนรู้อะไร
How? - จะทำอย่างไร
2. หลักการทางเทคนิค (Technical Principles)
2.1 Event-Driven Architecture
2.2 Publish-Subscribe Flow
2.3 Event Bus Architecture (Part A)
2.4 Integration Architecture (Part B)
2.5 Initialization Sequence (Part B -- Critical!)
3. Part A: Event Bus (Ex4 - Simulated + IPC Data)
3.1 Event Types
3.2 Event Data Structure
3.3 Event Bus Core
3.4 Step-by-Step Implementation
3.5 Subscriber Registration Map
4. Part B: Advanced IPC Integration (Ex8 - Real Hardware)
4.1 Layout Helpers (AIC Layout System)
Function
Description
เทียบเท่า LVGL Manual
4.2 Layout Helpers vs Manual Positioning
4.3 Layout Structure ของ Part B
4.4 Data Flow Diagram
4.5 Event Bus Pub/Sub ใน Part B
4.6 Static Variables
4.7 Event Bus Callbacks (Subscribers)
4.8 LED Toggle Callback (IPC + GPIO + Logging)
4.9 Timer Callback (Heart of the System)
4.10 Main Function (Full UI Build)
5. องค์ความรู้และเทคนิค (Patterns & Tips)
5.1 Integration Checklist Pattern
5.2 Graceful Degradation Pattern
5.3 Button Edge Detection
5.4 Event Count as System Health Metric
5.5 Design Patterns ที่เกี่ยวข้อง
6. แบบฝึกหัด (Exercises)
Exercise 1: Event Counter Dashboard (Bar Chart) -- Part A
Exercise 2: Event-Driven State Machine -- Part A
Exercise 3: Sensor Threshold Alerts -- Part B
Exercise 4: IPC Health Card -- Part B
7. Quick Reference
Event Bus API (Part A)
AIC Event Bus API (Part B)
Function
Description
Layout Helper Functions (Part B)
Function
Description
IPC + Hardware Functions (Part B)
Function
Description
Architecture Principles
Application ในงาน Industrial
Use Case
คำอธิบาย
Last updated
Was this helpful?