Mux Entity

API Documentation: [cpp] [python] [.NET] [CCA] [REST]

A MUX is a multiplexer that takes one or more similar inputs (bus, connection, or signal) and allows switching to one or more outputs. An analogy would be the switchboard of a telephone operator. Calls (inputs) come in and by re-connecting the input to an output, the operator (multiplexer) can direct that input to one or more outputs.

One possible output is to not connect the input to anything which essentially disables that input’s connection to anything. Not every MUX has multiple inputs.

Some mux entities can simply be a single input that can be enabled (connected to a single output) or disabled (not connected to anything).

Channel (Set/Get)

mux [ index ] . setChannel => (unsigned char) channel
mux [ index ] . getChannel <= (unsigned char) channel

Gets/Sets the currently selected channel

Enable/Disable (Set/Get)

mux [ index ] . setEnable => (unsigned char) enable
mux [ index ] . getEnable <= (unsigned char) enable

Enables/Disables the mux.

Get Channel Voltage (Get)

mux [ index ] . getChannelVoltage <= ((unsigned char) channel, (unsigned char) voltage)

Returns the voltage of the supplied channel.

Configuration (Get/Set)

mux [ index ] . getConfiguration <= (unsigned char) configuration
mux [ index ] . setConfiguration => (unsigned char) configuration

Gets or sets the mux operating configuration (for example default routing, split mode, or port-priority behavior on products that support it). Product-specific option values and bit layouts are described in each module’s documentation.

Split Mode (Get/Set)

mux [ index ] . getSplitMode <= (unsigned int) split_mode
mux [ index ] . setSplitMode => (unsigned int) split_mode

After split-style configuration is enabled on supported hardware, the split mode word defines how functional groups are assigned to mux channels. See the product datasheet for field definitions.

Data Direction (Get/Set)

mux [ index ] . getDataDirection <= (unsigned char) direction
mux [ index ] . setDataDirection => (unsigned char) direction

Gets or sets which port is the host. Direction is used with protocols that need a host side, such as DisplayPort and USB4.

Data Direction Options

Value

Name

Description

0

Automatic

Automatic direction selection

1

ComToMux

Data flows from the Common port to the Mux port (host on Common)

2

MuxToCom

Data flows from the Mux port to the Common port (host on Mux)

Code Examples

C++

// All commands return aErr values when errors are encountered and aErrNone on
// success. Get calls will fill the variable with the returned value.

err = stem.mux[0].getChannel(&channel);
err = stem.mux[0].setChannel(1);
err = stem.mux[0].setEnable(1);
err = stem.mux[0].setEnable(0);
err = stem.mux[0].getChannel(1, &voltage);
err = stem.mux[0].setChannel(3);

Python

result = stem.mux[0].getChannel(&channel);
print result.value
err = stem.mux[0].setChannel(1)
err = stem.mux[0].setEnable(1)
err = stem.mux[0].setEnable(0)
voltage = stem.mux[0].getChannel(1)
print voltage.value
err = stem.mux[0].setChannel(3)