#ifndef _IKONKE_OPT_TUNNEL_H_
#define _IKONKE_OPT_TUNNEL_H_

#include "ikk-module-def.h"
#include "../driver/ikk-uart.h"

extern const af_simple_descriptor_t kInterpanSimpleDesc;



#define	INTERPAN_ENDPOINT						5

#define INTERPAN_EVENT_INIT						0x00		// interPan Event
#define INTERPAN_EVENT_OFF						0x01		//
#define INTERPAN_AUTO_OFF_TIME					(10 * 60 * 1000)
#define INTERPAN_DELAY_SEND_INTERVAL			(3 * 1000)
#define INTERPAN_DELAY_SEND_TIMES				(2)
#define INTERPAN_CHANNEL						20

#define ZCL_CLUSTER_INTERPAN_REQ				0x0001

typedef void (*pInterPanMsgIncomingCallback)(UMsgNodeSt *pMsgNode );

typedef struct{
	uint8_t seq;
	uint8_t src_addr_mode;
	uint8_t src_ext_addr[8];
	uint16_t src_short_id;
	uint8_t src_ep;
	uint8_t reserved[8];
}INCOM_MESSAGE_INFO;

void SetInterpanPara(uint8_t channel,uint16_t panid,bool is_enable);
void afInterpan_dataSendConfirm(void *arg);
void afInterpan_rx_handler(void *arg);
void kInterpanDisable(void);
kk_err_t kInterPanSend(UMsgNodeSt *pMsgNode);
void kInterpan_Init(void);
bool kInterPanSetEnableStatus(uint8_t enable);

void kInterPanMoudleInit(pInterPanMsgIncomingCallback pfunc_incoming);
#endif /* _SAMPLE_LIGHT_H_ */
