WarpPI/hardware/src/main/java/it/cavallium/warppi/MmapByteBuffer.java

33 lines
618 B
Java
Raw Normal View History

package it.cavallium.warppi;
2017-12-13 22:34:15 +01:00
import java.nio.ByteBuffer;
public class MmapByteBuffer {
2018-05-12 21:18:29 +02:00
private final int fd;
private final int address;
private final int length;
private final ByteBuffer buffer;
2017-12-13 22:34:15 +01:00
2018-09-22 11:17:30 +02:00
public MmapByteBuffer(final int fd, final int address, final int length, final ByteBuffer buffer) {
2017-12-13 22:34:15 +01:00
this.fd = fd;
this.address = address;
this.length = length;
this.buffer = buffer;
}
public int getFd() {
return fd;
}
2018-05-12 21:18:29 +02:00
2017-12-13 22:34:15 +01:00
public int getAddress() {
return address;
}
2018-05-12 21:18:29 +02:00
2017-12-13 22:34:15 +01:00
public int getLength() {
return length;
}
2018-05-12 21:18:29 +02:00
2017-12-13 22:34:15 +01:00
public ByteBuffer getBuffer() {
return buffer;
}
}