24#ifdef TIME_WITH_SYS_TIME
28# ifdef HAVE_SYS_TIME_H
44#include <sys/socket.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
85typedef void (*remote_func) (
struct ir_remote* remotes);
87enum 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;
256extern unsigned int eps;
263ssize_t
raw_read(
void* buffer,
size_t size,
unsigned int timeout_us);
uint64_t ir_code
Denotes an internal coded representation for an IR transmission.
unsigned int eps
Shared list of remotes.
void flushhw(void)
Clear the driver input buffers.
enum lengths_status get_lengths(struct lengths_state *state, struct ir_remote *remote, int force, int interactive)
Try to find out pre/post etc.
button_status
Return from one pass in record_buttons().
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.
int config_file_finish(struct main_state *state, const struct opts *opts)
Write the final config file.
lengths_status
Return from one attempt to determine lengths in get_lengths().
get_gap_status
Return form one attempt to get gap in get_gap().
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.
void button_state_init(struct button_state *state, int started_as_root)
Initiate a pristine button_state.
toggle_status
Return from one attempt in get_toggle_bit_mask().
ssize_t raw_read(void *buffer, size_t size, unsigned int timeout_us)
Absolute error tolerance (us).
void remove_pre_data(struct ir_remote *remote)
Test hook: Move remote->pre_data into remote->bits.
void remove_post_data(struct ir_remote *remote)
Test hook: Move remote->post_data into remote->bits.
void invert_data(struct ir_remote *remote)
Test hook: Invert all data items in remote.
enum get_gap_status get_gap_length(struct gap_state *state, struct ir_remote *remote)
Try to find out gap length, returning gap_status.
void free_all_lengths(void)
Free heap data allocated by get_lengths().
void gap_state_init(struct gap_state *state)
Initiate a pristine gap_state.
void remove_trail(struct ir_remote *remote)
Test hook: Move remote->trail into remote->bits.
int do_analyse(const struct opts *opts, struct main_state *state)
The –analyse wrapper, returns boolean ok/fail.
void get_post_data(struct ir_remote *remote)
Test hook: Extract remote->post_data and post_data_bits from bits.
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.
void lengths_state_init(struct lengths_state *state)
Initiate a pristine lengths_state.
void toggle_state_init(struct toggle_state *state)
Initiate a pristine toggle_state.
void for_each_remote(struct ir_remote *remotes, remote_func func)
Unconditionally apply func(remote) for all items in remotes list.
void get_pre_data(struct ir_remote *remote)
Test hook: Extract remote->pre_data from remote->bits.
loglevel_t
The defined loglevels.
Main include file for lirc applications.
State describing code, pre, post + gap and repeat state.
The data the driver exports i.
Private state in get_gap_length().
IR Command, corresponding to one (command defining) line of the configuration file.
One remote as represented in the configuration file.
State in get_lengths(), private besides commented.
int keypresses_done
Number of printed keypresses.
int count
Number of processed data items.
int keypresses
Number of counted button presses.
lirc_t sum
Number of bits accounted for in signal.
Parsed run-time options, reflects long_options and the command line, mostly a const object.
Private state in get_togggle_bit_mask().