kdriveExpress SDK 23.2.0
kdrive_express_dpt.h File Reference

kdriveExpress Datapoint API More...

Go to the source code of this file.

Data Structures

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

Macros

#define KDRIVE_MAX_DP_TYPE_ID_LEN   (13)
 The max length of a datapoint type id. More...
 
#define KDRIVE_MAX_DP_TYPE_NAME_LEN   (30)
 The max length of a datapoint type name. More...
 
#define KDRIVE_DPT1_SIZE_IN_BITS   (1)
 The size in bits of DPT1. More...
 
#define KDRIVE_DPT2_SIZE_IN_BITS   (2)
 The size in bits of DPT2. More...
 
#define KDRIVE_DPT3_SIZE_IN_BITS   (4)
 The size in bits of DPT3. More...
 
#define KDRIVE_DPT4_SIZE_IN_BITS   (8)
 The size in bits of DPT4. More...
 
#define KDRIVE_DPT5_SIZE_IN_BITS   (8)
 The size in bits of DPT5. More...
 
#define KDRIVE_DPT6_SIZE_IN_BITS   (8)
 The size in bits of DPT6. More...
 
#define KDRIVE_DPT7_SIZE_IN_BITS   (16)
 The size in bits of DPT7. More...
 
#define KDRIVE_DPT8_SIZE_IN_BITS   (16)
 The size in bits of DPT8. More...
 
#define KDRIVE_DPT9_SIZE_IN_BITS   (16)
 The size in bits of DPT9. More...
 
#define KDRIVE_DPT10_SIZE_IN_BITS   (24)
 The size in bits of DPT10. More...
 
#define KDRIVE_DPT11_SIZE_IN_BITS   (24)
 The size in bits of DPT11. More...
 
#define KDRIVE_DPT12_SIZE_IN_BITS   (32)
 The size in bits of DPT12. More...
 
#define KDRIVE_DPT13_SIZE_IN_BITS   (32)
 The size in bits of DPT13. More...
 
#define KDRIVE_DPT14_SIZE_IN_BITS   (32)
 The size in bits of DPT14. More...
 
#define KDRIVE_DPT15_SIZE_IN_BITS   (32)
 The size in bits of DPT15. More...
 
#define KDRIVE_DPT16_SIZE_IN_BITS   (112)
 The size in bits of DPT16. 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

kdriveExpress Datapoint API

Author
Copyright (c) 2002-2023 WEINZIERL ENGINEERING GmbH

Macro Definition Documentation

◆ KDRIVE_DPT10_SIZE_IN_BITS

#define KDRIVE_DPT10_SIZE_IN_BITS   (24)

The size in bits of DPT10.

◆ KDRIVE_DPT11_SIZE_IN_BITS

#define KDRIVE_DPT11_SIZE_IN_BITS   (24)

The size in bits of DPT11.

◆ KDRIVE_DPT12_SIZE_IN_BITS

#define KDRIVE_DPT12_SIZE_IN_BITS   (32)

The size in bits of DPT12.

◆ KDRIVE_DPT13_SIZE_IN_BITS

#define KDRIVE_DPT13_SIZE_IN_BITS   (32)

The size in bits of DPT13.

◆ KDRIVE_DPT14_SIZE_IN_BITS

#define KDRIVE_DPT14_SIZE_IN_BITS   (32)

The size in bits of DPT14.

◆ KDRIVE_DPT15_SIZE_IN_BITS

#define KDRIVE_DPT15_SIZE_IN_BITS   (32)

The size in bits of DPT15.

◆ KDRIVE_DPT16_SIZE_IN_BITS

#define KDRIVE_DPT16_SIZE_IN_BITS   (112)

The size in bits of DPT16.

◆ KDRIVE_DPT1_SIZE_IN_BITS

#define KDRIVE_DPT1_SIZE_IN_BITS   (1)

The size in bits of DPT1.

◆ KDRIVE_DPT2_SIZE_IN_BITS

#define KDRIVE_DPT2_SIZE_IN_BITS   (2)

The size in bits of DPT2.

◆ KDRIVE_DPT3_SIZE_IN_BITS

#define KDRIVE_DPT3_SIZE_IN_BITS   (4)

The size in bits of DPT3.

◆ KDRIVE_DPT4_SIZE_IN_BITS

#define KDRIVE_DPT4_SIZE_IN_BITS   (8)

The size in bits of DPT4.

◆ KDRIVE_DPT5_SIZE_IN_BITS

#define KDRIVE_DPT5_SIZE_IN_BITS   (8)

The size in bits of DPT5.

◆ KDRIVE_DPT6_SIZE_IN_BITS

#define KDRIVE_DPT6_SIZE_IN_BITS   (8)

The size in bits of DPT6.

◆ KDRIVE_DPT7_SIZE_IN_BITS

#define KDRIVE_DPT7_SIZE_IN_BITS   (16)

The size in bits of DPT7.

◆ KDRIVE_DPT8_SIZE_IN_BITS

#define KDRIVE_DPT8_SIZE_IN_BITS   (16)

The size in bits of DPT8.

◆ KDRIVE_DPT9_SIZE_IN_BITS

#define KDRIVE_DPT9_SIZE_IN_BITS   (16)

The size in bits of DPT9.

◆ KDRIVE_MAX_DP_TYPE_ID_LEN

#define KDRIVE_MAX_DP_TYPE_ID_LEN   (13)

The max length of a datapoint type id.

◆ KDRIVE_MAX_DP_TYPE_NAME_LEN

#define KDRIVE_MAX_DP_TYPE_NAME_LEN   (30)

The max length of a datapoint type name.