knx
ETS configurable knx-stack
dpt.cpp
Go to the documentation of this file.
1 #include "dpt.h"
2 
3 #include "bits.h"
4 
6 {}
7 
8 Dpt::Dpt(short mainGroup, short subGroup, short index /* = 0 */)
9  : mainGroup(mainGroup), subGroup(subGroup), index(index)
10 {
11  if (subGroup == 0)
12  println("WARNING: You used and invalid Dpt *.0");
13 }
14 
15 bool Dpt::operator==(const Dpt& other) const
16 {
17  return other.mainGroup == mainGroup && other.subGroup == subGroup && other.index == index;
18 }
19 
20 bool Dpt::operator!=(const Dpt& other) const
21 {
22  return !(other == *this);
23 }
void println(const char *s)
Definition: dpt.h:364
bool operator==(const Dpt &other) const
Definition: dpt.cpp:15
bool operator!=(const Dpt &other) const
Definition: dpt.cpp:20
unsigned short mainGroup
Definition: dpt.h:368
unsigned short index
Definition: dpt.h:370
unsigned short subGroup
Definition: dpt.h:369
Dpt()
Definition: dpt.cpp:5