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.
| Parameter | Type | Description |
|---|---|---|
buffer | byte[] | The transfer buffer. |
offset | int | The offset into the buffer. |
count | int | The 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.
| Parameter | Type | Description |
|---|---|---|
buffer | byte[] | The transfer buffer. |
Returns int: The number of bytes successfully transferred.