pub struct LcBarRequest {
pub bar: LcBar,
pub tag: u8,
pub be_first: u8,
pub be_last: u8,
pub is_64bit: bool,
pub is_read: bool,
pub is_write: bool,
pub data_size: u32,
pub data_offset: u64,
pub data_write: Option<Vec<u8>>,
/* private fields */
}
Expand description
Fields§
§bar: LcBar
The PCIe BAR which this request is for.
tag: u8
PCIe TLP packet tag.
be_first: u8
first byte-enable.
be_last: u8
last byte-enable.
is_64bit: bool
is a 64-bit request.
is_read: bool
is a read request.
is_write: bool
is a write request.
data_size: u32
data size in bytes.
data_offset: u64
data byte offset within the BAR.
data_write: Option<Vec<u8>>
data to write (if a write request).
Implementations§
Source§impl LcBarRequest
impl LcBarRequest
Sourcepub fn read_reply(&self, data_reply: &[u8]) -> ResultEx<()>
pub fn read_reply(&self, data_reply: &[u8]) -> ResultEx<()>
Send a valid read reply to the BAR request.
The read reply must be of the exact length of the BAR read request.
§Arguments
data_reply
- The data to send as a reply.
Sourcepub fn read_reply_fail(&self) -> ResultEx<()>
pub fn read_reply_fail(&self) -> ResultEx<()>
Send an invalid read reply to the BAR request indicating that the read failed. An Unsupported Request TLP will be sent to the host system in reponse to the failed read.
This function should normally not be called.
Trait Implementations§
Source§impl Debug for LcBarRequest
impl Debug for LcBarRequest
Auto Trait Implementations§
impl Freeze for LcBarRequest
impl RefUnwindSafe for LcBarRequest
impl !Send for LcBarRequest
impl !Sync for LcBarRequest
impl Unpin for LcBarRequest
impl UnwindSafe for LcBarRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more