holoscan::get_preferred_network_ports

Beta
View as Markdown
std::vector<int> holoscan::get_preferred_network_ports(
const char *env_var_name
)

Get the preferred network ports from the specified environment variable.

This method reads the specified environment variable and returns a vector of preferred network ports. The environment variable is expected to be a comma-separated list of integers. If the environment variable is not set, is empty, or contains invalid or non-integer values, an empty vector is returned.

Returns: The vector containing the preferred network ports. If the environment variable is not set, is empty, or no valid port numbers are found, an empty vector is returned.

Parameters

env_var_name
const char *

The name of the environment variable to read.