![]() ![]() BRAHMS
User Guide » Developing Systems » Quick Start » Add Subsystem
This documentation is offline - click here to go online
Index | Search: Go online to use Search
| ||
OverviewAt times, it may be useful to package a collection of processes and links into a Subsystem, for inclusion in larger systems. This has the advantage of convenient packaging, but can also offer encapsulation of the operation of a Subsystem under some interface. Building a Subsystem is exactly like building a system; in fact, it only really becomes a Subsystem when you add it to a larger system. Procedure
Example![]() ScriptThis example, along with the others in this section, can be found in the script M Source Code (against 995)
% section header
disp
sml_system addsubsystem std/2009/resample/numeric 'addprocess link the output of sys/dst to the input of resamp
psys link brahms Expected OutputNote that the outputs of Matlab Console
=== Add Subsystem ===
--------------------------------
SystemML System
--------------------------------
['Parent System']
--------------------------------
["sys", 'untitled']
"src" (std/2009/source/numeric)
"dst" (std/2009/resample/numeric)
==> src>out ==> dst
--------------------------------
"resamp" (std/2009/resample/numeric)
==> sys/dst>out ==> resamp
--------------------------------
out =
sys: [1x1 struct]
resamp: [1x1 struct]
ans =
src: [1x1 struct]
dst: [1x1 struct]
ans =
out: [1 2 3 4 5 6 7 8 9 10]
ans =
out: [0 0.42857 1.8571 3.2857 4.7143 6.1429 7.5714]
ans =
out: [0 0 0 0.042857 0.34286 1.1429 2.1429 3.1429 4.1429 5.1429]
|
||
This is a documentation page for the BRAHMS Modular Execution (Simulation) Framework. For details of licensing and distribution, please click here. To advise of an error or omission, please click here. |