5 #include "dpt_types.hpp" 20 #define KNX_MAP_MAJOR(major, size, type) \ 21 template<> class MappingMajor<major> { public: enum { SIZE = size }; typedef type set_type; }; 23 KNX_MAP_MAJOR( 1, 1,
bool );
26 KNX_MAP_MAJOR( 4, 2,
char );
27 KNX_MAP_MAJOR( 5, 2, uint8_t );
28 KNX_MAP_MAJOR( 6, 2, int8_t );
29 KNX_MAP_MAJOR( 7, 3, uint16_t );
30 KNX_MAP_MAJOR( 8, 3, int16_t );
31 KNX_MAP_MAJOR( 9, 3,
float );
34 KNX_MAP_MAJOR( 12, 5, uint32_t );
35 KNX_MAP_MAJOR( 13, 5, int32_t );
36 KNX_MAP_MAJOR( 14, 5,
float );
42 KNX_MAP_MAJOR( 20, 2, uint8_t );
48 template<
int MAJOR,
int MINOR>
52 template<
int MAJOR,
int MINOR>
75 static unsigned int get_index();
79 void set(
const TYPE value);
83 void get(TYPE & value)
const;
86 template<
int MAJOR2,
int MINOR2>
87 friend std::ostream & operator<<(std::ostream & os, dpt<MAJOR2,MINOR2> & data);
91 template<
int MAJOR,
int MINOR>
92 std::ostream & operator<<(std::ostream & os, dpt<MAJOR,MINOR> & data);
151 KNX_IMPORT_EXPORT
static const uint16_t
MAX;
153 KNX_IMPORT_EXPORT
static const uint16_t
MIN;
Representation of date with day, month and year. Year has a value from 0 to 99 where values bigger th...
Definition: dpt.hpp:168
A 6 bit scene number with control field.
Definition: dpt.hpp:193
static KNX_IMPORT_EXPORT const dpt< 1, 001 >::set_type ON
Static variable for switching on.
Definition: dpt.hpp:100
static KNX_IMPORT_EXPORT const dpt< 1, 001 >::set_type OFF
Static variable for switching off.
Definition: dpt.hpp:102
Dimming control with direction and step value as 2^(value-1) subdivisions of the interval 0 to 100 pe...
Definition: dpt.hpp:119
A 6 bit scene number.
Definition: dpt.hpp:190
static KNX_IMPORT_EXPORT const float MAX_FLOAT
Maximal value as float.
Definition: dpt.hpp:155
Data container for this dpt.
Definition: dpt_types.hpp:173
Data container for this dpt.
Definition: dpt_types.hpp:49
Data container for this dpt.
Definition: dpt_types.hpp:89
Access data with six 4 byte fields.
Definition: dpt.hpp:184
Data container for this dpt.
Definition: dpt_types.hpp:111
Data container for this dpt.
Definition: dpt_types.hpp:152
Data container for this dpt.
Definition: dpt_types.hpp:196
Data container for this dpt.
Definition: dpt_types.hpp:221
Data container for this dpt.
Definition: dpt_types.hpp:289
dpt< MAJOR, MINOR > own_type
Assigning the type for later access.
Definition: dpt.hpp:63
Forward declaration of hidden implementation.
Definition: dpt.hpp:49
Unsigned value with 16 bit. Range from 0 to 65535.
Definition: dpt.hpp:137
Encoding of a status. Here autonomous(0), skave (1) and master (2).
Definition: dpt.hpp:199
Simple single ascii character.
Definition: dpt.hpp:124
Alarm information.
Definition: dpt.hpp:205
static KNX_IMPORT_EXPORT const uint16_t MAX
Maximal value in binary.
Definition: dpt.hpp:151
Data container for this dpt.
Definition: dpt_types.hpp:11
Unsigned value with 8 bit. Scaling represents range 0 to 100 percent.
Definition: dpt.hpp:129
Data container for this dpt.
Definition: dpt_types.hpp:30
dpt_private< MAJOR, MINOR > private_type
Assigning type of private implementation.
Definition: dpt.hpp:66
Binary single bit value with additional control bit. Either on or off.
Definition: dpt.hpp:106
Unsigned 32 bit. Here as counter.
Definition: dpt.hpp:175
Template definition of each dpt.
Definition: dpt.hpp:53
dpt_10_001 dpt_timeofday
Alias for dpt 10.001.
Definition: dpt.hpp:214
static KNX_IMPORT_EXPORT const dpt< 2, 001 >::set_type NO_CONTROL
Control bit is off so value is not used.
Definition: dpt.hpp:110
Color information.
Definition: dpt.hpp:208
Representation of time with day, hours, minutes and seconds.
Definition: dpt.hpp:161
static KNX_IMPORT_EXPORT const float MIN_FLOAT
Minimal value as float.
Definition: dpt.hpp:157
Float value with 16 bit. Non IEEE definition. Range from -671088.64 to 670760.96. Here interpreted as...
Definition: dpt.hpp:145
An ascii string with max 14 ascii characters.
Definition: dpt.hpp:187
Signed 32 bit. Here as counter.
Definition: dpt.hpp:178
separated namespace to embed all libknx related classes
Definition: connection.hpp:14
static KNX_IMPORT_EXPORT const uint16_t INVALID_DATA
Invalid value.
Definition: dpt.hpp:149
Float as 32 bit with IEEE 754 notation. Here as acceleration in ms^-2.
Definition: dpt.hpp:181
Combinaton of date and time as 8 byte value.
Definition: dpt.hpp:196
Signed value with 16 bit. Range from -32768 to 32767.
Definition: dpt.hpp:141
static KNX_IMPORT_EXPORT const dpt< 2, 001 >::set_type CONTROL_VALUE_ONE
Control bit is on and value is on.
Definition: dpt.hpp:114
Data container for this dpt.
Definition: dpt_types.hpp:349
dpt_1_001 dpt_switch
Alias for dpt 1.001.
Definition: dpt.hpp:211
Data container for this dpt.
Definition: dpt_types.hpp:314
MappingMajor< MAJOR >::set_type set_type
Fetching the set value type from mapping.
Definition: dpt.hpp:60
Signed value with 8 bit. Percent represents range -128 to 127 percent.
Definition: dpt.hpp:133
static KNX_IMPORT_EXPORT const dpt< 2, 001 >::set_type CONTROL_VALUE_ZERO
Control bit is on and value is off.
Definition: dpt.hpp:112
Binary single bit value. Either on or off.
Definition: dpt.hpp:96
static KNX_IMPORT_EXPORT const uint16_t MIN
Minimal value in binary.
Definition: dpt.hpp:153
Scene information with filed indicating if scene is active or not.
Definition: dpt.hpp:202