| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| en:pfw:wireless_communication_mesh-network [2023-09-04 18:23] – ↷ Seite von pfw:wireless_communication_mesh-network nach en:pfw:wireless_communication_mesh-network verschoben uho | en:pfw:wireless_communication_mesh-network [2025-11-17 15:03] (current) – Replaced HTML coded list with wiki list bernd |
|---|
| ===== Built on top ===== | ===== Built on top ===== |
| |
| The basis for this example are these files: [[pfw:spi|SPI]], [[:nrf24l01_basic_2024l01dn_20g2553-01a.f|Basic 24L01dn]] file and the [[en:pfw:bit-array|bit array]], these are used for the driver of the network layer. This driver uses **dynamic payload** to optimise the troughput of the network. | The basis for this example are these files: [[en:pfw:spi|SPI]], [[:nrf24l01_basic_2024l01dn_20g2553-01a.f|Basic 24L01dn]] file and the [[en:pfw:bit-array|bit array]], these are used for the driver of the network layer. This driver uses **dynamic payload** to optimise the troughput of the network. |
| |
| * [[https://github.com/project-forth-works/project-forth-works/blob/main/Communication-Protocols/Wireless-Communication/Mesh-network/Generic-Forth|Generic Forth]], version of the mesh network\\ | * [[https://github.com/project-forth-works/project-forth-works/blob/main/Communication-Protocols/Wireless-Communication/Mesh-network/Generic-Forth|Generic Forth]], version of the mesh network\\ |
| The mesh network code adds some additional words for constructing new functions above the basic node command interpreter. These are: | The mesh network code adds some additional words for constructing new functions above the basic node command interpreter. These are: |
| |
| ^Word ^Stack ^Function ^ | ^ Word ^ Stack ^ Function ^ |
| |''%%ALL%%'' |( -- a ) |Address of a BIT-table with all found nodes | | | ''%%ALL%%'' | ( -- a ) | Address of a BIT-table with all found nodes | |
| |''%%DIRECT%%'' |( -- a ) |Address of a BIT-table with direct accessable nodes | | | ''%%DIRECT%%'' | ( -- a ) | Address of a BIT-table with direct accessable nodes | |
| |''%%INDIRECT%%''|( -- a ) |Address of a BIT-table with indirect accessable nodes | | |''%%INDIRECT%%''|( -- a ) |Address of a BIT-table with indirect accessable nodes | |
| |''%%#MAP%%'' |( -- +n ) |Leave the size of a bitmap | | |''%%#MAP%%'' |( -- +n ) |Leave the size of a bitmap | |
| |''%%GET*%%'' |( u a -- 0|b ) |Check if node +n present in bit-array a? | | |''%%GET*%%'' |( u a -- 0/b ) |Check if node +n present in bit-array a? | |
| |''%%*CLR%%'' |( u a -- ) |Remove node +n from bit-array a | | |''%%*CLR%%'' |( u a -- ) |Remove node +n from bit-array a | |
| |''%%*COUNT%%'' |( a -- +n ) |Leave number of nodes found in bitmap a | | |''%%*COUNT%%'' |( a -- +n ) |Leave number of nodes found in bitmap a | |
| |''%%>USER%%'' |( a -- ) |Copy nodes to node accu for app programmer | | |''%%>USER%%'' |( a -- ) |Copy nodes to node accu for app programmer | |
| |''%%>WORK%%'' |( a -- ) |Copy nodes to node accu for internal functions | | |''%%>WORK%%'' |( a -- ) |Copy nodes to node accu for internal functions | |
| |''%%NEXT?%%'' |( a -- 0|u -1 )|Leave node number of the first used node in bitmap a & erase the bit | | |''%%NEXT?%%'' |( a -- 0/u -1 )|Leave node number of the first used node in bitmap a & erase the bit | |
| |''%%RUN%%'' |( -- ) |Allow a program to run free | | |''%%RUN%%'' |( -- ) |Allow a program to run free | |
| |''%%HALT?%%'' |( -- f ) |Alternative KEY? to stop node programs | | |''%%HALT?%%'' |( -- f ) |Alternative KEY? to stop node programs | |
| |''%%<WAIT>%%'' |( u -- ) |Wait +n milliseconds & respond to external network commands, leave after an } was received| | |''%%<WAIT>%%'' |( u -- ) |Wait +n milliseconds & respond to external network commands, leave after an } was received| |
| |''%%>OTHERS%%'' |( c -- ) |Send node command c to all nodes noted in WORK with a timeout of 1024 ms | | |''%%>OTHERS%%'' |( c -- ) |Send node command c to all nodes noted in WORK with a timeout of 1024 ms | |
| |''%%FINISH%%'' |( -- ) |End network buildup with adding node type information | | |''%%FINISH%%'' |( -- ) |End network buildup with adding node type information | |
| |
| === Generic forth example code === | === Generic forth example code === |
| ---- | ---- |
| |
| <HTML><ul></HTML> | * [[https://github.com/project-forth-works/project-forth-works/blob/main/Communication-Protocols/Wireless-Communication/Mesh-network/Generic-Forth/Tools/Build%20(3.9d).f|BUILD]], constructs a (hopping) mesh network |
| <HTML><li></HTML><HTML><p></HTML>[[https://github.com/project-forth-works/project-forth-works/blob/main/Communication-Protocols/Wireless-Communication/Mesh-network/Generic-Forth/Tools/Build%20(3.9d).f|BUILD]], constructs a (hopping) mesh network | * [[https://github.com/project-forth-works/project-forth-works/blob/main/Communication-Protocols/Wireless-Communication/Mesh-network/Generic-Forth/Tools/Ping-2.f|PING]], check node connection/availability |
| <HTML></p></HTML><HTML></li></HTML> | * [[https://github.com/project-forth-works/project-forth-works/blob/main/Communication-Protocols/Wireless-Communication/Mesh-network/Generic-Forth/Tools/Mesh-demos.f|DEMO's]], that activate the node outputs in different ways |
| <HTML><li></HTML><HTML><p></HTML>[[https://github.com/project-forth-works/project-forth-works/blob/main/Communication-Protocols/Wireless-Communication/Mesh-network/Generic-Forth/Tools/Ping-2.f|PING]], check node connection/availability | * [[https://github.com/project-forth-works/project-forth-works/blob/main/Communication-Protocols/Wireless-Communication/Mesh-network/Generic-Forth/Tools/automesh.f|Simple demo]], primitive network build routine & running light demo |
| <HTML></p></HTML><HTML></li></HTML> | |
| <HTML><li></HTML><HTML><p></HTML>[[https://github.com/project-forth-works/project-forth-works/blob/main/Communication-Protocols/Wireless-Communication/Mesh-network/Generic-Forth/Tools/Mesh-demos.f|DEMO's]], that activate the node outputs in different ways | |
| <HTML></p></HTML><HTML></li></HTML> | |
| <HTML><li></HTML><HTML><p></HTML>[[https://github.com/project-forth-works/project-forth-works/blob/main/Communication-Protocols/Wireless-Communication/Mesh-network/Generic-Forth/Tools/automesh.f|Simple demo]], primitive network build routine & running light demo<HTML></p></HTML> | |
| |
| ---- | ---- |
| <HTML></li></HTML><HTML></ul></HTML> | |
| |
| **All steps taken by the ''%%BUILD%%'' routine**\\ | **All steps taken by the ''%%BUILD%%'' routine**\\ |
| {{https://user-images.githubusercontent.com/11397265/157910410-addf6e4d-2e14-478c-8426-47e8435576b7.jpg|Build done color}} | {{https://user-images.githubusercontent.com/11397265/157910410-addf6e4d-2e14-478c-8426-47e8435576b7.jpg|Build done color}} |
| |