8.3.3.3. Impairment Custom Distribution

This module contains the impairment custom distribution commands.


class PEC_INDICES[source]

Bases: object

The full list of which custom distributions which are defined for a port. These are the custom id values that are used for assigning the custom distributions to an impairment. Setting the value of this command creates a new custom distribution (default values) for each value that is not already in use, and deletes each custom distribution that is not mentioned in the list. The same can be accomplished one-custom-distribution-at-a-time using the PEC_VAL and PEC_DELETE commands.

Note

Custom distributions which are currently defined are not affected when mentioned in a PEC_INDICES set command. Custom distributions which are currently assigned to an impairment cannot be deleted and any attempt of deleting such a custom distribution using either PEC_DELETE` or PEC_INDICES` will result in an error.

get()[source]

Get a list of the indices to the custom distributions which are currently defined on that port.

Returns:

a list of the indices to the custom distributions which are currently defined on that port

Return type:

PEC_INDICES.GetDataAttr

set(indexations)[source]

Set a list of indices to create new custom distributions.

Parameters:

indexations (List[int]) – a list of indices to create new custom distributions

class PEC_VAL[source]

Bases: object

Definition of custom distribution. Custom distributions can be defined for latency with 1024 entries and for non-latency impairments with 512 entries. Each port will maintain a list of defined custom distributions, identified by an CUST_ID. (Range: 1 - 40).

get()[source]

Get the definition of custom distribution.

Returns:

definition of custom distribution

Return type:

PEC_VAL.GetDataAttr.

set(linear, symmetric, entry_count, data_x)[source]

Set the definition of custom distribution. Custom distributions can be defined for latency with 1024 entries and for non-latency impairments with 512 entries. Each port will maintain a list of defined custom distributions, identified by an CUST_ID. (Range: 1 - 40).

Parameters:
  • linear (OnOff) – defines the way the FPGA RAM content is played out

  • symmetric (OnOff) – reserved for future use, must be set to 0.

  • entry_count (int) – defines the number of entries in “data_x” (allowed value: 512,1024). For Latency, 1024 entries are used, and for rest, 512 entries are used.

  • data_x (List[int]) – array size equals to “entry_count”, holds values to be filled in the RAM memory.

class PEC_COMMENT[source]

Bases: object

Defines the user-defined description string of a custom distribution.

get()[source]

Get the user-defined description string of a custom distribution.

Returns:

the user-specified comment/description for the custom distribution.

Return type:

PEC_COMMENT.GetDataAttr

set(comment)[source]

Set the user-defined description string of a custom distribution.

Parameters:

comment (str) – the user-specified comment/description for the custom distribution.

class PEC_DELETE[source]

Bases: object

Deletes the custom distribution definition.

Note

Once a customer has defined a customer distribution using PEC_VAL, it is defined until it is explicitly deleted. Only customer distributions which are not referenced by any impairments, can be deleted.

set()[source]

Deletes the custom distribution definition.

class PEC_DISTTYPE[source]

Bases: object

Retrieves if a custom distribution is defined for latency or non-latency.

Note

Using PEC_DISTTYPE as set has no effect. The distribution type is determined upon custom distribution creation and cannot be modified later. However, it is legal to issue the PEC_DISTTYPE set command with no effect.

get()[source]

Get the latency type of a custom distribution.

Returns:

latency type of a custom distribution

Return type:

PEC_DISTTYPE.GetDataAttr