{"id":15417052,"url":"https://github.com/blueandi/vscp-framework","last_synced_at":"2025-04-19T14:34:55.610Z","repository":{"id":25435015,"uuid":"28864703","full_name":"BlueAndi/vscp-framework","owner":"BlueAndi","description":"Very Simple Control Protocol (VSCP) Level 1 Framework","archived":false,"fork":false,"pushed_at":"2025-01-20T20:01:12.000Z","size":50540,"stargazers_count":11,"open_issues_count":1,"forks_count":9,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-29T08:43:36.229Z","etag":null,"topics":["automation","c99","homeautomation","vscp","vscp-framework"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlueAndi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-01-06T13:27:49.000Z","updated_at":"2025-03-10T15:58:09.000Z","dependencies_parsed_at":"2025-01-02T11:30:56.951Z","dependency_job_id":null,"html_url":"https://github.com/BlueAndi/vscp-framework","commit_stats":{"total_commits":663,"total_committers":7,"mean_commits":94.71428571428571,"dds":"0.31825037707390647","last_synced_commit":"6c6e339a009bc2cddff1ce315198a8be0734a48a"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueAndi%2Fvscp-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueAndi%2Fvscp-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueAndi%2Fvscp-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueAndi%2Fvscp-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlueAndi","download_url":"https://codeload.github.com/BlueAndi/vscp-framework/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249715499,"owners_count":21315055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","c99","homeautomation","vscp","vscp-framework"],"created_at":"2024-10-01T17:14:33.550Z","updated_at":"2025-04-19T14:34:55.580Z","avatar_url":"https://github.com/BlueAndi.png","language":"C","readme":"# VSCP L1 Framework\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://choosealicense.com/licenses/mit/)\n[![Repo Status](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![Release](https://img.shields.io/github/release/BlueAndi/vscp-framework.svg)](https://github.com/BlueAndi/vscp-framework/releases)\n[![Coverity Scan Build Status](https://img.shields.io/coverity/scan/4825.svg)](https://scan.coverity.com/projects/4825?tab=overview)\n[![Build Status](https://github.com/BlueAndi/vscp-framework/workflows/CI/badge.svg?branch=master)](https://github.com/BlueAndi/vscp-framework/actions?query=workflow%3ACI)\n\nThe VSCP software framework for level 1 devices provides several layers according to the [VSCP specification](https://docs.vscp.org/spec/latest).\n\n- [VSCP L1 Framework](#vscp-l1-framework)\n- [VSCP](#vscp)\n- [Framework](#framework)\n  - [Core](#core)\n  - [Event Abstraction](#event-abstraction)\n  - [Configuration Parameters](#configuration-parameters)\n    - [Common](#common)\n    - [Device Data](#device-data)\n- [VSCP L1 Bootloader](#vscp-l1-bootloader)\n- [VSCP CLI Tools](#vscp-cli-tools)\n- [Structure](#structure)\n- [Getting Started](#getting-started)\n  - [1 Get The VSCP Framework To Your Project](#1-get-the-vscp-framework-to-your-project)\n    - [1.1 Possibility 1: Copy it](#11-possibility-1-copy-it)\n    - [1.2 Possibility 2: git submodule](#12-possibility-2-git-submodule)\n    - [1.3 Possibility 3: PlatformIO](#13-possibility-3-platformio)\n  - [2 Initialization Of The VSCP Framework](#2-initialization-of-the-vscp-framework)\n  - [3 Processing Of The VSCP Framework](#3-processing-of-the-vscp-framework)\n  - [4 VSCP Framework Timer](#4-vscp-framework-timer)\n  - [5 VSCP Transport Adaption](#5-vscp-transport-adaption)\n  - [6 Control The VSCP Lamp](#6-control-the-vscp-lamp)\n  - [7 Connect The Initialization Button](#7-connect-the-initialization-button)\n  - [8 Persistent Memory](#8-persistent-memory)\n  - [9 Ready To Run](#9-ready-to-run)\n- [Typical Infrastructure](#typical-infrastructure)\n- [Issues, Ideas And Bugs](#issues-ideas-and-bugs)\n- [License](#license)\n- [Contribution](#contribution)\n\n# VSCP\n\n\u003cimg src=\"https://github.com/grodansparadis/vscp_logo/raw/master/vscp_logo.jpg\" width=\"200px\" alt=\"Logo\" /\u003e\n\nThe Very Simple Control Protocol (VSCP), an open and free protocol for IoT/m2m automation tasks.\n\nMore information can be found on the main site http://www.vscp.org\n\n# Framework\n\n## Core\n![core-diagram](http://www.plantuml.com/plantuml/proxy?cache=no\u0026src=https://raw.githubusercontent.com/BlueAndi/vscp-framework/master/doc/doxfiles/vscp_modules.plantuml)\n\n* 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.\n* 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.\n* The decision matrix next generation is supported too (vscp\\_dm\\_ng.[ch]). It eliminates the limitations of the standard decision matrix, incl. its extension.\n* 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]).\n* 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.\n* The transport layer has the possibility to loop events back (vscp_transport.[ch]).\n    This can be configured for each data (vscp\\_dev\\_data_config.[ch]), except the firmware version.\n* Functionality can be configured for your needs (vscp_config.[ch]).\n* Some utility functions are separated (vscp\\_util.[ch]) and used by different core modules or are maybe interested for the application too.\n* Log functionaly is provided for debugging purposes (vscp\\_logger.[ch]).\n\nThe framework is independent of the hardware and the used operating system. To achieve independence all of the following\nlayers have to be adapted to the system. This is supported by templates, which contains all necessary functions with nearly empty\nbodys.\n\nThe following modules have to be adapted for your needs, because it depends on the hardware, the operating system or\nhow VSCP is integrated into your software:\n* Transport adapter (vscp\\_tp\\_adapter.c)\n* Timer driver (vscp\\_timer.c)\n* Persistent memory access driver (vscp\\_ps\\_access.c)\n* Action module, used by the decision matrix (standard, extension and next generation) (vscp\\_action.c)\n* Application register access (vscp\\_app\\_reg.c)\n* Callout functions, lamp handling and etc. (vscp\\_portable.c)\n\nTemplates exists for all of them, which makes it much easier to adapt it and less time. See in the templates folder.\n\n## Event Abstraction\n![core-diagram](http://www.plantuml.com/plantuml/proxy?cache=no\u0026src=https://raw.githubusercontent.com/BlueAndi/vscp-framework/master/doc/doxfiles/vscp_event_modules.plantuml)\n\nUsing only the core, you have to assemble the VSCP events by yourself. If you want to deal only with parameter, which are\nVSCP independent, use the next upper layer, the event abstraction modules.\n\n## Configuration Parameters\n\n### Common\n\nThe following configuration parameters can be enable/disable/set in the\n```\nvscp_config_overwrite.h\n```\n\n| Feature switch | Default | Description |\n| :------------: | :-----: | :---------: |\n| \u003csub\u003eVSCP\\_CONFIG\\_ENABLE\\_LOGGER\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eEnable log functionality (CLASS1.Log). Use the macros in vscp\\_logger.h to send log messages.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_SILENT\\_NODE\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eSilent 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.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_HARD\\_CODED\\_NODE\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eHard-coded node (fixed nickname id)\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_HEARTBEAT\\_SUPPORT\\_SEGMENT\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eEnable segment controller heartbeat support for nodes.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_HEARTBEAT\\_NODE\u003csub\u003e | \u003csub\u003eenabled\u003csub\u003e | \u003csub\u003eEnable sending node heartbeat (mandatory since 2015-09-10).\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_IDLE\\_CALLOUT\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eEnable idle callout. If VSCP stops working and enters idle state, the application will be notified.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_ERROR\\_CALLOUT\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eEnable error callout. If VSCP stops working and enters error state, the application will be notified.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_BOOT\\_LOADER\\_SUPPORTED\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eEnable boot loader support.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_ENABLE\\_DM\u003csub\u003e | \u003csub\u003eenabled\u003csub\u003e | \u003csub\u003eEnable decision matrix (standard).\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_DM\\_PAGED\\_FEATURE\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eEnable decision matrix special paged feature.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_ENABLE\\_DM\\_EXTENSION\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eEnable the decision matrix extension to be able to compare to a configureable zone/sub-zone and event parameters.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_ENABLE\\_DM\\_NEXT\\_GENERATION\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eEnable the decision matrix next generation.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_ENABLE\\_LOOPBACK\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eEnable a loopback for all sent VSCP events. This feature is interesting to invoke decision matrix actions by own sent VSCP events.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_ENABLE\\_SEGMENT\\_TIME\\_CALLOUT\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eEnable a time update callout for every received segment master heartbeat, in case the event contains a new time since epoch.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_PROTOCOL\\_EVENT\\_NOTIFICATION\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eUsually 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.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_ENABLE\\_CUSTOM\\_HEARTBEAT\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eBy 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.\u003csub\u003e |\n\n| Parameter | Default | Description |\n| :-------: |:------: | :---------: |\n| \u003csub\u003eVSCP\\_CONFIG\\_NODE\\_SEGMENT\\_INIT\\_TIMEOUT\u003csub\u003e | \u003csub\u003e5000\u003csub\u003e | \u003csub\u003eTimeout in ms for the node segment initialization.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_PROBE\\_ACK\\_TIMEOUT\u003csub\u003e | \u003csub\u003e2000\u003csub\u003e | \u003csub\u003eTimeout in ms for the probe acknowledge.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_MULTI\\_MSG\\_TIMEOUT\u003csub\u003e | \u003csub\u003e1000\u003csub\u003e | \u003csub\u003eTimeout in ms to observe multi-message handling.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_HEARTBEAT\\_NODE\\_PERIOD\u003csub\u003e | \u003csub\u003e30000\u003csub\u003e | \u003csub\u003eNode heartbeat period in ms (recommended 30s - 60s).\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_DM\\_PAGE\u003csub\u003e |\u003csub\u003e1\u003csub\u003e | \u003csub\u003eDecision matrix location: First page of the decision matrix.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_DM\\_OFFSET\u003csub\u003e | \u003csub\u003e0\u003csub\u003e | \u003csub\u003eDecision matrix location: Offset in the first page of the decision matrix.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_DM\\_ROWS\u003csub\u003e | \u003csub\u003e10\u003csub\u003e | \u003csub\u003eNumber of decision matrix rows.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_DM\\_NG\\_PAGE\u003csub\u003e | \u003csub\u003e2\u003csub\u003e | \u003csub\u003eDecision 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.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_DM\\_NG\\_RULE\\_SET\\_SIZE\u003csub\u003e | \u003csub\u003e80\u003csub\u003e | \u003csub\u003eDecision matrix next generation: Maximum size in bytes of a rule set.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_LOOPBACK\\_STORAGE\\_NUM\u003csub\u003e | \u003csub\u003e4\u003csub\u003e | \u003csub\u003eNumber 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.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_CONFIG\\_START\\_NODE\\_PROBE\\_NICKNAME\u003csub\u003e | \u003csub\u003e1\u003csub\u003e | \u003csub\u003eNumber to start probing nickname from.\u003csub\u003e |\n\n### Device Data\n\nThe following device data can be enable/disable/set in the\n```\nvscp_dev_data_config_overwrite.h\n```\n\n| Feature switch | Default | Description |\n| :------------: | :-----: | :---------: |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_ENABLE\\_FAMILY\\_CODE\u003csub\u003e | \u003csub\u003eenabled\u003csub\u003e | \u003csub\u003eEnable the support of the family code.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_ENABLE\\_GUID\\_STORAGE\\_PS\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eEnable this define to load the GUID from persistent storage.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_ENABLE\\_GUID\\_STORAGE\\_EXT\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eEnable this define to load the GUID from external storage, e.g. from MCU GUID.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_ENABLE\\_NODE\\_ZONE\\_STORAGE\\_PS\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eEnable this define to load the node zone from persistent storage.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_ENABLE\\_NODE\\_SUB\\_ZONE\\_STORAGE\\_PS\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eEnable this define to load the node sub-zone from persistent storage.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_ENABLE\\_MANUFACTURER\\_DEV\\_ID\\_STORAGE\\_PS\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eEnable this define to load the manufacturer device id from persistent storage.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_ENABLE\\_MANUFACTURER\\_SUB\\_DEV\\_ID\\_STORAGE\\_PS\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eEnable this define to load the manufacturer sub device id from persistent storage.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_ENABLE\\_MDF\\_URL\\_STORAGE\\_PS\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eEnable this define to load the MDF URL from persistent storage.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_ENABLE\\_STD\\_DEV\\_FAMILY\\_CODE\\_STORAGE\\_PS\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eEnable this define to load the standard device family code from persistent storage. Note, that the feature family code has to be enabled, otherwise this define won't be considered.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_ENABLE\\_STD\\_DEV\\_TYPE\\_STORAGE\\_PS\u003csub\u003e | \u003csub\u003edisabled\u003csub\u003e | \u003csub\u003eEnable this define to load the standard device type from persistent storage. Note, that the feature family code has to be enabled, otherwise this define won't be considered.\u003csub\u003e |\n\n| Parameter | Default | Description |\n| :-------: |:------: | :---------: |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_NODE\\_GUID\u003csub\u003e | \u003csub\u003e00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00\u003csub\u003e | \u003csub\u003eNode GUID\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_NODE\\_ZONE\u003csub\u003e | \u003csub\u003e0xff\u003csub\u003e | \u003csub\u003eNode zone. Note, 0xff means all zones.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_NODE\\_SUB\\_ZONE\u003csub\u003e | \u003csub\u003e0xff\u003csub\u003e | \u003csub\u003eNode sub-zone. Note, 0xff means all sub zones.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_MANUFACTURER\\_ID\u003csub\u003e | \u003csub\u003e0x0000\u003csub\u003e | \u003csub\u003eManufacturer id (0x0000 means unknown)\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_MANUFACTURER\\_DEVICE\\_ID\u003csub\u003e | \u003csub\u003e0x00000000\u003csub\u003e | \u003csub\u003eManufacturer device id\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_MANUFACTURER\\_SUB\\_DEVICE\\_ID\u003csub\u003e | \u003csub\u003e0x00000000\u003csub\u003e | \u003csub\u003eManufacturer sub device id\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_MDF\\_URL\u003csub\u003e | \u003csub\u003eempty\u003csub\u003e | \u003csub\u003eMDF URL (only 32 characters are allowed!), without \"http://\" which is implied Note, the encoding is UTF-8!\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_VERSION\\_MAJOR\u003csub\u003e | \u003csub\u003e0\u003csub\u003e | \u003csub\u003eMajor firmware version (format: major.minor.sub-minor)\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_VERSION\\_MINOR\u003csub\u003e | \u003csub\u003e1\u003csub\u003e | \u003csub\u003eMinor firmware version (format: major.minor.sub-minor)\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_VERSION\\_SUB\\_MINOR\u003csub\u003e | \u003csub\u003e0\u003csub\u003e | \u003csub\u003eSub-minor firmware version (format: major.minor.sub-minor)\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_STANDARD\\_DEVICE\\_FAMILY\\_CODE\u003csub\u003e | \u003csub\u003e0x00000000\u003csub\u003e | \u003csub\u003eStandard device family code.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_STANDARD\\_DEVICE\\_TYPE\u003csub\u003e | \u003csub\u003e0x00000000\u003csub\u003e | \u003csub\u003eStandard device type.\u003csub\u003e |\n| \u003csub\u003eVSCP\\_DEV\\_DATA\\_CONFIG\\_FIRMWARE\\_DEVICE\\_CODE\u003csub\u003e | \u003csub\u003e0x0000\u003csub\u003e | \u003csub\u003eFirmware device code.\u003csub\u003e |\n\n# VSCP L1 Bootloader\n\nA generic VSCP L1 bootloader: https://github.com/BlueAndi/vscp-bootloader\n\n# VSCP CLI Tools\n\nSome tools to maintain VSCP via command line interface: https://github.com/BlueAndi/vscp-cli-tools\n\n# Structure\n\n\u003cpre\u003e\n+---doc                 (Documentation)\n|   +---doxfiles        (Doxygen related files)\n|   \\---html            (Doxygen generated documentation in HTML)\n+---examples            (Examples which are showing how to use the VSCP framework)\n|   +---arm             (Examples with ARM based microcontrollers)\n|   \\---avr             (Examples with Atmel AVR microcontrollers)\n|---src                 (VSCP framework)\n|   \\---events          (These modules are using the VSCP core to send CLASS1 dedicated events)\n+---templates           (Templates of the files, which the user shall adapt to its needs)\n|---test                (Test of the VSCP framework)\n\\---tools               (General tools, used by examples and projects)\n    \\---xslt            (XML transformation processor)\n\u003c/pre\u003e\n\n# Getting Started\n\nThis part shows you how to get the VSCP framework working in a \"minimal\" way:\n\n1. [Get the VSCP framework to your project](https://github.com/BlueAndi/vscp-framework/blob/master/README.md#get-the-vscp-framework-to-your-project)\n2. [Initialization of the VSCP framework](https://github.com/BlueAndi/vscp-framework/blob/master/README.md#initialization-of-the-vscp-framework)\n3. [Processing of the VSCP framework](https://github.com/BlueAndi/vscp-framework/blob/master/README.md#processing-of-the-vscp-framework)\n4. [VSCP framework timer](https://github.com/BlueAndi/vscp-framework/blob/master/README.md#vscp-framework-timer)\n5. [VSCP transport adaption](https://github.com/BlueAndi/vscp-framework/blob/master/README.md#vscp-transport-adaption)\n6. [Control the VSCP lamp](https://github.com/BlueAndi/vscp-framework/blob/master/README.md#control-the-vscp-lamp)\n7. [Connect the initialization button](https://github.com/BlueAndi/vscp-framework/blob/master/README.md#connect-the-initialization-button)\n8. [Persistent memory](https://github.com/BlueAndi/vscp-framework/blob/master/README.md#persistent-memory)\n9. [Ready to run](https://github.com/BlueAndi/vscp-framework/blob/master/README.md#ready-to-run)\n\n## 1 Get The VSCP Framework To Your Project\n\nThere are 3 possible integrations listed, there may be more of course.\n\n### 1.1 Possibility 1: Copy it\n\n1. Copy or link the VSCP framework (./src and ./src/events) to your project.\n2. Copy (!!do not link!!) all necessary template files (./templates) to your project. Recommended is a sub-directory \"vscp_user\".\n3. Update your makefile or your project configuration.\n\n### 1.2 Possibility 2: git submodule\n\nInitial add it.\n```\ngit submodule add https://github.com/BlueAndi/vscp-framework\n```\nLater update it.\n```\ngit submodule update --remote\n```\n\n### 1.3 Possibility 3: PlatformIO\n\nAdd ```vscp-framework``` with the required version to the platformio.ini configuration. Find more informations in the [PlatformIO documentation](https://docs.platformio.org/en/latest/projectconf/section_env_library.html#lib-deps).\n\nExample:\n```\n    lib_deps =\n        vscp-framework @ 2.0.0\n```\n\n## 2 Initialization Of The VSCP Framework\n\nThe VSCP framework has to be initialized, before any function is used. This is simply done\nby calling the function vscp\\_core\\_init() during start-up.\n\n## 3 Processing Of The VSCP Framework\n\nThe VSCP framework has to be called periodically to be able to react on incoming events.\nCall the process routine vscp\\_core\\_process() in a constant cyclic period. The period should be\nlower or equal than 100 ms, but depends on several factors, like the bitrate on the choosen\ncommunication bus, the event load on the bus and etc.\n\nThe process routine handle all received VSCP events.\n\n## 4 VSCP Framework Timer\n\nVSCP specifies several timing behaviour in different use cases. Therefore the framework needs some\ntimers to achieve it.\n\nBecause timer are usually hardware and software dependend, they have to be implemented by you for your needs.\nAdapt the vscp_timer.c template file. Find all necessary informations in the module.\n\nThe timer handling can be processed by calling vscp\\_timer\\_process() in the same or in a different task as vscp\\_core\\_process() is called.\nIf a different task calls it, don't forget to make the timer functions reentrant!\n\nBecause the VSCP timer module needs to know the period of processing the timers, you have to call it with the\nperiod time in ms as parameter, e.g. vscp\\_timer\\_process(1000);\n\nCall the timer processing routine equal or lower than 1 s.\n\nNote, that never call vscp\\_process() with a lower period, than vscp\\_timer\\_process(). Because vscp\\_process() reacts\non timer timeouts and vscp\\_timer\\_process() decrease only the timers, but doesn't do more.\n\n## 5 VSCP Transport Adaption\n\nNow its time to connect the VSCP framework to the communication bus. This can be done by implementing the transport\nadapter in the vscp\\_tp\\_adapter.c template file.\n\n## 6 Control The VSCP Lamp\n\nTo see that something is happen on your embedded device, next step is to control the VSCP lamp (in most cases a LED).\nUpdate the function vscp\\_portable\\_setLampState() in the vscp\\_portable.c module.\n\n## 7 Connect The Initialization Button\n\nAccording to the VSCP specification, every embedded device should have a button to start the segment initialization.\nHopefully you have one right now :-) and if it is pressed, call the function vscp\\_core\\_startNodeSegmentInit() in the\nvscp\\_core.c module.\n\n## 8 Persistent Memory\n\nIt is important that the VSCP framework can store data in a persistent memory, e.g. an EEPROM. Implement in the\nvscp\\_ps\\_access.c module the low level access to the persistent memory. Its quite easy, because only byte access\nfunctions are used, so you have one read and one write function to adapt.\n\n## 9 Ready To Run\n\nNow the minimal sub set is done and your node hopefully starts up with a nickname discovery.\n\nHave fun!\n\n# Typical Infrastructure\n\n![typical-infrastructure](http://www.plantuml.com/plantuml/proxy?cache=no\u0026src=https://raw.githubusercontent.com/BlueAndi/vscp-framework/master/doc/doxfiles/vscp_typical_infrastructure.plantuml)\n\n# Issues, Ideas And Bugs\n\nIf you have further ideas or you found some bugs, great! Create a [issue](https://github.com/BlueAndi/vscp-framework/issues) or if\nyou are able and willing to fix it by yourself, clone the repository and create a pull request.\n\n# License\nThe whole source code is published under the [MIT license](http://choosealicense.com/licenses/mit/).\n\n# Contribution\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any\nadditional terms or conditions.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblueandi%2Fvscp-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblueandi%2Fvscp-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblueandi%2Fvscp-framework/lists"}