Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dhineshkumarmcci committed Dec 23, 2020
1 parent 2b4946b commit 951240e
Show file tree
Hide file tree
Showing 22 changed files with 1,685 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Catena4410.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ class Catena4410 : public CatenaFeatherM0
*/
class LoRaWAN /* forward */;

// Sigfox binding
class Sigfox /* forward */;

virtual const char *CatenaName() const override { return "Catena 4410"; };

protected:
Expand Down
24 changes: 24 additions & 0 deletions src/Catena4420.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ class Catena4420 : public CatenaFeatherM0
*/
class LoRaWAN /* forward */;

// Sigfox binding
class Sigfox /* forward */;

virtual const char *CatenaName() const override { return "Catena 4420"; };

protected:
Expand Down Expand Up @@ -77,6 +80,27 @@ class Catena4420::LoRaWAN : public CatenaFeatherM0::LoRaWAN
private:
};

/*
|| The Sigfox class for the Catena4420.
*/
class Catena4420::Sigfox : public CatenaFeatherM0::Sigfox
{
public:
using Super = CatenaFeatherM0::Sigfox;

/*
|| the constructor.
*/
Sigfox() {};

protected:
/*
|| we use the CatenaFeatherM0 defaults
*/

private:
};

} /* namespace McciCatena */


Expand Down
24 changes: 24 additions & 0 deletions src/Catena455x.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ class Catena455x : public CatenaStm32L0
// LoRaWAN binding
class LoRaWAN /* forward */;

// Sigfox binding
class Sigfox /* forward */;

enum ANALOG_PINS
{
APIN_VBAT_SENSE = A3,
Expand Down Expand Up @@ -108,6 +111,27 @@ class Catena455x::LoRaWAN : public CatenaStm32L0::LoRaWAN

protected:

private:
};

/*
|| The Sigfox class for the Catena 455x.
*/
class Catena455x::Sigfox : public CatenaStm32L0::Sigfox
{
public:
using Super = CatenaStm32L0::Sigfox;

/*
|| the constructor. We don't do anything at this level, the
|| Super constructor does most of the work.
*/
Sigfox() {};

bool begin(Catena455x *pParent);

protected:

private:
};

Expand Down
24 changes: 24 additions & 0 deletions src/Catena461x.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ class Catena461x : public CatenaStm32L0
// LoRaWAN binding
class LoRaWAN /* forward */;

// Sigfox binding
class Sigfox /* forward */;

enum ANALOG_PINS
{
APIN_VBAT_SENSE = A3,
Expand Down Expand Up @@ -122,6 +125,27 @@ class Catena461x::LoRaWAN : public CatenaStm32L0::LoRaWAN

protected:

private:
};

/*
|| The Sigfox class for the Catena 461x.
*/
class Catena461x::Sigfox : public CatenaStm32L0::Sigfox
{
public:
using Super = CatenaStm32L0::Sigfox;

/*
|| the constructor. We don't do anything at this level, the
|| Super constructor does most of the work.
*/
Sigfox() {};

bool begin(Catena461x *pParent);

protected:

private:
};

Expand Down
24 changes: 24 additions & 0 deletions src/Catena463x.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ class Catena463x : public CatenaStm32L0
// LoRaWAN binding
class LoRaWAN /* forward */;

// Sigfox binding
class Sigfox /* forward */;

enum ANALOG_PINS
{
APIN_VBAT_SENSE = A1,
Expand Down Expand Up @@ -97,6 +100,27 @@ class Catena463x::LoRaWAN : public CatenaStm32L0::LoRaWAN

protected:

private:
};

/*
|| The Sigfox class for the Catena 463x.
*/
class Catena463x::Sigfox : public CatenaStm32L0::Sigfox
{
public:
using Super = CatenaStm32L0::Sigfox;

/*
|| the constructor. We don't do anything at this level, the
|| Super constructor does most of the work.
*/
Sigfox() {};

bool begin(Catena463x *pParent);

protected:

private:
};

Expand Down
24 changes: 24 additions & 0 deletions src/Catena480x.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ class Catena480x : public CatenaStm32L0
// LoRaWAN binding
class LoRaWAN /* forward */;

// Sigfox binding
class Sigfox /* forward */;

enum ANALOG_PINS
{
APIN_VBAT_SENSE = A0,
Expand Down Expand Up @@ -120,6 +123,27 @@ class Catena480x::LoRaWAN : public CatenaStm32L0::LoRaWAN

protected:

private:
};

/*
|| The Sigfox class for the Catena 480x.
*/
class Catena480x::Sigfox : public CatenaStm32L0::Sigfox
{
public:
using Super = CatenaStm32L0::Sigfox;

/*
|| the constructor. We don't do anything at this level, the
|| Super constructor does most of the work.
*/
Sigfox() {};

bool begin(Catena480x *pParent);

protected:

private:
};

Expand Down
38 changes: 38 additions & 0 deletions src/CatenaStm32L0.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Copyright notice:

#include <Arduino_LoRaWAN_network.h>

#include <MCCI_Sigfox.h>

namespace McciCatena {

class CatenaStm32L0 : public CatenaStm32
Expand Down Expand Up @@ -157,6 +159,42 @@ class CatenaStm32L0::LoRaWAN : public Arduino_LoRaWAN_network,
CatenaStm32L0 *m_pCatena;
};

class CatenaStm32L0::Sigfox : public MCCI_Sigfox,
public McciCatena::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(CatenaStm32L0 *pCatena);

virtual void poll() { this->Super::loop(); };

protected:
/*
|| we have to provide these for the lower level
*/
virtual bool GetSigfoxConfiguringInfo(
Arduino_LoRaWAN::OtaaProvisioningInfo *
) override;

//
// TODO(tmm@mcci.com) -- the following are not used but are always
// hanging around even when we have better ways to do things.
//
private:
CatenaStm32L0 *m_pCatena;
};

// this function is called from a trampoline C function that
// needs to invoke analog reads for checking USB presence.
bool CatenaStm32L0_ReadAnalog(
Expand Down
5 changes: 5 additions & 0 deletions src/Catena_FramStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ class cFramStorage
kOperatingFlags = 15,
kBme680Cal = 16,
kAppConf = 17,
kDevID = 18,
kPAC = 19,
kKey = 20,
kRegion = 21,
kEncryption = 22,
// when you add something, also update McciCatena::cFramStorage::vItemDefs[]!
kMAX
};
Expand Down
Loading

0 comments on commit 951240e

Please sign in to comment.