Package-level declarations

Discover some useful extensions for manipulating byte data.

Functions

Link copied to clipboard
fun RxBleClient.checkBluetoothState()
Link copied to clipboard
fun Byte.getBit(position: Int): Boolean
Link copied to clipboard

Converts the result of a lock command from bytes into a readable string. The first byte represents the command, and the rest of the bytes provide command result.

Link copied to clipboard

Converts lock notification bytes into a readable string format. The first byte indicates the type of notification and the rest of the bytes provide the notification details.

Link copied to clipboard

Gets the readable state of a lock based on its byte code. Each byte corresponds to a different state, such as open or closed.

Link copied to clipboard

Gets the lock's current state and status based on bytes. It uses bytes to represent the current state and the last status change of the lock.

Link copied to clipboard

Converts a byte representing the status of a lock into a readable string. Each byte can represent different statuses, like "OK" or "JAMMED".

Link copied to clipboard

Converts a response code byte into a readable string. Each byte represents a different response, like "BUSY", "ERROR" or "SUCCESS".

Link copied to clipboard
fun parseHexStringToByte(hexString: String): Byte?

Converts a single hex string into a byte. The string must represent a hex number, like "0x01".

Link copied to clipboard

Converts a string of hex values into a byte array. Each part of the string should be a hex number, separated by spaces. For example, "0x01 0x02" becomes 1, 2 as bytes.

Link copied to clipboard

Creates a string from a byte array where each byte is converted to its hexadecimal representation. The bytes are separated by spaces for easy reading.

Link copied to clipboard