Overview
Comment:Revised to use ordered lists of subsystems and ports
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 7e28516b8e4e6dacd0e54f8f2e5bcf22e49f95c3c7ca0a5cb4b838515d3509cd
User & Date: gawthrop@users.sourceforge.net on 1998-09-02 11:14:23
Other Links: branch diff | manifest | tags
Context
1998-09-02
11:35:20
Removed port.index field check-in: 5ee7c259c9 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
11:14:23
Revised to use ordered lists of subsystems and ports check-in: 7e28516b8e user: gawthrop@users.sourceforge.net tags: origin/master, trunk
10:30:30
Now writes out list of ports ans list of subsystems.
These ordereded lists determine the order of processing of ports ans
subsystems.
check-in: 7428a2fda5 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/m/cbg2ese.m from [2ea9ad400f] to [b78d61b0f4].

19
20
21
22
23
24
25




26
27
28
29
30
31
32
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36







+
+
+
+







# Structure matrix [states,nonstates,inputs,outputs,zero_outputs]

# ###############################################################
# ## Version control history
# ###############################################################
# ## $Id$
# ## $Log$
# ## Revision 1.29  1998/08/25 09:22:34  peterg
# ## Correctely recognises port SSs its now easy -- they are in there own
# ## field
# ##
# ## Revision 1.28  1998/08/25 08:31:42  peterg
# ## Fixed bug - didn't find the ports - use deblank
# ##
# ## Revision 1.27  1998/08/25 07:16:49  peterg
# ## Modified to data struture representation
# ##
# ## Revision 1.26  1998/08/24 14:53:55  peterg
192
193
194
195
196
197
198
199

200

201
202

203
204
205
206





207
208


209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
196
197
198
199
200
201
202

203
204
205
206
207
208




209
210
211
212
213


214
215
216
217
218
219
220
221


222
223
224
225
226
227
228







-
+

+


+
-
-
-
-
+
+
+
+
+
-
-
+
+






-
-








  if (length(system_cr)==0)
    mtt_info(sprintf("No cr given so no cr aliasing done for system %s(%s)",\
		     system_name,system_type), infofilenum);
  endif;


  fields=["ports";"subsystems"];	# Do for both ports and subsystems -
  fields=["ports";"subsystems"]; # Do for both ports and subsystems -
				# ports first
  lists=["portlist";"subsystemlist"];
  for i=1:2
    field=deblank(fields(i,:));
    list=deblank(lists(i,:));
    if struct_contains(CBG,field);
      eval(["CBG_field = CBG.",field, ";"]);
      for [subsystem,comp_name] = CBG_field
i,comp_name
    if struct_contains(CBG,list);
      eval(["namelist=CBG.",list,";"]); # List of ports/subsystems
      [N,M]=size(namelist);	# Number of ports/subsystems
      for j=1:N
      	comp_name = deblank(namelist(j,:)); # Name of this component
				#comp = nozeros(components(i,:));
    	comp = subsystem.connections;
	eval(["subsystem=CBG.",field,".",comp_name,";"]); # Pluck out the details
    	comp = subsystem.connections; # Connections
    	bond_list = abs(comp);
    	direction = sign(comp)'*[1 1];
				# Convert from arrow orientated to component orientated causality
    	comp_bonds = CBG.bonds(bond_list,:).*direction;
	
    	disp(["---- ", field, " ---"]);    
				# Get the component details
				#eval([ "[comp_type,comp_name,cr,args,repetitions] = ", cmp_name, "(i)"]);
    	
				# Alias the args list -- if not at top level
    	message = sprintf("\tfor component  %s (%s) within %s",\
			  comp_name,subsystem.type,full_name);    
    	if struct_contains(CBG,"alias")
	  subsystem.arg = alias_args(subsystem.arg,CBG.alias,";",message,infofilenum)
	  subsystem.cr = alias_args(subsystem.cr,CBG.alias,";",message,infofilenum)


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]