From 5110704723dfc6eff03f8b6de06b7a2d5dd50733 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 8 Dec 2017 17:58:32 +0100 Subject: [PATCH] [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. --- include/openthread/types.h | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/include/openthread/types.h b/include/openthread/types.h index 1d9b2a09c..21d1b5d1d 100644 --- a/include/openthread/types.h +++ b/include/openthread/types.h @@ -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.