24 #ifdef TIME_WITH_SYS_TIME 
   25 # include <sys/time.h> 
   28 # ifdef HAVE_SYS_TIME_H 
   29 #  include <sys/time.h> 
   44 #include <sys/socket.h> 
   46 #include <sys/types.h> 
   54 #define min(a, b) (a > b ? b : a) 
   55 #define max(a, b) (a > b ? a : b) 
   57 #define BUTTON       (80 + 1) 
   61 #define MAX_SIGNALS   200 
   64 #define TH_SPACE_ENC   80        
   70 #define TH_RC6_SIGNAL 550 
   73 #define MAX_GAP    100000 
   85 typedef void (*remote_func) (
struct ir_remote* remotes);
 
   87 enum analyse_mode { MODE_GET_GAP, MODE_HAVE_GAP };
 
  108         STS_GAP_GOT_ONE_PRESS,
 
  116         STS_TGL_GOT_ONE_PRESS,
 
  128         STS_BTN_GET_RAW_DATA,
 
  130         STS_BTN_GET_TOGGLE_BITS,
 
  133         STS_BTN_BUTTONS_DONE,
 
  144         lirc_t          sum, upper_bound, lower_bound, min, max;
 
  157         int             disable_namespace;
 
  166         const char*     filename;
 
  168         const char*     backupfile;
 
  172         char            commandline[128];
 
  188         struct timeval  start;
 
  212         lirc_t                  remaining_gap;
 
  215         enum analyse_mode       mode;
 
  256 extern unsigned int eps;                
 
  263 ssize_t 
raw_read(
void* buffer, 
size_t size, 
unsigned int timeout_us);
 
One remote as represented in the configuration file. 
 
lengths_status
Return from one attempt to determine lengths in get_lengths(). 
 
Private state in get_togggle_bit_mask(). 
 
Parsed run-time options, reflects long_options and the command line, mostly a const object...
 
toggle_status
Return from one attempt in get_toggle_bit_mask(). 
 
void gap_state_init(struct gap_state *state)
Initiate a pristine gap_state. 
 
void invert_data(struct ir_remote *remote)
Test hook: Invert all data items in remote. 
 
button_status
Return from one pass in record_buttons(). 
 
void toggle_state_init(struct toggle_state *state)
Initiate a pristine toggle_state. 
 
get_gap_status
Return form one attempt to get gap in get_gap(). 
 
int keypresses
Number of counted button presses. 
 
void button_state_init(struct button_state *state, int started_as_root)
Initiate a pristine button_state. 
 
Private state in get_gap_length(). 
 
loglevel_t
The defined loglevels. 
 
int keypresses_done
Number of printed keypresses. 
 
ssize_t raw_read(void *buffer, size_t size, unsigned int timeout_us)
Absolute error tolerance (us). 
 
lirc_t aeps
Error tolerance in per cent. 
 
void btn_state_set_message(struct button_state *state, const char *fmt,...)
sprintf-style message formatting into state->message. 
 
Main include file for lirc applications. 
 
unsigned int eps
Shared list of remotes. 
 
enum lengths_status get_lengths(struct lengths_state *state, struct ir_remote *remote, int force, int interactive)
Try to find out pre/post etc. 
 
void get_pre_data(struct ir_remote *remote)
Test hook: Extract remote->pre_data from remote->bits. 
 
void remove_post_data(struct ir_remote *remote)
Test hook: Move remote->post_data into remote->bits. 
 
int config_file_finish(struct main_state *state, const struct opts *opts)
Write the final config file. 
 
lirc_t sum
Number of bits accounted for in signal. 
 
The data the driver exports i. 
 
int do_analyse(const struct opts *opts, struct main_state *state)
The –analyse wrapper, returns boolean ok/fail. 
 
IR Command, corresponding to one (command defining) line of the configuration file. 
 
void remove_trail(struct ir_remote *remote)
Test hook: Move remote->trail into remote->bits. 
 
State describing code, pre, post + gap and repeat state. 
 
void remove_pre_data(struct ir_remote *remote)
Test hook: Move remote->pre_data into remote->bits. 
 
void get_post_data(struct ir_remote *remote)
Test hook: Extract remote->post_data and post_data_bits from bits. 
 
enum toggle_status get_toggle_bit_mask(struct toggle_state *state, struct ir_remote *remote)
Try to find out toggle_bit_mask, returning toggle_status. 
 
void config_file_setup(struct main_state *state, const struct opts *opts)
Write the provisionary config file. 
 
enum button_status record_buttons(struct button_state *btn_state, enum button_status last_status, struct main_state *state, const struct opts *opts)
Try to record one button, returning button_status. 
 
void for_each_remote(struct ir_remote *remotes, remote_func func)
Unconditionally apply func(remote) for all items in remotes list. 
 
void flushhw(void)
Clear the driver input buffers. 
 
enum get_gap_status get_gap_length(struct gap_state *state, struct ir_remote *remote)
Try to find out gap length, returning gap_status. 
 
int count
Number of processed data items. 
 
void free_all_lengths(void)
Free heap data allocated by get_lengths(). 
 
State in get_lengths(), private besides commented. 
 
void lengths_state_init(struct lengths_state *state)
Initiate a pristine lengths_state. 
 
uint64_t ir_code
Denotes an internal coded representation for an IR transmission.