Skip to main content

Pipe Class

Package: GHIElectronics.Endpoint.Devices.UsbHost
Namespace: GHIElectronics.Endpoint.Devices.UsbHost

A USB communication pipe.

class Pipe : public IDisposable {};

Properties​

Endpoint​

Endpoint Endpoint() const;

Endpoint associated with this pipe.

Returns Endpoint

TransferTimeout​

int32_t TransferTimeout() const;
void TransferTimeout(int32_t value);

The timeout for transfer operations in milliseconds (0: none). Defaults to 500ms.

Returns int

Methods​

Dispose()​

void Dispose();

Closes the pipe.

Transfer(byte[] buffer, int offset, int count)​

int32_t Transfer(const std::vector<uint8_t>& buffer, int32_t offset, int32_t count);

Transfers data to/from the endpoint: an IN endpoint (address 0x80 and up) fills the buffer, an OUT endpoint sends it.

ParameterTypeDescription
bufferbyte[]The transfer buffer.
offsetintThe offset into the buffer.
countintThe amount to transfer starting at offset from the buffer.

Returns int: The number of bytes successfully transferred.

Transfer(byte[] buffer)​

int32_t Transfer(const std::vector<uint8_t>& buffer);

Transfers data to/from the endpoint.

ParameterTypeDescription
bufferbyte[]The transfer buffer.

Returns int: The number of bytes successfully transferred.