[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: GAttrib refdes appends '.'



I should follow up with a mention that in the parts you observe, the
"numslots" attribute is set in the symbol file itself, not at the
schematic level.  Therefore, you, the user, don't see this attribute
since it is not promoted to the schematic level (unless you tweak
gschemrc).  

FWIW, this is another reason to be wary of "heavy" symbols: Users may
be unaware of strange or unknown attributes lurking in the symbol, and
those symbol-level attributes might do things which the naive user [1]
doesn't expect or understand.

Stuart

[1] I don't mean Dan personally is naive or unaware :-).  Just that he
brought up an interesting point with his observation.


> 
> > Why does gattrib show some components with a dot ( period ) appended to 
> > their refdes?
> 
> IIRC, Gattrib appends a dot to the refdes if the "numslots" attribute is
> set. Then, assuming you have a slotted part (i.e. numslots > 0),
> each slot of the part is listed on a separate line.  For example:
> 
> refdes  attr1  attr2
> U1.1    foo    bar
> U1.2    baz
> U2
> U3.            foo1
> 
> etc.
> 
> In the above example, U1 is a slotted part with numslots=2.   Each
> slot of U1 is listed on a separate line.  U2 has no "numslots"
> attribute at all, and U3 has numslots=0.
> 
> In an effort to clean up our parts libararies, our diligent developers
> have been adding the "numslots" attribute to all components, including
> things like single caps & resistors.  In the case of single parts,
> numslots=0, which turns off slotting.  However, since gattrib is
> triggered off the presence of the "numslots", and not its value, it
> appends the ".".  All this happens in gattrib/src/s_attrib.c at the
> bottom of the file.
> 
> As for why it works this way?  I belive gattrib was segfaulting on
> slotted parts before this features was implemented.  Either that, or
> it was badly munging parts.  In any event, it needed a way to handle
> parts with multiple slots, and the above way was the easiest to
> create.  
> 
> > I could find anything in the manual about what the '.' symbolizes. 
> 
> Gattrib has a manual???
> 
> Stuart
>