mirror of
https://github.com/espressif/openthread.git
synced 2026-08-10 04:37:47 +00:00
[network-data] changing kMaxServerDataSize and kMaxServiceDataSize to #defines (#2408)
The size of the server and service data is not really an enum. Additionally the formatting of the enum was different from the other enums.
This commit is contained in:
@@ -812,18 +812,8 @@ typedef enum otRoutePreference
|
||||
OT_ROUTE_PREFERENCE_HIGH = 1, ///< High route preference.
|
||||
} otRoutePreference;
|
||||
|
||||
enum
|
||||
{
|
||||
/**
|
||||
* Maximum size of Service Data in bytes.
|
||||
*/
|
||||
kMaxServiceDataSize = 252,
|
||||
|
||||
/**
|
||||
* Maximum size of Server Data in bytes. This is theoretical limit, practical one is much lower.
|
||||
*/
|
||||
kMaxServerDataSize = 248,
|
||||
};
|
||||
#define OT_SERVICE_DATA_MAX_SIZE 252 ///< Maximum size of Service Data in bytes.
|
||||
#define OT_SERVER_DATA_MAX_SIZE 248 ///< Maximum size of Server Data in bytes. This is theoretical limit, practical one is much lower.
|
||||
|
||||
/**
|
||||
* This structure represents a Server configuration.
|
||||
@@ -843,7 +833,7 @@ typedef struct otServerConfig
|
||||
/**
|
||||
* Server data bytes
|
||||
*/
|
||||
uint8_t mServerData[kMaxServerDataSize];
|
||||
uint8_t mServerData[OT_SERVER_DATA_MAX_SIZE];
|
||||
|
||||
/**
|
||||
* The Server Rloc.
|
||||
@@ -874,7 +864,7 @@ typedef struct otServiceConfig
|
||||
/**
|
||||
* Service data bytes
|
||||
*/
|
||||
uint8_t mServiceData[kMaxServiceDataSize];
|
||||
uint8_t mServiceData[OT_SERVICE_DATA_MAX_SIZE];
|
||||
|
||||
/**
|
||||
* The Server configuration.
|
||||
|
||||
Reference in New Issue
Block a user