Skip to main content

Module env

Module env 

Source
Expand description

EPICS environment parameters — C’s envSubr.c.

The only declaration of an EPICS environment default in this workspace is the generated super::env_table, which env-codegen derives from the vendored configure/CONFIG_ENV + CONFIG_SITE_ENV the same way C’s bldEnvData.pl derives envData.c. Everything else resolves through it.

That is enforced by shape, not by convention: EnvParam has no public constructor (only the generated table, inside this crate, can mint one), and none of its accessors takes a default argument. A caller that could supply a default would be a second declaration source, so no caller can.

get remains for the handful of variables that are NOT EPICS Base ENV_PARAMs — C reads those with a plain getenv and its caller owns the fallback, so this port does too.

Structs§

EnvParam
One row of C’s ENV_PARAM table (envDefs.h:41-45): a parameter name and the default compiled in from configure/CONFIG_ENV.

Enums§

EnvDoubleError
Why EnvParam::double did not yield a value — C’s non-zero status.

Constants§

IPPORT_USERRESERVED
Lowest port number a configurable EPICS port may take.

Functions§

get
A plain getenv, no default and no ENV_PARAM behind it.
hostname
prt_env_params
C epicsPrtEnvParams (envSubr.c:383-392) — every parameter EPICS Base knows, with its effective value, in env_param_list[] order.
register_iocsh_env_vars
C iocshRegisterCommon (iocshRegisterCommon.c:54-67) — the environment variables an IOC shell publishes about itself, so a .db, a .substitutions or an st.cmd can expand $(EPICS_VERSION_FULL) or $(ARCH).
set_crate_path
Set an environment variable to a path relative to a crate’s CARGO_MANIFEST_DIR.
set_default
Set an environment variable only if it is not already set.