From: Larry Lachman (larry++at++paradigmsim.com)
Date: 03/22/2000 17:04:55
christopher.g.dorosky++at++lmco.com wrote:
> Hi
>
> Imagine you have a pfswitch with 10 children.
>
> To turn them all on, do pfswitch->setVal(PFSWITCH_ON);
> all off is PFSWITCH_OFF
> to turn on number 5 is setVal(4) or maybe five, whatever.
>
> How do you turn on numbers 5 and 7?
>
> I had wanted to turn on children one by one, but setting the val seems to
> absolutely set it, not "or" it.
This is correct; each child being enabled is mutually exclusive of the other
children, unless you enable them all. In order to turn on numbers 5 and 7 you
must restructure your pfSwitch node. In your example with 10 children, one of
the children must be another pfSwitch node. Underneath this child switch node
is children 5 and 7. Suppose this new pfSwitch resides at index 4 of the parent
pfSwitch (still child 5). You can then enable either one of the new switch's
children, or simply use PFSWITCH_ON to enable both of them - as you have
requested to do.
Larry
-- _______________________________________________________________Larry Lachman WWW: http://www.multigen-paradigm.com MultiGen-Paradigm, Inc. larry++at++paradigmsim.com 14900 Landmark, Suite 400 (972) 960-2301 ext 287 voice Dallas, Texas 75240 USA (972) 960-2303 fax
This archive was generated by hypermail 2b29 : Wed Mar 22 2000 - 16:24:36 PST