GetPorts - MapleSim Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : MapleSim : MapleSim Application Programming Interface : API Commands : MapleSim/LinkModel/GetPorts

GetPorts

get the signal ports of the active MapleSim subsystem

 

Calling Sequence

Parameters

Returns

Options

Description

Examples

Calling Sequence

A := MapleSim:-LinkModel();

A:-GetPorts(options)

Parameters

options

-

(optional) equation(s) of the form name = value

Returns

• 

list,list : lists of the active subsystem's ports: [InputPorts], [OutputPorts]

Options

• 

toplevel : true or false

  

Specifies whether the top-level ports should be returned regardless of the active subsystem setting.  Default is false.

• 

returnacausal : true or false

  

Specifies whether to also return possibly present active subsystem's acausal ports. If set to true, the procedure's return will be of the form list,list,list : [InputPorts], [OutputPorts], [AcausalPorts]. AcausalPorts is a list of lists, where each list describes ports for one acausal port and is of the form [flow variable, across variable]. Default is false.

Description

• 

A:-GetPorts returns lists of A's active subsystem's input and output ports and optionally, acausal ports. If no subsystem is active, or the option toplevel is specified, the command returns an empty list of the inputs and a list of A's probe names for the outputs.

• 

The A := MapleSim:-LinkModel() statement needs to be run prior to successfully using any of the ModelObject A's export functions.

Examples

Linking to a MapleSim model (located in .msim file):

AMapleSim:-LinkModel'filename'=catkernelopts'toolboxdir'=MapleSim,/data/examples/RLCcircuit.msim:

Getting the signal ports of the active subsystem (you are at the top-level):

A:-GetPorts

,Main.Probe1.Voutt

(1)

Setting the active subsystem an RLC circuit subsystemq:

A:-SetSubsystemNameRLC

Getting the signal ports of the RLC subsystem:

A:-GetPorts

Main.RLC.InputSignalt,Main.RLC.OutputSignalt

(2)

See Also

MapleSim

MapleSim[LinkModel]

MapleSim[LinkModel][SetSubsystemName]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam