Engee documentation

Bus Creator

Forms a bus from signals of different types.

blockType: BusCreator

Path in the library:

/Basic/Signal Routing/Bus Creator

Description

The Bus Creator block combines a set of input elements into a bus. All types of elements can be connected to the input ports, including other buses. The bus elements can be accessed using the block Bus Selector.

The output port of the Bus Creator block can only be connected to the input port of the block Bus Selector

Bus elements must have unique names. By default, each bus element inherits the name of the element connected to the block Bus Creator. If duplicate names are present, the Bus Creator block adds the port number to all input element names. For elements that have no names, the Bus Creator block generates names of the form signaln, where n is the port number connected to the element. You can refer to items by name when searching for their sources or selecting items to connect to other blocks.

For more information about bus types, see Custom Bus Types.

Ports

Output

# OUT_1 — output bus
bus

Details

The output bus consists of input elements.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool.

Complex numbers support

No

Input

# IN — input element for inclusion in the bus
scalar | vector | matrix | bus

Details

Input ports of the block receive elements for inclusion in the bus. The number of input ports is determined by the parameters Number of inputs.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool

Complex numbers support

No

Parameters

Main

# Number of inputs — number of elements in the input bus

Details

The number of input elements must be an integer greater than or equal to `2'. Increasing the value of this parameter adds empty input ports to the block. Before you simulate the model, make sure that the input element is connected to each input port.

When changing the parameter Number of inputs Click the Refresh button to update the list of items.

Default value

2

Program usage name

Inputs

Tunable

No

Evaluatable

Yes

# Output data type — output bus data type
Inherit: auto | BusSignal

Details

Specify the data type of the output bus.

To programmatically set the value of the block parameter, use the function engee.set_param!.

Values

Inherit: auto | BusSignal

Default value

Inherit: auto

Program usage name

OutDataTypeStr

Tunable

No

Evaluatable

No

# Output bus type — type of output bus
Data type

Details

Describes the type of bus that the unit outputs.

You can set the type yourself or enter the name of a variable that stores a type that has already been created in the workspace.

Dependencies

To use this parameter, set for the parameter Output data type meaning BusSignal.

Default value

BusSignal((), (), ())

Program usage name

OutDataTypeStrBus

Tunable

No

Evaluatable

Yes

Additional options

C code generation: Yes

Examples