diff options
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/QID.kt | 10 |
1 files changed, 10 insertions, 0 deletions
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<UByte> { + var bytes: List<UByte> = 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 |