Function sc_tdc_init_inifile_override

Function Documentation

int sc_tdc_init_inifile_override(const char *ini_filename, int overrides_handle)

see sc_tdc_init_inifile(). Additionally copies the contents from an “override registry” and stores them internally such that values of the configuration parameters listed in that registry override those from the ini file. The registry object is not modified. Call sc_tdc_overrides_close() on the respective handle after initialization to avoid memory leaks unless the registry is planned for later reuse. While a similar effect can be achieved via sc_tdc_init_with_config_lines(), there are some differences: (1) runtime editing of the ini file in DebugLevel > 0 remains possible (2) no parsing of the ini file is required from the application developer (3) no dynamic memory allocation for data structures is required from the application developer (4) only those parameters that are to be modified need to be added into the registry

Parameters
  • ini_filename – the name of the ini file or the full path to the ini file

  • overrides_handle – the handle as returned by sc_tdc_overrides_create(). If a negative value is passed, no overrides will be in effect, and the function does NOT report an error because of this. In that case, the function has the same effect as calling sc_tdc_init_inifile().

Returns

non-negative device descriptor if the device was successfully initialized; else negative error code