Expand description
USB3 Vision transport layer.
Provides device discovery, GenCP-over-USB control, bootstrap register parsing, and bulk-endpoint streaming for USB3 Vision cameras.
The usb feature flag enables actual USB hardware access via nusb, a
pure-Rust USB library (ADR-0032). Without it, only protocol types,
encoding, and mock-based testing compile.
The modules are private; what is public is re-exported here (ADR-0030).
registers is the one public namespace: the bootstrap register maps,
the vocabulary the fake camera shares.
Modules§
- registers
- The bootstrap register maps, by offset: the ABRM, the SBRM and the SIRM, with their capability bits (USB3 Vision 1.0; GenCP 1.2 for the ABRM).
Structs§
- Abrm
- Technology Agnostic Bootstrap Register Map — GenCP’s registers at address 0.
- Completion
- A transfer
BulkIn::wait_nexthands back. - Control
Channel - GenCP control channel over a USB3 Vision bulk endpoint pair.
- Eirm
- What the device says about its event interface.
- Leader
- Parsed U3V stream leader.
- Manifest
Entry - One entry of the device’s Manifest Table: a GenICam file in its memory.
- Mock
UsbTransfer - In-memory mock of
UsbTransferfor unit tests. - Nusb
Transfer UsbTransferover a USB3 Vision device opened withnusb: its control interface claimed, and its streaming and event interfaces when it has them.- RawFrame
- A block as received from the U3V stream, before conversion to the
transport-agnostic
Frametype. - Sbrm
- USB3 Vision’s technology-specific Bootstrap Register Map.
- Sirm
- What the device says about one stream channel.
- Stream
Layout - How the host reads one block: the sizes it writes to the SIRM, and reads with.
- Trailer
- Parsed U3V stream trailer.
- U3vDevice
- High-level handle for a USB3 Vision device.
- U3vDevice
Info - Information about a discovered USB3 Vision device.
- U3vEvent
- One event a USB3 Vision device sent.
- U3vEvent
Stream - The events a device sends, read from its event endpoint with a few event commands’ transfers queued.
- U3vInterface
Info - Information about a USB3 Vision device’s interfaces and endpoints, extracted from USB descriptors.
- U3vStream
- U3V stream receiver: reads blocks from a USB bulk endpoint, with several transfers queued on it.
- U3vStream
Counters - What a stream has counted since it was opened.
- U3vStream
Options - How a stream reads: the payload size to use when the device does not say, and the transfers it keeps queued.
Enums§
- File
Format - How a manifest file is stored (Schema / Filetype / Fileformat bits 10-15).
- U3vError
- Errors produced by the USB3 Vision transport layer.
- U3vStatus
- A USB3 Vision acknowledgement’s status.
- UsbSpeed
- The bus speed a device runs at: the SBRM’s current speed register, as the Grasshopper3’s XML decodes it, or the speed the host reports.
Constants§
- DEFAULT_
MAX_ TRANSFER_ SIZE - Largest single payload transfer the host asks for: aravis’s default
(
ARV_UV_STREAM_MAXIMUM_TRANSFER_SIZE_DEFAULT, 1 MiB). - DEFAULT_
TRANSFERS_ IN_ FLIGHT - Transfers a stream keeps queued: aravis’s eight
(
ARV_UV_STREAM_N_MAXIMUM_SUBMITS). - PAYLOAD_
TYPE_ CHUNK - Payload type of chunk data alone.
- PAYLOAD_
TYPE_ IMAGE - Payload type of an image (
ARV_UVSP_PAYLOAD_TYPE_IMAGE). - PAYLOAD_
TYPE_ IMAGE_ EXTENDED_ CHUNK - Payload type of an image followed by chunk data.
Traits§
- BulkIn
- A bulk IN endpoint’s queue of transfers: submitted in order, completed in order (USB bulk transfers on one endpoint complete in the order they were queued).
- UsbTransfer
- Abstraction over a claimed USB device for bulk endpoint I/O.
Functions§
- discover
- Enumerate all USB3 Vision devices currently connected to the system.
- parse_
chunks - The chunks of a USB3 Vision chunk payload, as
(chunk ID, offset, length)in payload order. - parse_
event_ command - The events in one event command.
- parse_
leader - Parse a U3V stream leader from raw bytes.
- parse_
trailer - Parse a U3V stream trailer from raw bytes.