#ifndef __CD1F3300_H__ #define __CD1F3300_H__ #include "plt.h" #define CD1F3300_NBR_MAX 8 struct cd1f3300_t{ char szinfo[32]; int idx; char szdev_id[SNOW_ID_BUF_SIZE]; //char szmodel[32]; //int model; //char szaddr[16]; //int chan_idx; //int adr; int cmd; struct comm_t comm; struct statemachine_t sm; int co_density; int state; int threshold; char state_str[30]; }; extern struct cd1f3300_t cd1f3300[CD1F3300_NBR_MAX + 1]; int cd1f3300_init(); int cd1f3300_get_state( int idx); char* cd1f3300_get_state_str( int idx); int cd1f3300_get_cmd( int idx); void cd1f3300_reset_cmd( int idx); int cd1f3300_send_sm_cmd( int idx, int val ); int cd1f3300_get_addr( int idx ); int cd1f3300_get_co_density(int idx); int cd1f3300_get_co_threshold(int idx); int cd1f3300_chk_stat_all( int stat); int cd1f3300_send_sm_cmd_all( int val ); int cd1f3300_get_comm_st(int idx); int cd1f3300_get_chan_idx(int idx); int cd1f3300_get_tick(int idx); char* cd1f3300_get_comm_state_str(int idx); int cd1f3300_get_nbr(); int cd1f3300_get_tool_data(int idx,char* buf); int cd1f3300_get_tbmqtt_data(int idx,char* buf); int cd1f3300_get_cloud_data(int ctn_idx,int idx,char* buf); int cd1f3300_get_bkds_data(int idx,char* buf); int cd1f3300_get_init_data(int ctn_idx, int idx, char *buf); int cd1f3300_get_modbus_data(int idx,unsigned short* data); #endif