From e959e5c358964bce8225d62c21c2c31be0b74366 Mon Sep 17 00:00:00 2001 From: Edoardo La Greca Date: Mon, 11 Aug 2025 19:35:29 +0200 Subject: add toRaw to QID --- src/main/kotlin/QID.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/kotlin/QID.kt b/src/main/kotlin/QID.kt index 3e32523..1e03fe8 100644 --- a/src/main/kotlin/QID.kt +++ b/src/main/kotlin/QID.kt @@ -1,3 +1,5 @@ +import java.math.BigInteger + /** * This class holds information about a single QID. */ @@ -90,4 +92,12 @@ class QID { private fun getIsTemporary(): Boolean { return checkTypeBits(0x04u) } + + fun toRaw(): List { + var bytes: List = emptyList() + bytes += this.type + bytes += OutMessage.convIntegerToBytes(BigInteger(this.version.toString()), 4u) + bytes += OutMessage.convIntegerToBytes(BigInteger(this.path.toString()), 8u) + return bytes + } } \ No newline at end of file -- cgit v1.2.3