pec_commands module
This module contains the impairment custom distribution commands.
Port (Impairment) Custom Distribution Commands
- class PEC_COMMENT[source]
Bases:
objectDefines the user-defined description string of a custom distribution.
- class GetDataAttr[source]
Bases:
ResponseBodyStruct- comment
string, the user-specified comment/description for the custom distribution.
- class SetDataAttr[source]
Bases:
RequestBodyStruct- comment
string, the user-specified comment/description for the custom distribution.
- class PEC_DELETE[source]
Bases:
objectDeletes 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.
- class PEC_DISTTYPE[source]
Bases:
objectRetrieves 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.
- class GetDataAttr[source]
Bases:
ResponseBodyStruct- latency_type
byte, 0 indicates interpacket distribution, 1 indicates latency distribution.
- class PEC_INDICES[source]
Bases:
objectThe 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.
- class GetDataAttr[source]
Bases:
ResponseBodyStruct- indexations
list of integers, a list of the indices to the custom distributions which are currently defined on that port, max 40 elements.
- class SetDataAttr[source]
Bases:
RequestBodyStruct- indexations
list of integers, a list of the indices to the custom distributions which are currently defined on that port, max 40 elements.
- class PEC_VAL[source]
Bases:
objectDefinition 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).
- class GetDataAttr[source]
Bases:
ResponseBodyStruct- data_x
array of long integers, array size=”num_entries”, holds values to be filled in the RAM memory.
- entry_count
integer, defines the number of entries in “dataX” (allowed value: 512,1024). NOTE: For Latency, 1024 entries are used, and for rest, 512 entries are used)
- linear
coded byte, defines the way the FPGA RAM content is played out.
- symmetric
coded byte, reserved for future use, must be set to OFF.
- class SetDataAttr[source]
Bases:
RequestBodyStruct- data_x
array of long integers, array size=”num_entries”, holds values to be filled in the RAM memory.
- entry_count
integer, defines the number of entries in “dataX” (allowed value: 512,1024). NOTE: For Latency, 1024 entries are used, and for rest, 512 entries are used)
- linear
coded byte, defines the way the FPGA RAM content is played out.
- symmetric
coded byte, reserved for future use, must be set to OFF.
- 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.