#ifndef _KK_SUBDEV_DB_H_
#define _KK_SUBDEV_DB_H_
#include "kk_tsl_common.h"
typedef struct {
	int isOnline;
	int index;
    char productType[PRODUCT_TYPE_MAXLEN];
	char productCode[PRODUCT_CODE_MAXLEN];
	char deviceCode[DEVICE_CODE_MAXLEN];
	char fatherMac[DEVICE_MAC_MAXLEN];
} kk_dm_subdev_t;

int kk_subDb_init(void);
int kk_subDev_insert_db(int isOnline,char productType[PRODUCT_TYPE_MAXLEN],char productCode[PRODUCT_CODE_MAXLEN], \
							char deviceCode[DEVICE_CODE_MAXLEN],char fatherMac[DEVICE_MAC_MAXLEN],char version[DEVICE_VERSION_MAXLEN]);
int kk_subDev_delete_byMac(char device_mac[DEVICE_MAC_MAXLEN]);

int kk_subDev_update_online(int isOnline,const char *device_mac);

#endif
