/**************************************************************************************************
  Filename:       LocationProfile.h
  Revised:        $Date: 2007-10-27 17:16:54 -0700 (Sat, 27 Oct 2007) $
  Revision:       $Revision: 15793 $

  Description:    Z-Stack Location Profile Application.


  Copyright 2006-2007 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,n
  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.
**************************************************************************************************/

#ifndef LOCATIONPROFILE_H
#define LOCATIONPROFILE_H

// Uncomment the definition of the LocationProfile device to build.
//#define LOCATION_REFNODE
//#define LOCATION_BLINDNODE
//#define LOCATION_DONGLE

/*********************************************************************
 * INCLUDES
 */

#if defined ( LOCATION_REFNODE )
  #include "RefNode.h"
#endif

#if defined ( LOCATION_DONGLE )
  #include "LocDongle.h"
#endif

/*********************************************************************
 * CONSTANTS
 */

// These endpoints are only for example and can be changed as desired.
#define LOCATION_REFNODE_ENDPOINT                 210
#define LOCATION_BLINDNODE_ENDPOINT               211
#define LOCATION_DONGLE_ENDPOINT                  203

#define LOCATION_PROFID                           0xC003

#define LOCATION_REFNODE_DEVICEID                 0x0010
#define LOCATION_BLINDNODE_DEVICEID               0x0011
#define LOCATION_DONGLE_DEVICEID                  0x0012
#define LOCATION_DEVICE_VERSION                   0
#define LOCATION_FLAGS                            0


// This profile uses the MSG AF service.


// NV Items
#define LOC_NV_REFNODE_CONFIG       0x1001
#define LOC_NV_BLINDNODE_CONFIG     0x1002



// Cluster IDs
#define TAS_BROADCAST_ABSENCE       0x0020
#define TAS_READ_TEMPERATURE        0x0010
#define TAS_READ_VOLATGE            0x0011
//Set configuration
#define TAS_SET_T1                  0x0080  //sample temperature period 
#define TAS_SET_T2                  0x0081  //send temperatue period
#define TAS_SET_T3                  0x0082  //alarm send temperatue period
#define TAS_SET_TD                  0x0083  //delta temperatue 
#define TAS_SET_TH                  0x0084  //temperatue high limit
#define TAS_SET_TL                  0x0085  //temperatue low limit
#define TAS_SET_TM                  0x0086  //delta temperatue function enable
//Read Configuration
#define TAS_RD_T1                  0x0070  //sample temperature period 
#define TAS_RD_T2                  0x0071  //send temperatue period
#define TAS_RD_T3                  0x0072  //alarm send temperatue period
#define TAS_RD_TD                  0x0073  //delta temperatue 
#define TAS_RD_TH                  0x0074  //temperatue high limit
#define TAS_RD_TL                  0x0075  //temperatue low limit
#define TAS_RD_TM                  0x0076  //delta temperatue function enable




/*********************************************************************
 * MACROS
 */

/*********************************************************************
 * GLOBAL VARIABLES
 */

/*********************************************************************
 * FUNCTIONS
 */
extern uint16 Debug_HalUARTWrite( uint8 port, uint8 *buf, uint16 len );

#endif  // #ifndef LOCATIONPROFILE_H

/*********************************************************************
*********************************************************************/
