Infrared signal brute-forcing library. More...
#include <stdint.h>#include <stdbool.h>#include "infrared_error_code.h"Go to the source code of this file.
Typedefs | |
| typedef struct InfraredBruteForce | InfraredBruteForce |
| InfraredBruteForce opaque type declaration. | |
Functions | |
| InfraredBruteForce * | infrared_brute_force_alloc (void) |
| Create a new InfraredBruteForce instance. | |
| void | infrared_brute_force_free (InfraredBruteForce *brute_force) |
| Delete an InfraredBruteForce instance. | |
| void | infrared_brute_force_set_db_filename (InfraredBruteForce *brute_force, const char *db_filename) |
| Set an InfraredBruteForce instance to use a signal database contained in a file. | |
| InfraredErrorCode | infrared_brute_force_calculate_messages (InfraredBruteForce *brute_force) |
| Build a signal dictionary from a previously set database file. | |
| bool | infrared_brute_force_start (InfraredBruteForce *brute_force, uint32_t index, uint32_t *record_count) |
| Start transmitting signals from a category stored in the dictionary. | |
| bool | infrared_brute_force_is_started (const InfraredBruteForce *brute_force) |
| Determine whether the transmission was started. | |
| void | infrared_brute_force_stop (InfraredBruteForce *brute_force) |
| Stop transmitting the signals. | |
| bool | infrared_brute_force_send (InfraredBruteForce *brute_force, uint32_t signal_index) |
| Send an arbitrary signal from the chosen category. | |
| void | infrared_brute_force_add_record (InfraredBruteForce *brute_force, uint32_t index, const char *name) |
| Add a signal category to an InfraredBruteForce instance's dictionary. | |
| void | infrared_brute_force_reset (InfraredBruteForce *brute_force) |
| Reset an InfraredBruteForce instance. | |
Infrared signal brute-forcing library.
The BruteForce library is used to send large quantities of signals, sorted by a category. It is used to implement the Universal Remote feature.
| void infrared_brute_force_add_record | ( | InfraredBruteForce * | brute_force, |
| uint32_t | index, | ||
| const char * | name ) |
Add a signal category to an InfraredBruteForce instance's dictionary.
| [in,out] | brute_force | pointer to the instance to be updated. |
| [in] | index | index of the category to be added. |
| [in] | name | name of the category to be added. |
| InfraredBruteForce * infrared_brute_force_alloc | ( | void | ) |
Create a new InfraredBruteForce instance.
| InfraredErrorCode infrared_brute_force_calculate_messages | ( | InfraredBruteForce * | brute_force | ) |
Build a signal dictionary from a previously set database file.
This function must be called each time after setting the database via a infrared_brute_force_set_db_filename() call.
| [in,out] | brute_force | pointer to the instance to be updated. |
| void infrared_brute_force_free | ( | InfraredBruteForce * | brute_force | ) |
Delete an InfraredBruteForce instance.
| [in,out] | brute_force | pointer to the instance to be deleted. |
| bool infrared_brute_force_is_started | ( | const InfraredBruteForce * | brute_force | ) |
Determine whether the transmission was started.
| [in] | brute_force | pointer to the instance to be tested. |
| void infrared_brute_force_reset | ( | InfraredBruteForce * | brute_force | ) |
Reset an InfraredBruteForce instance.
| [in,out] | brute_force | pointer to the instance to be reset. |
| bool infrared_brute_force_send | ( | InfraredBruteForce * | brute_force, |
| uint32_t | signal_index ) |
Send an arbitrary signal from the chosen category.
| [in] | brute_force | pointer to the instance |
| signal_index | the index of the signal within the category, must be between 0 and record_count as told by infrared_brute_force_start |
| void infrared_brute_force_set_db_filename | ( | InfraredBruteForce * | brute_force, |
| const char * | db_filename ) |
Set an InfraredBruteForce instance to use a signal database contained in a file.
| [in,out] | brute_force | pointer to the instance to be configured. |
| [in] | db_filename | pointer to a zero-terminated string containing a full path to the database file. |
| bool infrared_brute_force_start | ( | InfraredBruteForce * | brute_force, |
| uint32_t | index, | ||
| uint32_t * | record_count ) |
Start transmitting signals from a category stored in the dictionary.
The function locates the category identified by index, reports the number of records it contains via record_count, and prepares the brute-force instance to transmit those signals. On failure record_count is set to zero.
| [in,out] | brute_force | pointer to the instance to be started. |
| [in] | index | index of the signal category in the dictionary. |
| [out] | record_count | pointer that receives the number of records in the category. |
| void infrared_brute_force_stop | ( | InfraredBruteForce * | brute_force | ) |
Stop transmitting the signals.
| [in] | brute_force | pointer to the instance to be stopped. |