.. _program_listing_file_src_knx_dpt.cpp: Program Listing for File dpt.cpp ================================ |exhale_lsh| :ref:`Return to documentation for file ` (``src/knx/dpt.cpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #include "dpt.h" #include "bits.h" Dpt::Dpt() {} Dpt::Dpt(short mainGroup, short subGroup, short index /* = 0 */) : mainGroup(mainGroup), subGroup(subGroup), index(index) { if (subGroup == 0 && (mainGroup < 14 || mainGroup > 16)) println("WARNING: You used an invalid Dpt *.0"); } bool Dpt::operator==(const Dpt& other) const { return other.mainGroup == mainGroup && other.subGroup == subGroup && other.index == index; } bool Dpt::operator!=(const Dpt& other) const { return !(other == *this); }