mirror of
https://github.com/espressif/openthread.git
synced 2026-08-07 03:07:47 +00:00
Create a mechanism to modify the beacon version field. (#841)
* Create a mechanism to modify the beacon version field when the Join flag is set.
This commit is contained in:
@@ -34,6 +34,8 @@
|
||||
#ifndef MAC_FRAME_HPP_
|
||||
#define MAC_FRAME_HPP_
|
||||
|
||||
#include <openthread-core-config.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
@@ -799,7 +801,14 @@ public:
|
||||
* This method sets the Joining Permitted flag.
|
||||
*
|
||||
*/
|
||||
void SetJoiningPermitted(void) { mFlags |= kJoiningFlag; }
|
||||
void SetJoiningPermitted(void) {
|
||||
mFlags |= kJoiningFlag;
|
||||
|
||||
#if OPENTHREAD_CONFIG_JOIN_BEACON_VERSION != kProtocolVersion
|
||||
mFlags &= ~kVersionMask;
|
||||
mFlags |= OPENTHREAD_CONFIG_JOIN_BEACON_VERSION << kVersionOffset;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a pointer to the Network Name field.
|
||||
|
||||
@@ -237,6 +237,16 @@
|
||||
#define OPENTHREAD_CONFIG_COAP_MAX_RETRANSMIT 4
|
||||
#endif // OPENTHREAD_CONFIG_COAP_MAX_RETRANSMIT
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_JOIN_BEACON_VERSION
|
||||
*
|
||||
* The Beacon version to use when the beacon join flag is set.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_JOIN_BEACON_VERSION
|
||||
#define OPENTHREAD_CONFIG_JOIN_BEACON_VERSION kProtocolVersion
|
||||
#endif // OPENTHREAD_CONFIG_JOIN_BEACON_VERSION
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_LOG_LEVEL
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user