TSDuck v3.40-3963
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::HiDesDevice Class Reference

Encapsulation of a HiDes modulator device. More...

#include <tsHiDesDevice.h>

Public Member Functions

 HiDesDevice ()
 Constructor.
 
virtual ~HiDesDevice ()
 Destructor.
 
bool close (Report &report=(ts::CerrReport::Instance()))
 Close the device.
 
bool getGain (int &gain, Report &report=(ts::CerrReport::Instance()))
 Get the output gain in dB.
 
bool getGainRange (int &minGain, int &maxGain, uint64_t frequency, BandWidth bandwidth, Report &report=(ts::CerrReport::Instance()))
 Get the allowed range of output gain in dB.
 
bool getInfo (HiDesDeviceInfo &info, Report &report=(ts::CerrReport::Instance())) const
 Get information about the device.
 
bool isOpen () const
 Check if the HiDes device is open.
 
bool open (const UString &name, Report &report=(ts::CerrReport::Instance()))
 Open the HiDes device by adapter name or device name.
 
bool open (int index, Report &report=(ts::CerrReport::Instance()))
 Open the HiDes device by adapter number.
 
bool send (const TSPacket *data, size_t packet_count, Report &report=(ts::CerrReport::Instance()), AbortInterface *abort=nullptr)
 Send TS packets.
 
bool setDCCalibration (int dcI, int dcQ, Report &report=(ts::CerrReport::Instance()))
 Set DC calibration values.
 
bool setGain (int &gain, Report &report=(ts::CerrReport::Instance()))
 Set the output gain in dB.
 
bool startTransmission (Report &report=(ts::CerrReport::Instance()))
 Start transmission (after having set tuning parameters).
 
bool stopTransmission (Report &report=(ts::CerrReport::Instance()))
 Stop transmission.
 
bool tune (const ModulationArgs &params, Report &report=(ts::CerrReport::Instance()))
 Tune the modulator with DVB-T modulation parameters.
 

Static Public Member Functions

static bool GetAllDevices (HiDesDeviceInfoList &devices, Report &report=(ts::CerrReport::Instance()))
 Get all HiDes devices in the system.
 

Static Public Attributes

static const int IT95X_DC_CAL_MAX = 512
 Maximum DC calibration value.
 
static const int IT95X_DC_CAL_MIN = -512
 Minimum DC calibration value.
 

Detailed Description

Encapsulation of a HiDes modulator device.

Member Function Documentation

◆ GetAllDevices()

static bool ts::HiDesDevice::GetAllDevices ( HiDesDeviceInfoList devices,
Report report = (ts::CerrReport::Instance()) 
)
static

Get all HiDes devices in the system.

Parameters
[out]devicesReturned list of devices.
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ open() [1/2]

bool ts::HiDesDevice::open ( int  index,
Report report = (ts::CerrReport::Instance()) 
)

Open the HiDes device by adapter number.

Parameters
[in]indexAdapter number.
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ open() [2/2]

bool ts::HiDesDevice::open ( const UString name,
Report report = (ts::CerrReport::Instance()) 
)

Open the HiDes device by adapter name or device name.

Parameters
[in]nameAdapter name or device name.
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ isOpen()

bool ts::HiDesDevice::isOpen ( ) const
inline

Check if the HiDes device is open.

Returns
True if the HiDes device is open.

◆ getInfo()

bool ts::HiDesDevice::getInfo ( HiDesDeviceInfo info,
Report report = (ts::CerrReport::Instance()) 
) const

Get information about the device.

Parameters
[out]infoReturned information.
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ close()

bool ts::HiDesDevice::close ( Report report = (ts::CerrReport::Instance()))

Close the device.

Parameters
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ setGain()

bool ts::HiDesDevice::setGain ( int &  gain,
Report report = (ts::CerrReport::Instance()) 
)

Set the output gain in dB.

Parameters
[in,out]gainThe gain (if positive) or attenuation (if negative) in dB. Upon return, gain contains the actually set value. The range of valid gain values depends on the frequency and the bandwidth.
[in,out]reportWhere to report errors.
Returns
True on success, false on error.
See also
getGainRange()

◆ getGain()

bool ts::HiDesDevice::getGain ( int &  gain,
Report report = (ts::CerrReport::Instance()) 
)

Get the output gain in dB.

Parameters
[out]gainThe gain (if positive) or attenuation (if negative) in dB.
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ getGainRange()

bool ts::HiDesDevice::getGainRange ( int &  minGain,
int &  maxGain,
uint64_t  frequency,
BandWidth  bandwidth,
Report report = (ts::CerrReport::Instance()) 
)

Get the allowed range of output gain in dB.

The range of valid gain values depends on the frequency and the bandwidth.

Parameters
[out]minGainMinimum allowed gain value in dB.
[out]maxGainMaximum allowed gain value in dB.
[in]frequencyTarget frequency in Hz.
[in]bandwidthTarget bandwidth.
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ setDCCalibration()

bool ts::HiDesDevice::setDCCalibration ( int  dcI,
int  dcQ,
Report report = (ts::CerrReport::Instance()) 
)

Set DC calibration values.

Parameters
[in]dcIDC offset compensation for I (-512 to +512).
[in]dcQDC offset compensation for Q (-512 to +512).
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ tune()

bool ts::HiDesDevice::tune ( const ModulationArgs params,
Report report = (ts::CerrReport::Instance()) 
)

Tune the modulator with DVB-T modulation parameters.

Parameters
[in]paramsTuning parameters.
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ startTransmission()

bool ts::HiDesDevice::startTransmission ( Report report = (ts::CerrReport::Instance()))

Start transmission (after having set tuning parameters).

Parameters
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ stopTransmission()

bool ts::HiDesDevice::stopTransmission ( Report report = (ts::CerrReport::Instance()))

Stop transmission.

Parameters
[in,out]reportWhere to report errors.
Returns
True on success, false on error.

◆ send()

bool ts::HiDesDevice::send ( const TSPacket data,
size_t  packet_count,
Report report = (ts::CerrReport::Instance()),
AbortInterface abort = nullptr 
)

Send TS packets.

Parameters
[in]dataAddress of first TS packet to send.
[in]packet_countNumber of contiguous packets to send.
[in,out]reportWhere to report errors.
[in]abortIf non-zero, invoked when I/O is interrupted (in case of user-interrupt, return, otherwise retry).
Returns
True on success, false on error.

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