Documentation ¶
Index ¶
- Variables
- func ListSupportedTypes() []string
- type DPT_10001
- type DPT_1001
- type DPT_1002
- type DPT_1003
- type DPT_1004
- type DPT_1005
- type DPT_1006
- type DPT_1007
- type DPT_1008
- type DPT_1009
- type DPT_1010
- type DPT_1011
- type DPT_1012
- type DPT_1013
- type DPT_1014
- type DPT_1015
- type DPT_1016
- type DPT_1017
- type DPT_1018
- type DPT_1019
- type DPT_1021
- type DPT_1022
- type DPT_1023
- type DPT_1024
- type DPT_1100
- type DPT_11001
- type DPT_12001
- type DPT_13001
- type DPT_13002
- type DPT_13010
- type DPT_13011
- type DPT_13012
- type DPT_13013
- type DPT_13014
- type DPT_13015
- type DPT_13016
- type DPT_13100
- type DPT_14000
- type DPT_14001
- type DPT_14002
- type DPT_14003
- type DPT_14004
- type DPT_14005
- type DPT_14006
- type DPT_14007
- type DPT_14008
- type DPT_14009
- type DPT_14010
- type DPT_14011
- type DPT_14012
- type DPT_14013
- type DPT_14014
- type DPT_14015
- type DPT_14016
- type DPT_14017
- type DPT_14018
- type DPT_14019
- type DPT_14020
- type DPT_14021
- type DPT_14022
- type DPT_14023
- type DPT_14024
- type DPT_14025
- type DPT_14026
- type DPT_14027
- type DPT_14028
- type DPT_14029
- type DPT_14030
- type DPT_14031
- type DPT_14032
- type DPT_14033
- type DPT_14034
- type DPT_14035
- type DPT_14036
- type DPT_14037
- type DPT_14038
- type DPT_14039
- type DPT_14040
- type DPT_14041
- type DPT_14042
- type DPT_14043
- type DPT_14044
- type DPT_14045
- type DPT_14046
- type DPT_14047
- type DPT_14048
- type DPT_14049
- type DPT_14050
- type DPT_14051
- type DPT_14052
- type DPT_14053
- type DPT_14054
- type DPT_14055
- type DPT_14056
- type DPT_14057
- type DPT_14058
- type DPT_14059
- type DPT_14060
- type DPT_14061
- type DPT_14062
- type DPT_14063
- type DPT_14064
- type DPT_14065
- type DPT_14066
- type DPT_14067
- type DPT_14068
- type DPT_14069
- type DPT_14070
- type DPT_14071
- type DPT_14072
- type DPT_14073
- type DPT_14074
- type DPT_14075
- type DPT_14076
- type DPT_14077
- type DPT_14078
- type DPT_14079
- type DPT_16000
- type DPT_16001
- type DPT_17001
- type DPT_18001
- type DPT_20102
- type DPT_20105
- type DPT_242600
- type DPT_251600
- type DPT_28001
- type DPT_5001
- type DPT_5003
- type DPT_5004
- type DPT_5005
- type DPT_6010
- type DPT_7001
- type DPT_7002
- type DPT_7003
- type DPT_7004
- type DPT_7005
- type DPT_7006
- type DPT_7007
- type DPT_7010
- type DPT_7011
- type DPT_7012
- type DPT_7013
- type DPT_9001
- type DPT_9002
- type DPT_9003
- type DPT_9004
- type DPT_9005
- type DPT_9006
- type DPT_9007
- type DPT_9008
- type DPT_9010
- type DPT_9011
- type DPT_9020
- type DPT_9021
- type DPT_9022
- type DPT_9023
- type DPT_9024
- type DPT_9025
- type DPT_9026
- type DPT_9027
- type DPT_9028
- type DatapointMeta
- type DatapointValue
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidLength is returned when the application data has unexpected length. ErrInvalidLength = errors.New("given application data has invalid length") // ErrBadReservedBits is returned when reserved bits are populated. E.g. if bit number 5 of a r4B4 field is populated ErrBadReservedBits = errors.New("reserved bits in the input data have been populated") )
Functions ¶
func ListSupportedTypes ¶
func ListSupportedTypes() []string
ListSupportedTypes returns the name all known datapoint-types (DPTs).
Types ¶
type DPT_10001 ¶
DPT_10001 represents DPT 10.001 / TimeOfDay p. 34. Weekday is NOT a golang Weekday, but a KNX Day [0,...,7]. It may be 0, indicating "no day" was provided.
type DPT_11001 ¶
DPT_11001 represents DPT 11.001 / Date p 34. Valid years are limited to 1990 - 2089 for the Year field.
type DPT_14028 ¶
type DPT_14028 float32
DPT_14028 represents DPT 14.028 / Electric PotentialDifference
type DPT_16000 ¶
type DPT_16000 string
DPT_16000 represents DPT 16.000 / String ASCII. The string should be ASCII and contain at most 14 chars. A string longer than 14 chars will be silently truncated. Non-ASCII chars will be replaced with a space = 0x20.
type DPT_16001 ¶
type DPT_16001 string
DPT_16001 represents DPT 16.001 / String 8859-1. The string must be ISO-8859-1 and contain at most 14 chars. A string longer than 14 chars will be silently truncated. Non-ISO-8859-1 chars will be replaced with a space = 0x20.
type DPT_18001 ¶
type DPT_18001 uint8
DPT_18001 represents DPT 18.001 / Scene Control.
type DPT_242600 ¶
DPT_242600 represents DPT 242.600 (DPT_Colour_xyY) Colour xyY - x: 0-1 (= 0 - 65535) y: 0-1 (= 0 - 65535) U16 U16 U8 r6B2
func (DPT_242600) Pack ¶
func (d DPT_242600) Pack() []byte
func (DPT_242600) String ¶
func (d DPT_242600) String() string
func (DPT_242600) Unit ¶
func (d DPT_242600) Unit() string
func (*DPT_242600) Unpack ¶
func (d *DPT_242600) Unpack(data []byte) error
type DPT_251600 ¶
type DPT_251600 struct { Red uint8 Green uint8 Blue uint8 White uint8 RedValid bool GreenValid bool BlueValid bool WhiteValid bool }
DPT_251600 represents DPT 251.600 / Colour RGBW - RGBW value 4x(0..100%) / U8 U8 U8 U8 r8 r4B4
func (DPT_251600) Pack ¶
func (d DPT_251600) Pack() []byte
func (DPT_251600) String ¶
func (d DPT_251600) String() string
func (DPT_251600) Unit ¶
func (d DPT_251600) Unit() string
func (*DPT_251600) Unpack ¶
func (d *DPT_251600) Unpack(data []byte) error
type DatapointMeta ¶
type DatapointMeta interface { // Unit returns the unit of this datapoint type or empty string if it doesn't have a unit. Unit() string }
DatapointMeta gives meta information about a datapoint type.
type DatapointValue ¶
type DatapointValue interface { // Pack the datapoint to a byte array. Pack() []byte // Unpack a the datapoint value from a byte array. Unpack(data []byte) error }
A DatapointValue is a value of a datapoint.
func Produce ¶
func Produce(name string) (d DatapointValue, ok bool)
Produce creates a new instance of the given datapoint-type name e.g. "1.001".