TSDuck v3.43-4426
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches

Description of a Unicable switch (satellite reception). More...

#include <tsUnicable.h>

Inheritance diagram for ts::Unicable:
Collaboration diagram for ts::Unicable:

Public Member Functions

 Unicable ()=default
 Default constructor.
 
bool decode (const UString &str, Report &report)
 Decode a string containing a Unicable representation.
 
bool isValid () const
 Check if the content of this object is valid and consistent.
 
virtual UString toString () const override
 Convert to a string object.
 

Static Public Member Functions

static bool GetDefaultLNB (LNB &lnb, Report &report)
 Get the default LNB for Unicable switches.
 
static const UStringStringFormat ()
 Get a string describing the format of Unicable strings.
 

Public Attributes

uint64_t user_band_frequency = 0
 User band frequency in Hz.
 
uint8_t user_band_slot = 0
 User band slot, must be in range 1-8 (Unicable I) or 1-32 (Unicable II).
 
uint8_t version = 0
 Unicable version, must be 1 (EN50494) or 2 (EN50607).
 

Static Public Attributes

static constexpr uint32_t EN50494_STEP_SIZE = 4
 Unicable 1 step-size in MHz.
 

Detailed Description

Description of a Unicable switch (satellite reception).

There are two unicable specifications:

These use the DiSEqC hardware-level interface, while permitting several receivers to share the same COAXial cable.

This massively reduces the cabling in multiple-dwelling units such as hotels, apartments and large offices.

The standard supports both unidirectional (bus specification 1.x) and bidirectional (bus specification 2.x) commands.

In normal use, receivers need only to use unidirectional commands.

To achieve this, each receiver is attached to the bus via a power-passing combiner (so that the LNB controllers do not attempt to back-power each other), and the passive "watching a channel" state is to send a low voltage and no tone.

To send a command, you:

  1. assert the high voltage;
  2. wait for a settling time;
  3. send the command;
  4. if it is a bidirectional command await a reply (not supported);
  5. wait for a "clear channel" time;
  6. assert the low voltage;
  7. wait for a settling time;

It is possible for the commands from two or more receivers to collide, in which case they will probably both not be actioned. The specifications suggest a detection and a random-backoff and retransmit mechanism, which is not implemented here.

Each receiver is assigned a "user band" and a "user band frequency"

  1. The specification does NOT assign bands to frequencies - switches come with a table.
  2. The receiver sends commands for its user-band, and only ever tunes to its user-band-frequency.
  3. The switch interprets commands, and frequency-shifts the required signal to the receiver's user-band-frequency.
  4. Both versions of the specification have extended versions of the "channel change" command which includes a PIN code, the idea being that the switch should ignore commands where the PIN is incorrect. This is intended to stop the neighbour from hijacking "your" user-band. This version of the command is not used here.

The channel-change command contains the following parameters:

  1. The user-band assigned to the receiver;
  2. The satellite position to be tuned to;
  3. The polarity to be tuned to;
  4. The frequency range to be tuned to;
  5. A "tuning word"

The specifications combines 2,3 and 4 into a "bank", and somewhat confusingly (and unnecessarily) tries to compare the bank to DiSEqC uncommitted (1.1), and committed (1.0) switch positions.

Unicable I supports up to 8 user-bands on a single piece of COAX, and two satellite positions. The calculation of the tuning word also uses the user-band frequency.

Unicable II supports up to 32 user-bands on a single piece of COAX, and up to 64 satellite positions. The calculation of the tuning word does not include the user-band frequency.

Experience of various switches on the market suggest that it is common for the switches to support a power-of-two number of satellites, and ignore unsupported satellite-position bits in commands, therefore for a switch supporting four satellite positions 0,4,8,...,60 all alias to the same satellite.

Member Function Documentation

◆ isValid()

bool ts::Unicable::isValid ( ) const

Check if the content of this object is valid and consistent.

Returns
True if the content of this object is valid and consistent.

◆ toString()

virtual UString ts::Unicable::toString ( ) const
overridevirtual

Convert to a string object.

Returns
This object, converted as a string.

Implements ts::StringifyInterface.

◆ decode()

bool ts::Unicable::decode ( const UString str,
Report report 
)

Decode a string containing a Unicable representation.

Parameters
[in]strString containing the Unicable representation. Format: <version>,<userband slot>,<userband frequency in MHz>.
[in,out]reportWhere to log errors.
Returns
True on success, false on error.

◆ StringFormat()

static const UString & ts::Unicable::StringFormat ( )
static

Get a string describing the format of Unicable strings.

Typically used in help messages.

Returns
A constant reference to the description string.

◆ GetDefaultLNB()

static bool ts::Unicable::GetDefaultLNB ( LNB lnb,
Report report 
)
static

Get the default LNB for Unicable switches.

Parameters
[out]lnbThe returned LNB.
[in,out]reportWhere to log errors.
Returns
True on success, false on error.

Member Data Documentation

◆ user_band_frequency

uint64_t ts::Unicable::user_band_frequency = 0

User band frequency in Hz.

This is the frequency between the tuner and the Unicable switch. This frequency is statically assigned to the receiver. Each receiver on the COAX has a specific user band frequency.

Note: In the string representation of the Unicable parameters, the user band frequency is in MHz by convention. However, in C++ code, all frequencies are in Hz for consistency.


The documentation for this class was generated from the following file: