-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #270: updated the src to support Sigfox provisioning
- Loading branch information
1 parent
951240e
commit ccdce72
Showing
18 changed files
with
183 additions
and
420 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,9 @@ Copyright notice: | |
|
||
#include <Arduino_LoRaWAN_network.h> | ||
|
||
#include <MCCI_Sigfox.h> | ||
#include <Catena_Sigfox_wapper.h> | ||
|
||
namespace McciCatena { | ||
|
||
class CatenaFeatherM0 : public CatenaSamd21 | ||
|
@@ -37,6 +40,9 @@ class CatenaFeatherM0 : public CatenaSamd21 | |
// forward reference | ||
class LoRaWAN; | ||
|
||
// Sigfox binding | ||
class Sigfox /* forward */; | ||
|
||
// all FeatherM0s put vbat on A7 | ||
enum ANALOG_PINS | ||
{ | ||
|
@@ -116,6 +122,42 @@ class CatenaFeatherM0::LoRaWAN : public Arduino_LoRaWAN_network, | |
CatenaFeatherM0 *m_pCatena; | ||
}; | ||
|
||
class CatenaFeatherM0::Sigfox : public MCCI_Catena_Sigfox, | ||
public cPollableObject | ||
{ | ||
public: | ||
using Super = MCCI_Sigfox; | ||
|
||
/* | ||
|| the constructor. | ||
*/ | ||
Sigfox() {}; | ||
|
||
/* | ||
|| the begin function loads data from the local | ||
|| platform's stable storage and initializes | ||
|| the connection. | ||
*/ | ||
virtual bool begin(CatenaFeatherM0 *pCatena); | ||
|
||
virtual void poll() { sigfox_loop(); }; | ||
|
||
protected: | ||
/* | ||
|| we have to provide these for the lower level | ||
*/ | ||
virtual bool GetSigfoxConfiguringInfo( | ||
SigfoxConfiguringInfo *pProvisioningInfo | ||
) override; | ||
|
||
// | ||
// TODO([email protected]) -- the following are not used but are always | ||
// hanging around even when we have better ways to do things. | ||
// | ||
private: | ||
CatenaFeatherM0 *m_pCatena; | ||
}; | ||
|
||
} /* namespace McciCatena */ | ||
|
||
/**** end of CatenaFeatherM0.h ****/ | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ Copyright notice: | |
#include <Arduino_LoRaWAN_network.h> | ||
|
||
#include <MCCI_Sigfox.h> | ||
#include <Catena_Sigfox_wapper.h> | ||
|
||
namespace McciCatena { | ||
|
||
|
@@ -47,6 +48,9 @@ class CatenaStm32L0 : public CatenaStm32 | |
// forward reference | ||
class LoRaWAN; | ||
|
||
// Sigfox binding | ||
class Sigfox /* forward */; | ||
|
||
// start the Stm32L0 level | ||
virtual bool begin(void) override; | ||
|
||
|
@@ -159,11 +163,11 @@ class CatenaStm32L0::LoRaWAN : public Arduino_LoRaWAN_network, | |
CatenaStm32L0 *m_pCatena; | ||
}; | ||
|
||
class CatenaStm32L0::Sigfox : public MCCI_Sigfox, | ||
class CatenaStm32L0::Sigfox : public MCCI_Catena_Sigfox, | ||
public McciCatena::cPollableObject | ||
{ | ||
public: | ||
using Super = MCCI_Sigfox; | ||
using Super = MCCI_Catena_Sigfox; | ||
|
||
/* | ||
|| the constructor. | ||
|
@@ -177,20 +181,15 @@ class CatenaStm32L0::Sigfox : public MCCI_Sigfox, | |
*/ | ||
virtual bool begin(CatenaStm32L0 *pCatena); | ||
|
||
virtual void poll() { this->Super::loop(); }; | ||
virtual void poll() { sigfox_loop(); }; | ||
|
||
protected: | ||
/* | ||
|| we have to provide these for the lower level | ||
*/ | ||
virtual bool GetSigfoxConfiguringInfo( | ||
Arduino_LoRaWAN::OtaaProvisioningInfo * | ||
MCCI_Catena_Sigfox::SigfoxConfiguringInfo * | ||
) override; | ||
|
||
// | ||
// TODO([email protected]) -- the following are not used but are always | ||
// hanging around even when we have better ways to do things. | ||
// | ||
private: | ||
CatenaStm32L0 *m_pCatena; | ||
}; | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.