Skip to content

Recording

The Scanner module lets you scan for DVB services over Satellite, Terrestrial, and Cable.

To start scanning, call one of scanCableAuto, scanCableManual, scanSatelliteAuto, scanSatelliteManual, scanTerrestrialAuto, scanTerrestrialManual, depending on the type of scan you want to take place.

After a scan is finished, all found channels will appear in the Master List of the Channels module.

While scanning, you will recieve onStatusChanged signals, whenever there is some progress. Futhermore, you can connect a callback to onTransponderEvent signal to get information for a transponder when some event occurs on it during a scan operation.

You can cancel a scan that is in progress, by calling the stop function.

Members

CableBandwidth

Enum for the bandwidth parameter to makeCableManual.

Properties:

Name Type Description
BPSK
QPSK
QAM_4
QAM_8
QAM_16
QAM_32
QAM_64
QAM_128
QAM_256

onStatusChanged

Signals that the scanner's status has changed. The listener will be passed the following arguments:

  • status: A Status object. Same as what is returned by getStatus.

onTransponderEvent

Emitted when an event occurs on a transponder. The listener will be passed the following arguments:

  • event: A TransponderEvent object.
  • tpInfo: An object with information about the transponder on which the event occurred. The information provided may differ among events.

onPsipTableRecieved

Signals that a Psip table update has been recieved. The listener will be passed the following arguments:

  • filter: Filter handle as number.
  • pid: PID used by the filter as number.
  • data: Raw data as Uint8Array.

ScanType

Enum for the scan types.

Properties:

Name Type Description
SATELITE Satellite scan.
CABLE Cable scan.
TERRESTRIAL Terrestrial scan.

SearchMode

Enum for selecting the mode of the DVB Scan. Currenty there are two search modes. Frequency scan and NIT scan. This enum can be passed as an optional parameter to all DVB scan methods. By default, there will be used FREQUENCY scan.

Properties:

Name Type Description
FREQUENCY_SEARCH_MODE
NETWORK_SEARCH_MODE

TransponderEvent

Enum for the events that may occur on a currently scanned transponder. The SEARCH_STARTED_SUCCESS event signals the start of a search on a transponder. The SEARCH_STARTED_FAILURE event is fired when a search of a transponder fails to start. The SEARCH_FINISHED_SUCCESS event signals a successful search on a transponder. The SEARCH_FINISHED_FAILURE event is used to indicate a failure during a transponder search. SEARCH_FINISHED_SUCCESS and SEARCH_FINISHED_FAILURE always occur after a SEARCH_STARTED_SUCCESS event and are used interchangeably.

Properties:

Name Type Description
SEARCH_STARTED_SUCCESS Signals the start of a search on a transponder.
SEARCH_STARTED_FAILURE Fired when a search on a transponder fails to start.
SEARCH_FINISHED_SUCCESS Signals a successful search on a transponder.
SEARCH_FINISHED_FAILURE Indicates a failure during a transponder search.

Methods

getDvbCountry()

Retrieves the country code string for DVB operations in ISO 3166-1 alpha-3 format.

Returns:

Type Description
A promise. The completion handler will be passed the following arguments:
- countryCode: A string representing the current configured country code.

getStatus()

Get the status of the scan currently in progress.

Returns:

Type Description
A promise. The completion handler will be passed the following arguments:
- status: A Status object.

scanCableAuto(searchmode)

Automatically scan for cable channels. If another scan is already in progress, it will be stopped.

Parameters:

Name Type Description
searchmode module:Platform.Scanner.SearchMode (optional) - An enum value specifying the search mode. Default value is FREQUENCY_SEARCH_MODE.

Returns:

Type Description
A promise. No arguments are passed to the completion handler.

scanCableManual(low_freq, high_freq, freq_step, bandwidth, symbol_rate, searchmode)

Scan for cable channels using parameters. If another scan is already in progress, it will be stopped.

Parameters:

Name Type Description
low_freq Number The frequency from which to start scanning.
high_freq Number The frequency at which to stop scanning.
freq_step Number The size of the frequency step that will be taken when scanning.
bandwidth module:Platform.Scanner.CableBandwidth An enum value specifying the bandwidth.
symbol_rate Number The symbol rate.
searchmode module:Platform.Scanner.SearchMode (optional) - An enum value specifying the search mode. Default value is FREQUENCY_SEARCH_MODE

Returns:

Type Description
A promise. No arguments are passed to the completion handler.

scanSatelliteAuto(searchmode)

Automatically scan for satellite channels. If another scan is already in progress, it will be stopped.

Parameters:

Name Type Description
searchmode module:Platform.Scanner.SearchMode (optional) - An enum value specifying the search mode. Default value is FREQUENCY_SEARCH_MODE

Returns:

Type Description
A promise. No arguments are passed to the completion handler.

scanSatelliteManual(settings, searchmode)

Manually scan for satellite channels. If another scan is already in progress, the call is ignored.

Parameters:

Name Type Description
settings Object The settings to perform the scan. Properties:
NameTypeDescription
frequencyNumberThe transponder frequency in MHz.
polaritymodule:Platform.Scanner.DVBS.PolarityThe transponder polarity.
symbolRateNumberThe transponder symbol rate in kSps.
fecmodule:Platform.Scanner.DVBS.ForwardErrorCorrectionThe transponder forward error correction.
versionmodule:Platform.Scanner.DVBS.VersionThe transponder version.
modulationmodule:Platform.Scanner.DVBS.ModulationThe transponder modulation.
nameStringThe satellite name. It may well be any custom name.
longitudeNumberThe longitude of the satellite.
directionmodule:Platform.Scanner.DVBS.DirectionThe direction of the satellite.
lnbPowermodule:Platform.Scanner.DVBS.LNBPowerThe LNB power.
lnbIs22kBooleanControls 22k for LNB. true enables it, false disables it.
cSwitchNumberThe LNB C switch port. Acceptable values range from 0 to 4 inclusive. Setting to 0 disables C switch.
uSwitchNumberThe LNB U switch port. Acceptable values range from 0 to 16 inclusive. Setting to 0 disables U switch.
diseqcRepeatsNumberThe diseqc repeats for the LNB.
searchmode module:Platform.Scanner.SearchMode (optional) - An enum value specifying the search mode. Default value is FREQUENCY_SEARCH_MODE.

Returns:

Type Description
A promise. The listener will be passed the following arguments:
- success: A boolean indicating that the scan started without any issues.

scanTerrestrialAuto(searchmode)

Automatically scan for terrestrial channels. If another scan is already in progress, it will be stopped.

Parameters:

Name Type Description
searchmode module:Platform.Scanner.SearchMode (optional) - An enum value specifying the search mode. Default value is FREQUENCY_SEARCH_MODE

Returns:

Type Description
A promise. No arguments are passed to the completion handler.

setDvbCountry(countryCode)

Sets the country for the DVB operations.

The provided argument must be an ISO 3166-1 alpha-3 string in order to set the country successfully.

The following country codes are supported: "arg" (Argentina), "aus" (Australia), "aut" (Austria), "bel" (Belgium), "bol" (Bolivia), "bra" (Brazil), "chl" (Chile), "chi" (China), "col" (Colombia), "cri" (Costarica), "hrv" (Croatia), "cze" (Czechrep), "dnk" (Denmark), "dma" (Dominicanrep), "ecu" (Ecuador), "slv" (Elsalvador), "fin" (Finland), "fra" (France), "deu" (Germany), "gtm" (Guatemala), "hnd" (Honduras), "hun" (Hungary), "irl" (Ireland), "ita" (Italy), "lva" (Latvia), "lux" (Luxembourg), "mex" (Mexico), "nld" (Netherlands), "nic" (Nicaragua), "nor" (Norway), "pan" (Panama), "per" (Peru), "pol" (Poland), "por" (Portugal), "rus" (Russia), "srb" (Serbia), "svk" (Slovakia), "svn" (Slovenia), "zaf" (Southafrica), "esp" (Spain), "swe" (Sweden), "che" (Switzerland), "gbr" (UK), "ukr" (Ukraine), "ven" (Venezuela).

Note that in case no value is set when configuring scanning parameters, the default country code is "svk" (Slovakia).

Parameters:

Name Type Description
countryCode String The country code of the desired country.

Returns:

Type Description
A promise. No arguments are passed to the completion handler.

stop()

Stop the scan that is currently in progress. If no scan is in progress, this function has no effect.

Returns:

Type Description
A promise. No arguments are passed to the completion handler.

requestPsipTable(pid,tid,xtid,continuous)

Sets up Psip table filter. You can connect a callback to onPsipTableRecieved signal to get the raw data from the Psip table. releasePsipTableResources() should be called to free the allocated resources when the filters are no longer used.

Parameters:

Name Type Description
pid Number required pid
tid Number required table id
xtid Number required table id extension
continuous Bool true for CONTINUOUS, false for ONE_SHOT

Returns:

Type Description
A promise. The completion handler will be passed the following arguments:
- val: A number representing the current filter handle.

cancelPsipTableRequest(filter_handle)

Stops Psip table filter.

Parameters:

Name Type Description
filter_handle Number filter handle.

Returns:

Type Description
A promise. No arguments are passed to the completion handler.

releasePsipTableResources()

Stops all running filter for PSIP tables and release the allocated resources.

Returns:

Type Description
A promise. No arguments are passed to the completion handler.

DVBC_tuneToUserDefinedParams(frep, bandwidth, symbolrate, reqd_si, relock_on)

Scan for cable channels using parameters.

Parameters:

Name Type Description
frep Number The frequency from which to start scanning.
bandwidth module:Platform.Scanner.CableBandwidth An enum value specifying the bandwidth.
symbolrate Number The symbol rate.
reqd_si module:Platform.Scanner.SearchType SI search mode to be used if tuning is successful.
relock_on Bool defines whether the tuner is to attempt to relock if lock is lost.

Returns:

Type Description
A promise. No arguments are passed to the completion handler.

Type Definitions

Status The status of the scan currently in progress.

Properties:

Name Type Description
type module:Platform.Scanner.ScanType The scan type.
running Boolean Will be true if a scan is in progres.
progress Number A number from 0 to 100 indicating the current progress.
Back to top