[mac] move static variable definition into Mac class (#4132)

Reasons for this the change:

- Namespace/scope variables under Mac class only.

- Allow us in future to potentially break mac.cpp into multiple files
  (e.g. mac_ftd?).
This commit is contained in:
Abtin Keshavarzian
2019-08-30 09:01:08 -07:00
committed by Jonathan Hui
parent 45b3baf040
commit ed0939c45a
2 changed files with 11 additions and 5 deletions
+6 -5
View File
@@ -55,17 +55,18 @@
namespace ot {
namespace Mac {
static const uint8_t sMode2Key[] = {0x78, 0x58, 0x16, 0x86, 0xfd, 0xb4, 0x58, 0x0f,
0xb0, 0x92, 0x54, 0x6a, 0xec, 0xbd, 0x15, 0x66};
const uint8_t Mac::sMode2Key[] = {0x78, 0x58, 0x16, 0x86, 0xfd, 0xb4, 0x58, 0x0f,
0xb0, 0x92, 0x54, 0x6a, 0xec, 0xbd, 0x15, 0x66};
static const otExtAddress sMode2ExtAddress = {
const otExtAddress Mac::sMode2ExtAddress = {
{0x35, 0x06, 0xfe, 0xb8, 0x23, 0xd4, 0x87, 0x12},
};
static const otExtendedPanId sExtendedPanidInit = {
const otExtendedPanId Mac::sExtendedPanidInit = {
{0xde, 0xad, 0x00, 0xbe, 0xef, 0x00, 0xca, 0xfe},
};
static const char sNetworkNameInit[] = "OpenThread";
const char Mac::sNetworkNameInit[] = "OpenThread";
Mac::Mac(Instance &aInstance)
: InstanceLocator(aInstance)
+5
View File
@@ -678,6 +678,11 @@ private:
static const char *OperationToString(Operation aOperation);
static const uint8_t sMode2Key[];
static const otExtAddress sMode2ExtAddress;
static const otExtendedPanId sExtendedPanidInit;
static const char sNetworkNameInit[];
bool mEnabled : 1;
bool mPendingActiveScan : 1;
bool mPendingEnergyScan : 1;