DataBase.h 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. #ifndef _DATA_BASE_H_
  2. #define _DATA_BASE_H_
  3. #include "../Config.h"
  4. int DB_Open(void);
  5. int DB_Insert_Record(int gunIndex);
  6. int DB_Update_Operactive(uint8_t gunIndex, uint8_t IsAvailable);
  7. int DB_Get_Operactive(uint8_t gunIndex);
  8. int DB_Reboot_Record(void);
  9. //for Module_EventLog
  10. int CreateEventRecord(void);
  11. int InsertEventRecord(uint8_t *statusCode);
  12. int PowerDB_Open(void);
  13. int DB_Get_PowerConsumption(uint8_t gunIndex);
  14. int DB_Insert_PowerConsumption(uint8_t gunIndex, float energy);
  15. int DB_Update_PowerConsumption(uint8_t gunIndex, float energy);
  16. int DeductDB_Open(void);
  17. int InsertDeductInfo(int gunIndex, RecordTransactionInfo *deductInfo);
  18. int UpdateDeductInfoStatus(int gunIndex, RecordTransactionInfo *deductInfo);
  19. int DB_GetDeductInfo(int deductResult, int uploadState, int *gunIndex, RecordTransactionInfo *deductInfo);
  20. int DB_GetReDeductInfo(int *gunIndex, RecordTransactionInfo *deductInfo);
  21. int DB_GetReUploadDeduct(int *gunIndex, RecordTransactionInfo *deductInfo);
  22. int UpdateRedeuctBill(int Txid, float amount);
  23. int DB_GetMultiDeductInfo(int deductResult, int uploadState, int *gunIndex, RecordTransactionInfo *deductInfo);
  24. int DB_GetMultiReDeductInfo(int *gunIndex, RecordTransactionInfo *deductInfo);
  25. int DB_GetMultiReUploadDeduct(int *gunIndex, RecordTransactionInfo *deductInfo);
  26. #endif /* _DATA_BASE_H_ */