libknx
group.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <stdint.h>
4 #include <string>
5 #include <sstream>
6 
11 namespace knx {
12 
16 class KNX_IMPORT_EXPORT group
17 {
18 public:
20  group();
22  group(std::string name);
24  group(uint8_t a, uint8_t b, uint8_t c);
26  group(uint8_t a, uint8_t b);
31  std::string get_name();
36  uint16_t get_binary();
43  void set_by_number(uint16_t a, uint16_t b, uint16_t c);
49  void set_by_number(uint16_t a, uint16_t b);
53  void set_by_name(std::string name);
58  void set_by_binary_2(uint16_t binary);
63  void set_by_binary_3(uint16_t binary);
65  bool operator==(knx::group other);
66 private:
67  std::string name;
68  uint16_t binary;
69 };
70 
71 }
72 
73 
74 
This class represents a KNX group address which might be either 3 compnent "a/b/c" or 2 component "a/...
Definition: group.hpp:17
uint16_t get_binary()
group(uint8_t a, uint8_t b)
Binary assign a 2 component group address.
void set_by_number(uint16_t a, uint16_t b, uint16_t c)
group()
Sets group to 0/0/0 by default.
void set_by_binary_3(uint16_t binary)
void set_by_number(uint16_t a, uint16_t b)
group(std::string name)
Assigns a group address by name. Sets default 0/0/0 if string is invalid. 2 component addresses may b...
void set_by_binary_2(uint16_t binary)
bool operator==(knx::group other)
Comparison operator for rapid equality checks.
group(uint8_t a, uint8_t b, uint8_t c)
Binary assign a 3 component group address.
std::string get_name()
void set_by_name(std::string name)
separated namespace to embed all libknx related classes
Definition: config.hpp:13