1
0
mirror of https://github.com/danog/libdvb.git synced 2024-11-26 20:04:39 +01:00

more docs

This commit is contained in:
Andrey Dyldin 2021-01-20 14:31:42 +02:00
parent 07e04d9782
commit 3037f42446
2 changed files with 29 additions and 1 deletions

View File

@ -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));
```

View File

@ -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,