⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zglobals.lst

📁 用IAR开发的ZIGBEE网络路由例子
💻 LST
📖 第 1 页 / 共 5 页
字号:
     75          // Security level

   \                                 In segment XDATA_Z, align 1, keep-with-next
   \   000000                REQUIRE __INIT_XDATA_Z
     76          uint8 zgSecurityLevel = SECURITY_LEVEL;
   \                     zgSecurityLevel:
   \   000000                DS 1
     77          
     78          // Route expiry

   \                                 In segment XDATA_I, align 1, keep-with-next
     79          uint8 zgRouteExpiryTime = ROUTE_EXPIRY_TIME;
   \                     zgRouteExpiryTime:
   \   000000                DS 1
   \   000001                REQUIRE `?<Initializer for zgRouteExpiryTime>`
   \   000001                REQUIRE __INIT_XDATA_I
     80          
     81          // Extended PAN Id

   \                                 In segment XDATA_Z, align 1, keep-with-next
   \   000000                REQUIRE __INIT_XDATA_Z
     82          uint8 zgExtendedPANID[Z_EXTADDR_LEN];
   \                     zgExtendedPANID:
   \   000000                DS 8
     83          
     84          // Broadcast parameters

   \                                 In segment XDATA_I, align 1, keep-with-next
     85          uint8 zgMaxBcastRetires   = MAX_BCAST_RETRIES;
   \                     zgMaxBcastRetires:
   \   000000                DS 1
   \   000001                REQUIRE `?<Initializer for zgMaxBcastRetires>`
   \   000001                REQUIRE __INIT_XDATA_I

   \                                 In segment XDATA_I, align 1, keep-with-next
     86          uint8 zgPassiveAckTimeout = PASSIVE_ACK_TIMEOUT;
   \                     zgPassiveAckTimeout:
   \   000000                DS 1
   \   000001                REQUIRE `?<Initializer for zgPassiveAckTimeout>`
   \   000001                REQUIRE __INIT_XDATA_I

   \                                 In segment XDATA_I, align 1, keep-with-next
     87          uint8 zgBcastDeliveryTime = BCAST_DELIVERY_TIME;
   \                     zgBcastDeliveryTime:
   \   000000                DS 1
   \   000001                REQUIRE `?<Initializer for zgBcastDeliveryTime>`
   \   000001                REQUIRE __INIT_XDATA_I
     88          
     89          // Network mode

   \                                 In segment XDATA_I, align 1, keep-with-next
     90          uint8 zgNwkMode = NWK_MODE;
   \                     zgNwkMode:
   \   000000                DS 1
   \   000001                REQUIRE `?<Initializer for zgNwkMode>`
   \   000001                REQUIRE __INIT_XDATA_I
     91          
     92          // Many-to-one values

   \                                 In segment XDATA_Z, align 1, keep-with-next
   \   000000                REQUIRE __INIT_XDATA_Z
     93          uint8 zgConcentratorEnable = CONCENTRATOR_ENABLE;
   \                     zgConcentratorEnable:
   \   000000                DS 1

   \                                 In segment XDATA_Z, align 1, keep-with-next
   \   000000                REQUIRE __INIT_XDATA_Z
     94          uint8 zgConcentratorDiscoveryTime = CONCENTRATOR_DISCOVERY_TIME;
   \                     zgConcentratorDiscoveryTime:
   \   000000                DS 1

   \                                 In segment XDATA_I, align 1, keep-with-next
     95          uint8 zgConcentratorRadius = CONCENTRATOR_RADIUS;
   \                     zgConcentratorRadius:
   \   000000                DS 1
   \   000001                REQUIRE `?<Initializer for zgConcentratorRadius>`
   \   000001                REQUIRE __INIT_XDATA_I

   \                                 In segment XDATA_I, align 1, keep-with-next
     96          uint8 zgMaxSourceRoute = MAX_SOURCE_ROUTE;
   \                     zgMaxSourceRoute:
   \   000000                DS 1
   \   000001                REQUIRE `?<Initializer for zgMaxSourceRoute>`
   \   000001                REQUIRE __INIT_XDATA_I
     97          
     98          
     99          /*********************************************************************
    100           * APS GLOBAL VARIABLES
    101           */
    102          
    103          // The maximum number of retries allowed after a transmission failure

   \                                 In segment XDATA_I, align 1, keep-with-next
    104          uint8 zgApscMaxFrameRetries = APSC_MAX_FRAME_RETRIES;
   \                     zgApscMaxFrameRetries:
   \   000000                DS 1
   \   000001                REQUIRE `?<Initializer for zgApscMaxFrameRetries>`
   \   000001                REQUIRE __INIT_XDATA_I
    105          
    106          // The maximum number of seconds (milliseconds) to wait for an
    107          // acknowledgement to a transmitted frame.
    108          
    109          // This number is used by polled devices.

   \                                 In segment XDATA_I, align 1, keep-with-next
    110          uint16 zgApscAckWaitDurationPolled = APSC_ACK_WAIT_DURATION_POLLED;
   \                     zgApscAckWaitDurationPolled:
   \   000000                DS 2
   \   000002                REQUIRE `?<Initializer for zgApscAckWaitDurationPolled>`
   \   000002                REQUIRE __INIT_XDATA_I
    111          
    112          // This number is used by non-polled devices in the following formula:
    113          //   (100 mSec) * (_NIB.MaxDepth * zgApsAckWaitMultiplier)

   \                                 In segment XDATA_I, align 1, keep-with-next
    114          uint8 zgApsAckWaitMultiplier = 2;
   \                     zgApsAckWaitMultiplier:
   \   000000                DS 1
   \   000001                REQUIRE `?<Initializer for zgApsAckWaitMultiplier>`
   \   000001                REQUIRE __INIT_XDATA_I
    115          
    116          // The maximum number of milliseconds for the end device binding

   \                                 In segment XDATA_I, align 1, keep-with-next
    117          uint16 zgApsDefaultMaxBindingTime = APS_DEFAULT_MAXBINDING_TIME;
   \                     zgApsDefaultMaxBindingTime:
   \   000000                DS 2
   \   000002                REQUIRE `?<Initializer for zgApsDefaultMaxBindingTime>`
   \   000002                REQUIRE __INIT_XDATA_I
    118          
    119          /*********************************************************************
    120           * SECURITY GLOBAL VARIABLES
    121           */
    122          
    123          // This is the pre-configured key in use (from NV memory)

   \                                 In segment XDATA_Z, align 1, keep-with-next
   \   000000                REQUIRE __INIT_XDATA_Z
    124          uint8 zgPreConfigKey[SEC_KEY_LEN];
   \                     zgPreConfigKey:
   \   000000                DS 16
    125          
    126          // If true, preConfigKey should be configured on all devices on the network
    127          // If false, it is configured only on the coordinator and sent to other 
    128          // devices upon joining.

   \                                 In segment XDATA_Z, align 1, keep-with-next
   \   000000                REQUIRE __INIT_XDATA_Z
    129          uint8 zgPreConfigKeys = FALSE; //  TRUE;
   \                     zgPreConfigKeys:
   \   000000                DS 1
    130          
    131          
    132          /*********************************************************************
    133           * ZDO GLOBAL VARIABLES
    134           */
    135          
    136          // Configured PAN ID

   \                                 In segment XDATA_I, align 1, keep-with-next
    137          uint16 zgConfigPANID = ZDAPP_CONFIG_PAN_ID;
   \                     zgConfigPANID:
   \   000000                DS 2
   \   000002                REQUIRE `?<Initializer for zgConfigPANID>`
   \   000002                REQUIRE __INIT_XDATA_I
    138          
    139          // Device Logical Type

   \                                 In segment XDATA_I, align 1, keep-with-next
    140          uint8 zgDeviceLogicalType = DEVICE_LOGICAL_TYPE;
   \                     zgDeviceLogicalType:
   \   000000                DS 1
   \   000001                REQUIRE `?<Initializer for zgDeviceLogicalType>`
   \   000001                REQUIRE __INIT_XDATA_I
    141          
    142          // Startup Delay

   \                                 In segment XDATA_I, align 1, keep-with-next
    143          uint8 zgStartDelay = START_DELAY;
   \                     zgStartDelay:
   \   000000                DS 1
   \   000001                REQUIRE `?<Initializer for zgStartDelay>`
   \   000001                REQUIRE __INIT_XDATA_I
    144          
    145          /*********************************************************************
    146           * NON-STANDARD GLOBAL VARIABLES
    147           */
    148          
    149          // Simple API Endpoint

   \                                 In segment XDATA_I, align 1, keep-with-next
    150          uint8 zgSapiEndpoint = SAPI_ENDPOINT;
   \                     zgSapiEndpoint:
   \   000000                DS 1
   \   000001                REQUIRE `?<Initializer for zgSapiEndpoint>`
   \   000001                REQUIRE __INIT_XDATA_I
    151          
    152          /*********************************************************************
    153           * LOCAl VARIABLES
    154           */
    155          
    156          /*********************************************************************
    157           * ZGlobal Item Table
    158           */

   \                                 In segment CODE_C, align 1
    159          static CONST zgItem_t zgItemTable[] = 
   \                     ??zgItemTable:
   \   000000   00000000     DW 0, 0, 0H
   \            0000    
    160          {
    161          #if defined ( NV_INIT )
    162            {
    163              ZCD_NV_LOGICAL_TYPE, sizeof(zgDeviceLogicalType), &zgDeviceLogicalType
    164            },
    165            {
    166              ZCD_NV_POLL_RATE, sizeof(zgPollRate), &zgPollRate
    167            },
    168            {
    169             ZCD_NV_QUEUED_POLL_RATE, sizeof(zgQueuedPollRate), &zgQueuedPollRate
    170            },
    171            {
    172              ZCD_NV_RESPONSE_POLL_RATE, sizeof(zgResponsePollRate), &zgResponsePollRate
    173            },
    174            {
    175              ZCD_NV_REJOIN_POLL_RATE, sizeof(zgRejoinPollRate), &zgRejoinPollRate
    176            },
    177            {
    178             ZCD_NV_DATA_RETRIES, sizeof(zgMaxDataRetries), &zgMaxDataRetries
    179            },
    180            {
    181               ZCD_NV_POLL_FAILURE_RETRIES, sizeof(zgMaxPollFailureRetries), &zgMaxPollFailureRetries
    182            },
    183            {
    184              ZCD_NV_CHANLIST, sizeof(zgDefaultChannelList), &zgDefaultChannelList
    185            }
    186            ,
    187            {
    188              ZCD_NV_SCAN_DURATION, sizeof(zgDefaultStartingScanDuration), &zgDefaultStartingScanDuration
    189            },
    190            {
    191              ZCD_NV_STACK_PROFILE, sizeof(zgStackProfile), &zgStackProfile
    192            },
    193            {
    194              ZCD_NV_INDIRECT_MSG_TIMEOUT, sizeof(zgIndirectMsgTimeout), &zgIndirectMsgTimeout
    195            },
    196            {
    197              ZCD_NV_ROUTE_EXPIRY_TIME, sizeof(zgRouteExpiryTime), &zgRouteExpiryTime
    198            },
    199            {
    200              ZCD_NV_EXTENDED_PAN_ID, Z_EXTADDR_LEN, &zgExtendedPANID
    201            },
    202            {
    203              ZCD_NV_BCAST_RETRIES, sizeof(zgMaxBcastRetires), &zgMaxBcastRetires
    204            },
    205            {
    206              ZCD_NV_PASSIVE_ACK_TIMEOUT, sizeof(zgPassiveAckTimeout), &zgPassiveAckTimeout
    207            },
    208            {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -