pub struct CableDeliverySystemDescriptor {
pub frequency_bcd: u32,
pub fec_outer: FecOuter,
pub modulation: Modulation,
pub symbol_rate_bcd: u32,
pub fec_inner: FecInner,
}Expand description
Cable Delivery System Descriptor.
Fields§
§frequency_bcd: u3232-bit BCD frequency in 100 kHz (e.g. 0x03460000 = 346.0000 MHz).
fec_outer: FecOuterFEC outer coding scheme.
modulation: ModulationModulation scheme.
symbol_rate_bcd: u3228-bit BCD symbol rate in Msym/s (value stored in low 28 bits of u32).
fec_inner: FecInnerFEC inner code rate.
Implementations§
Source§impl CableDeliverySystemDescriptor
impl CableDeliverySystemDescriptor
Sourcepub fn frequency_hz(&self) -> Option<u64>
pub fn frequency_hz(&self) -> Option<u64>
Decode the 32-bit BCD frequency to Hz (100 Hz field resolution).
None if the BCD nibbles are out of range.
e.g. 0x0346_0000 → 346_000_000 Hz (346.0000 MHz).
Sourcepub fn set_frequency_hz(&mut self, hz: u64) -> Result<()>
pub fn set_frequency_hz(&mut self, hz: u64) -> Result<()>
Set frequency from Hz, encoding to the 8-digit BCD field at the field’s
100 Hz resolution (finer precision is truncated).
§Errors
ValueOutOfRange on overflow of
the 8-digit BCD field.
Sourcepub fn symbol_rate_sps(&self) -> Option<u64>
pub fn symbol_rate_sps(&self) -> Option<u64>
Decode the 28-bit BCD symbol_rate to symbols/second (100 sym/s
resolution). None if the BCD nibbles are out of range.
Sourcepub fn set_symbol_rate_sps(&mut self, sps: u64) -> Result<()>
pub fn set_symbol_rate_sps(&mut self, sps: u64) -> Result<()>
Set symbol_rate from symbols/second (100 sym/s field resolution).
§Errors
ValueOutOfRange on overflow of
the 7-digit BCD field.
Trait Implementations§
Source§impl Clone for CableDeliverySystemDescriptor
impl Clone for CableDeliverySystemDescriptor
Source§fn clone(&self) -> CableDeliverySystemDescriptor
fn clone(&self) -> CableDeliverySystemDescriptor
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 CableDeliverySystemDescriptor
Source§impl DescriptorDef<'_> for CableDeliverySystemDescriptor
impl DescriptorDef<'_> for CableDeliverySystemDescriptor
impl Eq for CableDeliverySystemDescriptor
Source§impl<'a> From<CableDeliverySystemDescriptor> for AnyDescriptor<'a>
impl<'a> From<CableDeliverySystemDescriptor> for AnyDescriptor<'a>
Source§fn from(d: CableDeliverySystemDescriptor) -> Self
fn from(d: CableDeliverySystemDescriptor) -> Self
Source§impl<'a> Parse<'a> for CableDeliverySystemDescriptor
impl<'a> Parse<'a> for CableDeliverySystemDescriptor
Source§impl PartialEq for CableDeliverySystemDescriptor
impl PartialEq for CableDeliverySystemDescriptor
Source§fn eq(&self, other: &CableDeliverySystemDescriptor) -> bool
fn eq(&self, other: &CableDeliverySystemDescriptor) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for CableDeliverySystemDescriptor
impl Serialize for CableDeliverySystemDescriptor
Source§type Error = Error
type Error = Error
Parse impl, but need not be).Source§fn serialized_len(&self) -> usize
fn serialized_len(&self) -> usize
serialize_into will write.