3 #include <linux/lirc.h> 37 void report(
const char *name,
bool value, std::ostream& stream)
const;
40 int ioctl(uint32_t cmd, uint32_t arg);
71 virtual void report(std::ostream& stream = std::cout)
const;
73 virtual bool isMode2()
const = 0;
104 return ioctl(LIRC_SET_TRANSMITTER_MASK, mask);
117 return ioctl(LIRC_SET_REC_TIMEOUT, arg);
125 return ioctl(LIRC_SET_REC_TIMEOUT_REPORTS, (
int) enable);
128 #ifdef SUPPORT_NEVER_IMPLEMENTED_OPTIONS 129 bool canSendRaw()
const {
130 return canDo(LIRC_CAN_SEND_RAW);
133 bool canSendMode2()
const {
134 return canDo(LIRC_CAN_SEND_MODE2);
137 bool canRecRaw()
const {
138 return canDo(LIRC_CAN_REC_RAW);
141 bool canRecPulse()
const {
142 return canDo(LIRC_CAN_REC_PULSE);
145 bool canSetRecCarrier()
const {
146 return canDo(LIRC_CAN_SET_REC_CARRIER);
149 bool canSetRecDutyCycle()
const {
150 return canDo(LIRC_CAN_SET_REC_DUTY_CYCLE);
153 bool canSetRecDutyCycleRange()
const {
154 return canDo(LIRC_CAN_SET_REC_DUTY_CYCLE_RANGE);
157 bool canSetRecCarrierRange()
const {
158 return canDo(LIRC_CAN_SET_REC_CARRIER_RANGE);
161 bool canSetRecFilter()
const {
162 return canDo(LIRC_CAN_SET_REC_FILTER);
165 bool canNotifyDecoder()
const {
166 return canDo(LIRC_CAN_NOTIFY_DECODE);
171 bool canMeasureCarrier()
const {
172 return canDo(LIRC_CAN_MEASURE_CARRIER);
175 bool canUseWidebandReceiver()
const {
176 return canDo(LIRC_CAN_USE_WIDEBAND_RECEIVER);
180 return canDo(LIRC_CAN_REC_LIRCCODE);
183 #endif // SUPPORT_NEVER_IMPLEMENTED_OPTIONS bool canSendLircCode() const
bool canSendPulse() const
virtual bool isLircCode() const =0
static const milliseconds_t defaultBeginTimeout
static const char * version
void setBeginTimeout(milliseconds_t timeout)
bool canRecLircCode() const
int ioctl(uint32_t cmd, uint32_t arg)
int setRecTimeoutReports(bool enable)
Enable or disable timeout packages.
bool reportValidity(std::ostream &stream=std::cout) const
uint32_t milliseconds_t
Type for durations in milli seconds.
static const uint32_t INVALID
virtual bool isMode2() const =0
void report(const char *name, bool value, std::ostream &stream) const
static const bool longReport
Flag indicating how to format reports.
bool canSetRecTimeout() const
unsigned getNumberTransmitters() const
Return the number of transmitters as reported from the device.
milliseconds_t getBeginTimeout() const
int setTransmitterMask(uint32_t mask)
Enable the set of transmitters specified in val, which contains a bit mask where each enabled transmi...
static const char * defaultFilename
milliseconds_t beginTimeout
LircDevice(const char *path=defaultFilename, milliseconds_t beginTimeout=defaultBeginTimeout)
This abstract class contains the common functionality of the derived classes.
bool canDo(uint32_t mask) const
This file defines some general data types that are used in the library.
int setRecTimeout(int arg)
Set the integer value for IR inactivity timeout (microseconds).
bool canSetTransmitterMask() const
unsigned numberTransmitters