You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/02.uno/boards/uno-q/tutorials/01.user-manual/content.md
+54-2Lines changed: 54 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -793,7 +793,11 @@ While the `Bridge` library is what you use in your code, the Router is the traff
793
793
794
794
**Key Features:**
795
795
796
-
-**Multipoint Communication:** Unlike simple serial communication (which is typically point-to-point), the Router allows multiple Linux processes to communicate with the MCU simultaneously. For example, you could have a Python script reading sensor data while a separate C++ application commands motors, both interacting with the same running Sketch.
796
+
-**Multipoint Communication:** Unlike simple serial communication (which is typically point-to-point), the Router allows multiple Linux processes to communicate with the MCU simultaneously (and with each other).
797
+
798
+
**Linux ↔ MCU:** Multiple Linux processes can interact with the MCU simultaneously (e.g., a Python script reading sensors while a separate C++ application commands motors).
799
+
800
+
**Linux ↔ Linux:** You can use the Router to bridge different applications running on the MPU. For example, a Python script can expose an RPC function that another Python or C++ application calls directly, allowing services to exchange data without involving the MCU at all.
797
801
798
802
-**Service Discovery:** Clients (like your Python script or the MCU Sketch) "register" functions they want to expose. The Router keeps a directory of these functions and routes calls to the correct destination.
-`notify(method, args...)`: Invokes a function on the Linux side without waiting for a response (fire-and-forget).
823
876
-`provide(name, function)`: Exposes a local MCU function to Linux. Note: The function executes in the high-priority background RPC thread. Keep these functions short and thread-safe.
824
877
-`provide_safe(name, function)`: Exposes a local MCU function, but ensures it executes within the main `loop()` context. Use this if your function interacts with standard Arduino APIs (like `digitalWrite` or `Serial`) to avoid concurrency crashes.
825
-
-`update()`: Process incoming requests.
826
878
827
879
`RpcCall`
828
880
- Helper class representing an asynchronous RPC. If its `.result` method is invoked, it waits for the response, extracts the return value, and propagates error codes if needed.
0 commit comments