mirror of
https://github.com/danog/libdvb.git
synced 2024-11-26 20:04:39 +01:00
more docs
This commit is contained in:
parent
07e04d9782
commit
3037f42446
19
README.md
19
README.md
@ -21,7 +21,7 @@ TODO:
|
||||
|
||||
Example DVB-S2 tune:
|
||||
|
||||
```
|
||||
```rust
|
||||
let cmdseq = vec![
|
||||
DtvProperty::new(DTV_DELIVERY_SYSTEM, SYS_DVBS2),
|
||||
DtvProperty::new(DTV_FREQUENCY, (11044 - 9750) * 1000),
|
||||
@ -39,3 +39,20 @@ let cmdseq = vec![
|
||||
let fe = FeDevice::open("/dev/dvb/adapter0/frontend0", true)?;
|
||||
fe.ioctl_set_property(&mut cmdseq)?;
|
||||
```
|
||||
|
||||
Frontend information:
|
||||
|
||||
```rust
|
||||
let fe = FeDevice::open("/dev/dvb/adapter0/frontend0", false)?;
|
||||
println!("{}", &fe);
|
||||
```
|
||||
|
||||
Frontend status:
|
||||
|
||||
```rust
|
||||
let fe = FeDevice::open("/dev/dvb/adapter0/frontend0", false)?;
|
||||
let mut status = FeStatus::default();
|
||||
status.read(&fe)?;
|
||||
println!("{}", &status.display(1));
|
||||
```
|
||||
|
||||
|
@ -177,7 +177,18 @@ impl FeStatus {
|
||||
/// Returns an object that implements `Display` for different verbosity levels
|
||||
/// Verbosity levels:
|
||||
/// 0 - single line status
|
||||
/// ```text
|
||||
/// Status:SCVYL S:-38.56dBm (59%) Q:14.57dB (70%) BER:0 UNC:0
|
||||
/// ```
|
||||
///
|
||||
/// 1 - full report
|
||||
/// ```text
|
||||
/// Status: SIGNAL CARRIER FEC SYNC LOCK
|
||||
/// Signal: -38.20dBm (59%)
|
||||
/// SNR: 14.65dB (70%)
|
||||
/// BER: 0
|
||||
/// UNC: 0
|
||||
/// ```
|
||||
pub fn display(&self, verbose: u32) -> FeStatusDisplay {
|
||||
FeStatusDisplay {
|
||||
inner: self,
|
||||
|
Loading…
Reference in New Issue
Block a user