Skip to content
QiTASC.com / intaQt Built-ins /
Attenuator Built-ins
/ .. /
Attenuator Built-ins





Attenuator Built-ins

Attenuator Built-ins provide Handover Box functionality to the custom intaQt languages. The Handover Boxes block must be configured to use the following methods.

Get Attenuator Box

Defines the handover box.

Syntax

1
<boxName HandoverBox> := Attenuator.getAttenuatorBox(<name Name>)

Returns

The handover box instance.

Parameter

  • name - The name assigned to the handover box in the configuration

Example

1
box := Attenuator.getAttenuatorBox(testBox)

Set Attenuator

Sets the attenuator to specified strength in decibels (dB).

Syntax

1
<boxName HandoverBox>.setAttenuator(<attenuator Number>, <dbValue Number>)

Parameters

  • boxName - The name assigned to the handover box by getAttenuatorBox()

  • attenuator - The number that identifies the attenuator being set

    • This number can be found on the box
  • dbValue - The strength level the attenuator is being set to

    • Must be between 0 and 95 (dB)

Example

1
box.setAttenuator(1, 90)

In the example above, Box 1 is set to 90 decibels.

Fade Attenuator

Allows a single attenuator to fade in strength over a certain period of time.

Syntax

1
2
<boxName HandoverBox>.fadeAttenuator(<attenuator Number>, <startValue Number>,
    <endValue Number>, <duration Number> <stepSize Number>)

Parameters

  • boxName - The name assigned to the handover box by getAttenuatorBox()

  • attenuator - The number that identifies the attenuator being set

  • startValue - The strength in decibels the attenuator starts at

    • Must be between 0 and 95
  • endValue - The strength in decibels the attenuator ends at

    • Must be between 0 and 95
  • duration - The duration of the fade in milliseconds

  • stepSize (Optional) - The incremental change in decibels with each step

    • Default is set to 1
    • Minimum value has to be > 0
    • For example, if starting at 90 decibels and fading to 70 with a step size of 2, the decibels would begin as: 90, 88, 86, 84, ...

Example

1
box.fadeAttenuator(1, 90, 70, 10000, 2)

Variable Handover

Simulates the handover between cells by decreasing one attenuator strength level while increasing the value of the second one.

Syntax

1
2
<boxName HandoverBox>.handover(<attenuator1 Number>, <dbValue1 Number>,
    <attenuator2 Number>, <dbValue2 Number>, <intervalMillis Number>)

Parameters

  • boxName - The name assigned to the handover box by getAttenuatorBox()

  • attenuator1 - The first attenuator used in the handover

  • dbValue1 - The strength level in decibels that attenuator1 reaches at the end of the handover

    • Must be between 0 and 95
  • attenuator2 - The second attenuator used in the handover

  • dbValue2 - The strength level in decibels that attenuator2 reaches at the end of the handover

    • Must be between 0 and 95
  • intervalMillis (Optional) - The duration of the handover in milliseconds

    • Default is set to 500

Example

1
box.handover(1, 0, 2, 95, 1000)

In the example above, attenuator 1 starts at a strength level of 95 dB and reaches 0 by the end of the handover. Attenuator 2 starts at a strength level of 0 dB and reaches 95. The handover duration is 1000 milliseconds.

Read Attenuator

Reads the current attenuator value in decibels.

Syntax

1
<boxName HandoverBox>.readAttenuator(<attenuator Number>)

Parameters

  • boxName - The name assigned to the handover box by getAttenuatorBox()

  • attenuator - The attenuator to read

Example

1
box.readAttenuator(1)

Wait Until Idle

Waits for the attenuator to reach an idle state.

Syntax

1
<boxName HandoverBox>.waitIdle(<timeoutMilliseconds Number>)

Parameters

  • boxName - The name assigned to the handover box by getAttenuatorBox()

  • timeoutMilliseconds - The number of milliseconds to wait for the attenuator to idle

    • Default is set to 10000

Test Case Example

Feature File Example

1
And on handover box myHandOverBox set attenuator 1 to 0

Stepdef Example

1
2
3
4
5
6
7
stepdef "set attenuators to {}" / value /
    box := Attenuator.getAttenuatorBox("rs")

    for i in range(1, 16)
        box.setAttenuator(i, value)
    end
end