[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:
Thomas
2017-12-08 16:58:32 +00:00
committed by Jonathan Hui
parent 9428a2fe26
commit 5110704723
+4 -14
View File
@@ -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.