![]() |
TSDuck v3.46-4930
MPEG Transport Stream Toolkit
|
#include <tsSignalState.h>


Classes | |
| class | Value |
Public Types | |
| enum class | Unit { COUNTER , PERCENT , MDB } |
Public Member Functions | |
| SignalState ()=default | |
| virtual void | clear () |
| virtual std::ostream & | display (std::ostream &strm, const UString &margin=UString(), int level=Severity::Info) const override |
| void | setPercent (std::optional< Value > SignalState::*field, int64_t value, int64_t min, int64_t max) |
| void | toJSON (json::Object &obj) const |
| virtual UString | toString () const override |
Public Attributes | |
| std::optional< Value > | bit_error_rate {} |
| std::optional< Value > | packet_error_rate {} |
| bool | signal_locked = false |
| std::optional< Value > | signal_noise_ratio {} |
| std::optional< Value > | signal_strength {} |
State of a modulated broadcast signal.
The type of information on the state of a modulated broadcast signal highly depends on the operating systems and drivers. The units also differ. The value can be in decibels or percentage. So, this structure contains many different fields which can be set or not.
|
strong |
Unit of a state value.
| Enumerator | |
|---|---|
| COUNTER | A raw counter value, unit is 1, whatever it means. |
| PERCENT | A value from 0 to 100. |
| MDB | Milli-decibel, unit of 0.001 dB. |
|
default |
Constructor.
|
virtual |
Clear content, reset all values, they become "unset"
|
overridevirtual |
Convert to a string object.
Implements ts::StringifyInterface.
|
overridevirtual |
Display the content of this object to a stream.
| [in,out] | stream | The stream where to print the content. Standard output by default. |
| [in] | margin | The prefix string on each line, empty by default. |
| [in] | level | Severity level (for instance, Severity::Info or Severity::Debug may display more information). |
Implements ts::DisplayInterface.
| void ts::SignalState::toJSON | ( | json::Object & | obj | ) | const |
Build a JSON description of this object.
| [in,out] | obj | JSON object into which the signal state information is added. |
| void ts::SignalState::setPercent | ( | std::optional< Value > SignalState::* | field, |
| int64_t | value, | ||
| int64_t | min, | ||
| int64_t | max ) |
Set a percentage value from a raw driver value. This method is a utility for system-specific implementations.
| [out] | field | Pointer-to-member for the field to update. |
| [in] | value | Raw value as returned by the driver. The field is set with a value from 0 to 100, based on the range min to max. |
| [in] | min | Minimum value corresponding to 0 %. |
| [in] | max | Maximum value corresponding to 100 %. |
| bool ts::SignalState::signal_locked = false |
Set to true when the signal is confirmed to be locked at the input of the demodulator.
| std::optional<Value> ts::SignalState::signal_strength {} |
Signal strength.
| std::optional<Value> ts::SignalState::signal_noise_ratio {} |
Signal to noise ratio (SNR).
| std::optional<Value> ts::SignalState::bit_error_rate {} |
Bit error rate (BER).
| std::optional<Value> ts::SignalState::packet_error_rate {} |
Packet error rate (PER).