RingBuffer operations on a Device.
More...
Inherits DeviceInterfaceBase, and IRingBuffer.
|
virtual void | Dispose (bool disposing) |
| Dispose implementation with disposing flag. More...
|
|
|
void | ResetBufferImageCache (WeakReference[] bufferImages) |
| Resets the .Net cached images of this ring buffer and with that updates the memory pressure. More...
|
|
RingBuffer operations on a Device.
◆ RingBuffer()
Creates a RingBuffer
object from the given device .
- Parameters
-
◆ ChangeCount()
Changes the number of buffers in this ring buffer.
If you are unsure about the mode , simply use DeviceUpdateMode.UpdateDeviceImage. If you use this, all RingBufferImages are disposed/unlocked.
- Parameters
-
numBuffers | New number of buffers in the ring buffer. |
mode | Defines how to handle device images. |
Implements IRingBuffer.
◆ Dispose()
virtual void Dispose |
( |
bool |
disposing | ) |
|
|
protectedvirtual |
Dispose implementation with disposing flag.
- Parameters
-
disposing | true if called from IDisposable interface; false if called from finalizer. |
◆ GetAcquisitionSequence()
int[] GetAcquisitionSequence |
( |
| ) |
|
Creates the acquisition sequence in acquisition order.
- Returns
- First entry is the oldest.
Implements IRingBuffer.
◆ GetEnumerator()
Gets the typed enumerator iterating all available images.
- Returns
- Typed iterator.
◆ LockModeFromHandle()
Gets the lock moder for the given native handle .
- Parameters
-
handle | Native device (image) handle to query. |
- Returns
- The lock mode.
◆ ResetBufferImageCache()
void ResetBufferImageCache |
( |
WeakReference[] |
bufferImages | ) |
|
|
package |
Resets the .Net cached images of this ring buffer and with that updates the memory pressure.
- Parameters
-
bufferImages | The new (empty array) of weak references to ring buffer images. |
◆ this[int bufferIndex]
Access to a single ring buffer image specified by its bufferIndex .
The ring buffer images are stored as weak references and are recreated if finalized or disposed. But this also means there is at most one ring buffer image available for one buffer index.
- Parameters
-
bufferIndex | Image index of the ring buffer image to access. |
- Returns
- The image at bufferIndex .
Implements IRingBuffer.