system/uorb: adds non-wakeup subscription support。 #3373
+102
−15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds non-wakeup subscription support to the uORB subsystem, enabling applications to subscribe to sensor topics without waking the system when new data arrives. This feature is critical for power-sensitive applications where battery life is prioritized over real-time data delivery.
Commit 1: Core API (edd1cb2) -
system/uorb/uORB/Adds new subscription APIs that enable non-wakeup mode:
Implementation:
orb_advsub_open()to acceptnon_wakeupparameternon_wakeupis true, callsioctl(fd, SNIOC_SET_NONWAKEUP, true)orb_subscribe_multi()unchanged (defaults to wakeup mode)system/uorb/uORB/uORB.c: Added new functions and parametersystem/uorb/uORB/uORB.h: Added API declarations and documentationCommit 2: CLI Tool Support (2079026) -
system/uorb/listener.cAdds
-uflag touorb_listenerfor testing non-wakeup subscriptions:Impact
Users
New Functionality:
-uflagAPI Changes:
Backward Compatibility:
Build Process
Testing
~~~
ap> ][01/20 22:31:27] [ 7] [cp] bt_temperature_comp_thread, temperature: 32
uorb_listener -n 10 sensor_accel
Mointor objects num:1
object_name:sensor_accel, object_instance:0
sensor_accel(now:20447017000):timestamp:20430408830,x:0.365890,y:0.218209,z:9.730313,temperature:29.453125
sensor_accel(now:20447057000):timestamp:20430449030,x:0.404197,y:0.306794,z:9.785380,temperature:29.453125
[01/20 22:31:28] [ 0] [audio] CPU USAGE: busy=1 cpu_sleep=0 bus_sleep=0 subsys_sleep=99(pd)
sensor_accel(now:20447097200):timestamp:20430489230,x:0.344342,y:0.323553,z:9.680036,temperature:29.453125
sensor_accel(now:20447137400):timestamp:20430529530,x:0.361101,y:0.249333,z:9.792563,temperature:29.453125
sensor_accel(now:20447177700):timestamp:20430569730,x:0.298852,y:0.313977,z:9.754255,temperature:29.453125
sensor_accel(now:20447217800):timestamp:20430609930,x:0.387437,y:0.249333,z:9.792563,temperature:29.453125
sensor_accel(now:20447257900):timestamp:20430650130,x:0.365890,y:0.290035,z:9.713554,temperature:29.453125
sensor_accel(now:20447298100):timestamp:20430690330,x:0.363495,y:0.261304,z:9.802140,temperature:29.453125
sensor_accel(now:20447338300):timestamp:20430730630,x:0.274910,y:0.297217,z:9.876360,temperature:29.453125
sensor_accel(now:20447379000):timestamp:20430770830,x:0.332371,y:0.313977,z:9.787775,temperature:29.453125
Object name:sensor_accel0, recieved:10
Total number of received Message:10/10
ap>
~~~