Skip to content

Conversation

@linguini1
Copy link
Contributor

Summary

Introduces a user-space netsensor: a uORB sensor which publishes data received
over UDP as a uORB topic.

A second application, netsensor_stream, allows users to stream a uORB topic of
their choosing over UDP. This can interface with a netsensor instance on a
different device over the network.

Impact

This new sensor will allow users to conduct more complex testing using uORB.
Small network devices no longer need large CSV files containing simulated data
for fakesensor uORB testing, but instead can receive this data piece-wise over
the network.

In addition, this opens the door to easy sensor network development with NuttX,
as sensors from other network nodes can be read from as regular uORB topics.

Testing

TBD, this is a draft.

Adds a new application which allows the registration of a uORB sensor
(similar to faksensor) that publishes data received over a UDP socket to
a uORB topic of the user's choosing. Implemented in userspace.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
Added a program which allows the user to stream uORB data from their
selected topic over UDP in a form which can be interpreted by a
netsensor device.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
Comment on lines +78 to +79
const struct orb_metadata *meta;
struct sockaddr_in addr; /* TODO: IPv6 support */
Copy link
Contributor

@acassis acassis Jan 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@linguini1 not an issue, but normally structs and complex types are defined early inside a function, I think this is just a convention that Greg created, but in some cases it avoids misalignment, i.e. it you have an uint8_t followed by a struct definition. Maybe others here have a better explanation why this convention is used, since the C compiler don't care much about the variables position


/* Set up topic advertisement */

if (usedevno)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (usedevno)
if (usedevno > 0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants