@Test @DisplayName("The physical address can be written") void setPhysicalAddress() { assume(); val offset = PacketBufferWrapperConstants.HEADER_OFFSET + PacketBufferWrapperConstants.PAP_OFFSET; for (val virtual : virtuals) { assertThat(virtual).isNotZero(); val packet = new PacketBufferWrapper(virtual); val physicalAddress = random.nextLong(); packet.setPhysicalAddress(physicalAddress); assertThat(mmanager.getLongVolatile(virtual + offset)).as("Physical address").isEqualTo(physicalAddress); } }
void setPhysicalAddress(final long physicalAddress) { if (DEBUG >= LOG_TRACE) { log.trace("Writing physical address pointer field @ 0x{} + {}.", leftPad(virtualAddress), PAP_OFFSET); } mmanager.putLongVolatile(virtualAddress + PAP_OFFSET, physicalAddress); }
PacketBufferWrapper implements Comparable<PacketBufferWrapper> { void setPhysicalAddress(final long physicalAddress) { if (DEBUG >= LOG_TRACE) { log.trace("Writing physical address pointer field @ 0x{} + {}.", leftPad(virtualAddress), PAP_OFFSET); } mmanager.putLongVolatile(virtualAddress + PAP_OFFSET, physicalAddress); } }
PacketBufferWrapper implements Comparable<PacketBufferWrapper> { void setPhysicalAddress(final long physicalAddress) { if (DEBUG >= LOG_TRACE) { log.trace("Writing physical address pointer field @ 0x{} + {}.", leftPad(virtualAddress), PAP_OFFSET); } mmanager.putLongVolatile(virtualAddress + PAP_OFFSET, physicalAddress); }  }
PacketBufferWrapper implements Comparable<PacketBufferWrapper> { void setPhysicalAddress(final long physicalAddress) { if (DEBUG >= LOG_TRACE) { log.trace("Writing physical address pointer field @ 0x{} + {}.", leftPad(virtualAddress), PAP_OFFSET); } mmanager.putLongVolatile(virtualAddress + PAP_OFFSET, physicalAddress); }  @Contract(pure = true) long getPhysicalAddress(); @Contract(pure = true) int getSize(); void setSize(final int size); byte getByte(final int offset); void putByte(final int offset, final byte value); short getShort(final int offset); void putShort(final int offset, final short value); int getInt(final int offset); void putInt(final int offset, final int value); long getLong(final int offset); void putLong(final int offset, final long value); void get(final int offset, int bytes, final @NotNull byte[] buffer); void put(final int offset, int bytes, final @NotNull byte[] buffer); @Override @Contract(pure = true) int compareTo(final @NotNull PacketBufferWrapper o); @Override @Contract(pure = true) @NotNull String toString(); }
PacketBufferWrapper implements Comparable<PacketBufferWrapper> { void setPhysicalAddress(final long physicalAddress) { if (DEBUG >= LOG_TRACE) { log.trace("Writing physical address pointer field @ 0x{} + {}.", leftPad(virtualAddress), PAP_OFFSET); } mmanager.putLongVolatile(virtualAddress + PAP_OFFSET, physicalAddress); }  @Contract(pure = true) long getPhysicalAddress(); @Contract(pure = true) int getSize(); void setSize(final int size); byte getByte(final int offset); void putByte(final int offset, final byte value); short getShort(final int offset); void putShort(final int offset, final short value); int getInt(final int offset); void putInt(final int offset, final int value); long getLong(final int offset); void putLong(final int offset, final long value); void get(final int offset, int bytes, final @NotNull byte[] buffer); void put(final int offset, int bytes, final @NotNull byte[] buffer); @Override @Contract(pure = true) int compareTo(final @NotNull PacketBufferWrapper o); @Override @Contract(pure = true) @NotNull String toString();  }