
public class KnxEncoder extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
KnxEncoder.KnxMessageType |
| Constructor and Description |
|---|
KnxEncoder() |
| Modifier and Type | Method and Description |
|---|---|
static String |
clearHexValue(String hexValue)
This method remove, if present, the "0x" prefix of the hexValue variable.
|
static String |
convertDeviceAddressToHex(String address)
Translates readable device addresses to knx hex code.
|
static String |
convertGroupAddressToHex(String address)
Converts a readable knx group address to hex encoded string.
|
static String |
convertGroupAddressToReadable(byte[] buffer)
Convert knx group address from knx encoded bytes to readable x/y/z
format.
|
static byte[] |
convertToByteArray(String hexString)
Converts a hex-encoded knx message to byte array.
|
static String |
convertToHex(byte[] b)
Convert byte array to hex encoded string without delimiters.
|
static String |
convertToReadableHex(byte[] b)
Convert byte array to readable hex-encoded string.
|
static KnxTelegram |
decode(byte[] knxMessage)
Decode knx byte array and create KnxTelegram object.
|
static byte[] |
encode(boolean repeatBit,
byte[] sourceByte,
String targetAddress,
byte[] dataByte,
KnxCommand commandType,
boolean multicast)
Encode a knx telegram for sending to a knx bus.
|
static byte[] |
removeTrailingZeros(byte[] original)
Remove trailing Zero bytes.
|
public static byte[] encode(boolean repeatBit,
byte[] sourceByte,
String targetAddress,
byte[] dataByte,
KnxCommand commandType,
boolean multicast)
repeatBit - has this telegram been sent already?sourceByte - sending KNX addresstargetAddress - knx address - could be device or group addressdataByte - knx commandmessageType - (read, write, scenario)public static KnxTelegram decode(byte[] knxMessage)
knx - telegrampublic static byte[] removeTrailingZeros(byte[] original)
original - public static String convertDeviceAddressToHex(String address)
address - of the device as x.y.zpublic static String convertGroupAddressToHex(String address)
readable - string "x/y/z" group addresspublic static byte[] convertToByteArray(String hexString)
a - hex-encoded message stringpublic static String convertToReadableHex(byte[] b)
public static String convertToHex(byte[] b)
public static String convertGroupAddressToReadable(byte[] buffer)
buffer - group device address in bytesCopyright © 2018 universAAL Consortium. All rights reserved.