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.