1INSSEGMBKRDS(3) RDS PHYSICAL FUNCTIONS INSSEGMBKRDS(3)
2
3
4
6 inssegmbkrds - adds in RDS instance all the segments of MBK instance
7
9 #include "rdsnnn.h"
10 rdsrec_list ∗inssegmbkrds( InstanceMbk, ModelMbk, InstanceRds, Lynx )
11 phins_list ∗InstanceMbk;
12 phfig_list ∗ModelMbk;
13 rdsins_list ∗InstanceRds;
14 char Lynx;
15
17 InstanceMbk The MBK instance which contains the segments to
18 convert.
19
20 ModelMbk Pointer to the model of the MBK instance.
21
22 InstanceRds The instance which has to receive converted seg‐
23 ments from MBK to RDS format.
24
25 Lynx Flag used for the segment conversion. If the param‐
26 eter Lynx is set to 0 then thi s is the normal con‐
27 version mode. If the parameter Lynx is set to 1
28 then the rds structure generated permits to extract
29 equipotentials rectangles.
30
32 The inssegmbkrds function adds in the RDS instance all segments of the
33 MBK instance converted to RDS format. All newly created segments are
34 chained each other (circulary list) using the USER field of the
35 rdsrec_list structure.
36
38 Pointer to the head of list of the added rectangles to the RDS
39 instance.
40
42 "Rds202: rdsalloc error, can't continue !"
43 it's impossible to allocate the memory size desired
44
46 #include "mphnnn.h"
47 #include "mutnnn.h"
48 #include "rdsnnn.h"
49 #include "rfmnnn.h"
50 #include "rtlnnn.h"
51 typedef struct UserStruct
52 {
53 char ∗STRING;
54 void ∗USER1;
55 } UserStruct;
56 main()
57 {
58 phfig_list ∗MbkFigure;
59 phins_list ∗MbkInstance;
60 phfig_list ∗MbkModelInstance;
61 rdsfig_list ∗RdsFigure;
62 rdsins_list ∗RdsInstance;
63 rdsrec_list ∗RdsSegmentList;
64 rdsrec_list ∗ScanSegment;
65 mbkenv();
66 rdsenv();
67 loadrdsparam();
68 /∗ creates MbkFigure Named "core" ∗/
69 MbkFigure = addphfig("core");
70 /∗ creates RdsFigure named "core_2" ∗/
71 RdsFigure = addrdsfig("core_2",sizeof(UserStruct));
72 /∗ adds Mbk instance "n1_y" to MbkFigure named "core" ∗/
73 MbkInstance = addphins(MbkFigure,"n1_y","inv_1",NOSYM,4,9);
74 /∗ Gets Model of instance n1_y ∗/
75 MbkModelInstance = getphfig("n1_y",'A');
76 /∗ creates Rds instance named "block_1" added to RdsFigure ∗/
77 RdsInstance =
78 addrdsins(RdsFigure,"block","block_1",RDS_NOSYM,8,6);
79 /∗
80 adds segments of "inv_1" instance Mbk in Rds instance
81 named "block_1"
82 ∗/
83 RdsSegmentList = inssegmbkrds ( MbkInstance,
84 MbkModelInstance,
85 RdsInstance,0 );
86 viewrdsrec ( RdsSegmentList );
87 for ( ScanSegment = RdsSegmentList->USER ;
88 ScanSegment != RdsSegmentList ;
89 ScanSegment = ScanSegment->USER )
90 {
91 viewrdsrec ( (rdsrec_list ∗) ScanSegment );
92 }
93 }
94
96 librfm, librds, loadrdsparam
97
98
99
100
101
102
103ASIM/LIP6 October 1, 1997 INSSEGMBKRDS(3)