linguini1 commented on code in PR #3296:
URL: https://github.com/apache/nuttx-apps/pull/3296#discussion_r2658412363


##########
system/smf/Kconfig:
##########
@@ -0,0 +1,28 @@
+# SMF (State Machine Framework) configuration options
+#
+# For syntax reference, see kconfig-language.txt in the NuttX tools repository.
+
+config APPS_SMF

Review Comment:
   All of these config options should be prefixed with `SYSTEM_SMF`. i.e. 
`SYSTEM_SMF_ANCESTOR_SUPPORT`



##########
system/smf/Make.defs:
##########
@@ -0,0 +1,25 @@
+############################################################################
+# apps/smf/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.
+#
+############################################################################
+
+ifeq ($(CONFIG_APPS_SMF),y)

Review Comment:
   Same here, `CONFIG_SYSTEM_SMF`



##########
examples/smf/hsm_psicc2_thread.h:
##########
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2024 Glenn Andrews
+ * State Machine example copyright (c) Miro Samek
+ *
+ * Implementation of the statechart in Figure 2.11 of
+ * Practical UML Statecharts in C/C++, 2nd Edition by Miro Samek
+ * https://www.state-machine.com/psicc2
+ * Used with permission of the author.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#ifndef _HSM_PSICC2_THREAD_H
+#define _HSM_PSICC2_THREAD_H
+
+#include <stdint.h>
+
+#define HSM_PSICC2_THREAD_STACK_SIZE       2048
+#define HSM_PSICC2_THREAD_PRIORITY         120
+#define HSM_PSICC2_THREAD_EVENT_QUEUE_SIZE 10

Review Comment:
   These should be Kconfig options if possible.



##########
examples/smf/hsm_psicc2_thread.c:
##########
@@ -0,0 +1,401 @@
+/*

Review Comment:
   As the check failures indicate, you'll need to follow the coding standard 
guideline. NuttX also has a top-of-file comment string you should use here 
(check another source file to see the format), and be sure to copy in the 
attributions from the original file as well. @jerpelea is more familiar with 
the licensing attribution requirements/SPDX stuff.



##########
system/smf/smf.c:
##########
@@ -0,0 +1,436 @@
+/*

Review Comment:
   It looks like you'll have to re-format this file to pass the CI formatting 
check. Use `tools/checkpatch.sh` to see what needs to be changed.



##########
examples/smf/Makefile:
##########
@@ -0,0 +1,37 @@
+############################################################################
+# apps/examples/hsm_psicc2/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.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+# HSM PSICC2 (SMF demo) built-in application info
+
+PROGNAME  = $(CONFIG_EXAMPLES_SMF_PROGNAME)
+PRIORITY  = $(CONFIG_EXAMPLES_SMF_PRIORITY)
+STACKSIZE = $(CONFIG_EXAMPLES_SMF_STACKSIZE)
+MODULE    = $(CONFIG_EXAMPLES_SMF)
+
+# HSM PSICC2 Example
+
+MAINSRC = main.c

Review Comment:
   Use `smf_main.c`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to