Skip to content

Subsystem

Functions

Name
hse_err_t hse_init(const char * config, size_t paramc, const char *const * paramv)
Initialize the HSE subsystem.
void hse_fini(void )
Shutdown the HSE subsystem.
hse_err_t hse_param_get(const char * param, char * buf, size_t buf_sz, size_t * needed_sz)
Get HSE global parameter.

Functions Documentation

function hse_init

hse_err_t hse_init(
    const char * config,
    size_t paramc,
    const char *const * paramv
)

Initialize the HSE subsystem.

Parameters:

  • config Path to a global configuration file.
  • paramc Number of initialization parameters in paramv.
  • paramv List of parameters in key=value format.

Return: Error status.

Note: This function is not thread safe and is idempotent.

This function initializes a range of different internal HSE structures. It must be called before any other HSE functions are used.

function hse_fini

void hse_fini(
    void 
)

Shutdown the HSE subsystem.

Warning: After invoking this function, calling any other HSE functions will result in undefined behavior unless HSE is re-initialized.

This function cleanly finalizes a range of different internal HSE structures. It should be called prior to application exit.

function hse_param_get

hse_err_t hse_param_get(
    const char * param,
    char * buf,
    size_t buf_sz,
    size_t * needed_sz
)

Get HSE global parameter.

Parameters:

  • param Parameter name.
  • buf Buffer for writing stringified value of parameter.
  • buf_sz Size of buf.
  • needed_sz Needed size of buf.

Return: Error status.

Note: This function is thread safe.

Remark:

  • param must not be NULL.
  • param must be a valid parameter.

Puts the stringified version of the parameter value into buf. If buf_sz is NULL, then needed_sz will still be populated.


Updated on 17 November 2022 at 15:11:02 CST