#ifndef __KK_MOTOR_BIND_DB_H__
#define __KK_MOTOR_BIND_DB_H__
#include "cJSON.h"
enum{
	MOTOR_BIND_DB_PANEL_DEVICECODE = 0,
	MOTOR_BIND_DB_PANEL_EP,
	MOTOR_BIND_DB_MOTOR_DEVICECODE,
	MOTOR_BIND_DB_MOTOR_EP,
	MOTOR_BIND_DB_DUMMYID,
};
	
struct kk_motor_bind_info{
	int epNum;
	int dummyId;
	char deviceCode[32];
};

int kk_motor_bind_db_init(void);
int kk_motor_bind_db_insert(const char* panelDCode,int panelEpNum,const char* motorDCode,int motorEpNum,int dummyId);
int kk_motor_bind_db_delete(const char* panelDCode,int panelEpNum,const char* motorDCode,int motorEpNum);
int kk_motor_bind_db_delete_ex(const char* panelDCode);
int kk_motor_bind_db_find(const char* panelDCode,int panelEpNum,struct kk_motor_bind_info* info,int max);
int kk_motor_bind_db_find_ex(int dummyId,struct kk_motor_bind_info* info,int max);
int kk_motor_bind_db_find_dummyId(const char* panelDCode,int panelEpNum,const char* motorDCode,int motorEpNum);
int kk_motor_bind_db_delete_by_deviceCode(const char* deviceCode);


#endif
