pub struct FeDevice { /* private fields */ }Expand description
A reference to the frontend device and device information
Implementations
sourceimpl FeDevice
impl FeDevice
sourcepub fn open_ro(adapter: u32, device: u32) -> Result<FeDevice>
pub fn open_ro(adapter: u32, device: u32) -> Result<FeDevice>
Attempts to open frontend device in read-only mode
sourcepub fn open_rw(adapter: u32, device: u32) -> Result<FeDevice>
pub fn open_rw(adapter: u32, device: u32) -> Result<FeDevice>
Attempts to open frontend device in read-write mode
sourcepub fn set_properties(&self, cmdseq: &[DtvProperty]) -> Result<()>
pub fn set_properties(&self, cmdseq: &[DtvProperty]) -> Result<()>
Sets properties on frontend device
sourcepub fn get_properties(&self, cmdseq: &mut [DtvProperty]) -> Result<()>
pub fn get_properties(&self, cmdseq: &mut [DtvProperty]) -> Result<()>
Gets properties from frontend device
sourcepub fn get_event(&self, event: &mut FeEvent) -> Result<()>
pub fn get_event(&self, event: &mut FeEvent) -> Result<()>
Returns a frontend events if available
sourcepub fn read_status(&self) -> Result<fe_status>
pub fn read_status(&self) -> Result<fe_status>
Returns frontend status
- [
FE_NONE] - [
FE_HAS_SIGNAL] - [
FE_HAS_CARRIER] - [
FE_HAS_VITERBI] - [
FE_HAS_SYNC] - [
FE_HAS_LOCK] - [
FE_TIMEDOUT] - [
FE_REINIT]
sourcepub fn read_signal_strength(&self) -> Result<u16>
pub fn read_signal_strength(&self) -> Result<u16>
Reads and returns a signal strength relative value (DVBv3 API)
sourcepub fn read_snr(&self) -> Result<u16>
pub fn read_snr(&self) -> Result<u16>
Reads and returns a signal-to-noise ratio, relative value (DVBv3 API)
sourcepub fn read_unc(&self) -> Result<u64>
pub fn read_unc(&self) -> Result<u64>
Reads and returns an uncorrected blocks counter (DVBv3 API)
sourcepub fn set_tone(&self, value: u32) -> Result<()>
pub fn set_tone(&self, value: u32) -> Result<()>
Turns on/off generation of the continuous 22kHz tone
allowed value’s:
- SEC_TONE_ON - turn 22kHz on
- SEC_TONE_OFF - turn 22kHz off
sourcepub fn set_voltage(&self, value: u32) -> Result<()>
pub fn set_voltage(&self, value: u32) -> Result<()>
Sets the DC voltage level for LNB
allowed value’s:
- SEC_VOLTAGE_13 for 13V
- SEC_VOLTAGE_18 for 18V
- SEC_VOLTAGE_OFF turns LNB power supply off
Different power levels used to select internal antennas for different polarizations:
- 13V:
- Vertical in linear LNB
- Right in circular LNB
- 18V:
- Horizontal in linear LNB
- Left in circular LNB
- OFF is needed with external power supply, for example to use same LNB with several receivers.
sourcepub fn diseqc_master_cmd(&self, msg: &[u8]) -> Result<()>
pub fn diseqc_master_cmd(&self, msg: &[u8]) -> Result<()>
Sets DiSEqC master command
msg is a message no more 6 bytes length
Example DiSEqC commited command:
[0xE0, 0x10, 0x38, 0xF0 | value]- byte 1 is a framing (master command without response)
- byte 2 is an address (any LNB)
- byte 3 is a command (commited)
- last 4 bits of byte 4 is:
- xx00 - switch input
- 00x0 - bit is set on SEC_VOLTAGE_18
- 000x - bit is set on SEC_TONE_ON
sourcepub fn get_api_version(&self) -> u16
pub fn get_api_version(&self) -> u16
Returns the current API version major - first byte minor - second byte
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FeDevice
impl Send for FeDevice
impl Sync for FeDevice
impl Unpin for FeDevice
impl UnwindSafe for FeDevice
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more