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
impl ObjectClass
Sourcepub const INVENTORY: [ObjectClass; 4]
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.
pub fn from_raw(v: u32) -> Self
pub fn to_raw(self) -> u32
pub fn label(self) -> String
Sourcepub fn storage(self) -> Option<Slot>
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.
Sourcepub fn is_library(self) -> bool
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.
Sourcepub fn overwrites_in_place(self) -> bool
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_WRITE → WRITE_DATA →
END_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.
Sourcepub fn names_its_slots(self) -> bool
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
impl Clone for ObjectClass
Source§fn clone(&self) -> ObjectClass
fn clone(&self) -> ObjectClass
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ObjectClass
Source§impl Debug for ObjectClass
impl Debug for ObjectClass
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.
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.