/*********************************************************************************************** * @param driver Handle to the driver class that will do the polling ***********************************************************************************************/ public AsyncPollingHelper(Driver driver) { this.driver = driver; //Default the max buffer size to 10 seconds worth of imu data int maxSize = Math.round(driver.getDatarate().getHz() * 10); fifo = BufferUtils.synchronizedBuffer(new CircularFifoBuffer(maxSize)); }
/************************************************************************************************ * @param size sets the maximum size of the circular fifo buffer ************************************************************************************************/ public void setBufferSize(int size){ fifo = (CircularFifoBuffer) BufferUtils.synchronizedBuffer(new CircularFifoBuffer(size)); }
private NotificationList() { list = BufferUtils.synchronizedBuffer(new CircularFifoBuffer(10)); }
public ChannelBuffer(final String name, final int bufferSize) { this.channelName = name; this.messageBuffer = BufferUtils.synchronizedBuffer(new CircularFifoBuffer(bufferSize)); this.size = bufferSize; }
public void createChannelBuffer() { this.messageBuffer = BufferUtils.synchronizedBuffer(new CircularFifoBuffer(MAX_BUFFER_SIZE)); this.size = MAX_BUFFER_SIZE; }
public void createChannelBuffer(final int bufferSize) { this.messageBuffer = BufferUtils.synchronizedBuffer(new CircularFifoBuffer(bufferSize)); this.size = bufferSize; }