New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extend PhyTxRx to consider antenna gain and max power #159
Conversation
bebd047
to
23edf03
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why couldn't this be just added to PhyRxTx with default impls to avoid the extra generic arg?
23edf03
to
3857fec
Compare
ff2ccf9
to
b3415fb
Compare
Thanks for the feedback! I think you're right and I tried it out combined with @plaes 's const generic suggestion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I do not like with current design is that it's somewhat error-prone as it has to be "manually" adjusted every time mac.{send,join_otaa}
creates TxConfig object.
Ideally it should be already adjusted whenever this object is craeted which happens in only two places:
- join_otaa
- send
Or alternatively it should happen when this instance is used (one possibility could be adding extra optional argument forradio.tx(...)
in lora-phy)?
b3415fb
to
9018a41
Compare
Thanks for the idea @plaes. Your point is why my first iteration passed a const generic to the Mac struct initially, but @lulf 's feedback made me think that the mental load of yet another trait seemed unnecessary and I liked the UX of the trait associated const. I was going to do Therefore, the current solution is to use the trait constants to instantiate the Mac with the appropriate limits. This at least passes the responsibility the adjustment to |
caf27c1
to
50eb077
Compare
50eb077
to
7dffe22
Compare
7dffe22
to
e9a4308
Compare
Resolves #150