blob: 1ed4942dec3a075cb0853e742e02fee1992f6b8b [file] [log] [blame]
zongqiang.zhang0c6a0882019-08-07 14:48:21 +08001#ifndef _SP_DATA_H_
2#define _SP_DATA_H_
3
4#include "sp_config.h"
5#include "sp_communicate.h"
6
7//Á÷Ë®´¦Àí
8uint16 sp_prepare_behalf_transdtl(sp_pos_t* pos, sp_card_t* card, sp_transdtl_t* record);
9uint16 sp_prepare_below_transdtl(sp_pos_t* pos, sp_card_t* card, sp_transdtl_t* record);
10uint16 sp_read_lastrecord(const sp_pos_t* pos, sp_transdtl_t* dtl);
11uint16 sp_confirm_record(const sp_pos_t* pos, sp_transdtl_t* dtl);
12uint16 sp_query_record(const sp_pos_t* pos, uint8 refno[16], sp_transdtl_t* dtl);
13uint16 sp_clear_transdtl(sp_pos_t* pos);
14uint16 sp_write_unconfirm_record(sp_pos_t* pos);
15
16//ϵͳ²ÎÊýÉèÖÃ
17void sp_reset_factory(sp_pos_t* pos);
18uint16 sp_load_config(sp_pos_t* pos);
19uint16 sp_save_config(sp_pos_t* pos, sp_config_t* config);
20uint16 sp_save_deviceno(sp_pos_t* pos, uint8 deviceno);
21uint16 sp_save_devphyid(sp_pos_t* pos, uint8 devphyid[4]);
22uint16 sp_config_init(sp_pos_t* pos);
23uint16 sp_save_login_info(sp_pos_t* pos, uint8 flag, uint8 unit, uint8 offline_maxhour);
24uint16 sp_save_heartbeat_info(sp_pos_t* pos, uint8 flag);
25
26//É豸ÊÖ¶¯²Ù×÷½Ó¿Ú
27uint8 sp_confirm_login(sp_protocol_response_t* resp, sp_pos_t* pos);
28
29#endif
30