Struct BebobAvc

Source
pub struct BebobAvc(/* private fields */);
Expand description

The implementation of AV/C transaction with quirks specific to BeBoB solution.

It seems a unique quirk that the status code in response frame for some AV/C commands is against AV/C general specification in control operation.

Implementations§

Source§

impl BebobAvc

Source

pub fn bind(&self, node: &impl IsA<FwNode>) -> Result<(), Error>

Source

pub fn control<O: AvcOp + AvcControl>( &self, addr: &AvcAddr, op: &mut O, timeout_ms: u32, ) -> Result<(), Error>

Source

pub fn status<O: AvcOp + AvcStatus>( &self, addr: &AvcAddr, op: &mut O, timeout_ms: u32, ) -> Result<(), Error>

Trait Implementations§

Source§

impl Debug for BebobAvc

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for BebobAvc

Source§

fn default() -> BebobAvc

Returns the “default value” for a type. Read more
Source§

impl Ta1394Avc<Error> for BebobAvc

Source§

fn transaction( &self, command_frame: &[u8], timeout_ms: u32, ) -> Result<Vec<u8>, Error>

Transmit given command frame and return received response frame. Read more
Source§

fn control<O: AvcOp + AvcControl>( &self, addr: &AvcAddr, op: &mut O, timeout_ms: u32, ) -> Result<(), Ta1394AvcError<Error>>

Source§

const FRAME_SIZE: usize = 512usize

The maximum size of frame in both command and response.
Source§

const RESP_CODE_MASK: u8 = 15u8

The mask for first byte of response frame to detect status code. The rest bits express Command/transaction set (CTS) but appears not to be used actually.
Source§

fn compose_command_frame( ctype: AvcCmdType, addr: &AvcAddr, opcode: u8, operands: &[u8], ) -> Result<Vec<u8>, Ta1394AvcError<T>>

Source§

fn detect_response_operands<'a>( frame: &'a [u8], addr: &AvcAddr, opcode: u8, ) -> Result<(AvcRespCode, &'a [u8]), AvcRespParseError>

Source§

fn status<O>( &self, addr: &AvcAddr, op: &mut O, timeout_ms: u32, ) -> Result<(), Ta1394AvcError<T>>
where O: AvcOp + AvcStatus,

Source§

fn specific_inquiry<O>( &self, addr: &AvcAddr, op: &mut O, timeout_ms: u32, ) -> Result<(), Ta1394AvcError<T>>
where O: AvcOp + AvcControl,

Source§

fn notify<O>( &self, addr: &AvcAddr, op: &mut O, timeout_ms: u32, ) -> Result<(), Ta1394AvcError<T>>
where O: AvcOp + AvcNotify,

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V