diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-08-12 19:10:47 +0800 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-08-12 19:10:47 +0800 |
commit | 138096b4d2595818f0c14776e46a06cfc3395f6c (patch) | |
tree | 11617f77145f9689022dfcbc18c405be329ed2af /easytool | |
parent | ed097192e3e53d92ed6f701f93bb1aae997caddd (diff) |
add transaction number parsing
Diffstat (limited to 'easytool')
-rw-r--r-- | easytool/easytool.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/easytool/easytool.c b/easytool/easytool.c index 8ab2262..b2436c6 100644 --- a/easytool/easytool.c +++ b/easytool/easytool.c @@ -91,7 +91,8 @@ static void parse_acc_bits(struct acc_bits_parsed *abp, uint8_t *acc_bits) /* storage of a transaction log record on the transponder itself */ struct easy_log_rec { - uint8_t unknown[2]; + uint8_t trans_id; + uint8_t unknown; uint8_t timestamp[3]; /* seconds since January 1st 1970 / 256 */ uint8_t trans_type; uint16_t amount; /* transaction amount / value */ @@ -111,9 +112,9 @@ static void dump_easy_log(const struct easy_log_rec *elr) { time_t t_time = convert_timestamp(elr->timestamp); struct tm *t_tm = gmtime(&t_time); - printf("%4u-%02u-%02u %02u:%02u | %10s | Paid %4u NTD | %4u NTD remaining\n", + printf("%4u-%02u-%02u %02u:%02u | %02x | %10s | Paid %4u NTD | %4u NTD remaining\n", t_tm->tm_year+1900, t_tm->tm_mon+1, t_tm->tm_mday, - t_tm->tm_hour, t_tm->tm_min, + t_tm->tm_hour, t_tm->tm_min, elr->trans_id, get_value_string(easy_tt_names, elr->trans_type), elr->amount, elr->remaining); switch (elr->trans_type) { |