Data Sheet

Table Of Contents
43
bit encoding) starting from CorruptPayload4bBitOffset and
length of 0x03 bits). This field will be processed if
CorruptPayload4b is PD_TRUE.
Default: 0x00
CorruptPaylaod4bValue
Byte stream. Defines the value to be replaced with the Payload
(before 5-bit encoding) data. The offset and length of replacing
data should be defined using CorruptPayload4bBitOffset and
CorruptPaylaod4bBitLen fields. This field will be processed if
CorruptPayload4b field is PD_TRUE.
Default: 0x00
CorruptPyload5bSymbolIndex
Indicates the symbol index (starting from 0) of 5-bit encoded
Payload data to be corrupted (e.g. index 0 will corrupt the first 5-
bit symbol in Payload data). This field will be processed if
CorruptPayload5b field is PD_TRUE.
Default: 0x00
CorruptPyload5bSymbolValue
Indicates the corrupted 5-bit symbol to be replaced with the 5-bit
symbol indicated by CorruptPyload5bSymbolIndex. Will be
processed if CorruptPayload5b field is PD_TRUE.
Default: 0x00
NoEop
Indicates whether to insert EOP in the packet or not.
Default: PD_FALSE
CorruptEop
Indicates whether to corrupt EOP in th packet or not.
Default: PD_FALSE
CorruptedEopSymbol
COrrupted EOP symbol to be replaced with EOP in the packet. This
field will be processed if CorruptEop field is PD_TRUE.
Result
None
Examples
$GetSinkCapsPacket = PD_GetSinkCapMessage
{
PortPowerRole_CablePlug = 1
}
$corrupted_send_settings = PD_SendCorruptedPacketSettings
{
CorruptCrc4b = PD_TRUE
}
call PD_SendCorruptedPacket($GetSinkCapsPacket, $corrupted_send_settings)
4.4 PD_ReceivePacket
Receives a packet from device. You can specify the packet type using its settings.
Format
Call PD_ReceivePacket( PD_ReceivePacketSettings $receive_Settings )
Parameters
$receive_Settings
Settings for receiving packet. The structure type should be PD_ReceivePacketSettings.
Table below shows this structure in detail:
Field Name
Description
OrderedSetType
Ordered set type for receiving message. Possible values:
PD_ORDERED_SET_TYPE_SOP(default)
PD_ORDERED_SET_TYPE_SOP_PRIME
PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME
PD_ORDERED_SET_TYPE_HARDRESET
PD_ORDERED_SET_TYPE_CABLERESET