
#ifndef KK_DATA_MNG_H_
#define KK_DATA_MNG_H_
#include "kk_log.h"
#include "cJSON.h"
#include "klist.h"
#include "kk_product.h"
#include "com_api.h"
#include "kk_opcode.h"
typedef struct {
    cJSON *newccu;
    cJSON *oldccu;
    int channelNum;
    char gwDeviceCode[DEVICE_CODE_LEN];
    char productCode[PRODUCT_CODE_LEN];
    char deviceCode[DEVICE_CODE_LEN];
    char opearteType[8];
    struct list_head linked_list;
} kk_map_dev_node_t;

typedef struct {
    void *mutex;
    struct list_head dev_list;
} kk_map_dev_ctx;

kk_map_dev_node_t *kk_map_dev_add(char *deviceCode,char *productCode,char *gwdeviceCode);
int kk_create_devicestatus_to_sdk(cJSON *root);
int kk_create_devices_to_sdk(cJSON *root);
#endif