Skip to content

Lora: Add support for runtime PHY selection #7430

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

Merged
merged 2 commits into from
Jul 11, 2018
Merged

Lora: Add support for runtime PHY selection #7430

merged 2 commits into from
Jul 11, 2018

Conversation

kivaisan
Copy link
Contributor

@kivaisan kivaisan commented Jul 6, 2018

Description

Add support to set up lora stack using user given PHY object. This will enable PHY selection at run time (usefull for example to roaming devices).

Pull request type

[ ] Fix
[ ] Refactor
[ ] New target
[X] Feature
[ ] Breaking change

Instead of giving LoRaWANTimeHandler object as parameter for constructor,
object is now given via own initialize() method.

This change is needed for future refactoring where application can give own
PHY object for LoRa stack.
@kivaisan
Copy link
Contributor Author

kivaisan commented Jul 6, 2018

@hasnainvirk, @kjbracey-arm, please review.

*
*/
void bind_radio_driver(LoRaRadio &radio);
void bind_phy_and_radio_driver(LoRaRadio& radio, LoRaPHY &phy);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoRaRadio& radio -> LoRaRadio &radio

* @param phy A reference to user created PHY object.
*
*/
LoRaWANInterface(LoRaRadio& radio, LoRaPHY &phy);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add doc for the first parameter as well.

@kivaisan
Copy link
Contributor Author

kivaisan commented Jul 6, 2018

@hasnainvirk please review again.

hasnainvirk
hasnainvirk previously approved these changes Jul 6, 2018
* @param radio A reference to radio object
* @param phy A reference to PHY object
*/
LoRaWANInterface(LoRaRadio& radio, LoRaPHY &phy);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style fix here. LoRaRadio& radio -> LoRaRadio &radio

@@ -98,15 +98,16 @@ LoRaWANStack::LoRaWANStack()
/*****************************************************************************
* Public Methods *
****************************************************************************/
void LoRaWANStack::bind_radio_driver(LoRaRadio &radio)
void LoRaWANStack::bind_phy_and_radio_driver(LoRaRadio& radio, LoRaPHY &phy)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style fix here. LoRaRadio &raido

*
*/
void bind_radio_driver(LoRaRadio &radio);
void bind_phy_and_radio_driver(LoRaRadio &radio, LoRaPHY &phy);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style fix LoRaRadio &radio

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is good already but I fixed some other radio style bugs.

To support custom PHY object, a new LoRaWANInterface constructor was
added.
@hasnainvirk
Copy link
Contributor

@kjbracey-arm Can you please spare some time to review this ?

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 9, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Jul 9, 2018

Build : SUCCESS

Build number : 2551
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7430/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Jul 9, 2018

@mbed-ci
Copy link

mbed-ci commented Jul 9, 2018

@cmonr
Copy link
Contributor

cmonr commented Jul 11, 2018

Looks good to go!

@cmonr cmonr merged commit 3f742c9 into ARMmbed:master Jul 11, 2018
pan- pushed a commit to pan-/mbed that referenced this pull request Aug 22, 2018
Lora: Add support for runtime PHY selection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants