{"id":17576899,"url":"https://github.com/bengtmartensson/devslashlirc","last_synced_at":"2025-04-28T15:13:37.322Z","repository":{"id":92520403,"uuid":"61137279","full_name":"bengtmartensson/DevSlashLirc","owner":"bengtmartensson","description":"Object oriented access to /dev/lirc-hardware from C++ and Java","archived":false,"fork":false,"pushed_at":"2020-12-14T14:37:06.000Z","size":773,"stargazers_count":4,"open_issues_count":8,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T02:43:09.313Z","etag":null,"topics":["infrared","ir-signal","java","jni","linux","lirc"],"latest_commit_sha":null,"homepage":"http://www.harctoolbox.org/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bengtmartensson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-06-14T16:10:34.000Z","updated_at":"2022-09-30T14:32:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb28fe82-6e85-421c-882c-d23388f80419","html_url":"https://github.com/bengtmartensson/DevSlashLirc","commit_stats":{"total_commits":40,"total_committers":1,"mean_commits":40.0,"dds":0.0,"last_synced_commit":"5fc4d27cd7d599af40796981f646f137770549c4"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bengtmartensson%2FDevSlashLirc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bengtmartensson%2FDevSlashLirc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bengtmartensson%2FDevSlashLirc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bengtmartensson%2FDevSlashLirc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bengtmartensson","download_url":"https://codeload.github.com/bengtmartensson/DevSlashLirc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242506434,"owners_count":20140378,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["infrared","ir-signal","java","jni","linux","lirc"],"created_at":"2024-10-21T23:43:35.715Z","updated_at":"2025-03-08T05:31:00.772Z","avatar_url":"https://github.com/bengtmartensson.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DevSlashLirc \u0026mdash; Object oriented access to `/dev/lirc`-hardware.\n\n## API documentation\n\n* [C++](https://bengtmartensson.github.io/DevSlashLirc/cpp/)\n* [Java](https://bengtmartensson.github.io/DevSlashLirc/java/)\n\n## Introduction\nThis library makes objects from `/dev/lirc`-hardware. These objects have properties like `canSend` etc.,\nindicating the capabilities of the currently connected hardwarec, and methods like `send` and `receive`\nfor sending and receiving. See the examples in `src/test/c++`.\n\nAs opposed to standard C/Lirc, where a device is opened, and it \"turns out\" that it is \"mode2\" or \"lirccode\",\nhere the user has to decide if he wants a mode2 or lirccode device, and open it with the appropriate class.\nThis will fail if the connected hardware does not have the expected properties.  For this,\nthere are the concrete classes `Mode2LircDevice` (modeling a \"mode2\" device, i.e. with the possibility of\nhandling IR signals with \"arbitrary\" timings), and `LircCodeLircDevice` (modeling a \"LircCode\" device, i.e.\none that can only use IR signals from its own set, and codes them on an integer, representing the IR\nsignal.) The latter class is presently not completely implemented.\n\nThe classes may be instantiated multiple times,\nbut of course only one can open a particular device file at a particular time.\n\nThe core library is written in C++, using classes and the stdc++ library.\nThere are no other dependencies. In particular, there is no dependency of the\nLirc sources, includes, or libraries. Only `media/lirc.h`, see `man 4 lirc`, which is considered\nbelonging to the kernel, is included. The C++ code is documented using doxygen.\n\nThe C++-code uses the (\"non-portable\") `#pragma once` instead of the traditional\n[include guards](https://en.wikipedia.org/wiki/Include_guard).\n\nThe C++ code is compiled into a shared library. This can be linked into application programs (see the test\nprograms in `src/test/c++`) or used as a JNI library for accessing it from Java.\nAlso a static library is built.\n\nAs `man 4 lirc` shows, there is a large number of hardly ever implemented properties supported. I have followed\nthe \"agile\" commandment _maximize the amount of work not done_, and simply ignored the ones not useful or not\ncommonly implemented.\n\nAs mentioned, there are also Java bindings using JNI. With some extra effort, bindings\nfrom other languages can be added, for example using [SWIG](https://en.wikipedia.org/wiki/SWIG).\nContributions are welcome, (see [issue #1](https://github.com/bengtmartensson/DevSlashLirc/issues/1)).\n\nThe code should compile on any platform supporting `/dev/lirc`, possibly after adapting the Makefile\n(see [issue #2](https://github.com/bengtmartensson/DevSlashLirc/issues/2)).\n\nA natural extension would be to extend the library to support Lirc plugin drivers. This is discussed in [issue #3](https://github.com/bengtmartensson/DevSlashLirc/issues/3)).\nThere is also a branch containing some work in this directon, `lircdriver`.\n\nMaven is used to compile the Java parts. A Makefile compiles the C++ code, and also invokes the Maven process.\nRedundantly, to build, just issue the command\n\n     make lib\n\nOn an x86_64, this will build the libraries for x86_32 and x86_64.\nTo build for another architecture without using a cross compiler,\nlog in to an appropriate host, cd to `src/main/c++`, and issue the command\n\n    make clean all\n\non that host.\nThen copy the thus created `libdevslashlirc.so` to a desired location.\n\nThe command\n\n    make doc\n\ncreates the Doxygen and Javadoc documentation.\n\nThe code is entirely written from scratch (not counting the branch `lircdriver`).\n\n## Usage\nThere is no \"install\". Just copy the `so` file, the `jar` file, and possibly the `*.h` files to anywhere you like.\n(Or use maven instead for the `jar` file.)\n\nFor C++ (or a similar language), just link with the shared library `libdevslashlirc.so`\n(alternatively the static library `libdevslashlirc.a`) in the usual manner.\n\nFor Java, copy `libdevslashlirc.so` to an \"arbitrary\" location. In the Java code,\nthat library must be loaded with `org.harctoolbox.devslashlirc.LircHardware.loadLibrary()`.\nThere are two possibilites:\n\n1. Either call `loadLibrary()` without arguments, (see\n`src/test/java/org/harctoolbox/devslashlirc/Mode2LircDeviceNGTest.java` for an example),\nin which case the actual directory has to be given to the JVM using the `-Djava.library.path`\noption (like `java -Djava.library.path=/usr/local/lib` ...), or,\n\n2. Call `loadLibrary(File)` with argument, either the path name of the library,\nor the path name of the containing directory.\nFor example `LircHardware.loadLibrary(new File(\"/home/trump/covfefe/libdevslashlirc.so\"))`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbengtmartensson%2Fdevslashlirc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbengtmartensson%2Fdevslashlirc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbengtmartensson%2Fdevslashlirc/lists"}