pub struct MtcFullFrame;Expand description
MTC Full Frame message encoder/decoder.
Full Frame SysEx format: [0xF0, 0x7F, 0x7F, 0x01, 0x01, hh, mm, ss, ff, 0xF7]
where hh encodes both the hours (5 bits) and rate code (2 bits).
Implementations§
Source§impl MtcFullFrame
impl MtcFullFrame
Sourcepub fn encode(tc: &MtcTimecode) -> Vec<u8> ⓘ
pub fn encode(tc: &MtcTimecode) -> Vec<u8> ⓘ
Encode an MTC timecode as a Full Frame SysEx message.
The hh byte encodes: 0rrhhhhh where rr is the rate code and
hhhhh is the hours value.
Sourcepub fn decode(data: &[u8]) -> Option<MtcTimecode>
pub fn decode(data: &[u8]) -> Option<MtcTimecode>
Decode a Full Frame SysEx message into an MTC timecode.
Returns None if the data is not a valid MTC Full Frame message.
Auto Trait Implementations§
impl Freeze for MtcFullFrame
impl RefUnwindSafe for MtcFullFrame
impl Send for MtcFullFrame
impl Sync for MtcFullFrame
impl Unpin for MtcFullFrame
impl UnsafeUnpin for MtcFullFrame
impl UnwindSafe for MtcFullFrame
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
Mutably borrows from an owned value. Read more