kdriveExpress SDK 22.1.1
kdriveExpress Datapoint API

Data Structures

struct  datapoint_type_t
 Represents a single datapoint type. More...
 

Typedefs

typedef struct datapoint_type_t datapoint_type_t
 Represents a single datapoint type. More...
 

Functions

kdriveExpress_API error_t kdrive_dpt_get_dpt_descriptor (char *dpt_id, datapoint_type_t *dpt_desc)
 Returns the datapoint type information associated with a datapoint type id. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt1 (uint8_t *data, uint32_t *length, bool_t value)
 Sets DPT-1 (1 bit) More...
 
kdriveExpress_API error_t kdrive_dpt_decode_dpt1 (const uint8_t *data, uint32_t length, bool_t *value)
 Gets DPT-1 (1 bit) More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt2 (uint8_t *data, uint32_t *length, bool_t control, bool_t value)
 Sets DPT-2: 1 bit controlled. More...
 
kdriveExpress_API error_t kdrive_dpt_decode_dpt2 (const uint8_t *data, uint32_t length, bool_t *control, bool_t *value)
 Gets DPT-2: 1 bit controlled. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt3 (uint8_t *data, uint32_t *length, bool_t control, uint8_t value)
 Sets DPT-3: 3 bit controlled. More...
 
kdriveExpress_API error_t kdrive_dpt_decode_dpt3 (const uint8_t *data, uint32_t length, bool_t *control, uint8_t *value)
 Gets DPT-3: 3 bit controlled. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt4 (uint8_t *data, uint32_t *length, uint8_t character)
 Sets DPT-4: Character. More...
 
kdriveExpress_API error_t kdrive_dpt_decode_dpt4 (const uint8_t *data, uint32_t length, uint8_t *character)
 Gets DPT-4: Character. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt5 (uint8_t *data, uint32_t *length, uint8_t value)
 Sets DPT-5: 8 bit unsigned value. More...
 
kdriveExpress_API error_t kdrive_dpt_decode_dpt5 (const uint8_t *data, uint32_t length, uint8_t *value)
 Gets DPT-5: 8 bit unsigned value. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt6 (uint8_t *data, uint32_t *length, int8_t value)
 Sets DPT-6: 8 bit signed value. More...
 
kdriveExpress_API error_t kdrive_dpt_decode_dpt6 (const uint8_t *data, uint32_t length, int8_t *value)
 Gets DPT-6: 8 bit signed value. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt7 (uint8_t *data, uint32_t *length, uint16_t value)
 Sets DPT-7: 2 byte unsigned value. More...
 
kdriveExpress_API error_t kdrive_dpt_decode_dpt7 (const uint8_t *data, uint32_t length, uint16_t *value)
 Gets DPT-7: 2 byte unsigned value. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt8 (uint8_t *data, uint32_t *length, int16_t value)
 Sets DPT-8: 2 byte signed value. More...
 
kdriveExpress_API error_t kdrive_dpt_decode_dpt8 (const uint8_t *data, uint32_t length, int16_t *value)
 Gets DPT-8: 2 byte signed value. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt9 (uint8_t *data, uint32_t *length, float32_t value)
 Sets DPT-9: 2 byte float value. More...
 
kdriveExpress_API error_t kdrive_dpt_decode_dpt9 (const uint8_t *data, uint32_t length, float32_t *value)
 Gets DPT-9: 2 byte float value. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt10_local (uint8_t *data, uint32_t *length)
 Sets DPT-10: local time. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt10_utc (uint8_t *data, uint32_t *length)
 Sets DPT-10: UTC time. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt10 (uint8_t *data, uint32_t *length, int32_t day, int32_t hour, int32_t minute, int32_t second)
 Sets DPT-10: time. More...
 
kdriveExpress_API error_t kdrive_dpt_decode_dpt10 (const uint8_t *data, uint32_t length, int32_t *day, int32_t *hour, int32_t *minute, int32_t *second)
 Gets DPT-10: time. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt11_local (uint8_t *data, uint32_t *length)
 Sets DPT-11: current local date. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt11_utc (uint8_t *data, uint32_t *length)
 Sets DPT-11: current UTC date. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt11 (uint8_t *data, uint32_t *length, int32_t year, int32_t month, int32_t day)
 Sets DPT-11: date in KNX format NOTE: The year is in KNX DPT11 format: 0..99; >=90 : 20th century; <90 : 21th century
e.g. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt11_knx (uint8_t *data, uint32_t *length, int32_t year, int32_t month, int32_t day)
 Sets DPT-11: date in KNX format NOTE: The year is in KNX DPT11 format: 0..99; >=90 : 20th century; <90 : 21th century
e.g. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt11_yyyy (uint8_t *data, uint32_t *length, int32_t year, int32_t month, int32_t day)
 Sets DPT-11: date in "normal" format. More...
 
kdriveExpress_API error_t kdrive_dpt_decode_dpt11 (const uint8_t *data, uint32_t length, int32_t *year, int32_t *month, int32_t *day)
 Gets DPT-11: date in KNX format NOTE: The year is in KNX DPT11 format: 0..99; >=90 : 20th century; <90 : 21th century
e.g. More...
 
kdriveExpress_API error_t kdrive_dpt_decode_dpt11_knx (const uint8_t *data, uint32_t length, int32_t *year, int32_t *month, int32_t *day)
 Gets DPT-11: date in KNX format NOTE: The year is in KNX DPT11 format: 0..99; >=90 : 20th century; <90 : 21th century
e.g. More...
 
kdriveExpress_API error_t kdrive_dpt_decode_dpt11_yyyy (const uint8_t *data, uint32_t length, int32_t *year, int32_t *month, int32_t *day)
 Gets DPT-11: date in "normal" format. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt12 (uint8_t *data, uint32_t *length, uint32_t value)
 Sets DPT-12: 4 byte unsigned value. More...
 
kdriveExpress_API error_t kdrive_dpt_decode_dpt12 (const uint8_t *data, uint32_t length, uint32_t *value)
 Gets DPT-12: 4 byte unsigned value. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt13 (uint8_t *data, uint32_t *length, int32_t value)
 Sets DPT-13: 4 byte signed value. More...
 
kdriveExpress_API error_t kdrive_dpt_decode_dpt13 (const uint8_t *data, uint32_t length, int32_t *value)
 Gets DPT-13: 4 byte signed value. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt14 (uint8_t *data, uint32_t *length, float32_t value)
 Sets DPT-14: 4 byte float value. More...
 
kdriveExpress_API error_t kdrive_dpt_decode_dpt14 (const uint8_t *data, uint32_t length, float32_t *value)
 Gets DPT-14: 4 byte float value. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt15 (uint8_t *data, uint32_t *length, int32_t accessCode, bool_t error, bool_t permission, bool_t direction, bool_t encrypted, int32_t index)
 Sets DPT-15: Entrance access. More...
 
kdriveExpress_API error_t kdrive_dpt_decode_dpt15 (const uint8_t *data, uint32_t length, int32_t *accessCode, bool_t *error, bool_t *permission, bool_t *direction, bool_t *encrypted, int32_t *index)
 Gets DPT-15: Entrance access. More...
 
kdriveExpress_API error_t kdrive_dpt_encode_dpt16 (uint8_t *data, uint32_t *length, const char value[KDRIVE_DPT16_LENGTH+1])
 Sets DPT-16: Character string. More...
 
kdriveExpress_API error_t kdrive_dpt_decode_dpt16 (const uint8_t *data, uint32_t length, char value[KDRIVE_DPT16_LENGTH+1])
 Gets DPT-16: Character string The out value string is null terminated. More...
 

Detailed Description

|----------|----------|-----------------------------|-------------|---------------|
|  Id      |  Number  |  Name                       |  SizeInBit  |  Implemented  |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-1    | 1        | 1 bit                       | 1           | Yes           |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-2    | 2        | 1 bit controlled            | 2           | Yes           |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-3    | 3        | 3 bit controlled            | 4           | Yes           |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-4    | 4        | Character                   | 8           | Yes           |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-5    | 5        | 8 bit unsigned value        | 8           | Yes           |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-6    | 6        | 8 bit signed value          | 8           | Yes           |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-7    | 7        | 2 byte unsigned value       | 16          | Yes           |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-8    | 8        | 2 byte signed value         | 16          | Yes           |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-9    | 9        | 2 byte float value          | 16          | Yes           |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-10   | 10       | Time                        | 24          | Yes           |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-11   | 11       | Date                        | 24          | Yes           |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-12   | 12       | 4 byte unsigned value       | 32          | Yes           |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-13   | 13       | 4 byte signed value         | 32          | Yes           |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-14   | 14       | 4 byte float value          | 32          | Yes           |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-15   | 15       | Entrance access             | 32          | Yes           |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-16   | 16       | Character string            | 112         | Yes           |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-17   | 17       | Scene Number                | 8           | No            |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-18   | 18       | Scene Control               | 8           | No            |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-19   | 19       | Date Time                   | 64          | No            |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-20   | 20       | 1 byte                      | 8           | use DPT-5/6   |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-217  | 217      | Version                     | 16          | No            |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-219  | 219      | Alarm Info                  | 48          | No            |
|----------|----------|-----------------------------|-------------|---------------|
| DPT-222  | 222      | 3x 16-Float Value           | 48          | No            |
|----------|----------|-----------------------------|-------------|---------------|

Typedef Documentation

◆ datapoint_type_t

Represents a single datapoint type.

Function Documentation

◆ kdrive_dpt_decode_dpt1()

kdriveExpress_API error_t kdrive_dpt_decode_dpt1 ( const uint8_t data,
uint32_t  length,
bool_t value 
)

Gets DPT-1 (1 bit)

Parameters
[in]datathe group value data buffer to be decoded
[in]lengththe length of the group value data buffer (in bytes)
[out]valuethe value extracted from the data buffer
Returns
success if the datapoint value can be extracted
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_decode_dpt10()

kdriveExpress_API error_t kdrive_dpt_decode_dpt10 ( const uint8_t data,
uint32_t  length,
int32_t day,
int32_t hour,
int32_t minute,
int32_t second 
)

Gets DPT-10: time.

Parameters
[in]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
[out]daythe day value extracted from the data buffer
[out]hourthe hour value extracted from the data buffer
[out]minutethe minute extracted from the data buffer
[out]secondthe second extracted from the data buffer
Returns
success if the datapoint value can be extracted
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_decode_dpt11()

kdriveExpress_API error_t kdrive_dpt_decode_dpt11 ( const uint8_t data,
uint32_t  length,
int32_t year,
int32_t month,
int32_t day 
)

Gets DPT-11: date in KNX format NOTE: The year is in KNX DPT11 format: 0..99; >=90 : 20th century; <90 : 21th century
e.g.

99 => 1999; 0 => 2000

Deprecated:
This function was replaced by kdrive_dpt_decode_dpt11_knx
Parameters
[in]datathe group value data buffer to be decoded
[in]lengththe length of the group value data buffer (in bytes)
[out]yearthe year value extracted from the data buffer (0..99)
[out]monththe month value extracted from the data buffer (1..12)
[out]daythe day value extracted from the data buffer (1..31)
Returns
success if the datapoint value can be extracted
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_decode_dpt11_knx()

kdriveExpress_API error_t kdrive_dpt_decode_dpt11_knx ( const uint8_t data,
uint32_t  length,
int32_t year,
int32_t month,
int32_t day 
)

Gets DPT-11: date in KNX format NOTE: The year is in KNX DPT11 format: 0..99; >=90 : 20th century; <90 : 21th century
e.g.

99 => 1999; 0 => 2000 This function replace kdrive_dpt_encode_dpt11.

Parameters
[in]datathe group value data buffer to be decoded
[in]lengththe length of the group value data buffer (in bytes)
[out]yearthe year value extracted from the data buffer (0..99)
[out]monththe month value extracted from the data buffer (1..12)
[out]daythe day value extracted from the data buffer (1..31)
Returns
success if the datapoint value can be extracted

◆ kdrive_dpt_decode_dpt11_yyyy()

kdriveExpress_API error_t kdrive_dpt_decode_dpt11_yyyy ( const uint8_t data,
uint32_t  length,
int32_t year,
int32_t month,
int32_t day 
)

Gets DPT-11: date in "normal" format.

Parameters
[in]datathe group value data buffer to be decoded
[in]lengththe length of the group value data buffer (in bytes)
[out]yearthe year value extracted from the data buffer (1990 .. 2089)
[out]monththe month value extracted from the data buffer (1..12)
[out]daythe day value extracted from the data buffer (1..31)
Returns
success if the datapoint value can be extracted

◆ kdrive_dpt_decode_dpt12()

kdriveExpress_API error_t kdrive_dpt_decode_dpt12 ( const uint8_t data,
uint32_t  length,
uint32_t value 
)

Gets DPT-12: 4 byte unsigned value.

Parameters
[in]datathe group value data buffer to be decoded
[in]lengththe length of the group value data buffer (in bytes)
[out]valuethe value extracted from the data buffer
Returns
success if the datapoint value can be extracted
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_decode_dpt13()

kdriveExpress_API error_t kdrive_dpt_decode_dpt13 ( const uint8_t data,
uint32_t  length,
int32_t value 
)

Gets DPT-13: 4 byte signed value.

Parameters
[in]datathe group value data buffer to be decoded
[in]lengththe length of the group value data buffer (in bytes)
[out]valuethe value extracted from the data buffer
Returns
success if the datapoint value can be extracted
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_decode_dpt14()

kdriveExpress_API error_t kdrive_dpt_decode_dpt14 ( const uint8_t data,
uint32_t  length,
float32_t value 
)

Gets DPT-14: 4 byte float value.

Parameters
[in]datathe group value data buffer to be decoded
[in]lengththe length of the group value data buffer (in bytes)
[out]valuethe value extracted from the data buffer
Returns
success if the datapoint value can be extracted
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_decode_dpt15()

kdriveExpress_API error_t kdrive_dpt_decode_dpt15 ( const uint8_t data,
uint32_t  length,
int32_t accessCode,
bool_t error,
bool_t permission,
bool_t direction,
bool_t encrypted,
int32_t index 
)

Gets DPT-15: Entrance access.

Parameters
[in]datathe group value data buffer to be decoded
[in]lengththe length of the group value data buffer (in bytes)
[out]accessCodethe accessCode extracted from the data buffer
[out]errorthe error extracted from the data buffer
[out]permissionthe permission extracted from the data buffer
[out]directionthe direction extracted from the data buffer
[out]encryptedthe encrypted extracted from the data buffer
[out]indexthe index extracted from the data buffer
Returns
success if the datapoint value can be extracted
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_decode_dpt16()

kdriveExpress_API error_t kdrive_dpt_decode_dpt16 ( const uint8_t data,
uint32_t  length,
char  value[KDRIVE_DPT16_LENGTH+1] 
)

Gets DPT-16: Character string The out value string is null terminated.

NOTE: This function exists only for consistency. You could also use the buffer directly and append the null termination.

Parameters
[in]datathe group value data buffer to be decoded
[in]lengththe length of the group value data buffer (in bytes)
[out]valuethe value extracted from the data buffer (as null terminated string)
Returns
success if the datapoint value can be extracted
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_decode_dpt2()

kdriveExpress_API error_t kdrive_dpt_decode_dpt2 ( const uint8_t data,
uint32_t  length,
bool_t control,
bool_t value 
)

Gets DPT-2: 1 bit controlled.

Parameters
[in]datathe group value data buffer to be decoded
[in]lengththe length of the group value data buffer (in bytes)
[out]controlthe value extracted from the data buffer
[out]valuethe value extracted from the data buffer
Returns
success if the datapoint value can be extracted
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_decode_dpt3()

kdriveExpress_API error_t kdrive_dpt_decode_dpt3 ( const uint8_t data,
uint32_t  length,
bool_t control,
uint8_t value 
)

Gets DPT-3: 3 bit controlled.

Parameters
[in]datathe group value data buffer to be decoded
[in]lengththe length of the group value data buffer (in bytes)
[out]controlthe value extracted from the data buffer
[out]valuethe value extracted from the data buffer
Returns
success if the datapoint value can be extracted
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_decode_dpt4()

kdriveExpress_API error_t kdrive_dpt_decode_dpt4 ( const uint8_t data,
uint32_t  length,
uint8_t character 
)

Gets DPT-4: Character.

Parameters
[in]datathe group value data buffer to be decoded
[in]lengththe length of the group value data buffer (in bytes)
[out]characterthe value extracted from the data buffer
Returns
success if the datapoint value can be extracted
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_decode_dpt5()

kdriveExpress_API error_t kdrive_dpt_decode_dpt5 ( const uint8_t data,
uint32_t  length,
uint8_t value 
)

Gets DPT-5: 8 bit unsigned value.

Parameters
[in]datathe group value data buffer to be decoded
[in]lengththe length of the group value data buffer (in bytes)
[out]valuethe value extracted from the data buffer
Returns
success if the datapoint value can be extracted
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_decode_dpt6()

kdriveExpress_API error_t kdrive_dpt_decode_dpt6 ( const uint8_t data,
uint32_t  length,
int8_t value 
)

Gets DPT-6: 8 bit signed value.

Parameters
[in]datathe group value data buffer to be decoded
[in]lengththe length of the group value data buffer (in bytes)
[out]valuethe value extracted from the data buffer
Returns
success if the datapoint value can be extracted
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_decode_dpt7()

kdriveExpress_API error_t kdrive_dpt_decode_dpt7 ( const uint8_t data,
uint32_t  length,
uint16_t value 
)

Gets DPT-7: 2 byte unsigned value.

Parameters
[in]datathe group value data buffer to be decoded
[in]lengththe length of the group value data buffer (in bytes)
[out]valuethe value extracted from the data buffer
Returns
success if the datapoint value can be extracted
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_decode_dpt8()

kdriveExpress_API error_t kdrive_dpt_decode_dpt8 ( const uint8_t data,
uint32_t  length,
int16_t value 
)

Gets DPT-8: 2 byte signed value.

Parameters
[in]datathe group value data buffer to be decoded
[in]lengththe length of the group value data buffer (in bytes)
[out]valuethe value extracted from the data buffer
Returns
success if the datapoint value can be extracted
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_decode_dpt9()

kdriveExpress_API error_t kdrive_dpt_decode_dpt9 ( const uint8_t data,
uint32_t  length,
float32_t value 
)

Gets DPT-9: 2 byte float value.

Parameters
[in]datathe group value data buffer to be decoded
[in]lengththe length of the group value data buffer (in bytes)
[out]valuethe value extracted from the data buffer
Returns
success if the datapoint value can be extracted
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_encode_dpt1()

kdriveExpress_API error_t kdrive_dpt_encode_dpt1 ( uint8_t data,
uint32_t length,
bool_t  value 
)

Sets DPT-1 (1 bit)

Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
[in]valuethe value written to the data buffer
Returns
success if the datapoint value can be written
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_encode_dpt10()

kdriveExpress_API error_t kdrive_dpt_encode_dpt10 ( uint8_t data,
uint32_t length,
int32_t  day,
int32_t  hour,
int32_t  minute,
int32_t  second 
)

Sets DPT-10: time.

Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
[in]daythe day value written to the data buffer
[in]hourthe hour value written to the data buffer
[in]minutethe minute value written to the data buffer
[in]secondthe second value written to the data buffer
Returns
success if the datapoint value can be written
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_encode_dpt10_local()

kdriveExpress_API error_t kdrive_dpt_encode_dpt10_local ( uint8_t data,
uint32_t length 
)

Sets DPT-10: local time.

Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
Returns
success if the datapoint value can be written
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_encode_dpt10_utc()

kdriveExpress_API error_t kdrive_dpt_encode_dpt10_utc ( uint8_t data,
uint32_t length 
)

Sets DPT-10: UTC time.

Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
Returns
success if the datapoint value can be written
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_encode_dpt11()

kdriveExpress_API error_t kdrive_dpt_encode_dpt11 ( uint8_t data,
uint32_t length,
int32_t  year,
int32_t  month,
int32_t  day 
)

Sets DPT-11: date in KNX format NOTE: The year is in KNX DPT11 format: 0..99; >=90 : 20th century; <90 : 21th century
e.g.

99 => 1999; 0 => 2000

Deprecated:
This function was replaced by kdrive_dpt_encode_dpt11_knx
Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
[in]yearthe year value written to the data buffer (0..99)
[in]monththe month value written to the data buffer (1..12)
[in]daythe day value written to the data buffer (1..31)
Returns
success if the datapoint value can be written

◆ kdrive_dpt_encode_dpt11_knx()

kdriveExpress_API error_t kdrive_dpt_encode_dpt11_knx ( uint8_t data,
uint32_t length,
int32_t  year,
int32_t  month,
int32_t  day 
)

Sets DPT-11: date in KNX format NOTE: The year is in KNX DPT11 format: 0..99; >=90 : 20th century; <90 : 21th century
e.g.

99 => 1999; 0 => 2000 This function replace kdrive_dpt_encode_dpt11.

Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
[in]yearthe year value written to the data buffer (0..99)
[in]monththe month value written to the data buffer (1..12)
[in]daythe day value written to the data buffer (1..31)
Returns
success if the datapoint value can be written

◆ kdrive_dpt_encode_dpt11_local()

kdriveExpress_API error_t kdrive_dpt_encode_dpt11_local ( uint8_t data,
uint32_t length 
)

Sets DPT-11: current local date.

Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
Returns
success if the datapoint value can be written
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_encode_dpt11_utc()

kdriveExpress_API error_t kdrive_dpt_encode_dpt11_utc ( uint8_t data,
uint32_t length 
)

Sets DPT-11: current UTC date.

Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
Returns
success if the datapoint value can be written
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_encode_dpt11_yyyy()

kdriveExpress_API error_t kdrive_dpt_encode_dpt11_yyyy ( uint8_t data,
uint32_t length,
int32_t  year,
int32_t  month,
int32_t  day 
)

Sets DPT-11: date in "normal" format.

Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
[in]yearthe year value written to the data buffer (1990 .. 2089)
[in]monththe month value written to the data buffer (1..12)
[in]daythe day value written to the data buffer (1..31)
Returns
success if the datapoint value can be written
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_encode_dpt12()

kdriveExpress_API error_t kdrive_dpt_encode_dpt12 ( uint8_t data,
uint32_t length,
uint32_t  value 
)

Sets DPT-12: 4 byte unsigned value.

Parameters
[out]datathe group value data buffer to be encoded
[in,out]lengththe length of the group value data buffer (in bytes) (in) and the length of the formatted group value data buffer (in bits) (out)
[in]valuethe value written to the data buffer
Returns
success if the datapoint value can be written
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_encode_dpt13()

kdriveExpress_API error_t kdrive_dpt_encode_dpt13 ( uint8_t data,
uint32_t length,
int32_t  value 
)

Sets DPT-13: 4 byte signed value.

Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
[in]valuethe value written to the data buffer
Returns
success if the datapoint value can be written
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_encode_dpt14()

kdriveExpress_API error_t kdrive_dpt_encode_dpt14 ( uint8_t data,
uint32_t length,
float32_t  value 
)

Sets DPT-14: 4 byte float value.

Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
[in]valuethe value written to the data buffer
Returns
success if the datapoint value can be written
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_encode_dpt15()

kdriveExpress_API error_t kdrive_dpt_encode_dpt15 ( uint8_t data,
uint32_t length,
int32_t  accessCode,
bool_t  error,
bool_t  permission,
bool_t  direction,
bool_t  encrypted,
int32_t  index 
)

Sets DPT-15: Entrance access.

Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
[in]accessCodethe accessCode written to the data buffer
[in]errorthe error written to the data buffer
[in]permissionthe permission written to the data buffer
[in]directionthe direction written to the data buffer
[in]encryptedthe encrypted written to the data buffer
[in]indexthe index written to the data buffer
Returns
success if the datapoint value can be written
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_encode_dpt16()

kdriveExpress_API error_t kdrive_dpt_encode_dpt16 ( uint8_t data,
uint32_t length,
const char  value[KDRIVE_DPT16_LENGTH+1] 
)

Sets DPT-16: Character string.

NOTE: This function exists only for consistency. You could also use the buffer direct.

Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
[in]valuethe value written to the data buffer. (as null terminated string / or max 14 characters)
Returns
success if the datapoint value can be written
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_encode_dpt2()

kdriveExpress_API error_t kdrive_dpt_encode_dpt2 ( uint8_t data,
uint32_t length,
bool_t  control,
bool_t  value 
)

Sets DPT-2: 1 bit controlled.

Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
[in]controlthe value written to the data buffer
[in]valuethe value written to the data buffer
Returns
success if the datapoint value can be written
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_encode_dpt3()

kdriveExpress_API error_t kdrive_dpt_encode_dpt3 ( uint8_t data,
uint32_t length,
bool_t  control,
uint8_t  value 
)

Sets DPT-3: 3 bit controlled.

Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
[in]controlthe value written to the data buffer
[in]valuethe value written to the data buffer
Returns
success if the datapoint value can be written
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_encode_dpt4()

kdriveExpress_API error_t kdrive_dpt_encode_dpt4 ( uint8_t data,
uint32_t length,
uint8_t  character 
)

Sets DPT-4: Character.

Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
[in]characterthe value written to the data buffer
Returns
success if the datapoint value can be written
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_encode_dpt5()

kdriveExpress_API error_t kdrive_dpt_encode_dpt5 ( uint8_t data,
uint32_t length,
uint8_t  value 
)

Sets DPT-5: 8 bit unsigned value.

Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
[in]valuethe value written to the data buffer
Returns
success if the datapoint value can be written
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_encode_dpt6()

kdriveExpress_API error_t kdrive_dpt_encode_dpt6 ( uint8_t data,
uint32_t length,
int8_t  value 
)

Sets DPT-6: 8 bit signed value.

Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
[in]valuethe value written to the data buffer
Returns
success if the datapoint value can be written
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_encode_dpt7()

kdriveExpress_API error_t kdrive_dpt_encode_dpt7 ( uint8_t data,
uint32_t length,
uint16_t  value 
)

Sets DPT-7: 2 byte unsigned value.

Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
[in]valuethe value written to the data buffer
Returns
success if the datapoint value can be written
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_encode_dpt8()

kdriveExpress_API error_t kdrive_dpt_encode_dpt8 ( uint8_t data,
uint32_t length,
int16_t  value 
)

Sets DPT-8: 2 byte signed value.

Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
[in]valuethe value written to the data buffer
Returns
success if the datapoint value can be written
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_encode_dpt9()

kdriveExpress_API error_t kdrive_dpt_encode_dpt9 ( uint8_t data,
uint32_t length,
float32_t  value 
)

Sets DPT-9: 2 byte float value.

Parameters
[out]datathe group value data buffer to be encoded
[in]lengththe length of the group value data buffer (in bytes)
[out]lengththe length of the formatted group value data buffer (in bits)
[in]valuethe value written to the data buffer
Returns
success if the datapoint value can be written
Examples
kdrive_express_dpt.c.

◆ kdrive_dpt_get_dpt_descriptor()

kdriveExpress_API error_t kdrive_dpt_get_dpt_descriptor ( char *  dpt_id,
datapoint_type_t dpt_desc 
)

Returns the datapoint type information associated with a datapoint type id.

Parameters
[in]dpt_idthe datapoint type id
[out]dpt_descthe struct with the datapoint type informations