Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
3f6769d4
Commit
3f6769d4
authored
7 years ago
by
Beat Küng
Browse files
Options
Downloads
Patches
Plain Diff
uorb: add module documentation
parent
f2554916
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/modules/uORB/uORBMain.cpp
+28
-0
28 additions, 0 deletions
src/modules/uORB/uORBMain.cpp
with
28 additions
and
0 deletions
src/modules/uORB/uORBMain.cpp
+
28
−
0
View file @
3f6769d4
...
...
@@ -44,6 +44,34 @@ extern "C" { __EXPORT int uorb_main(int argc, char *argv[]); }
static
uORB
::
DeviceMaster
*
g_dev
=
nullptr
;
static
void
usage
()
{
PRINT_MODULE_DESCRIPTION
(
R"DESCR_STR(
### Description
uORB is the internal pub-sub messaging system, used for communication between modules.
It is typically started as one of the very first modules and most other modules depend on it.
### Implementation
No thread or work queue is needed, the module start only makes sure to initialize the shared global state.
Communication is done via shared memory.
The implementation is asynchronous and lock-free, ie. a publisher does not wait for a subscriber and vice versa.
This is achieved by having a separate buffer between a publisher and a subscriber.
The code is optimized to minimize the memory footprint and the latency to exchange messages.
The interface is based on file descriptors: internally it uses `read`, `write` and `ioctl`. Except for the
publications, which use `orb_advert_t` handles, so that they can be used from interrupts as well (on NuttX).
Messages are defined in the `/msg` directory. They are converted into C/C++ code at build-time.
If compiled with ORB_USE_PUBLISHER_RULES, a file with uORB publication rules can be used to configure which
modules are allowed to publish which topics. This is used for system-wide replay.
### Examples
Monitor topic publication rates. Besides `top`, this is an important command for general system inspection:
$ uorb top
)DESCR_STR"
);
PRINT_MODULE_USAGE_NAME
(
"uorb"
,
"communication"
);
PRINT_MODULE_USAGE_COMMAND
(
"start"
);
PRINT_MODULE_USAGE_COMMAND_DESCR
(
"status"
,
"Print topic statistics"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment