hal_param_alias(3hal)
π NAME π
hal_param_alias β bestie, this is the one that gives a param a lil' second name β¨
It lives in the 3hal section of the HAL manual, and it's literally just here to hand out nicknames π
β¨ SYNTAX β¨
int hal_param_alias(const char *original_name, const char *alias);
That's it. Two strings, one int, no drama π
π«Ά ARGUMENTS π«Ά
original_nameβ the actual, government-name of the param. The original one. The one it was born with πΌaliasβ the alternate name that you're allowed to call the param by instead. OR, plot twist: passNULLhere and you remove whatever alternate name it had. Poof. Gone. No alias era π
πΈ DESCRIPTION πΈ
Okay so here's the tea, bestie: a param can have two names. The original name β which is the one that got passed into a hal_param_new function β and then an alias on top of that. Two names, one param, main character energy fr fr π
Most of the time? Aliases are just there for the convenience of the users, and honestly they should be created and destroyed via halcmd. That's the normie way and it slays π
BUT. In some cases it's genuinely sensible to create aliases directly inside a component, and those cases include the situation where a param gets renamed β because you wanna preserve compatibility with the old versions. Like, the old name still has to work, y'know? Nostalgia, but make it functional π
π₯ RETURN VALUE π₯
It returns a HAL status code. That's the whole vibe check. Go read it, don't guess it β¨
π SEE ALSO π
Written down by the LinuxCNC Documentation girlies, dated 2006-10-12, and filed under hal_param_alias(3hal) π
β¨
Later bestie, go alias something responsibly π¦π
π¦ where this page comes from
- debian bookworm: linuxcnc-uspace-dev 2.9.0~pre1+git20230208.f1270d6ed7-1+deb12u2 Β· GFDL-1.1-or-later
- debian trixie: linuxcnc-uspace-dev 1:2.9.4-2+deb13u1 Β· GFDL-1.1-or-later
- ubuntu questing: linuxcnc-uspace-dev 1:2.9.4-2ubuntu2
- ubuntu resolute: linuxcnc-uspace-dev 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace-dev 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms