GetIsoPacketBufferSimple Method (packet)

LibUsbDotNet

LibUsbDotNet 2.2.8 GetIsoPacketBufferSimple Method (packet)
Library ReferenceMonoLibUsb.TransferMonoUsbTransferGetIsoPacketBufferSimple(Int32)
LibUsbDotNet on SourceForge
Convenience function to locate the position of an isochronous packet within the buffer of an isochronous transfer, for transfers where each packet is of identical size.
Declaration Syntax
C# Visual Basic Visual C++
public IntPtr GetIsoPacketBufferSimple(
	int packet
)
Public Function GetIsoPacketBufferSimple ( _
	packet As Integer _
) As IntPtr
public:
IntPtr GetIsoPacketBufferSimple(
	int packet
)
Parameters
packet (Int32)
The packet to return the address of.
Return Value
the base address of the packet buffer inside the transfer buffer.
Remarks

This function relies on the assumption that every packet within the transfer is of identical size to the first packet. Calculating the location of the packet buffer is then just a simple calculation: buffer + (packet_size * packet)

Do not use this function on transfers other than those that have identical packet lengths for each packet.

Note:GetIsoPacketBufferSimple(Int32) is roughly equivalent to libusb_get_iso_packet_buffer_simple().
Exceptions
Exception Condition
ArgumentOutOfRangeException This exception is thrown if the packet requested is >= NumIsoPackets.

Assembly: LibUsbDotNet (Module: LibUsbDotNet) Version: 2.2.8.104 (2.2.8.104)