Overview
| Comment: | Initial aliasing code - but need to pass cbg via arg list |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | origin/master | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
50b3a5acb694a022eeb2f63a64cdf54e |
| User & Date: | gawthrop@users.sourceforge.net on 2003-03-14 14:19:04.000 |
| Other Links: | branch diff | manifest | tags |
Context
|
2003-03-14
| ||
| 14:30:39 | Tidied up some ifs check-in: 40f6806b38 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
| 14:19:04 | Initial aliasing code - but need to pass cbg via arg list check-in: 50b3a5acb6 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
| 14:03:28 | Fixed error message check-in: cacc8a5875 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/m/mtt_component_eqn.m
from [6345e1c4b6]
to [8798014c1c].
| ︙ | ︙ | |||
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
## Port -- the port of the component to which it is connected.
##
[Name,name] = mtt_subname(fullname); # Split fullname
SD = "__"; # Subsystem delimiter
CD = "\n%%"; # Comment delimiter
DEBUG = 0;
if DEBUG
disp("=======================================");
fullname, name, Name, port,causality,known
endif
eqn="## No equation -- something wrong"; # Default
if length(known)<2 # Invalid
known = " ";
endif
| > > | > | > > > > > > > | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
## Port -- the port of the component to which it is connected.
##
[Name,name] = mtt_subname(fullname); # Split fullname
SD = "__"; # Subsystem delimiter
CD = "\n%%"; # Comment delimiter
arg_default = "1"; # Default aliased arg
DEBUG = 0;
if DEBUG
disp("=======================================");
fullname, name, Name, port,causality,known
endif
eqn="## No equation -- something wrong"; # Default
if length(known)<2 # Invalid
known = " ";
endif
if length(Name)>0
cbg = mtt_cbg(Name); # Structure for this subsystem
endif
if struct_contains (cbg, "ports")
## Combine ports with the other subsystems
for [component_structure, component] = cbg.ports
eval(sprintf("cbg.subsystems.%s=cbg.ports.%s;",component,component));
endfor
endif
## Aliasing
if length(name)>0
eval(sprintf("ARG=cbg.subsystems.%s.arg;", name)); # Arguments
ARG = mtt_alias (Name,ARG,arg_default); # Alias them
eval(sprintf("cbg.subsystems.%s.arg=ARG;", name)); # and copy
endif
## Call to a subsystem (represented by name="")
if strcmp(name,"")
if !struct_contains(cbg,"portlist")
N_ports = 0;
else
|
| ︙ | ︙ |