aboutsummaryrefslogtreecommitdiffstats
path: root/hv-collector-test-utils/src/main
diff options
context:
space:
mode:
authorPiotr Jaszczyk <piotr.jaszczyk@nokia.com>2018-08-21 14:46:40 +0200
committerPiotr Jaszczyk <piotr.jaszczyk@nokia.com>2018-08-22 09:40:50 +0200
commit56c5808a172a1ec8d8f82aafbed67fc020df9fac (patch)
tree186c41357dd0adcb25b427fd169c94876970227d /hv-collector-test-utils/src/main
parent2d8719cc8e475d213243f41dedd3b875fadb37f0 (diff)
Align with latest proposal of wire proto frame
Change-Id: I8f989a3913f1592b4d740a80ed30b01bc3aceff2 Issue-ID: DCAEGEN2-722 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
Diffstat (limited to 'hv-collector-test-utils/src/main')
-rw-r--r--hv-collector-test-utils/src/main/kotlin/messages.kt9
1 files changed, 6 insertions, 3 deletions
diff --git a/hv-collector-test-utils/src/main/kotlin/messages.kt b/hv-collector-test-utils/src/main/kotlin/messages.kt
index f8453c64..c6aa89b2 100644
--- a/hv-collector-test-utils/src/main/kotlin/messages.kt
+++ b/hv-collector-test-utils/src/main/kotlin/messages.kt
@@ -24,6 +24,7 @@ import io.netty.buffer.ByteBuf
import io.netty.buffer.ByteBufAllocator
import io.netty.buffer.PooledByteBufAllocator
import org.onap.dcae.collectors.veshv.domain.PayloadWireFrameMessage.Companion.MAX_PAYLOAD_SIZE
+import org.onap.dcae.collectors.veshv.domain.PayloadWireFrameMessage.Companion.RESERVED_BYTE_COUNT
import org.onap.ves.VesEventV5.VesEvent.CommonEventHeader.Domain
import java.util.UUID.randomUUID
@@ -31,9 +32,11 @@ import java.util.UUID.randomUUID
val allocator: ByteBufAllocator = PooledByteBufAllocator.DEFAULT
private fun ByteBuf.writeValidWireFrameHeaders() {
- writeByte(0xFF) // always 0xFF
- writeByte(0x01) // version
- writeByte(0x01) // content type = GPB
+ writeByte(0xFF) // always 0xFF
+ writeByte(0x01) // major version
+ writeByte(0x00) // minor version
+ writeZero(RESERVED_BYTE_COUNT) // reserved
+ writeByte(0x01) // content type = GPB
}
fun vesWireFrameMessage(domain: Domain = Domain.OTHER,