|
DevSlashLirc
|
This class is a LIRC_MODE_MODE2 device as per lirc(4). More...
#include <Mode2LircDevice.h>


Public Member Functions | |
| Mode2LircDevice (const char *path=defaultFilename=defaultFilename, milliseconds_t beginTimeout=defaultBeginTimeout, size_t captureSize=defaultCaptureSize, milliseconds_t endTimeout=defaultEndTimeout) | |
| virtual bool | open () |
| bool | isMode2 () const |
| bool | isLircCode () const |
| void | report (std::ostream &stream=std::cout) const |
| Prints a listing of the properties implemented on the stream supplied. More... | |
| microseconds_t | getRecResolution () const |
| bool | canSetSendCarrier () const |
| bool | canGetRecResolution () const |
| milliseconds_t | getEndTimeout () const |
| void | setEndTimeout (int timeout) |
| size_t | getCaptureSize () const |
| void | setCaptureSize (size_t captureSize_) |
| lirc_t | read (int timeout) |
| Reads exactly one duration. More... | |
| void | mode2dump (std::ostream &stream=std::cout) |
| Reads and dumps readings in mode2 format. More... | |
| IrSequence * | receive () |
| Reads a sequence. More... | |
| int | write (const uint32_t *data, size_t length) |
| A low-level interface to the write(2) call on the file descriptor. More... | |
| bool | send (const lirc_t *data, unsigned length) |
| Mid-level sending routine. More... | |
| bool | send (const IrSequence &irSequence) |
| High-level sending routine. More... | |
| bool | send (const IrSequence &irSequence, frequency_t frequency) |
| High-level sending routine. More... | |
| bool | send (const lirc_t *data, unsigned length, frequency_t frequency) |
| High-level sending routine. More... | |
| int | setSendCarrier (int frequency=defaultFrequency) |
| Set the modulation frequency. More... | |
Public Member Functions inherited from LircDevice | |
| bool | close () |
| virtual | ~LircDevice () |
| bool | isValid () const |
| milliseconds_t | getBeginTimeout () const |
| void | setBeginTimeout (milliseconds_t timeout) |
| bool | canSend () const |
| bool | canSetTransmitterMask () const |
| bool | canRec () const |
| bool | canSetRecTimeout () const |
| bool | canSendPulse () const |
| bool | canSendLircCode () const |
| bool | canRecMode2 () const |
| bool | canRecLircCode () const |
| unsigned | getNumberTransmitters () const |
| Return the number of transmitters as reported from the device. More... | |
| int | setTransmitterMask (uint32_t mask) |
| Enable the set of transmitters specified in val, which contains a bit mask where each enabled transmitter is a 1. More... | |
| int | setRecTimeout (int arg) |
| Set the integer value for IR inactivity timeout (microseconds). More... | |
| int | setRecTimeoutReports (bool enable) |
| Enable or disable timeout packages. More... | |
Static Public Attributes | |
| static const frequency_t | defaultFrequency = 38000U |
| static const microseconds_t | replacementEndingSilence = 100000U |
| static const milliseconds_t | defaultEndTimeout = 200U |
| static const size_t | defaultCaptureSize = 250 |
Static Public Attributes inherited from LircDevice | |
| static const char * | version = "LircDevice " VERSION |
| static const char * | defaultFilename = "/dev/lirc0" |
| static const milliseconds_t | defaultBeginTimeout = 5000U |
| static const uint32_t | INVALID = UINT32_MAX |
Protected Attributes | |
| milliseconds_t | endTimeout |
| size_t | captureSize |
Protected Attributes inherited from LircDevice | |
| bool | valid |
| const char * | fileName |
| int | fileDescriptor |
| unsigned | numberTransmitters |
| uint32_t | recordingMode |
| uint32_t | features |
| milliseconds_t | beginTimeout |
Additional Inherited Members | |
Protected Member Functions inherited from LircDevice | |
| void | report (const char *name, bool value, std::ostream &stream) const |
| bool | reportValidity (std::ostream &stream=std::cout) const |
| int | ioctl (uint32_t cmd, uint32_t arg) |
| bool | canDo (uint32_t mask) const |
| LircDevice (const char *path=defaultFilename, milliseconds_t beginTimeout=defaultBeginTimeout) | |
| LircDevice (const LircDevice &orig) | |
Static Protected Attributes inherited from LircDevice | |
| static const bool | longReport = false |
| Flag indicating how to format reports. More... | |
This class is a LIRC_MODE_MODE2 device as per lirc(4).
Definition at line 9 of file Mode2LircDevice.h.
| Mode2LircDevice::Mode2LircDevice | ( | const char * | path = defaultFilename = defaultFilename, |
| milliseconds_t | beginTimeout = defaultBeginTimeout, |
||
| size_t | captureSize = defaultCaptureSize, |
||
| milliseconds_t | endTimeout = defaultEndTimeout |
||
| ) |
Definition at line 13 of file Mode2LircDevice.cpp.
|
inline |
Definition at line 43 of file Mode2LircDevice.h.
|
inline |
Definition at line 42 of file Mode2LircDevice.h.
|
inline |
Definition at line 54 of file Mode2LircDevice.h.
|
inline |
Definition at line 45 of file Mode2LircDevice.h.
|
inline |
Definition at line 40 of file Mode2LircDevice.h.
|
inlinevirtual |
Implements LircDevice.
Definition at line 36 of file Mode2LircDevice.h.
|
inlinevirtual |
Implements LircDevice.
Definition at line 35 of file Mode2LircDevice.h.
| void Mode2LircDevice::mode2dump | ( | std::ostream & | stream = std::cout | ) |
Reads and dumps readings in mode2 format.
| stream |
Definition at line 116 of file Mode2LircDevice.cpp.
|
virtual |
Reimplemented from LircDevice.
Definition at line 17 of file Mode2LircDevice.cpp.
| lirc_t Mode2LircDevice::read | ( | int | timeout | ) |
Reads exactly one duration.
Read a number.
Blocks.
| timeout | timeout in milliseconds; 0 for no timeout (wait forever) |
Definition at line 68 of file Mode2LircDevice.cpp.
| IrSequence * Mode2LircDevice::receive | ( | ) |
Reads a sequence.
The mechanism for the ending may be device dependent, but in general returns a sane IrSequence.
Definition at line 89 of file Mode2LircDevice.cpp.
|
virtual |
Prints a listing of the properties implemented on the stream supplied.
| stream |
Reimplemented from LircDevice.
Definition at line 45 of file Mode2LircDevice.cpp.
| bool Mode2LircDevice::send | ( | const lirc_t * | data, |
| unsigned | length | ||
| ) |
Mid-level sending routine.
Sends the data.
| data | |
| length; | required to be odd. |
Definition at line 151 of file Mode2LircDevice.cpp.
| bool Mode2LircDevice::send | ( | const IrSequence & | irSequence | ) |
High-level sending routine.
Sends the irSequence with the requested frequency and duty cycle.
| irSequence |
Definition at line 161 of file Mode2LircDevice.cpp.
|
inline |
High-level sending routine.
Sends the irSequence with the requested frequency.
| irSequence | |
| frequency |
Definition at line 113 of file Mode2LircDevice.h.
| bool Mode2LircDevice::send | ( | const lirc_t * | data, |
| unsigned | length, | ||
| frequency_t | frequency | ||
| ) |
High-level sending routine.
Sends the irSequence with the requested frequency.
| data | |
| length | |
| frequency |
Definition at line 165 of file Mode2LircDevice.cpp.
|
inline |
Definition at line 58 of file Mode2LircDevice.h.
|
inline |
Definition at line 49 of file Mode2LircDevice.h.
|
inline |
Set the modulation frequency.
The argument is the frequency (Hz).
Definition at line 128 of file Mode2LircDevice.h.
| int Mode2LircDevice::write | ( | const uint32_t * | data, |
| size_t | length | ||
| ) |
A low-level interface to the write(2) call on the file descriptor.
| data | data to be written |
| length | of data |
Definition at line 128 of file Mode2LircDevice.cpp.
|
protected |
Definition at line 17 of file Mode2LircDevice.h.
|
static |
Definition at line 23 of file Mode2LircDevice.h.
|
static |
Definition at line 22 of file Mode2LircDevice.h.
|
static |
Definition at line 20 of file Mode2LircDevice.h.
|
protected |
Definition at line 16 of file Mode2LircDevice.h.
|
static |
Definition at line 21 of file Mode2LircDevice.h.
1.8.15