Overview
Comment:Explicit computation of port number from string.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 5d29a8dfc601d3daa388d7cb09e73e6b9d0aea5aa45c438b8aca29cf03a613da
User & Date: gawthrop@users.sourceforge.net on 1996-12-05 09:49:09
Other Links: branch diff | manifest | tags
Context
1996-12-05
10:00:49
Initial revision check-in: b535a1196e user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:49:09
Explicit computation of port number from string. check-in: 5d29a8dfc6 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:05:34
Added strcmp test for empty args string. check-in: 3025d1c8ef user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/lib/comp/simple/SS_eqn.m from [a6dcac55ff] to [c916553c94].

15
16
17
18
19
20
21



22
23
24
25
26
27
28

			
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$



% %% Revision 1.4  1996/08/18  20:06:21  peter
% %% Included zero outputs.
% %%
% %% Revision 1.3  1996/08/09 14:08:04  peter
% %% Empty effort and flow attributes replaced by 'external'.
% %%
% %% Revision 1.2  1996/08/08 16:38:19  peter







>
>
>







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

			
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% Version control history
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %% $Id$
% %% $Log$
% %% Revision 1.5  1996/12/04 21:27:53  peterg
% %% Replaced str2num by sprintf
% %%
% %% Revision 1.4  1996/08/18  20:06:21  peter
% %% Included zero outputs.
% %%
% %% Revision 1.3  1996/08/09 14:08:04  peter
% %% Empty effort and flow attributes replaced by 'external'.
% %%
% %% Revision 1.2  1996/08/08 16:38:19  peter
57
58
59
60
61
62
63

64

65
66
67
68
69
70
71


inputs = structure(3);
outputs = structure(4);
zero_outputs = structure(5);

if strcmp(effort_attribute, 'MTT_port') % Its a numbered port

  port_number = sprintf('%1.0f',flow_attribute);

  % Effort 
  if bonds(1,1)==-1 % Source
    fprintf(filenum, '%s := %s_MTTu%1.0f;\n', ...
        varname(name, bond_number,1), name, port_number);
  else % Sensor
    fprintf(filenum, '%s_MTTy%1.0f := %s;\n', ...
        name, port_number, varname(name, bond_number,1));







>
|
>







60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76


inputs = structure(3);
outputs = structure(4);
zero_outputs = structure(5);

if strcmp(effort_attribute, 'MTT_port') % Its a numbered port
  % Convert string to number
  port_number = abs(flow_attribute)-abs('0');

  % Effort 
  if bonds(1,1)==-1 % Source
    fprintf(filenum, '%s := %s_MTTu%1.0f;\n', ...
        varname(name, bond_number,1), name, port_number);
  else % Sensor
    fprintf(filenum, '%s_MTTy%1.0f := %s;\n', ...
        name, port_number, varname(name, bond_number,1));


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