108 lines
4.1 KiB
C
108 lines
4.1 KiB
C
|
#ifndef UWATER_FRAME_FUNC_REPLAY_SHENSHUI_H
|
|||
|
#define UWATER_FRAME_FUNC_REPLAY_SHENSHUI_H
|
|||
|
|
|||
|
#include "sys_config.h"
|
|||
|
#ifdef PRODUCT_SS
|
|||
|
//////////////////////////////////////////<2F><>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/////////////////////////////////////////////////////////
|
|||
|
/*NB<4E><42><EFBFBD><EFBFBD>ͨ<EFBFBD>Ź<EFBFBD>Լ*/
|
|||
|
//<2F><>ˮ<EFBFBD><CBAE>ȡ<EFBFBD><C8A1>ʷ<EFBFBD><CAB7><EFBFBD><EFBFBD>
|
|||
|
#define SS_READ_HIS_CTRL 0x27
|
|||
|
#define SS_ACK_READ_HIS_CTRL 0xa7
|
|||
|
#define SS_READ_HIS_CTRL_ID0 0x35
|
|||
|
#define SS_READ_HIS_CTRL_ID1 0xA0
|
|||
|
|
|||
|
#define QZ_READ_HIS_MONTH_CTRL_ID1 0x30 //<2F>¶<EFBFBD><C2B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#define QZ_READ_HIS_DAILY_CTRL_ID1 0x31 //<2F>ն<EFBFBD><D5B6><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|||
|
|
|||
|
//<2F><>ˮ<EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD>
|
|||
|
#define SS_UPLOAD_CTRL 0x67
|
|||
|
#define SS_ACK_UPLOAD_CTRL 0xD6
|
|||
|
#define SS_UPLOAD_CTRL_ID0 0x43
|
|||
|
#define SS_UPLOAD_CTRL_ID1 0xA1
|
|||
|
#define SS_UPLOAD_CTRL_UDP_ID0 0x31 //UDP<44>ϱ<EFBFBD><CFB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD>ʶ
|
|||
|
//<2F><>֡<EFBFBD>ϱ<EFBFBD><CFB1><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#define SHORT_UPLOAD_CTRL 0x9A
|
|||
|
#define SHORT_ACK_UPLOAD_CTRL 0xEF
|
|||
|
#define SHORT_UPLOAD_CTRL_ID0 0x02
|
|||
|
#define SHORT_UPLOAD_CTRL_ID1 0x10
|
|||
|
|
|||
|
//<2F>²<EFBFBD><C2B2><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD>ϱ<EFBFBD><CFB1><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#define SUPP_UPLOAD_CTRL 0x9B
|
|||
|
#define SUPP_ACK_UPLOAD_CTRL 0xF1
|
|||
|
#define SUPP_UPLOAD_CTRL_ID0 0x01
|
|||
|
#define SUPP_UPLOAD_CTRL_ID1 0x10
|
|||
|
|
|||
|
//<2F><>ˮ<EFBFBD><CBAE>¼֡
|
|||
|
#define SS_SIGN_IN_CTRL 0x8f
|
|||
|
#define SS_ACK_SIGN_IN_CTRL 0xe8
|
|||
|
#define SS_SIGN_IN_CTRL_ID0 0x55
|
|||
|
#define SS_SIGN_IN_CTRL_ID1 0xa1
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD>
|
|||
|
#define SS_CLEAR_FAIL_TIMES_CTRL 0x94
|
|||
|
#define SS_ACK_CLEAR_FAIL_TIMES_CTRL 0xEC
|
|||
|
#define SS_CLEAR_FAIL_TIMES_CTRL_DI0 0x59
|
|||
|
#define SS_CLEAR_FAIL_TIMES_CTRL_DI1 0xA1
|
|||
|
|
|||
|
enum{
|
|||
|
SUPPLEMENT_DATA_FRAME_S0 = 0,
|
|||
|
SUPPLEMENT_DATA_FRAME_S1,
|
|||
|
SUPPLEMENT_DATA_FRAME_S2,
|
|||
|
SUPPLEMENT_DATA_FRAME_S3,
|
|||
|
SUPPLEMENT_DATA_FRAME_S4,
|
|||
|
SUPPLEMENT_DATA_FRAME_S5,
|
|||
|
SUPPLEMENT_DATA_FRAME_S6,
|
|||
|
SUPPLEMENT_DATA_FRAME_S7
|
|||
|
};
|
|||
|
#define SUPPLEMENT_DATA_MAX_NUM 19 //һ֡<D2BB><D6A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>19<31><39><EFBFBD>ն<EFBFBD><D5B6><EFBFBD>
|
|||
|
|
|||
|
typedef enum
|
|||
|
{
|
|||
|
SS_StoreMsg0 = 0u,
|
|||
|
SS_StoreMsg1 = 1u,
|
|||
|
SS_StoreMsg2 = 2u,
|
|||
|
SS_StoreMsg3 = 3u,
|
|||
|
SS_StoreMsg4 = 4u,
|
|||
|
SS_StoreMsg5 = 5u,
|
|||
|
SS_StoreMsg6 = 6u,
|
|||
|
SS_StoreMsg7 = 7u
|
|||
|
}SS_StoreMsgType;
|
|||
|
|
|||
|
/***************************************<2A><>֡<EFBFBD>ϱ<EFBFBD><CFB1><EFBFBD><EFBFBD>ݸ<EFBFBD>ʽ*********************/
|
|||
|
#define PACK_NUM_GPRS 155 //<2F><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD><CFB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>
|
|||
|
#define PACK_NUM_GPRS_INTEN 199 //24Сʱ<D0A1><CAB1>30min<69><6E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD>,48*4+7
|
|||
|
#define PACK_NUM_GPRS_TOTAL (PACK_NUM_GPRS+PACK_NUM_GPRS_INTEN) //<2F><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD><CFB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܳ<EFBFBD><DCB3><EFBFBD>
|
|||
|
#define CURRENT_DATA_INFO_LEN 36
|
|||
|
#define STEP_FLOW_START_ADDR (0+CURRENT_DATA_INFO_LEN)
|
|||
|
/**************************<2A><>ԼӦ<D4BC><D3A6><EFBFBD><EFBFBD><EFBFBD>غ<EFBFBD><D8BA><EFBFBD>**********************************/
|
|||
|
u8 up_deal_code_ShenShui(void);
|
|||
|
u8 crack_frame_ShenShui(u16 frame_lenth,u8 *frame_buffer);
|
|||
|
void Frame_ResetDealState_ShenShui(void);
|
|||
|
void Frame_ack_ShenShui(u8* p_send_buf, u16* p_send_len);
|
|||
|
/**************************<2A>ϱ<EFBFBD><CFB1><EFBFBD><EFBFBD>غ<EFBFBD><D8BA><EFBFBD>***************************************/
|
|||
|
#define PERIOD_DATA_NUM 32 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݼ<EFBFBD>¼<EFBFBD>ܱ<EFBFBD><DCB1><EFBFBD>
|
|||
|
|
|||
|
void GetUploadDataResetState_SS(void);
|
|||
|
u8 GetUploadDataCheckIdle_SS(void);
|
|||
|
u8 GetUploadDataCheckTask_SS(void);
|
|||
|
void GetUploadDataMachine_SS(u8 data_step, u8* p_send_buf, u16* p_send_len);
|
|||
|
/**************************<2A>洢<EFBFBD><E6B4A2><EFBFBD>غ<EFBFBD><D8BA><EFBFBD>***************************************/
|
|||
|
void DataStoreInit(void);
|
|||
|
void DataStoreMachine(void);
|
|||
|
u8 DataStoreIfIdle(void);
|
|||
|
/*****************************************************************************/
|
|||
|
#define MAIN_CONNECT_TYPE NBIOT_CONNECT_COAP
|
|||
|
#define MAIN_SEND_TYPE SEND_TYPE_COAP
|
|||
|
#define SLAVE_CONNECT_TYPE NBIOT_CONNECT_UDP1
|
|||
|
#define SLAVE_SEND_TYPE SEND_TYPE_UDP1
|
|||
|
//<2F><><EFBFBD>ϱ<EFBFBD>10<31>룬<EFBFBD><EBA3AC><EFBFBD>ϱ<EFBFBD>5<EFBFBD><35>
|
|||
|
#define COAP_UPLOAD_WAIT_ACK_TIME 100 //10<31><30>
|
|||
|
#define UDP_UPLOAD_WAIT_ACK_TIME 50
|
|||
|
#define NB_ONLINE_KEEP_TIME 50
|
|||
|
|
|||
|
#endif
|
|||
|
|
|||
|
#endif
|
|||
|
|
|||
|
|