#[non_exhaustive]#[repr(u8)]pub enum CommandIds {
Show 16 variants
Ack = 36,
Error = 69,
SecondarySerial = 38,
FirmwareVersion = 42,
TimeStat = 90,
SetFan = 70,
SetBrightness = 73,
SetLed = 76,
SetMode = 100,
Log = 59,
DeviceStat = 35,
ReadMemory = 85,
WriteMemory = 87,
CommitMemory = 86,
FirmwareFlash = 66,
BigeyeCommand = 101,
}Expand description
A list of all commands that can be sent or received from the mainboard.
These commands are only for the regular mode of the mainboard.
§Implementation
The data sent to, or received by the HMD must always be HID_REPORT_SIZE
bytes large, with the first byte representing the command ID.
The subsequent [HID_REPORT_SIZE - 1] bytes can be used for any extra data
required for this command.
If a sent command does not need to return anything, Self::Ack will be
returned by default.
If a command fails, Self::Error will be returned to indicate something
going wrong.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Ack = 36
Returned when a command is sent that doesn’t need a response.
Some examples of when it’ll return are:
- Setting the fan speed.
- Setting the brightness.
- Writing memory.
Error = 69
Returned when a command fails for whatever reason.
SecondarySerial = 38
When sent, headset will respond with a null-terminated string of the secondary serial number.
FirmwareVersion = 42
When sent, headset will respond with a null-terminated string of the firmware version.
TimeStat = 90
Send, in addition to a second byte representing which time statistic you want to obtain from the headset.
The available statistics are:
- 0: Idle time
- 1: Usage time
- 2: Longest session
The returned value is a little-endian u32 in deca-minutes (10 minutes),
meaning you will need to multiply by TIMESTAT_STEP to get the value
in minutes.
§Data representation
The returned value is alright to store in a u32 due to the maximum value
(u32::MAX) taking approx 82,000 years to overflow.
SetFan = 70
Send, in addition to a byte representing the fan speed from 0 to 100, to temporarily set the fan speed.
SetBrightness = 73
Send, in addition to a big-endian u16 representing the brightness, to temporarily set the current brightness.
Also see: crate::helpers::Brightness.
SetLed = 76
Send, in addition to 3 bytes representing red, green, and blue (in this order) to set the LED color.
Also see: crate::helpers::RgbColor.
SetMode = 100
Send, in addition to a byte representing which display mode (refresh rate & resolution) to use.
Values for this extra byte can be:
- 0: 2560x2560 @ 75 Hz
- 1: 1920x1920 @ 90 Hz
Also see: crate::helpers::DisplayMode.
Log = 59
DeviceStat = 35
ReadMemory = 85
Send, in addition to a byte representing the bank
(zero indexed, crate::protocol::memory::BANK_COUNT banks total),
to get a byte of size
(always crate::protocol::memory::BANK_CAPACITY),
followed by size bytes of data.
To get the full memory
(crate::protocol::memory::MEMORY_SIZE bytes large),
concat all the banks.
§Decoding
To decode the banks, see
crate::protocol::memory::ConfigurationMemory for details on how to
do this.
Also see: crate::protocol::memory.
WriteMemory = 87
Send, in addition to a byte representing the bank
(zero indexed, crate::protocol::memory::BANK_COUNT banks total),
and crate::protocol::memory::BANK_CAPACITY bytes of data
(for crate::protocol::memory::MEMORY_SIZE bytes of total data).
Once complete, Self::CommitMemory must be sent.
Also see: crate::protocol::memory.
CommitMemory = 86
Send to commit memory written by Self::WriteMemory.
If the display mode in the memory has been changed
(see crate::protocol::memory::MemoryItem::DisplayMode), an extra ack
(Self::Ack) will be returned.
FirmwareFlash = 66
BigeyeCommand = 101
Implementations§
Source§impl CommandIds
impl CommandIds
Trait Implementations§
Source§impl Debug for CommandIds
impl Debug for CommandIds
Source§impl PartialEq for CommandIds
impl PartialEq for CommandIds
Source§fn eq(&self, other: &CommandIds) -> bool
fn eq(&self, other: &CommandIds) -> bool
self and other values to be equal, and is used by ==.impl Eq for CommandIds
impl StructuralPartialEq for CommandIds
Auto Trait Implementations§
impl Freeze for CommandIds
impl RefUnwindSafe for CommandIds
impl Send for CommandIds
impl Sync for CommandIds
impl Unpin for CommandIds
impl UnsafeUnpin for CommandIds
impl UnwindSafe for CommandIds
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
§impl<T> Conv for T
impl<T> Conv for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.