<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.15"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>LIRC libraries: /home/iurt/rpmbuild/BUILD/lirc-0.10.1/lib/ir_remote.c File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtreedata.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(initResizable); /* @license-end */</script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectlogo"><img alt="Logo" src="diode-2.gif"/></td> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">LIRC libraries </div> <div id="projectbrief">LinuxInfraredRemoteControl</div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.15 --> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ var searchBox = new SearchBox("searchBox", "search",false,'Search'); /* @license-end */ </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',true,false,'search.php','Search'); $(document).ready(function() { init_search(); }); }); /* @license-end */</script> <div id="main-nav"></div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(function(){initNavTree('ir__remote_8c.html','');}); /* @license-end */ </script> <div id="doc-content"> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> | <a href="#var-members">Variables</a> </div> <div class="headertitle"> <div class="title">ir_remote.c File Reference</div> </div> </div><!--header--> <div class="contents"> <p>Implements <a class="el" href="ir__remote_8h.html" title="Describes and decodes the signals from IR remotes.">ir_remote.h</a>. <a href="#details">More...</a></p> <div class="textblock"><code>#include <stdlib.h></code><br /> <code>#include <stdio.h></code><br /> <code>#include <stdint.h></code><br /> <code>#include <fcntl.h></code><br /> <code>#include <limits.h></code><br /> <code>#include <sys/ioctl.h></code><br /> <code>#include "media/lirc.h"</code><br /> <code>#include "lirc/ir_remote.h"</code><br /> <code>#include "lirc/driver.h"</code><br /> <code>#include "lirc/release.h"</code><br /> <code>#include "lirc/lirc_log.h"</code><br /> </div> <p><a href="ir__remote_8c_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:gac288bce2140d2066a3990a1b2e3317c5"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structir__ncode.html">ir_ncode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__driver__api.html#gac288bce2140d2066a3990a1b2e3317c5">ncode_dup</a> (struct <a class="el" href="structir__ncode.html">ir_ncode</a> *ncode)</td></tr> <tr class="memdesc:gac288bce2140d2066a3990a1b2e3317c5"><td class="mdescLeft"> </td><td class="mdescRight">Create a malloc'd, deep copy of ncode. <a href="group__driver__api.html#gac288bce2140d2066a3990a1b2e3317c5">More...</a><br /></td></tr> <tr class="separator:gac288bce2140d2066a3990a1b2e3317c5"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga4477860d1f604548e032694de8f69c16"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__driver__api.html#ga4477860d1f604548e032694de8f69c16">ncode_free</a> (struct <a class="el" href="structir__ncode.html">ir_ncode</a> *ncode)</td></tr> <tr class="memdesc:ga4477860d1f604548e032694de8f69c16"><td class="mdescLeft"> </td><td class="mdescRight">Dispose an <a class="el" href="structir__ncode.html" title="IR Command, corresponding to one (command defining) line of the configuration file.">ir_ncode</a> instance obtained from <a class="el" href="group__driver__api.html#gac288bce2140d2066a3990a1b2e3317c5" title="Create a malloc'd, deep copy of ncode.">ncode_dup()</a>. <a href="group__driver__api.html#ga4477860d1f604548e032694de8f69c16">More...</a><br /></td></tr> <tr class="separator:ga4477860d1f604548e032694de8f69c16"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga8d5bc121b8582a690000bc8befe13080"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__driver__api.html#ga8d5bc121b8582a690000bc8befe13080">ir_remote_init</a> (int use_dyncodes)</td></tr> <tr class="memdesc:ga8d5bc121b8582a690000bc8befe13080"><td class="mdescLeft"> </td><td class="mdescRight">Initiate: define if dynamic codes should be used. <a href="group__driver__api.html#ga8d5bc121b8582a690000bc8befe13080">More...</a><br /></td></tr> <tr class="separator:ga8d5bc121b8582a690000bc8befe13080"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga19bab2135ca2b7f68dc0b2f8cde9863f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__driver__api.html#ga19bab2135ca2b7f68dc0b2f8cde9863f">get_frequency_range</a> (const struct <a class="el" href="structir__remote.html">ir_remote</a> *remotes, unsigned int *min_freq, unsigned int *max_freq)</td></tr> <tr class="separator:ga19bab2135ca2b7f68dc0b2f8cde9863f"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga1a1b6c86d0309f25ab5806a5f861692c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__driver__api.html#ga1a1b6c86d0309f25ab5806a5f861692c">get_filter_parameters</a> (const struct <a class="el" href="structir__remote.html">ir_remote</a> *remotes, lirc_t *max_gap_lengthp, lirc_t *min_pulse_lengthp, lirc_t *min_space_lengthp, lirc_t *max_pulse_lengthp, lirc_t *max_space_lengthp)</td></tr> <tr class="separator:ga1a1b6c86d0309f25ab5806a5f861692c"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gaadf09b8ef4b71be00f8e53a39f70d315"><td class="memItemLeft" align="right" valign="top">const struct <a class="el" href="structir__remote.html">ir_remote</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__driver__api.html#gaadf09b8ef4b71be00f8e53a39f70d315">is_in_remotes</a> (const struct <a class="el" href="structir__remote.html">ir_remote</a> *remotes, const struct <a class="el" href="structir__remote.html">ir_remote</a> *remote)</td></tr> <tr class="memdesc:gaadf09b8ef4b71be00f8e53a39f70d315"><td class="mdescLeft"> </td><td class="mdescRight">Test if a given remote is in a list of remotes. <a href="group__driver__api.html#gaadf09b8ef4b71be00f8e53a39f70d315">More...</a><br /></td></tr> <tr class="separator:gaadf09b8ef4b71be00f8e53a39f70d315"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga251129673cd73c5f869bb53c6c38a88f"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structir__remote.html">ir_remote</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__driver__api.html#ga251129673cd73c5f869bb53c6c38a88f">get_ir_remote</a> (const struct <a class="el" href="structir__remote.html">ir_remote</a> *remotes, const char *name)</td></tr> <tr class="memdesc:ga251129673cd73c5f869bb53c6c38a88f"><td class="mdescLeft"> </td><td class="mdescRight">Return <a class="el" href="structir__remote.html" title="One remote as represented in the configuration file.">ir_remote</a> with given name in remotes list, or NULL if not found. <a href="group__driver__api.html#ga251129673cd73c5f869bb53c6c38a88f">More...</a><br /></td></tr> <tr class="separator:ga251129673cd73c5f869bb53c6c38a88f"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gabac8048f405d0a78fcc01fa9ef1132df"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__driver__api.html#gabac8048f405d0a78fcc01fa9ef1132df">map_code</a> (const struct <a class="el" href="structir__remote.html">ir_remote</a> *remote, struct <a class="el" href="structdecode__ctx__t.html">decode_ctx_t</a> *ctx, int pre_bits, <a class="el" href="ir__remote__types_8h.html#a4607c3797b0d3ac909185d2844030624">ir_code</a> pre, int bits, <a class="el" href="ir__remote__types_8h.html#a4607c3797b0d3ac909185d2844030624">ir_code</a> code, int post_bits, <a class="el" href="ir__remote__types_8h.html#a4607c3797b0d3ac909185d2844030624">ir_code</a> post)</td></tr> <tr class="separator:gabac8048f405d0a78fcc01fa9ef1132df"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gac691a06cc99d8c914e2c7451407f245a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__driver__api.html#gac691a06cc99d8c914e2c7451407f245a">map_gap</a> (const struct <a class="el" href="structir__remote.html">ir_remote</a> *remote, struct <a class="el" href="structdecode__ctx__t.html">decode_ctx_t</a> *ctx, const struct timeval *start, const struct timeval *last, lirc_t signal_length)</td></tr> <tr class="separator:gac691a06cc99d8c914e2c7451407f245a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gafaa7cb5587a3c58e3e825411b966738a"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structir__ncode.html">ir_ncode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__driver__api.html#gafaa7cb5587a3c58e3e825411b966738a">get_code_by_name</a> (const struct <a class="el" href="structir__remote.html">ir_remote</a> *remote, const char *name)</td></tr> <tr class="memdesc:gafaa7cb5587a3c58e3e825411b966738a"><td class="mdescLeft"> </td><td class="mdescRight">Return code with given name in remote's list of codes or NULL. <a href="group__driver__api.html#gafaa7cb5587a3c58e3e825411b966738a">More...</a><br /></td></tr> <tr class="separator:gafaa7cb5587a3c58e3e825411b966738a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a4f258aeecf1e6d52490d1337c14bfafd"><td class="memItemLeft" align="right" valign="top"><a id="a4f258aeecf1e6d52490d1337c14bfafd"></a> void </td><td class="memItemRight" valign="bottom"><b>find_longest_match</b> (struct <a class="el" href="structir__remote.html">ir_remote</a> *remote, struct <a class="el" href="structir__ncode.html">ir_ncode</a> *codes, <a class="el" href="ir__remote__types_8h.html#a4607c3797b0d3ac909185d2844030624">ir_code</a> all, <a class="el" href="ir__remote__types_8h.html#a4607c3797b0d3ac909185d2844030624">ir_code</a> *next_all, int have_code, struct <a class="el" href="structir__ncode.html">ir_ncode</a> **found, int *found_code)</td></tr> <tr class="separator:a4f258aeecf1e6d52490d1337c14bfafd"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga04461705747fd8521d369ee96ed762fe"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__driver__api.html#ga04461705747fd8521d369ee96ed762fe">write_message</a> (char *buffer, size_t size, const char *remote_name, const char *button_name, const char *button_suffix, <a class="el" href="ir__remote__types_8h.html#a4607c3797b0d3ac909185d2844030624">ir_code</a> code, int reps)</td></tr> <tr class="memdesc:ga04461705747fd8521d369ee96ed762fe"><td class="mdescLeft"> </td><td class="mdescRight">Formats the arguments into a readable string. <a href="group__driver__api.html#ga04461705747fd8521d369ee96ed762fe">More...</a><br /></td></tr> <tr class="separator:ga04461705747fd8521d369ee96ed762fe"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gae334c37e486ce414abf272d4850df6c4"><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__driver__api.html#gae334c37e486ce414abf272d4850df6c4">decode_all</a> (struct <a class="el" href="structir__remote.html">ir_remote</a> *remotes)</td></tr> <tr class="memdesc:gae334c37e486ce414abf272d4850df6c4"><td class="mdescLeft"> </td><td class="mdescRight">Tries to decode current signal trying all known remotes. <a href="group__driver__api.html#gae334c37e486ce414abf272d4850df6c4">More...</a><br /></td></tr> <tr class="separator:gae334c37e486ce414abf272d4850df6c4"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga51d2eb6ccf92c9210c69cd727b712bae"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__driver__api.html#ga51d2eb6ccf92c9210c69cd727b712bae">send_ir_ncode</a> (struct <a class="el" href="structir__remote.html">ir_remote</a> *remote, struct <a class="el" href="structir__ncode.html">ir_ncode</a> *code, int delay)</td></tr> <tr class="memdesc:ga51d2eb6ccf92c9210c69cd727b712bae"><td class="mdescLeft"> </td><td class="mdescRight">Transmits the actual code in the second argument by calling the current hardware driver. <a href="group__driver__api.html#ga51d2eb6ccf92c9210c69cd727b712bae">More...</a><br /></td></tr> <tr class="separator:ga51d2eb6ccf92c9210c69cd727b712bae"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:gaf2e0b982088d231116dea399afa8597f"><td class="memItemLeft" align="right" valign="top">const struct <a class="el" href="structir__remote.html">ir_remote</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__driver__api.html#gaf2e0b982088d231116dea399afa8597f">get_decoding</a> (void)</td></tr> <tr class="memdesc:gaf2e0b982088d231116dea399afa8597f"><td class="mdescLeft"> </td><td class="mdescRight">Return pointer to currently decoded remote. <a href="group__driver__api.html#gaf2e0b982088d231116dea399afa8597f">More...</a><br /></td></tr> <tr class="separator:gaf2e0b982088d231116dea399afa8597f"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a> Variables</h2></td></tr> <tr class="memitem:aae1e36a18695c7bc004436556ff3b53e"><td class="memItemLeft" align="right" valign="top"><a id="aae1e36a18695c7bc004436556ff3b53e"></a> struct <a class="el" href="structir__remote.html">ir_remote</a> * </td><td class="memItemRight" valign="bottom"><b>decoding</b> = NULL</td></tr> <tr class="separator:aae1e36a18695c7bc004436556ff3b53e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga474c489cabdaae4546ca0ac26ec9cd87"><td class="memItemLeft" align="right" valign="top"> struct <a class="el" href="structir__remote.html">ir_remote</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__driver__api.html#ga474c489cabdaae4546ca0ac26ec9cd87">last_remote</a> = NULL</td></tr> <tr class="memdesc:ga474c489cabdaae4546ca0ac26ec9cd87"><td class="mdescLeft"> </td><td class="mdescRight">TODO. <br /></td></tr> <tr class="separator:ga474c489cabdaae4546ca0ac26ec9cd87"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga7bc28a85da7d0ccf4466708918f01dc4"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structir__remote.html">ir_remote</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__driver__api.html#ga7bc28a85da7d0ccf4466708918f01dc4">repeat_remote</a> = NULL</td></tr> <tr class="memdesc:ga7bc28a85da7d0ccf4466708918f01dc4"><td class="mdescLeft"> </td><td class="mdescRight">Global pointer to the remote that contains the code currently repeating. <a href="group__driver__api.html#ga7bc28a85da7d0ccf4466708918f01dc4">More...</a><br /></td></tr> <tr class="separator:ga7bc28a85da7d0ccf4466708918f01dc4"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ga2da0e0383db556d0e1ba7261763815c5"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structir__ncode.html">ir_ncode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__driver__api.html#ga2da0e0383db556d0e1ba7261763815c5">repeat_code</a></td></tr> <tr class="memdesc:ga2da0e0383db556d0e1ba7261763815c5"><td class="mdescLeft"> </td><td class="mdescRight">Global pointer to the code currently repeating. <a href="group__driver__api.html#ga2da0e0383db556d0e1ba7261763815c5">More...</a><br /></td></tr> <tr class="separator:ga2da0e0383db556d0e1ba7261763815c5"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>Implements <a class="el" href="ir__remote_8h.html" title="Describes and decodes the signals from IR remotes.">ir_remote.h</a>. </p> <dl class="section author"><dt>Authors</dt><dd>Ralph Metzler, Christoph Bartelmus </dd></dl> <dl class="section copyright"><dt>Copyright</dt><dd>Copyright (C) 1996,97 Ralph Metzler (<a href="#" onclick="location.href='mai'+'lto:'+'rjk'+'m@'+'thp'+'.u'+'ni-'+'ko'+'eln'+'.d'+'e'; return false;">rjkm@<span style="display: none;">.nosp@m.</span>thp.<span style="display: none;">.nosp@m.</span>uni-k<span style="display: none;">.nosp@m.</span>oeln<span style="display: none;">.nosp@m.</span>.de</a>) Copyright (C) 1998 Christoph Bartelmus (<a href="#" onclick="location.href='mai'+'lto:'+'lir'+'c@'+'bar'+'te'+'lmu'+'s.'+'de'; return false;">lirc@<span style="display: none;">.nosp@m.</span>bart<span style="display: none;">.nosp@m.</span>elmus<span style="display: none;">.nosp@m.</span>.de</a>) </dd></dl> <p class="definition">Definition in file <a class="el" href="ir__remote_8c_source.html">ir_remote.c</a>.</p> </div></div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="navelem"><a class="el" href="dir_97aefd0d527b934f1d99a682da8fe6a9.html">lib</a></li><li class="navelem"><a class="el" href="ir__remote_8c.html">ir_remote.c</a></li> <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li> </ul> </div> </body> </html>