Overview
Comment:Allows port SS at top level - ie takes it to be an ardianry SS at top
level.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 87eb8b25dc97dbb3d7746b007e28a0dc4f2e24f8bd9168e1637e11a874002804
User & Date: gawthrop@users.sourceforge.net on 1996-12-07 17:10:48
Other Links: branch diff | manifest | tags
Context
1996-12-07
17:17:40
Added some ; check-in: fe3cbf057e user: gawthrop@users.sourceforge.net tags: origin/master, trunk
17:10:48
Allows port SS at top level - ie takes it to be an ardianry SS at top
level.
check-in: 87eb8b25dc user: gawthrop@users.sourceforge.net tags: origin/master, trunk
1996-12-05
12:39:49
Documentation check-in: 827e829554 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/m/abg2cbg.m from [44d0261bf2] to [2795ee140c].

12
13
14
15
16
17
18




19
20
21
22
23
24
25
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29







+
+
+
+







% [bonds,status] = abg2cbg(system_name, system_type, full_name, port_bonds, infofile)

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.10  1996/12/04 21:48:55  peterg
% %% Compares full-name with empty string (instead of testing for zero
% %% length.
% %%
% %% Revision 1.9  1996/08/30  12:55:40  peter
% %% More heirachical stuff added.
% %%
% %% Revision 1.8  1996/08/26  10:04:25  peterg
% %% Fixed error due to a line wrap.
% %%
% %%Revision 1.7  1996/08/16  12:58:58  peter
54
55
56
57
58
59
60



61
62
63
64

65
66
67
68
69
70
71
72
73
74

75
76
77
78
79
80
81
58
59
60
61
62
63
64
65
66
67
68
69
70

71
72
73
74
75
76
77
78
79
80

81
82
83
84
85
86
87
88







+
+
+



-
+









-
+







if nargin<4
  port_bonds = [];
end;

if nargin<5
  infofile = 'stdout';
end;

% Are we at the top level of the heirarchy?
at_top_level = strcmp(full_name, '');

% Create a file to contain shell commands which map subsystem types 
% onto components
if strcmp(full_name, '') % Then at top level
if at_top_level % Then at top level
  fprintf(typefile, '# Commands to map types onto subsystems\n');
  fprintf(typefile, '# File %s_type.sh\n', system_name);
  fprintf(typefile, '# Generated by MTT on %s\n\n', date);
end;

full_name
length(full_name)

% Create the (full) system name
if strcmp(full_name, '')
if at_top_level
  full_name = system_name;
  system_type = system_name;
else
  full_name = [full_name, '_', system_name];
end;

% Add to file to contain shell commands which map subsystem types 
104
105
106
107
108
109
110


111
112


113
114
115
116
117
118
119
120
121
122










123
124
125
126
127
128
129
111
112
113
114
115
116
117
118
119


120
121
122









123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139







+
+
-
-
+
+

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







 
% Find number of components
[n_components,columns] = size(components);
if n_components==0 % there is nothing to be done
  return
end;

% If not at top level, then sort out the port bonds.
if !at_top_level 
% Find number of port bonds
[n_port_bonds,columns] = size(port_bonds);
  % Find number of port bonds
  [n_port_bonds,columns] = size(port_bonds);

% Check compatibility - if ok copy port bonds to the internal bonds list.
if n_port_bonds~=n_ports
  mtt_info(sprintf('%1.0f port bonds incompatible with %1.0f ports', ...
      n_port_bonds, n_ports), infofile);
else % Copy the port bonds
  for i = 1:n_ports      % The port SSs come first
    j = abs(components(i,1)); % Get the bonds attached to the ports
    direction = -sign(components(i,1)); 
    bonds(j,:) = direction*port_bonds(i,:);
  % Check compatibility - if ok copy port bonds to the internal bonds list.
  if n_port_bonds~=n_ports
    mtt_info(sprintf('%1.0f port bonds incompatible with %1.0f ports', ...
	n_port_bonds, n_ports), infofile);
  else % Copy the port bonds
    for i = 1:n_ports      % The port SSs come first
      j = abs(components(i,1)); % Get the bonds attached to the ports
      direction = -sign(components(i,1)); 
      bonds(j,:) = direction*port_bonds(i,:);
    end;
  end;
end;


% Set initial status
status = -ones(n_components,1);
total = 2*n_bonds;


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