1GENLIB_SET_LORES(3)          MBK LOGICAL FUNCTIONS         GENLIB_SET_LORES(3)
2
3
4

NAME

6       GENLIB_SET_LORES  -  set  the  resistance  value of a logical resistor,
7       after its creation.
8

SYNOPSIS

10       #include "mlo.h"
11
12       void GENLIB_SET_LORES(figname,resname,newresi)
13       char ∗figname ;
14       char ∗resname ;
15       double newresi ;
16

PARAMETERS

18       figname             Name of the logical figure
19
20       resname             Instance name of the resistor
21
22       newresi             New resistance value
23

DESCRIPTION

25       GENLIB_SET_LORES looks in the list of resistors of  the  logical  model
26       figname  for  a resistor identified by its instance resname and set the
27       RESI field to the newresi value.
28

RETURN VALUE

30       None
31

ERRORS

33       "∗∗∗ mbk error ∗∗∗ getlores impossible : resistor name doesn't exist in
34       figure ptfig -> NAME"
35              No resistor matches the name.
36

EXAMPLE

38       #include <genlib.h>
39
40       int main(int argc,char ∗argv[])
41       {
42         /∗ Create a figure to work on, a parallel resistor ∗/
43         GENLIB_DEF_LOFIG("parallel_res") ;
44
45         /∗ Define interface ∗/
46         GENLIB_LOCON("i",IN,"input") ;
47         GENLIB_LOCON("f",OUT,"output") ;
48
49         /∗ Add resistors ∗/
50         GENLIB_LORES(RESMIM,5.1,"input","output","res1") ;
51         GENLIB_LORES(RESMIM,5.2,"input","output","res2") ;
52
53         /* Modify resistors value */
54         GENLIB_SET_LORES("parallel_res","res1",6.2) ;
55         GENLIB_SET_LORES("parallel_res","res2",6.3) ;
56
57         /∗ Save all that on disk ∗/
58         GENLIB_SAVE_LOFIG() ;
59
60         return 0 ;
61       }
62

SEE ALSO

64       mbk(1), GENLIB_DEF_LOFIG(3), GENLIB_LORES(3)
65
66
67
68
69
70
71ASIM/LIP6                       August 14, 2002            GENLIB_SET_LORES(3)
Impressum