Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sensors/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/Kconfig
25 changes: 25 additions & 0 deletions sensors/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# ##############################################################################
# apps/sensors/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
#
# ##############################################################################

nuttx_add_subdirectory()

nuttx_generate_kconfig(MENUDESC "Sensors")
23 changes: 23 additions & 0 deletions sensors/Make.defs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
############################################################################
# apps/sensors/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################

include $(wildcard $(APPDIR)/sensors/*/Make.defs)
25 changes: 25 additions & 0 deletions sensors/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
############################################################################
# apps/sensors/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################

MENUDESC = "Sensors"

include $(APPDIR)/Directory.mk
32 changes: 32 additions & 0 deletions sensors/netsensor/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#

config SENSORS_NETSENSOR
tristate "Netsensor"
default n
depends on UORB
depends on USENSOR
depends on NET_UDP
---help---
Program for a networked sensor that publishes data received over UDP as
uORB topics.

if SENSORS_NETSENSOR

comment "Program options"

config SENSORS_NETSENSOR_PRIORITY
int "Priority"
default 100
---help---
The task priority for the netsensor process.

config SENSORS_NETSENSOR_STACKSIZE
int "Stack size"
default DEFAULT_TASK_STACKSIZE
---help---
The stack size for the netsensor process.

endif # SENSORS_NETSENSOR
23 changes: 23 additions & 0 deletions sensors/netsensor/Make.defs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
############################################################################
# apps/sensors/netsensor/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################

ifneq ($(CONFIG_SENSORS_NETSENSOR),)
CONFIGURED_APPS += $(APPDIR)/sensors/netsensor
endif
32 changes: 32 additions & 0 deletions sensors/netsensor/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
############################################################################
# apps/sensors/netsensor/Makefile
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################

include $(APPDIR)/Make.defs

MODULE = $(CONFIG_SENSORS_NETSENSOR)
PRIORITY = $(CONFIG_SENSORS_NETSENSOR_PRIORITY)
STACKSIZE = $(CONFIG_SENSORS_NETSENSOR_STACKSIZE)
PROGNAME = netsensor

# Topics to advertise

MAINSRC = netsensor_main.c

include $(APPDIR)/Application.mk
10 changes: 10 additions & 0 deletions sensors/netsensor/helptext.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#define HELP_TEXT \

Check failure on line 1 in sensors/netsensor/helptext.h

View workflow job for this annotation

GitHub Actions / check

Missing file header comment block
"USAGE:\n netsensor [options] topic\n\nARGUMENTS:\n topic The " \

Check failure on line 2 in sensors/netsensor/helptext.h

View workflow job for this annotation

GitHub Actions / check

Path relative to repository other than "nuttx" must begin with the root directory
"uORB this netsensor will publish.\n\nOPTIONS:\n -h Display th" \
"is help message and quit.\n -p <port> Specify the UDP port to read f" \
"rom. Default: 5555\n -d <devno> Specify the device number that will b" \
"e used for the new topic\n instance. Default: increment to" \
" next available.\n -q <len> Specify the queue length (buffer length" \
") uORB will use to\n store published data. Default: 5\n " \
" -t If this flag is passed, timestamps will be overwritten by th" \
"e\n time the data was received over UDP.\n"
15 changes: 15 additions & 0 deletions sensors/netsensor/helptext.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
USAGE:
netsensor [options] topic

ARGUMENTS:
topic The uORB this netsensor will publish.

OPTIONS:
-h Display this help message and quit.
-p <port> Specify the UDP port to read from. Default: 5555
-d <devno> Specify the device number that will be used for the new topic
instance. Default: increment to next available.
-q <len> Specify the queue length (buffer length) uORB will use to
store published data. Default: 5
-t If this flag is passed, timestamps will be overwritten by the
time the data was received over UDP.
Loading
Loading