DevSlashLirc
LircT.cpp
Go to the documentation of this file.
1 #include "LircT.h"
2 
3 LircT::LircT(lirc_t data) {
4  this->data = data;
5 }
6 
8  // TODO: test input validity
9  this->data = data | type;
10 }
11 
12 LircT::LircT(const LircT& orig) {
13  data = orig.data;
14 }
15 
17 }
18 
19 void LircT::dump(std::ostream& stream) const {
20  stream << (isSpace() ? "space"
21  : isPulse() ? "pulse"
22  : isFrequency() ? "frequency"
23  : isTimeout() ? "timeout"
24  : "unknown");
25  stream << " " << getDuration();
26 }
void dump(std::ostream &stream=std::cout) const
Definition: LircT.cpp:19
bool isPulse() const
Definition: LircT.h:37
This is the class version of lirc_t, defined in lirc.h.
Definition: LircT.h:9
microseconds_t getDuration() const
Definition: LircT.h:29
virtual ~LircT()
Definition: LircT.cpp:16
bool isTimeout() const
Definition: LircT.h:45
uint32_t microseconds_t
Type for durations in micro seconds.
Definition: InfraredTypes.h:20
LircT(lirc_t data)
Definition: LircT.cpp:3
bool isSpace() const
Definition: LircT.h:33
bool isFrequency() const
Definition: LircT.h:41
LircTType
Definition: LircT.h:17