Z-Stack API Reference  5.10.00.13
Z-Stack TI-RTOS API
Date
2018-12-18 12:13:13 -0800 (Tue, 18 Dec 2018)
Revision
42528

Overview

To write an application for the Texas Instruments SimpleLink CC13x2 / CC26x2 Software Development Kit you first need to understand that the embedded system for the CC13x2/CC26x2 is organized as follows

fig-example-application-block-diagram.PNG



The functions defined in zstackapi.h are functions that communicate with the Z-Stack image through OsalPort messaging. If an immediate response, not over the air, is expected, the function will block for the response message.

To setup communicate with the Z-Stack thread, your application should do the following initialization (simplified):

When the joining process is complete, you'll receive a zstackmsg_CmdIDs_DEV_STATE_CHANGE_IND message with a state of:

You should then call zclport_getDeviceInfo(), or Zstackapi_sysNwkInfoReadReq() if your application isn't a ZCL project, to retrieve the device's joined network parameters.

You're free to do device discovery through ZDO commands (ie. Zstackapi_ZdoMatchDescReq()) and send data either through ZCL commands or by calling Zstackapi_AfDataReq() to send application proprietary messages.

Once you've registed an endpoint, your application will recieve any data message addressed to that endpoint as an AF Incoming Data Indication [zstackmsg_afIncomingMsgInd_t with a message event of zstackmsg_CmdIDs_AF_INCOMING_MSG_IND] through an OsalPort message.

Also, any indications or response message that you have signed up for using Zstackapi_DevZDOCBReq() will be delivered to your application as an OsalPort message. For example, the Device State Change message [zstackmsg_devStateChangeInd_t with a message event of zstackmsg_CmdIDs_DEV_STATE_CHANGE_IND].

Z-Stack API

ZStack Indications (callbacks)

The following messages will be delivered to your application through an OsalPort message after you register at least one endpoint with Zstackapi_AfRegisterReq(), you must call Zstackapi_freeIndMsg() to free the message when you are done processing:

The following messages will be delivered to your application through an OsalPort message after you request them by setting the correct fields (has and flag) to 'true' in zstack_devZDOCBReq_t and calling Zstackapi_DevZDOCBReq(), you must call Zstackapi_freeIndMsg() to free the message when you are done processing:

The following messages will be delivered to your application through an OsalPort message after a request to perform any BDB commissioning process, for instance, Zstackapi_bdbStartCommissioningReq() calls will trigger zstackmsg_CmdIDs_BDB_NOTIFICATION on the requested commissioning methods, you must call Zstackapi_freeIndMsg() to free the message when you are done processing:

The following messages will be delivered to your application through an OsalPort message when GP messages are process by the stack and must be process by Green Power Proxy or sink application side, which by default are already handled by example apps to the respective green power application. you must call Zstackapi_freeIndMsg() to free the message when you are done processing:



ZCL Modules

  • ZCL - All ZCL clusters IDs, common functions/typedefs
  • ZCL General ZCL clusters macros, typedefs, and functions for general device types
  • ZCL Closures ZCL cluster macros, typedefs, and functions for closure device types
  • ZCL Safety and Security ZCL cluster macros, typedefs, and functions for safety and security device types
  • ZCL Green Power Operation of the ZCL Green Power feature
  • ZCL Over the Air Macros, typedefs, and functions for the OTA cluster
  • ZCL Porting functions - Functions needed by ZCL to communication with the Z-Stack Thread.




Copyright 2014 - 2018 Texas Instruments Incorporated. All rights reserved.

IMPORTANT: Your use of this Software is limited to those specific rights granted under the terms of a software license agreement between the user who downloaded the software, his/her employer (which must be your employer) and Texas Instruments Incorporated (the "License"). You may not use this Software unless you agree to abide by the terms of the License. The License limits your use, and you acknowledge, that the Software may not be modified, copied or distributed unless embedded on a Texas Instruments microcontroller or used solely and exclusively in conjunction with a Texas Instruments radio frequency transceiver, which is integrated into your product. Other than for the foregoing purpose, you may not use, reproduce, copy, prepare derivative works of, modify, distribute, perform, display or sell this Software and/or its documentation for any purpose.

YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE PROVIDED ``AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.

Should you have any questions regarding your right to use this Software, contact Texas Instruments Incorporated at www.TI.com.