From 56c5808a172a1ec8d8f82aafbed67fc020df9fac Mon Sep 17 00:00:00 2001 From: Piotr Jaszczyk Date: Tue, 21 Aug 2018 14:46:40 +0200 Subject: Align with latest proposal of wire proto frame Change-Id: I8f989a3913f1592b4d740a80ed30b01bc3aceff2 Issue-ID: DCAEGEN2-722 Signed-off-by: Piotr Jaszczyk --- hv-collector-test-utils/src/main/kotlin/messages.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'hv-collector-test-utils/src/main') 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, -- cgit 1.2.3-korg