Skip to main content

ObjectClass

Enum ObjectClass 

Source
pub enum ObjectClass {
    Piano,
    Sample,
    Program,
    SetList,
    Live,
    Settings,
    Unknown(u32),
}
Expand description

What kind of object a session is about.

SESSION_OPEN carries one of these, and cmd::STATUS then reports on that class alone. Confirmed on hardware. The class code is the device’s partition index, and the partition table names each one. An unrecognized numeric class is preserved.

The gaps at 0 and 2 are the Piano (Native) and Samp Lib (Native) partitions — a second view of the same objects in storage order rather than by category. Both are readable and neither is modelled here.

Variants§

§

Piano

§

Sample

§

Program

§

SetList

§

Live

The three Live slots. Wire-addressed 0:0..0:2; bodies are ne5p-shaped.

§

Settings

The global settings singleton, wire-addressed 0:0. Reports no body checksum (0xffffffff), like the library classes.

§

Unknown(u32)

Implementations§

Source§

impl ObjectClass

Source

pub const INVENTORY: [ObjectClass; 4]

The classes worth querying for an inventory. Live and Settings also answer, but report zero items — they are singletons, not slot-counted storage.

Source

pub fn from_raw(v: u32) -> Self

Source

pub fn to_raw(self) -> u32

Source

pub fn label(self) -> String

Source

pub fn storage(self) -> Option<Slot>

The storage class nord_format’s acceptance table names this one by — the four libraries and the two singletons, without the wire. None for a code this crate does not name, which no table row can be about.

Source

pub fn is_library(self) -> bool

Whether this class is one of the content libraries, whose objects vary in size and whose Status counters are storage blocks rather than bytes.

Source

pub fn overwrites_in_place(self) -> bool

Whether a write into an occupied slot of this class lands without deleting it first.

Confirmed on hardware.

Live and Settings accept the ordinary BEGIN_WRITEWRITE_DATAEND_TRANSFER sequence at their occupied slots and the body reads back as what was sent, where every other class answers status 0x4 until the slot is empty. Their delete has never been attempted, so composing a write out of delete-then-write there is both unnecessary and untested.

Source

pub fn names_its_slots(self) -> bool

Whether the device stores a name for the objects of this class.

Confirmed on hardware.

Live and Settings hold fixed names (Live 1, Settings) — they answer 0x1c rename with success and change nothing, and they carry BEGIN_WRITE’s name argument and discard it. Partition record word 3, the slot-family name length, is 0 for both.

Trait Implementations§

Source§

impl Clone for ObjectClass

Source§

fn clone(&self) -> ObjectClass

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 ObjectClass

Source§

impl Debug for ObjectClass

Source§

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

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

impl Eq for ObjectClass

Source§

impl From<Library> for ObjectClass

The four library classes are the libraries a decoded body can refer into, and their codes are Library::code’s — one table for a caller holding both.

Source§

fn from(library: Library) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for ObjectClass

Source§

fn eq(&self, other: &ObjectClass) -> 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 ObjectClass

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.