vrtd::Bar
-
class Bar
Value-type metadata handle for a device BAR (Base Address Register).
Provides discovery information and a convenience method to open/map the BAR.
- Semantics
isUsable(): this BAR is currently accessible/mappable to the caller.isInUse(): this BAR is leased by another tenant (currently always false).getStartAddress(),getLength(): physical address and size in bytes.
- Lifetime
A
Barbecomes invalid if its originatingSessionis closed or moved. Any subsequent member call will throw.- Thread safety
Methods are thread-safe and may be called concurrently; they synchronize on the originating
Session.
Public Functions
-
uint32_t getDeviceNum() const noexcept
Zero-based device index that owns this BAR.
-
uint8_t getNum() const noexcept
Zero-based BAR index on the device.
-
bool isUsable() const noexcept
Whether this BAR is currently usable (mappable) by the caller.
-
bool isInUse() const noexcept
Whether this BAR is currently in use by another tenant.
Note
In the current implementation this always returns false.
-
uint64_t getStartAddress() const noexcept
Physical start address of the BAR.
-
uint64_t getLength() const noexcept
Length/size of the BAR (bytes).