RDK Documentation (Open Sourced RDK Components)
|
Functions | |
void | printUsage (char *app_name) |
This function displays the brief usage message for the tool. More... | |
bool | processCommandLine (int argc, char **argv, string &mode, string &input_file, string &output_file, string &output_file_sns) |
This API scans parameters from the command line. More... | |
int | main (int argc, char **argv) |
int | SiManager::xml_parse_attributes (xmlNodePtr parent) |
This API parses the program id, source id, modulation, frequency information from the XML. More... | |
bool | SiManager::load_xml_file (string xml_file) |
This function loads an input xml file into memory, it does the formatting related validations and parses the attributes. More... | |
uint32_t | SiManager::calc_mpeg2_crc (uint8_t *data, uint32_t len) |
Function to calculate Cyclic Redundancy Check(CRC) value. CRC is used to find the accidental changes happened to raw data. Here is the CRC flow works here. More... | |
unsigned int | SiManager::get_file_size (const char *location) |
The si_get_file_size() function will get the size of the specified file. More... | |
bool | SiManager::write_crc_for_si_cache (string sidbFileName) |
This API finds the CRC value and writes at the end of SI cache file. More... | |
bool | SiManager::write_crc_for_si_and_sns_cache (string sidbFileName, string snsdbFileName) |
This finds the CRC and write it at the end of SI and SNS cache files. More... | |
void | SiManager::init_si_entry (siTableEntry *si_entry) |
Internal Method to initialize service entries to default values init_si_entry() More... | |
bool | SiManager::parse_program_details (siTableEntry **si_entry_head, uint32_t frequency[], uint32_t modulation[], int &f_index, int &m_index) |
This API loads the program data from binary cache file. More... | |
bool | SiManager::cache_si_data (string sidbFileName) |
This API write the program details like modulation, frequency, program number, VCN information to SI cache file. More... | |
bool | SiManager::cache_sns_data (string snsdbFileName) |
This API write the program details like modulation, frequency, program number, VCN information to SI cache file. SNS cache is used to store the data available in NTT(Network Text Tables) by legacy boxes.It contains source id and corresponding source name(channel name) mappings. More... | |
bool | SiManager::load_si_data (string sidbFileName) |
This API function loads the program data from binary cache file. More... | |
bool | SiManager::Load (string file_name, int mode) |
This API is to load program data from XML file, if the operation mode selected is XML to Binary. Otherwise it will load program data from cache file. More... | |
bool | SiManager::GenerateSICache (string sidbFileName) |
Generates binary SI cache from the XML file. More... | |
bool | SiManager::GenerateSICache (string sidbFileName, string snsdbFileName) |
Generate both binary SI cache and binary SNS cache from the XML file. More... | |
bool | SiManager::GenerateXML (string sixmlFileName) |
Function to generate XML file(sidb.xml). More... | |
void printUsage | ( | char * | app_name | ) |
This function displays the brief usage message for the tool.
It includes the usage of the tool, description, options and examples.
[in] | app_name | Indicates the options for the tools |
Definition at line 78 of file si_cache_app.cpp.
bool processCommandLine | ( | int | argc, |
char ** | argv, | ||
string & | mode, | ||
string & | input_file, | ||
string & | output_file, | ||
string & | output_file_sns | ||
) |
This API scans parameters from the command line.
[in] | argc | Number of parameters |
[in] | argv | Parameter list |
[in] | mode | Operation mode. It can be one of the following: xtob - Generate SI Cache binaries from the given XML file btox - Generate SI Cache XML file from the given binary file dump - Dump channel map from the given binary file to console |
[in] | input_file | Input file. It can be an XML file or a binary SI Cache file depending on the operation mode |
[out] | output_file | Output file. It can be a binary SI Cache file or an XML file depending on the operation mode |
[out] | output_file_sns | Binary SNS Cache file to be generated. To use this option, the mode should be set to 'xtob'. |
True | on sucess, False on failure. |
Definition at line 121 of file si_cache_app.cpp.
|
private |
|
private |
|
private |
Function to calculate Cyclic Redundancy Check(CRC) value. CRC is used to find the accidental changes happened to raw data. Here is the CRC flow works here.
[in] | data | Binary cache file(SICache file). |
[in] | len | Size of the file. |
|
private |
|
private |
|
private |
|
private |
Internal Method to initialize service entries to default values init_si_entry()
[in] | si_entry | Service entry to set the default values for. |
|
private |
This API loads the program data from binary cache file.
It checks for the version information and CRC Value and proceeds further in reading modulation, frequency, program number and Virtual channel number.
[in] | sidbFileName | Binary SI Cache file. |
True | on sucess, False on failure. |
|
private |
|
private |
This API write the program details like modulation, frequency, program number, VCN information to SI cache file. SNS cache is used to store the data available in NTT(Network Text Tables) by legacy boxes.It contains source id and corresponding source name(channel name) mappings.
[in] | snsdbFileName | Binary SNS Cache file. |
True | on sucess, False on failure. |
|
private |
This API function loads the program data from binary cache file.
It checks for the version information and CRC Value and proceeds further for reading modulation, frequency, program number and Virtual channel number.
[in] | sidbFileName | Binary SI Cache file. |
True | on sucess, False on failure. |
bool SiManager::Load | ( | string | file_name, |
int | mode | ||
) |
This API is to load program data from XML file, if the operation mode selected is XML to Binary. Otherwise it will load program data from cache file.
It will also display number of available services.
[in] | file_name | It can be an XML file or a binary SI Cache file depending on the operation mode. |
[in] | mode | Operation mode. It can be one of the following: xtob - Generate SI Cache binaries from the given XML file btox - Generate SI Cache XML file from the given binary file |
True | on sucess, False on failure. |
bool SiManager::GenerateSICache | ( | string | sidbFileName | ) |
bool SiManager::GenerateSICache | ( | string | sidbFileName, |
string | snsdbFileName | ||
) |
bool SiManager::GenerateXML | ( | string | sixmlFileName | ) |
Function to generate XML file(sidb.xml).
It uses standard libxml2 methods for XML file creation. XML of the format: <?xml version="1.0" encoding="UTF-8"?> <SIDB> <program sourceid="162" program_number="65535" carrier_frequency="179" modulation_mode="674000000" virtual_channel_number="4"> </SIDB>
[out] | sixmlFileName | XML file |
True | on sucess, False on failure. |