forked from csyangbinbin/mlat-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathac_decoder.h
More file actions
executable file
·35 lines (30 loc) · 803 Bytes
/
ac_decoder.h
File metadata and controls
executable file
·35 lines (30 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef __AC_DECODER_INCLUDE__
#define __AC_DECODER_INCLUDE__
#include <time.h>
#include <map>
#include "ac_decoder_c.h"
class ac_decoder
{
public:
ac_decoder() ;
ac_decode_result_t decode(unsigned char ac[2]) ;
private:
typedef struct ac_count_stat_item
{
int counted;
int counting ;
}ac_count_stat_item_t;
typedef std::map<unsigned short ,ac_count_stat_item_t> ac_count_stat_t ;
private:
int get_ac_type(unsigned short modeac) ;
int get_mode_count_stat(ac_count_stat_t& which , unsigned short modea);
void inc_mode_stat(ac_count_stat_t& which ,unsigned short modea);
void commit_ac_mode_stat();
int modeA2modeC(unsigned int modea) ;
private:
time_t next_check_time ;
const int check_stat_interval ;
ac_count_stat_t a_mode_stat ;
ac_count_stat_t na_mode_stat ;
} ;
#endif