diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 6d72688..f59eb88 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -6,9 +6,9 @@ name: CI
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
- branches: [ master ]
+ branches: [ main, develop ]
pull_request:
- branches: [ master ]
+ branches: [ main, develop ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
@@ -23,7 +23,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
# Dependencies
- name: Build CUnit
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index a5fee8b..5596af8 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,58 +1,58 @@
-name: Relase Script
-
-# Controls when the action will run.
-on:
- release:
- # A release, pre-release, or draft of a release is published.
- types: [published]
-
-# A workflow run is made up of one or more jobs that can run sequentially or in parallel
-jobs:
- # The introduction just shows some useful informations.
- intro:
- # The type of runner that the job will run on.
- runs-on: ubuntu-latest
- # Steps represent a sequence of tasks that will be executed as part of the job.
- steps:
- - run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
- - run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}."
-
- publish:
- # The type of runner that the job will run on.
- runs-on: ubuntu-latest
- # Intro must run first
- needs: intro
- # Steps represent a sequence of tasks that will be executed as part of the job
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
-
- - name: Cache pip
- uses: actions/cache@v4
- with:
- path: ~/.cache/pip
- key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
- restore-keys: |
- ${{ runner.os }}-pip-
-
- - name: Cache PlatformIO
- uses: actions/cache@v4
- with:
- path: ~/.platformio
- key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
-
- - name: Set up Python
- uses: actions/setup-python@v4
- with:
- python-version: "3.9"
-
- - name: Install PlatformIO
- run: |
- python -m pip install --upgrade pip
- pip install --upgrade platformio
-
- - name: Deploy Package to Registry
- env:
- PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}
- run: |
- platformio package publish --non-interactive
+name: Relase Script
+
+# Controls when the action will run.
+on:
+ release:
+ # A release, pre-release, or draft of a release is published.
+ types: [published]
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+ # The introduction just shows some useful informations.
+ intro:
+ # The type of runner that the job will run on.
+ runs-on: ubuntu-latest
+ # Steps represent a sequence of tasks that will be executed as part of the job.
+ steps:
+ - run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
+ - run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}."
+
+ publish:
+ # The type of runner that the job will run on.
+ runs-on: ubuntu-latest
+ # Intro must run first
+ needs: intro
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v6
+
+ - name: Cache pip
+ uses: actions/cache@v5
+ with:
+ path: ~/.cache/pip
+ key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
+ restore-keys: |
+ ${{ runner.os }}-pip-
+
+ - name: Cache PlatformIO
+ uses: actions/cache@v5
+ with:
+ path: ~/.platformio
+ key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
+
+ - name: Set up Python
+ uses: actions/setup-python@v6
+ with:
+ python-version: "3.12"
+
+ - name: Install PlatformIO
+ run: |
+ python -m pip install --upgrade pip
+ pip install --upgrade platformio
+
+ - name: Deploy Package to Registry
+ env:
+ PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}
+ run: |
+ platformio package publish --non-interactive
diff --git a/README.md b/README.md
index 378f6a3..917ab54 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# VSCP L1 Framework
+# VSCP L1 Framework
[](http://choosealicense.com/licenses/mit/)
[](https://www.repostatus.org/#active)
@@ -8,13 +8,12 @@
The VSCP software framework for level 1 devices provides several layers according to the [VSCP specification](https://docs.vscp.org/spec/latest).
-- [VSCP L1 Framework](#vscp-l1-framework)
- [VSCP](#vscp)
- [Framework](#framework)
- [Core](#core)
- [Event Abstraction](#event-abstraction)
- - [Configuration Parameters](#configuration-parameters)
- - [Common](#common)
+- [Configuration Parameters](#configuration-parameters)
+ - [Common](#common)
- [Device Data](#device-data)
- [VSCP L1 Bootloader](#vscp-l1-bootloader)
- [VSCP CLI Tools](#vscp-cli-tools)
@@ -37,29 +36,30 @@ The VSCP software framework for level 1 devices provides several layers accordin
- [License](#license)
- [Contribution](#contribution)
-# VSCP
+## VSCP
The Very Simple Control Protocol (VSCP), an open and free protocol for IoT/m2m automation tasks.
-More information can be found on the main site http://www.vscp.org
+More information can be found on the main site [http://www.vscp.org](http://www.vscp.org).
-# Framework
+## Framework
-## Core
-
+### Core
-* The core functionality which has a built-in state machine to handle different use cases of the protocol and etc. (vscp\_core.[ch]). Right now it supports every mandatory event and some minor optional ones.
-* The decision matrix is handled separately (vscp\_dm.[ch]). It contains the standard decision matrix, as described in the VSCP specification and contains an additional extension.
-* The decision matrix next generation is supported too (vscp\_dm\_ng.[ch]). It eliminates the limitations of the standard decision matrix, incl. its extension.
-* VSCP needs some mandatory persistent data, which can be modified during run time. This kind of data is in the persistent storage handled (vscp\_ps.[ch]).
-* The device specific data is handled separatly (vscp\_dev\_data.[ch]). You can decide whether this data shall be constant and configured during compile time or its loaded from persistent storage and could be modified during run time.
-* The transport layer has the possibility to loop events back (vscp_transport.[ch]).
+
+
+- The core functionality which has a built-in state machine to handle different use cases of the protocol and etc. (vscp\_core.[ch]). Right now it supports every mandatory event and some minor optional ones.
+- The decision matrix is handled separately (vscp\_dm.[ch]). It contains the standard decision matrix, as described in the VSCP specification and contains an additional extension.
+- The decision matrix next generation is supported too (vscp\_dm\_ng.[ch]). It eliminates the limitations of the standard decision matrix, incl. its extension.
+- VSCP needs some mandatory persistent data, which can be modified during run time. This kind of data is in the persistent storage handled (vscp\_ps.[ch]).
+- The device specific data is handled separatly (vscp\_dev\_data.[ch]). You can decide whether this data shall be constant and configured during compile time or its loaded from persistent storage and could be modified during run time.
+- The transport layer has the possibility to loop events back (vscp_transport.[ch]).
This can be configured for each data (vscp\_dev\_data_config.[ch]), except the firmware version.
-* Functionality can be configured for your needs (vscp_config.[ch]).
-* Some utility functions are separated (vscp\_util.[ch]) and used by different core modules or are maybe interested for the application too.
-* Log functionaly is provided for debugging purposes (vscp\_logger.[ch]).
+- Functionality can be configured for your needs (vscp_config.[ch]).
+- Some utility functions are separated (vscp\_util.[ch]) and used by different core modules or are maybe interested for the application too.
+- Log functionaly is provided for debugging purposes (vscp\_logger.[ch]).
The framework is independent of the hardware and the used operating system. To achieve independence all of the following
layers have to be adapted to the system. This is supported by templates, which contains all necessary functions with nearly empty
@@ -67,17 +67,19 @@ bodys.
The following modules have to be adapted for your needs, because it depends on the hardware, the operating system or
how VSCP is integrated into your software:
-* Transport adapter (vscp\_tp\_adapter.c)
-* Timer driver (vscp\_timer.c)
-* Persistent memory access driver (vscp\_ps\_access.c)
-* Action module, used by the decision matrix (standard, extension and next generation) (vscp\_action.c)
-* Application register access (vscp\_app\_reg.c)
-* Callout functions, lamp handling and etc. (vscp\_portable.c)
+
+- Transport adapter (vscp\_tp\_adapter.c)
+- Timer driver (vscp\_timer.c)
+- Persistent memory access driver (vscp\_ps\_access.c)
+- Action module, used by the decision matrix (standard, extension and next generation) (vscp\_action.c)
+- Application register access (vscp\_app\_reg.c)
+- Callout functions, lamp handling and etc. (vscp\_portable.c)
Templates exists for all of them, which makes it much easier to adapt it and less time. See in the templates folder.
-## Event Abstraction
-
+### Event Abstraction
+
+
Using only the core, you have to assemble the VSCP events by yourself. If you want to deal only with parameter, which are
VSCP independent, use the next upper layer, the event abstraction modules.
@@ -87,88 +89,90 @@ VSCP independent, use the next upper layer, the event abstraction modules.
### Common
The following configuration parameters can be enable/disable/set in the
-```
+
+```bash
vscp_config_overwrite.h
```
-| Feature switch | Default | Description |
-| :------------: | :-----: | :---------: |
-| VSCP\_CONFIG\_ENABLE\_LOGGER | disabled | Enable log functionality (CLASS1.Log). Use the macros in vscp\_logger.h to send log messages. |
-| VSCP\_CONFIG\_SILENT\_NODE | disabled | Silent node configuration, which is used for e. g. RS-485 connections. This type of nodes only listen to traffic before they get initialized by a host. In this case the nickname discovery process is not started for a node when it is powered up for the first time. This type on node instead starts to listen for the CLASS1.PROTOCOL, Type=23 (GUID drop nickname-ID / reset device.) event. When this series of events is received and the GUID is the same as for the module the module starts the nickname discovery procedure as of above. |
-| VSCP\_CONFIG\_HARD\_CODED\_NODE | disabled | Hard-coded node (fixed nickname id) |
-| VSCP\_CONFIG\_HEARTBEAT\_SUPPORT\_SEGMENT | disabled | Enable segment controller heartbeat support for nodes. |
-| VSCP\_CONFIG\_HEARTBEAT\_NODE | enabled | Enable sending node heartbeat (mandatory since 2015-09-10). |
-| VSCP\_CONFIG\_IDLE\_CALLOUT | disabled | Enable idle callout. If VSCP stops working and enters idle state, the application will be notified. |
-| VSCP\_CONFIG\_ERROR\_CALLOUT | disabled | Enable error callout. If VSCP stops working and enters error state, the application will be notified. |
-| VSCP\_CONFIG\_BOOT\_LOADER\_SUPPORTED | disabled | Enable boot loader support. |
-| VSCP\_CONFIG\_ENABLE\_DM | enabled | Enable decision matrix (standard). |
-| VSCP\_CONFIG\_DM\_PAGED\_FEATURE | disabled | Enable decision matrix special paged feature. |
-| VSCP\_CONFIG\_ENABLE\_DM\_EXTENSION | disabled | Enable the decision matrix extension to be able to compare to a configureable zone/sub-zone and event parameters. |
-| VSCP\_CONFIG\_ENABLE\_DM\_NEXT\_GENERATION | disabled | Enable the decision matrix next generation. |
-| VSCP\_CONFIG\_ENABLE\_LOOPBACK | disabled | Enable a loopback for all sent VSCP events. This feature is interesting to invoke decision matrix actions by own sent VSCP events. |
-| VSCP\_CONFIG\_ENABLE\_SEGMENT\_TIME\_CALLOUT | disabled | Enable a time update callout for every received segment master heartbeat, in case the event contains a new time since epoch. |
-| VSCP\_CONFIG\_PROTOCOL\_EVENT\_NOTIFICATION | disabled | Usually the core handles all protocol class events and they are not forwarded to the application. Enable this to forward the events as well. If application handles the event, the core won't handle it. Attention: Handling events which the core is waiting for can cause bad behaviour. |
-| VSCP\_CONFIG\_ENABLE\_CUSTOM\_HEARTBEAT | disabled | By default a heartbeat is sent, with 0 as user data and without extended data. If you need a custom heartbeat and able to define user and extended data by yourself, enable this. |
-
-| Parameter | Default | Description |
-| :-------: |:------: | :---------: |
-| VSCP\_CONFIG\_NODE\_SEGMENT\_INIT\_TIMEOUT | 5000 | Timeout in ms for the node segment initialization. |
-| VSCP\_CONFIG\_PROBE\_ACK\_TIMEOUT | 2000 | Timeout in ms for the probe acknowledge. |
-| VSCP\_CONFIG\_MULTI\_MSG\_TIMEOUT | 1000 | Timeout in ms to observe multi-message handling. |
-| VSCP\_CONFIG\_HEARTBEAT\_NODE\_PERIOD | 30000 | Node heartbeat period in ms (recommended 30s - 60s). |
-| VSCP\_CONFIG\_DM\_PAGE |1 | Decision matrix location: First page of the decision matrix. |
-| VSCP\_CONFIG\_DM\_OFFSET | 0 | Decision matrix location: Offset in the first page of the decision matrix. |
-| VSCP\_CONFIG\_DM\_ROWS | 10 | Number of decision matrix rows. |
-| VSCP\_CONFIG\_DM\_NG\_PAGE | 2 | Decision matrix next generation: Location in the application register space. Note that the dm ng always starts at the begin of the page! This design decision was just for simplification, nothing else. |
-| VSCP\_CONFIG\_DM\_NG\_RULE\_SET\_SIZE | 80 | Decision matrix next generation: Maximum size in bytes of a rule set. |
-| VSCP\_CONFIG\_LOOPBACK\_STORAGE\_NUM | 4 | Number of messages in the loopback cyclic buffer. Note, that if you want to store up to 3 events, you have to configure 4, because of the technical implementation of the cyclic buffer. |
-| VSCP\_CONFIG\_START\_NODE\_PROBE\_NICKNAME | 1 | Number to start probing nickname from. |
-
-### Device Data
+| Feature switch | Default | Description |
+| ------------------------------------------------------ | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| VSCP\_CONFIG\_ENABLE\_LOGGER | disabled | Enable log functionality (CLASS1.Log). Use the macros in vscp\_logger.h to send log messages. |
+| VSCP\_CONFIG\_SILENT\_NODE | disabled | Silent node configuration, which is used for e. g. RS-485 connections. This type of nodes only listen to traffic before they get initialized by a host. In this case the nickname discovery process is not started for a node when it is powered up for the first time. This type on node instead starts to listen for the CLASS1.PROTOCOL, Type=23 (GUID drop nickname-ID / reset device.) event. When this series of events is received and the GUID is the same as for the module the module starts the nickname discovery procedure as of above. |
+| VSCP\_CONFIG\_HARD\_CODED\_NODE | disabled | Hard-coded node (fixed nickname id) |
+| VSCP\_CONFIG\_HEARTBEAT\_SUPPORT\_SEGMENT | disabled | Enable segment controller heartbeat support for nodes. |
+| VSCP\_CONFIG\_HEARTBEAT\_NODE | enabled | Enable sending node heartbeat (mandatory since 2015-09-10). |
+| VSCP\_CONFIG\_IDLE\_CALLOUT | disabled | Enable idle callout. If VSCP stops working and enters idle state, the application will be notified. |
+| VSCP\_CONFIG\_ERROR\_CALLOUT | disabled | Enable error callout. If VSCP stops working and enters error state, the application will be notified. |
+| VSCP\_CONFIG\_BOOT\_LOADER\_SUPPORTED | disabled | Enable boot loader support. |
+| VSCP\_CONFIG\_ENABLE\_DM | enabled | Enable decision matrix (standard). |
+| VSCP\_CONFIG\_DM\_PAGED\_FEATURE | disabled | Enable decision matrix special paged feature. |
+| VSCP\_CONFIG\_ENABLE\_DM\_EXTENSION | disabled | Enable the decision matrix extension to be able to compare to a configureable zone/sub-zone and event parameters. |
+| VSCP\_CONFIG\_ENABLE\_DM\_NEXT\_GENERATION | disabled | Enable the decision matrix next generation. |
+| VSCP\_CONFIG\_ENABLE\_LOOPBACK | disabled | Enable a loopback for all sent VSCP events. This feature is interesting to invoke decision matrix actions by own sent VSCP events. |
+| VSCP\_CONFIG\_ENABLE\_SEGMENT\_TIME\_CALLOUT | disabled | Enable a time update callout for every received segment master heartbeat, in case the event contains a new time since epoch. |
+| VSCP\_CONFIG\_PROTOCOL\_EVENT\_NOTIFICATION | disabled | Usually the core handles all protocol class events and they are not forwarded to the application. Enable this to forward the events as well. If application handles the event, the core won't handle it. Attention: Handling events which the core is waiting for can cause bad behaviour. |
+| VSCP\_CONFIG\_ENABLE\_CUSTOM\_HEARTBEAT |