Skip to main content

SetCoderPortCount

SetCoderPortCount

SetCoderPortCount(obj, target) => GroupAction

This code changes the size of the Encoder/Decoder object based on how many inputs/ouputs are entered. The number of inputs (decoder) or outputs (encoder) are increased by 2 to the power of the number of inputs/outputs chosen. Ex.) output count chosen = 3, then the number of inputs changes to 2^3 or 8 for an encoder. The actual size of the object is also changed accordingly.

Parameters

  •  obj: Encoder | Decoder – The encoder/decoder to change.

  •  target: number – The target number of outputs/inputs.

Returns

  •   GroupAction – An action that changes the objects ports.