blob: 399b8f5136f0fe2e872209ddf15beab5b01461c5 [file] [log] [blame]
#ifndef _SP_DATA_H_
#define _SP_DATA_H_
#include "sp_config.h"
#include "sp_communicate.h"
//Á÷Ë®´¦Àí
uint16 sp_prepare_behalf_transdtl(sp_pos_t* pos, sp_card_t* card);
uint16 sp_prepare_below_transdtl(sp_pos_t* pos, sp_card_t* card);
uint16 sp_read_lastrecord(const sp_pos_t* pos, sp_transdtl_t* dtl);
uint16 sp_confirm_record(const sp_pos_t* pos, sp_transdtl_t* dtl);
uint16 sp_query_record(const sp_pos_t* pos, uint8 refno[16], sp_transdtl_t* dtl);
uint16 sp_clear_transdtl(sp_pos_t* pos);
uint16 sp_write_unconfirm_record(sp_pos_t* pos);
//ϵͳ²ÎÊýÉèÖÃ
void sp_reset_factory(sp_pos_t* pos);
uint16 sp_load_config(sp_pos_t* pos);
uint16 sp_save_config(sp_pos_t* pos, sp_config_t* config);
uint16 sp_save_deviceno(sp_pos_t* pos, uint8 deviceno);
uint16 sp_save_devphyid(sp_pos_t* pos, uint8 devphyid[4]);
uint16 sp_config_init(sp_pos_t* pos);
uint16 sp_save_login_info(sp_pos_t* pos, uint8 flag, uint8 unit, uint8 offline_maxhour);
uint16 sp_save_heartbeat_info(sp_pos_t* pos, uint8 flag);
//É豸ÊÖ¶¯²Ù×÷½Ó¿Ú
uint8 sp_confirm_login(sp_protocol_response_t* resp, sp_pos_t* pos);
#endif