A 'pseudo' Hal component is created in order to make:
threadname.time pin (output only for halscope, hal-histogram, etc)
threadname.tmax param (rw so it can be reset)
The pseudo component name is identified by the prefix:
HAL_PSEUDO_COMP_PREFIX = "__"
Example:
$ halcmd show comp __
Loaded HAL Components:
ID Type Name PID State
17 RT __servo-thread ready
16 RT __base-thread ready
$ halcmd show pin \*thread\*
Component Pins:
Owner Type Dir Value Name
22 s32 OUT 26040 servo-thread.time ==> hhs-0
$ halcmd show param \*thread\*
Parameters:
Owner Type Dir Value Name
22 s32 RW 147280 servo-thread.tmax
Note:
removed two #if 0 sections for comments about adding this functionality
tested on
ubuntu lucid rtai
debian wheezy uspace
Alternate to using a coded prefix for a 'pseudo' component:
Consider changing the hal_comp_t struct type field from an
int to an enum and modifying hal_init() to accept an arg
for special comp types. As hal_init() is used many places,
this method is probably too pervasive for upcoming 2.7 release.
Signed-off-by: Dewey Garrett <dgarrett@panix.com>
|
||
|---|---|---|
| .. | ||
| expected | ||
| README | ||
| test.sh | ||
Checks that 'halcmd save' produces the expected output, including loadable module parameters, parameter settings, linked pins, and thread functions.