LoraPhy, LoraChannel: simulate sync word behavior#204
Open
maribu wants to merge 3 commits into
Open
Conversation
An enum instead of a magic number makes the code a lot easier to read.
This adds a simple sync word model: A PHY is configured with a given sync word and will use that in the preamble of outgoing packets. For incoming packets, the PHY will only lock onto the transmission if the sync word of the incoming packet matches the configured sync word.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #204 +/- ##
===========================================
+ Coverage 84.61% 84.78% +0.16%
===========================================
Files 67 67
Lines 7015 7096 +81
===========================================
+ Hits 5936 6016 +80
- Misses 1079 1080 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
|
Hi, sorry for keeping you waiting and thanks for all the work. I did a quick read of the code and I agree with the general idea of this extension. Before merging, I'll take a more in-depth look and take care of merging updates from the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR includes #203, it should be rebased once #203 is merged
Proposed Changes
LoraTagandLoraChannelParametersto carry the sync wordLoraPhyto allow configuring the sync wordLoraPhywith a"LostPacketBecauseSyncWordMismatch"trace sourceSimpleGatewayLoraPhyandSimpleEndDeviceLoraPhyto not receive incoming packets when the don't match the configured sync word"LostPacketBecauseSyncWordMismatch"is called