This document outlines the various modules within ATSC 3.0 and how they should be utilized when developing a user interface. Any references to the “application” in this document pertain to the software that integrates the user interface, whether statically linked to the ATSC libraries or executed as a separate process. Detailed descriptions of the functions mentioned here can be found in the ATSC 3.0 API documentation.
The file for defining the data types as per the standard is atsc_basetype.h available in the path : /DtvKit_ATSC30Stack_M3/src/atsc/common/inc/atsc_basetype.h
typedef unsigned char uint8_t; | unsigned byte integer value |
typedef short int int16_t; | Signed 2-Bytes Integer value |
typedef unsigned short uint16_t; | Unsigned 2-Bytes Integer value |
typedef int int32_t; | Signed 4-Bytes Integer Value |
typedef unsigned int uint32_t; | Unsigned 4-Bytes Integer Value |
typedef long int int64_t; | Signed 8-Bytes Integer Value |
typedef unsigned long int uint64_t; | Unsigned 8-Bytes Integer Value |
typedef long long UINT_64; | Signed 8-Bytes Integer Value |
typedef float FLOAT_32; | Decimal digits with 4Bytes //6-7 decimal digits |
typedef double FLOAT_64; | Decimal digits with 8Bytes //15-16 decimal digits |
There is the single interface for initialize the task to trigger the web application and also interface to tune the channel with default parameters,
And created the class-CAvCtrl() for Audio and Video handling and data management based on the media type.
AtscCore having some default configurations and its changed based on user config based on their requirements. These configurations available in the file /DtvKit_ATSC30Stack_M3/src/atsc/common/inc/atsccore_prod_config.h
So based on user requirement, below values and mapping will get varies.
#define API_VERSION "2.0"
#define ATSCCORE_FRONTEND_MAX 2
#define ATSCCORE_SUPPORTED_STANDARDS ( ATSC30 )
#define ATSCCORE_ATSC1_DEMOD_TYPE ( 8VSB )
#define ATSCCORE_DEFAULT_DEMOD ( eDemodATSC30 )
#define ATSCCORE_DEFAULT_REGION 0 // United State
#define ATSCCORE_DEFAULT_CHANNEL 56
#define ATSCCORE_US_MIN_CHANNEL 2
#define ATSCCORE_US_MAX_CHANNEL 71
#define ATSCCORE_KOREA_MIN_CHANNEL 2
#define ATSCCORE_KOREA_MAX_CHANNEL 56
#define ATSCCORE_INDIA_MIN_CHANNEL 21
#define ATSCCORE_INDIA_MAX_CHANNEL 68
#define ATSCCORE_HTTP_URL_SUPPORTED 64
#define ATSCCORE_HTTP_URL_STRING_LENGTH 256
#define WEB_URL_PORT_NUMBER 81
#define GUIDE_PATH "/guide"
#define GUIDE_FILE_NAME_WITH_PATH "/guide/guide.json"
#define ROOT_PATH "/"
#define ENV_PATH "/env.conf"
#define ENV_JSON_PATH "/env.json"
#define ESG_PATH "/esg"
#define FILES_STORAGE_PATH "/files/storage/"
#define STORAGE_FILES "/files"
#define MSG_FILE_PATH "/guide/slt.json"
#define HLS_FILE_PATH "/hls"
#define M3U8_FILE "/hls/%d-%d/index.m3u8"
#define M3U8_FILE_PATH "/hls/%d-%d/"
#define REMOVE_DUMP_FILE "rm -rf /dump/*.*"
#define DUMP_FILE_PATH "/dump/%s"
#define ATSCCORE_DB_PATH "/db"
#define ATSCCORE_DB_FILE "/db/homegateway.db"
#define ATSCCORE_DUMP_FILE "/dump/dump_history.json"
#define ATSCCORE_MOUNT_PATH "/proc/mounts"
#define ATSCCORE_FRONTEND_DEV_PATH "/dev/dvb/adapter%d/frontend0"
#define ATSCCORE_DEMUX_DEV_PATH "/dev/dvb/adapter%d/demux0"
#define ATSCCORE_START_CHANNEL 2
#define ATSCCORE_END_CHANNEL 70
#define ATSCCORE_HTTP_URL_STRING_LENGTH 256
#define BUILD_DATE "08-07-2024"
In ATSC Optmgateway application, scanning is processing with two method,
CAtscMw::RequestScan() => CMwService::Frontend_ScanChannels() by using below parameters for scanning the channel,
For scanning, its created the thread for continuous scanning process CMwService::ThreadScan() -> TuneToChannel(), based on the user selected parameters for scan the channels, basically a SetProperties() to Hal layer.
For tune to service, the user need to provide the demod type as ATSC1.0 or ATSC 3.0, frequency, plpId,Region Id, Channel number. Then its collected the data for the particular service if its get locked or tuned.
Then monitoring the data for the ALP parsing based on ROUTE & MMT protocol parse via ALP Processing thread.
Interface for Tune channel [DtvKit_ATSC30Stack_M3/src/atsc/mw/src/service/atsc_mw.cpp]
CAtscMw::TuneToChannel()
Thread for Scan and ALP processing:
CAtscMw::ScanChannels()
CMwService::AlpDataHandlerThread() -> CMwService::ProcessAlpData()
For stop the scanning process, stop the running thread by setting the mScanning flag as false.
Interface for stop the frontend and scanning process:
CMwService::Frontend_Stop()
Electronic Service Guide/ESG Search:
After collecting every service information from the Service List Table, it created the file/guide as
ESG by list out all the service list and event information in the user configured path.
ESG configure path:
#define ESG_PATH "/esg"
1. RegisterOnsnMsgEventNotify() - Event for On Screen Message for User.
2. RegisterFrontendParamCbEvents()
3. RegisterFrontendStatusCbEvents()
Information about frontend such as Tuner Id, Demod Type, Frequency, Channel Number, Region Id,Plp Id,
Bitrate,RSSI,SNR,Lock status which is received from Hal layer.