mirror of
https://github.com/espressif/openthread.git
synced 2026-08-16 23:57:46 +00:00
[style] apply clang-format-6.0 changes (#3222)
This commit is contained in:
@@ -55,7 +55,8 @@ extern "C" {
|
||||
* This enumeration defines the Border Agent state.
|
||||
*
|
||||
*/
|
||||
typedef enum otBorderAgentState {
|
||||
typedef enum otBorderAgentState
|
||||
{
|
||||
OT_BORDER_AGENT_STATE_STOPPED = 0, ///< Border agent role is disabled.
|
||||
OT_BORDER_AGENT_STATE_STARTED = 1, ///< Border agent is started.
|
||||
OT_BORDER_AGENT_STATE_ACTIVE = 2, ///< Border agent is connected with external commissioner.
|
||||
|
||||
@@ -65,7 +65,8 @@ extern "C" {
|
||||
* CoAP Type values.
|
||||
*
|
||||
*/
|
||||
typedef enum otCoapType {
|
||||
typedef enum otCoapType
|
||||
{
|
||||
OT_COAP_TYPE_CONFIRMABLE = 0x00, ///< Confirmable
|
||||
OT_COAP_TYPE_NON_CONFIRMABLE = 0x10, ///< Non-confirmable
|
||||
OT_COAP_TYPE_ACKNOWLEDGMENT = 0x20, ///< Acknowledgment
|
||||
@@ -82,7 +83,8 @@ typedef enum otCoapType {
|
||||
* CoAP Code values.
|
||||
*
|
||||
*/
|
||||
typedef enum otCoapCode {
|
||||
typedef enum otCoapCode
|
||||
{
|
||||
OT_COAP_CODE_EMPTY = OT_COAP_CODE(0, 0), ///< Empty message code
|
||||
OT_COAP_CODE_GET = OT_COAP_CODE(0, 1), ///< Get
|
||||
OT_COAP_CODE_POST = OT_COAP_CODE(0, 2), ///< Post
|
||||
@@ -118,7 +120,8 @@ typedef enum otCoapCode {
|
||||
/**
|
||||
* CoAP Option Numbers
|
||||
*/
|
||||
typedef enum otCoapOptionType {
|
||||
typedef enum otCoapOptionType
|
||||
{
|
||||
OT_COAP_OPTION_IF_MATCH = 1, ///< If-Match
|
||||
OT_COAP_OPTION_URI_HOST = 3, ///< Uri-Host
|
||||
OT_COAP_OPTION_E_TAG = 4, ///< ETag
|
||||
@@ -153,7 +156,8 @@ typedef struct otCoapOption
|
||||
* https://tools.ietf.org/html/rfc7252#page-92
|
||||
*
|
||||
*/
|
||||
typedef enum otCoapOptionContentFormat {
|
||||
typedef enum otCoapOptionContentFormat
|
||||
{
|
||||
OT_COAP_OPTION_CONTENT_FORMAT_TEXT_PLAIN = 0, ///< text/plain
|
||||
OT_COAP_OPTION_CONTENT_FORMAT_LINK_FORMAT = 40, ///< application/link-format
|
||||
OT_COAP_OPTION_CONTENT_FORMAT_XML = 41, ///< application/xml
|
||||
|
||||
@@ -58,7 +58,8 @@ extern "C" {
|
||||
* This enumeration defines the Commissioner State.
|
||||
*
|
||||
*/
|
||||
typedef enum otCommissionerState {
|
||||
typedef enum otCommissionerState
|
||||
{
|
||||
OT_COMMISSIONER_STATE_DISABLED = 0, ///< Commissioner role is disabled.
|
||||
OT_COMMISSIONER_STATE_PETITION = 1, ///< Currently petitioning to become a Commissioner.
|
||||
OT_COMMISSIONER_STATE_ACTIVE = 2, ///< Commissioner role is active.
|
||||
|
||||
@@ -222,7 +222,8 @@ typedef struct otOperationalDataset
|
||||
* This enumeration represents meshcop TLV types.
|
||||
*
|
||||
*/
|
||||
typedef enum otMeshcopTlvType {
|
||||
typedef enum otMeshcopTlvType
|
||||
{
|
||||
OT_MESHCOP_TLV_CHANNEL = 0, ///< meshcop Channel TLV
|
||||
OT_MESHCOP_TLV_PANID = 1, ///< meshcop Pan Id TLV
|
||||
OT_MESHCOP_TLV_EXTPANID = 2, ///< meshcop Extended Pan Id TLV
|
||||
|
||||
@@ -173,7 +173,8 @@ extern "C" {
|
||||
* This enumeration represents error codes used throughout OpenThread.
|
||||
*
|
||||
*/
|
||||
typedef enum otError {
|
||||
typedef enum otError
|
||||
{
|
||||
/**
|
||||
* No error.
|
||||
*/
|
||||
|
||||
@@ -56,7 +56,8 @@ extern "C" {
|
||||
* ICMPv6 Message Types
|
||||
*
|
||||
*/
|
||||
typedef enum otIcmp6Type {
|
||||
typedef enum otIcmp6Type
|
||||
{
|
||||
OT_ICMP6_TYPE_DST_UNREACH = 1, ///< Destination Unreachable
|
||||
OT_ICMP6_TYPE_ECHO_REQUEST = 128, ///< Echo Request
|
||||
OT_ICMP6_TYPE_ECHO_REPLY = 129, ///< Echo Reply
|
||||
@@ -66,7 +67,8 @@ typedef enum otIcmp6Type {
|
||||
* ICMPv6 Message Codes
|
||||
*
|
||||
*/
|
||||
typedef enum otIcmp6Code {
|
||||
typedef enum otIcmp6Code
|
||||
{
|
||||
OT_ICMP6_CODE_DST_UNREACH_NO_ROUTE = 0, ///< Destination Unreachable No Route
|
||||
} otIcmp6Code;
|
||||
|
||||
@@ -127,7 +129,8 @@ typedef struct otIcmp6Handler
|
||||
* ICMPv6 Echo Reply Modes
|
||||
*
|
||||
*/
|
||||
typedef enum otIcmp6EchoMode {
|
||||
typedef enum otIcmp6EchoMode
|
||||
{
|
||||
OT_ICMP6_ECHO_HANDLER_DISABLED = 0, ///< ICMPv6 Echo processing disabled
|
||||
OT_ICMP6_ECHO_HANDLER_UNICAST_ONLY = 1, ///< ICMPv6 Echo processing enabled only for unicast requests only
|
||||
OT_ICMP6_ECHO_HANDLER_MULTICAST_ONLY = 2, ///< ICMPv6 Echo processing enabled only for multicast requests only
|
||||
|
||||
@@ -126,7 +126,8 @@ typedef struct otNetifMulticastAddress
|
||||
* This enumeration represents the list of allowable values for an InterfaceId.
|
||||
*
|
||||
*/
|
||||
typedef enum otNetifInterfaceId {
|
||||
typedef enum otNetifInterfaceId
|
||||
{
|
||||
OT_NETIF_INTERFACE_ID_HOST = -1, ///< The interface ID telling packets received by host side interfaces.
|
||||
OT_NETIF_INTERFACE_ID_THREAD = 1, ///< The Thread Network interface ID.
|
||||
} otNetifInterfaceId;
|
||||
|
||||
@@ -56,7 +56,8 @@ extern "C" {
|
||||
* This enumeration defines the Joiner State.
|
||||
*
|
||||
*/
|
||||
typedef enum otJoinerState {
|
||||
typedef enum otJoinerState
|
||||
{
|
||||
OT_JOINER_STATE_IDLE = 0,
|
||||
OT_JOINER_STATE_DISCOVER = 1,
|
||||
OT_JOINER_STATE_CONNECT = 2,
|
||||
|
||||
@@ -84,7 +84,8 @@ typedef uint8_t otMacFilterIterator; ///< Used to iterate through mac filter ent
|
||||
* Defines address mode of the mac filter.
|
||||
*
|
||||
*/
|
||||
typedef enum otMacFilterAddressMode {
|
||||
typedef enum otMacFilterAddressMode
|
||||
{
|
||||
OT_MAC_FILTER_ADDRESS_MODE_DISABLED, ///< Address filter is disabled.
|
||||
OT_MAC_FILTER_ADDRESS_MODE_WHITELIST, ///< Whitelist address filter mode is enabled.
|
||||
OT_MAC_FILTER_ADDRESS_MODE_BLACKLIST, ///< Blacklist address filter mode is enabled.
|
||||
|
||||
@@ -150,7 +150,8 @@ typedef struct otExternalRouteConfig
|
||||
* Defines valid values for member mPreference in otExternalRouteConfig and otBorderRouterConfig.
|
||||
*
|
||||
*/
|
||||
typedef enum otRoutePreference {
|
||||
typedef enum otRoutePreference
|
||||
{
|
||||
OT_ROUTE_PREFERENCE_LOW = -1, ///< Low route preference.
|
||||
OT_ROUTE_PREFERENCE_MED = 0, ///< Medium route preference.
|
||||
OT_ROUTE_PREFERENCE_HIGH = 1, ///< High route preference.
|
||||
|
||||
@@ -56,7 +56,8 @@ extern "C" {
|
||||
* This enum represents OpenThread time synchronization status.
|
||||
*
|
||||
*/
|
||||
typedef enum otNetworkTimeStatus {
|
||||
typedef enum otNetworkTimeStatus
|
||||
{
|
||||
OT_NETWORK_TIME_UNSYNCHRONIZED = -1, ///< The device hasn't attached to a network.
|
||||
OT_NETWORK_TIME_RESYNC_NEEDED = 0, ///< The device hasn’t received time sync for more than two periods time.
|
||||
OT_NETWORK_TIME_SYNCHRONIZED = 1, ///< The device network time is synchronized.
|
||||
|
||||
@@ -203,7 +203,8 @@ enum
|
||||
* This enum represents BLE Device Address types.
|
||||
*
|
||||
*/
|
||||
typedef enum otPlatBleAddressType {
|
||||
typedef enum otPlatBleAddressType
|
||||
{
|
||||
OT_BLE_ADDRESS_TYPE_PUBLIC = 0, ///< Bluetooth public device address.
|
||||
OT_BLE_ADDRESS_TYPE_RANDOM_STATIC = 1, ///< Bluetooth random static address.
|
||||
OT_BLE_ADDRESS_TYPE_RANDOM_PRIVATE_RESOLVABLE = 2, ///< Bluetooth random private resolvable address.
|
||||
@@ -216,7 +217,8 @@ typedef enum otPlatBleAddressType {
|
||||
*
|
||||
* See v4.2 [Vol 3, Part G] 3.3.1.1 Characteristic Properties - Table 3.5
|
||||
*/
|
||||
typedef enum otPlatBleCccdFlags {
|
||||
typedef enum otPlatBleCccdFlags
|
||||
{
|
||||
/**
|
||||
* If set, permits broadcasts of the Characteristic Value using Characteristic Configuration Descriptor.
|
||||
*/
|
||||
@@ -273,7 +275,8 @@ typedef struct otPlatBleDeviceAddr
|
||||
* This enumeration defines flags for BLE advertisement mode.
|
||||
*
|
||||
*/
|
||||
typedef enum otPlatBleAdvMode {
|
||||
typedef enum otPlatBleAdvMode
|
||||
{
|
||||
/**
|
||||
* If set, advertising device will allow connections to be initiated.
|
||||
*/
|
||||
@@ -321,7 +324,8 @@ typedef struct otPlatBleGapConnParams
|
||||
* This enumeration represents BLE UUID value.
|
||||
*
|
||||
*/
|
||||
typedef enum otPlatBleUuidType {
|
||||
typedef enum otPlatBleUuidType
|
||||
{
|
||||
OT_BLE_UUID_TYPE_16 = 0, ///< UUID represented by 16-bit value.
|
||||
OT_BLE_UUID_TYPE_32 = 1, ///< UUID represented by 32-bit value.
|
||||
OT_BLE_UUID_TYPE_128 = 2, ///< UUID represented by 128-bit value.
|
||||
|
||||
@@ -116,7 +116,8 @@ typedef uint8_t otLogLevel;
|
||||
* This enumeration represents log regions.
|
||||
*
|
||||
*/
|
||||
typedef enum otLogRegion {
|
||||
typedef enum otLogRegion
|
||||
{
|
||||
OT_LOG_REGION_API = 1, ///< OpenThread API
|
||||
OT_LOG_REGION_MLE = 2, ///< MLE
|
||||
OT_LOG_REGION_ARP = 3, ///< EID-to-RLOC mapping.
|
||||
|
||||
@@ -67,7 +67,8 @@ void otPlatReset(otInstance *aInstance);
|
||||
* These are in the same order as the Spinel reset reason codes.
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
OT_PLAT_RESET_REASON_POWER_ON = 0,
|
||||
OT_PLAT_RESET_REASON_EXTERNAL = 1,
|
||||
OT_PLAT_RESET_REASON_SOFTWARE = 2,
|
||||
@@ -120,7 +121,8 @@ void otPlatWakeHost(void);
|
||||
* After a reset, the MCU power state MUST be `OT_PLAT_POWER_STATE_ON`.
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
/**
|
||||
* NCP's MCU stays on and active all the time.
|
||||
*
|
||||
|
||||
@@ -204,7 +204,8 @@ typedef struct otRadioFrame
|
||||
* This structure represents the state of a radio.
|
||||
* Initially, a radio is in the Disabled state.
|
||||
*/
|
||||
typedef enum otRadioState {
|
||||
typedef enum otRadioState
|
||||
{
|
||||
OT_RADIO_STATE_DISABLED = 0,
|
||||
OT_RADIO_STATE_SLEEP = 1,
|
||||
OT_RADIO_STATE_RECEIVE = 2,
|
||||
|
||||
@@ -59,7 +59,8 @@ extern "C" {
|
||||
* Represents a Thread device role.
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
OT_DEVICE_ROLE_DISABLED = 0, ///< The Thread stack is disabled.
|
||||
OT_DEVICE_ROLE_DETACHED = 1, ///< Not currently participating in a Thread network/partition.
|
||||
OT_DEVICE_ROLE_CHILD = 2, ///< The Thread Child role.
|
||||
|
||||
@@ -546,7 +546,8 @@ OTAPI otError OTCALL otThreadSetParentPriority(otInstance *aInstance, int8_t aPa
|
||||
* removed.
|
||||
*
|
||||
*/
|
||||
typedef enum otThreadChildTableEvent {
|
||||
typedef enum otThreadChildTableEvent
|
||||
{
|
||||
OT_THREAD_CHILD_TABLE_EVENT_CHILD_ADDED, ///< A child is being added.
|
||||
OT_THREAD_CHILD_TABLE_EVENT_CHILD_REMOVED, ///< A child is being removed.
|
||||
} otThreadChildTableEvent;
|
||||
|
||||
Reference in New Issue
Block a user