Skip to main content

MidiCiDiscovery

Struct MidiCiDiscovery 

Source
pub struct MidiCiDiscovery {
    pub device_id: u8,
    pub ci_version: u8,
    pub source_muid: u32,
    pub destination_muid: u32,
    pub manufacturer: [u8; 3],
    pub family: u16,
    pub model: u16,
    pub software_revision: [u8; 4],
    pub category_supported: u8,
    pub max_sysex_size: u32,
    pub output_path_id: u8,
}
Expand description

A MIDI-CI Discovery message (initiator → responder).

Fields§

§device_id: u8

Source device id (0x7F = whole MIDI port).

§ci_version: u8

MIDI-CI version/format (e.g. 0x02 for MIDI-CI 1.2).

§source_muid: u32

Source MUID, 28-bit.

§destination_muid: u32

Destination MUID, 28-bit (use BROADCAST_MUID for discovery).

§manufacturer: [u8; 3]

Device manufacturer SysEx ID (3 bytes).

§family: u16

Device family, 14-bit.

§model: u16

Device family model number, 14-bit.

§software_revision: [u8; 4]

Software revision level (4 bytes).

§category_supported: u8

Capability Inquiry category-supported bitmap.

§max_sysex_size: u32

Receivable maximum SysEx message size, 28-bit.

§output_path_id: u8

Initiator’s output path id (MIDI-CI 1.2).

Implementations§

Source§

impl MidiCiDiscovery

Source

pub fn encode(self, out: &mut [u8]) -> Result<usize, AudioError>

Serialize the Discovery message into out, returning bytes written (DISCOVERY_LEN). Errors AudioError::OutputBufferTooSmall if out is too short, or AudioError::InvalidParameter on out-of-range fields.

Source

pub fn parse(frame: &[u8]) -> Result<Self, AudioError>

Parse a Discovery message from a complete SysEx frame. Errors AudioError::MalformedAudio if the framing / header bytes do not identify a MIDI-CI Discovery message of the expected length.

Trait Implementations§

Source§

impl Clone for MidiCiDiscovery

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for MidiCiDiscovery

Source§

impl Debug for MidiCiDiscovery

Source§

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

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

impl Eq for MidiCiDiscovery

Source§

impl PartialEq for MidiCiDiscovery

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for MidiCiDiscovery

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.