Marine systems simulation

Select indexed signals from an input vector and output a concatenated vector.

+ Collaboration diagram for Selector:

The selector extracts a set of values form the input signal and outputs them as new signal. The new signal width is defined by the number of values extracted from the input.

Author
Karl Gunnar Aarsæther
Date
20.07.2011 KGA: Initial version.

Example configuration excerpt

<Lib
LibName = "fhsim_base"
SimObject = "Signal/Selector"
Name = "A"
PortWidth = "5"
OutputIndex = "1,3,4"
/>
...
<Connection
A.In = "20,12,34,765,2"
/>

Input Ports

Name Width Description
In <PortWidth> The input signal

Output Ports

Name Width Description
Out Determined by the number of elements in <OutputIndex> The values extracted from the input signal

Configuration parameters

Name Width Description
PortWidth 1

The number of elements in the input and output ports

OutputIndex N List of indexes in the input signal to extract and output (zero-indexed)

Initial conditions

There are no initial conditions for this function.

Full example file

<Contents>
<OBJECTS>
<Lib
LibName="base"
SimObject="Signal/Selector"
Name="A"
PortWidth="5"
OutputIndex="1,3,4"
/>
</OBJECTS>
<INTERCONNECTIONS>
<Connection
A.In="20,12,34,765,2"
/>
</INTERCONNECTIONS>
<INITIALIZATION>
<InitialCondition
/>
</INITIALIZATION>
<INTEGRATION>
<Engine
IntegratorMethod="2"
NumCores="1"
TOutput="0, 1, 30"
LogStates ="1"
stepsize ="0"
HMax="0.002"
HMin="0.00000001"
AbsTol="1e-3" RelTol="1e-3"
UseRSSNormInsteadOfInfNorm="0"
FileOutput="objects:all"
/>
</INTEGRATION>
</Contents>

This SimObject is referred to as Signal/Selector