v10.50 v10.55 Alpha v10.54 Alpha v10.53 Alpha v10.52 Alpha v10.51 Alpha
v10.50 v10.55 Alpha v10.54 Alpha v10.53 Alpha v10.52 Alpha v10.51 Alpha

Transaction Engine

The Power Delivery Transaction Engine™ includes high level commands and auto response capability.

High Level Commands

PD_SetWorkingRevision

Sets the Exerciser working revision along with the specification revision. Call this only once per Exerciser script. The default working revision is PD_SPEC_REVISION_2.

Call PD_SetWorkingRevision( revision )

Parameters

revision

The target revision. Possible values (defaults in bold):

PD_SPEC_REVISION_2

PD_SPEC_REVISION_3

Result: None

Example

Call PD_SetWorkingRevision( PD_SPEC_REVISION_3 )

PD_SetNegotiationSetting_Source

Applies settings to power negotiation-related commands as a Source in PD Exerciser. To change default settings for Source Power Negotiation, call this function before calling PD_NegotiatePower_Source or PD_NegotiatePower or PD_WaitForNegotiatePower.

Call PD_SetNegotiationSetting_Source( PD_Negotiation_Source_Settings $settings )

Parameters

$settings

Defines negotiation settings for source. Type is PD_Negotiation_Source_Settings template, shown below:

Field Name

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

The wait timeout (microseconds) to receive Request/EPRRequest Message.

NegotiationResponse

PD_NEGOTIATION_ACCEPT

PD_NEGOTIATION_WAIT

PD_NEGOTIATION_REJECT

The response type.

SourceCapsRetryCount

DEFAULT_SOURCE_CAPS_RETRY_COUNT

Source capabilities retry count.

VBusVoltage_mv

VBUS_VOLTAGE_V5_SAFE

VBUS voltage in millivolts.

SourceCapMsgSpecRev

PD_INVALID_VALUE

Or other user-defined value

If the value is not PD_INVALID_VALUE, the SourceCap Message in the Negotiation sequence will be transferred using this Specification Revision.

AutoSpecRev

PD_FALSE

PD_TRUE

Rev3.0 only

Whether or not the Exerciser should detect the Specification Revision automatically from the Negotiation process.

AutoUnchunkedSupport

PD_FALSE

PD_TRUE

Rev3.0 only

Whether or not the Exerciser should detect the Un-chunked Support automatically from the Negotiation sequence.

SkipNegotiationResponse

PD_TRUE

PD_FALSE

Prevents the source from sending a response back to request in the negotiation.

SendAcceptDelay

0

The delay (microseconds) to send ACCEPT message.

SendPSRDYDelay

0

The delay (microseconds) to send PS_RDY message.

SkipHardResetOnError

PD_TRUE

PD_FALSE

Skip sending Hard Reset during power negotiation.

Note: If you set the VBusVoltage_mv, the PD Exerciser will set VBusVoltage_mv on the VBUS regardless of the actual voltage value the UUT selected during the negotiation process. Otherwise, the Exerciser will set the VBUS using the voltage the UUT selected during the negotiation process.

Note: To apply voltages greater than 5V, select the Allow VBUS > 5v checkbox in Recording Options.

Result: None

Examples

#set negotiation using default values
$settings = PD_Negotiation_Source_Settings
call PD_SetNegotiationSetting_Source( $settings )

#set negotiation using reject as response
$settings
{
	NegotiationResponse = PD_NEGOTIATION_REJECT
}
call PD_SetNegotiationSetting_Source( $settings )

PD_AddSourceCap

Adds a specified Source Capability to the PD Exerciser. Before adding a group of source caps, make sure that there is no unwanted source cap in the list by calling PD_ResetSourceCaps. Must be called before calling PD_NegotiatePower_Source, PD_NegotiatePower, or PD_WaitForNegotiatePower to take effect.

Note: By default there is one predefined source cap (vSafe5V) in the list.

Call PD_AddSourceCap(PD_PowerDataObject $PowerDataObject)

Parameters

$PowerDataObject

Type is PD_PowerDataObject. See PD_SourceCapabilitiesMessage for available source power data objects.

Packet PD_GetSinkCapExtendedMsg: PD_ControlMessage

{
 MessageType = PD_MESSAGE_TYPE_GET_SNK_CAP_EXT
}

Result: None

Example

local $power_data_object = PD_PowerDataObjectFixedSupply_Source
{
	MaxCurrent_10mAUnits = 20
	Voltage_50mVUnits = 250
}
call PD_AddSourceCap($power_data_object)

PD_ResetSourceCaps

Clears all Source Capabilities defined in PD Exerciser. Should be called before calling PD_AddSourceCap.

Call PD_ResetSourceCaps()

Parameters: None

Result: None

Examples

call PD_ResetSourceCaps()

PD_NegotiatePower_Source

Tries to establish an explicit contract as Source.

Note: PD_ResetSourceCaps, PD_AddSourceCap, and PD_SetNegotiationSetting_Source might need to be called before calling this function.

Call PD_NegotiatePower_Source()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_REQUEST_MSG_INVALID_INDEX

Subresult: Invalid index in request message

PD_SUBRESULT_RESPONSE_WAIT

Subresult: Wait message has been sent as Request message response

PD_SUBRESULT_RESPONSE_REJECT

Subresult: Reject message has been sent as Request message response

Example

call PD_NegotiatePower_Source()

PD_SetNegotiationSetting_Sink

Applies power negotiation settings as Sink. Call this function before calling PD_NegotiatePower_Sink, PD_NegotiatePower, PD_WaitForNegotiatePower, or PD_DelayAutoResponse for it to take effect.

Call PD_SetNegotiationSetting_Sink( PD_Negotiation_Sink_Settings $settings )

Parameters

$settings

Type is PD_Negotiation_Sink_Settings, shown below:

Field Name

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) to receive SourceCapabilities Message.

ActiveSinkCapPos

PD_SNK_CAP_POS_AUTO_ASC

PD_SNK_CAP_POS_AUTO_DESC

PD_SNK_CAP_POS_UNDEFINED

1..7

Which added Sink Capability by PD_AddSinkCap should be used to update current/power and USBCommunicationCapable fields in RequestRDO.

When set to a number between 1 to 7, the correspond Sink Cap is used to update RequestRDO field.

When set to PD_SNK_CAP_POS_AUTO_ASC, the first Sink Cap matching the received Source Caps is selected automatically.

When set to PD_SNK_CAP_POS_AUTO_DESC, the last Sink Cap matching the received Source Caps is selected automatically.

When set to PD_SNK_CAP_POS_UNDEFINED, RequestRDO is left unchanged.

RequestRDO

0x00000000

The RDO which is used in the Request message.

It might be updated based on the value set in ActiveSinkCapPos.

EPRActiveSinkCapPos

PD_SNK_CAP_POS_AUTO

PD_SNK_CAP_POS_UNDEFINED

1..6

Which added Sink Capability by PD_AddEPRSinkCap should be used to update current/ power and USBCommunicationCapable fields in EPRRequestRDO.

When set to a number between 1 to 6, the correspond Sink Cap is used to update EPRRequestRDO.

When set to PD_SNK_CAP_POS_AUTO, the first Sink Cap matching the received Source Caps is selected automatically.

When set to PD_SNK_CAP_POS_UNDEFINED, EPRRequestRDO is left unchanged.

EPRRequestRDO

0x00000000

The RDO which is used in the EPRRequest message.

It might be updated based on the value set in EPRActiveSinkCapPos.

EPRRequestPDO

0x00000000

The PDO used in the EPRequest message.

If zero, the PDO is automatically set based on the selected Source Cap.

RetryCountOnWait

2

The retry count upon receiving Wait Message after sending the Request.

RetryDelayOnWait

100000 us

The delay time before retrying the Request, upon receiving Wait Message.

RequestMsgSpecRev

PD_INVALID_VALUE

User-defined value

If the value is not PD_INVALID_VALUE, the Request message in Negotiation sequence will be transferred using this Specification Revision.

ExTriggerOnAccept

PD_FALSE

PD_TRUE

Indicates whether or not to send External Trigger Out on receiving Accept message.

In M310e, it triggers connected Load Box through RS232 port.

ExTriggerOnPSRDY

PD_FALSE

PD_TRUE

Indicates whether or not to send External Trigger Out on receiving PS_RDY message.

In M310e, it triggers connected Load Box through RS232 port.

AutoSpecRev

PD_FALSE

PD_TRUE

Rev3.0 only

Whether or not the Exerciser should detect the Specification Revision automatically from the Negotiation process.

AutoUnchunkedSupport

PD_FALSE,

PD_TRUE

Rev3.0 only

Whether or not the Exerciser should detect the Un-chunked Support automatically from Negotiation sequence.

SendRequestDelay

0

The delay (microseconds) to send Request message.

SkipHardResetOnError

PD_TRUE

PD_FALSE

Skips sending Hard Reset during power negotiation.

ExTriggerDelay

0

The delay (microseconds) to send External Trigger Out. Related to ExTriggerOnAccept and ExTriggerOnPSRDY settings.

Result: None

Example

#Set sink negotiation settings as default
$settings = PD_Negotiation_Sink_Settings
call PD_SetNegotiationSetting_Sink( $settings )

PD_AddSinkCap

Adds Sink Capabilities to PD Exerciser. Before adding a group of sink caps, make sure that there is no unwanted sink cap in the list by calling PD_ResetSinkCaps. Must be called before calling PD_NegotiatePower_Sink, PD_NegotiatePower, PD_WaitForNegotiatePower, or PD_DelayAutoResponse to take effect.

Note: By default there is one predefined sink cap in the list.

Call PD_AddSinkCap(PD_PowerDataObject $PowerDataObject)

Parameters

$PowerDataObject

Type is PD_PowerDataObject. See PD_SPRPowerDataObjectAVS PD_SinkCapabilitiesMessage for available sink power data objects.

Packet PD_SPRPowerDataObjectAVS : PD_PowerDataObject
{
  MaxCurrent9To15VRange_10mAUnits :10=0
  MaxCurrent15To20VRange_10mAUnits :10=0
  SPRAVS_Rsvd_1 :6=0
  PeakCurrent :2=0
  APDOType :2=2    
  PowerDataType :2=3
}

Result: None

Example

local $power_data_object = PD_PowerDataObjectFixedSupply_Sink
{
	OperationalCurrent_10mAUnits = 50
	Voltage_50mVUnits = 100
}
call PD_AddSinkCap($power_data_object)

PD_ResetSinkCaps

Clears all Sink Capabilities defined for PD Exerciser. Should be called before calling PD_AddSinkCap.

Call PD_ResetSinkCaps()

Parameters: None

Result: None

Example

call PD_ResetSinkCaps()

PD_NegotiatePower_Sink

Tries to establish explicit contract as Sink by sending a Request message.

Note: PD_ResetSinkCaps, PD_AddSinkCap, and PD_SetNegotiationSetting_Sink might need to be called before calling this function.

Call PD_NegotiatePower_Sink()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_REJECT

Subresult: Reject received as the response

PD_SUBRESULT_RESPONSE_WAIT

Subresult: Wait received as the response

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: PS_RDY message not received.

Example

call PD_NegotiatePower_Sink()

PD_WaitForNegotiatePower

Tries to establish explicit contract either as Source or Sink according to the current PD Exerciser power role. If the current power role of PD Exerciser is Source, this command will wait to receive Request message and if the current power role of PD Exerciser is Sink, it will wait to receive Source_Capabilities message.

Note: If the PD Exerciser is operating as Source, PD_ResetSourceCaps, PD_AddSourceCap, and PD_SetNegotiationSetting_Source might need to be called before calling this function. If the PD Exerciser is operating as Sink, PD_ResetSinkCaps, PD_AddSinkCap, and PD_SetNegotiationSetting_Sink might need to be called before calling this function.

Call PD_WaitForNegotiatePower()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received

PD_SUBRESULT_RESPONSE_REJECT

Subresult: Reject message received as the response

PD_SUBRESULT_RESPONSE_WAIT

Subresult: Wait message received as the response

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: Request(PD Exerciser as Source)/Source_Capabilities(PD Exerciser as Sink) message not received or PS_RDY message not received(PD Exerciser as Sink)

Example

call Pd PD_WaitForNegotiatePower()

PD_NegotiatePower

Negotiates power with the peer port according to PD Exerciser current power role. If PD Exerciser operates as Source, this function starts power negotiation as Source and if the PD Exerciser operates as Sink, this function starts power negotiation as Sink (will wait to receive Request message).

Note: If the PD Exerciser is operating as Source, PD_ResetSourceCaps, PD_AddSourceCap, and PD_SetNegotiationSetting_Source might need to be called before calling this function. If the PD Exerciser is operating as Sink, PD_ResetSinkCaps, PD_AddSinkCap, and PD_SetNegotiationSetting_Sink might need to be called before calling this function.

Call PD_NegotiatePower()

Parameters: None

Result: If PD Exerciser operates as this Source, this function returns the same sub-results as PD_NegotiatePower_Source. If the PD Exerciser operates as Sink, this function returns the same sub-results as PD_NegotiatePower_Sink.

Example

Call PD_NegotiatePower()

PD_SetSwapPowerRoleSetting

Must be called before calling PD_SwapPowerRole, PD_WaitForSwapPowerRole, or PD_DelayAutoResponse to take effect.

Call PD_SetSwapPowerRoleSetting( Pd_SwapPowerRole_Settings $settings )

Parameters

$settings

Type is Pd_SwapPowerRole_Settings, shown below:

Field Name

Possible Values (defaults in bold)

Description

SwapResponse

PD_MESSAGE_TYPE_ACCEPT

PD_MESSAGE_TYPE_WAIT

PD_MESSAGE_TYPE_REJECT

PD_RESPONSE_NOT_SUPPORTED (PD3.0 only)

Defines the response type.

SkipSwap

PD_TRUE

PD_FALSE

If set to PD_TRUE, PD_SwapPowerRole AMS will not swap the power role.

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Timeout (microseconds) to wait to receive the PR_SWAP message.

RetryCountOnWait

2

The retry count after receiving Wait message in response to sent PR_Swap Message.

RetryDelayOnWait

100000

The retry delay time (microseconds) upon receiving Wait message in response to sent PR_Swap Message.

SwapResponseOnWait

PD_MESSAGE_TYPE_ACCEPT

PD_MESSAGE_TYPE_WAIT

PD_MESSAGE_TYPE_REJECT

PD_RESPONSE_NOT_SUPPORTED (PD3.0 only)

Defines the response type in a case that the DUT initially responded to PR_Swap message with a Wait message and after a while issued a PR_Swap message towards the PD Exerciser.

SkipSendingPSRDY

PD_TRUE

PD_FALSE

If set to PD_TRUE, PD_SwapPowerRole AMS will not send the PS_RDY message.

NewSrcRpType

CC_RP_CUR_DEFAULT

CC_RP_CUR_1_5

CC_RP_CUR_3_0

The Rp current value when swapping from Sink to Source.

SendPSRDYDelay

0

The delay (microseconds) to send PS_RDY message.

SkipWaitingForVBus

PD_TRUE

PD_FALSE

If set to PD_TRUE, will skip waiting for VBus On/Off operations.

NoGoodCRCToPSRDY

PD_TRUE

PD_FALSE

If set to PD_TRUE, PD_SwapPowerRole AMS will not send the GoodCRC for PS_RDY message.

SkipPowerNegotiation

PD_TRUE

PD_FALSE

If set to PD_TRUE, will skip power negotiation after the power swap.

Result: None

Example

#Set response to REJECT;
#Set response on receiving Wait message to ACCEPT;
#Set Rp type while swapping to source as CC_RP_CUR_3_0;
$settings = Pd_SwapPowerRole_Settings
{
	SwapResponse = PD_MESSAGE_TYPE_REJECT
	SwapResponseOnWait = PD_MESSAGE_TYPE_ACCEPT
	NewSrcRpType = CC_RP_CUR_3_0
}
call PD_SetSwapPowerRoleSetting( $settings )

PD_SwapPowerRole

Tries to swap power role. Starts the Swap Power Role AMS.

Note: PD_SetSwapPowerRoleSetting might need to be called before calling this function.

Call PD_SwapPowerRole()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: Response not received

PD_SUBRESULT_RESPONSE_REJECT

Subresult: Reject message received as response

PD_SUBRESULT_RESPONSE_WAIT

Subresult: Wait message received as response

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: PS_RDY message not received(PD Exerciser as Sink)

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Rev3.0 only

Subresult: Not_Supported message received as response

Example

call PD_SwapPowerRole()

PD_WaitForSwapPowerRole

Waits to receive PR_Swap message and responds to incoming messages as part of the Swap Power Role AMS.

Note: PD_SetSwapPowerRoleSetting might need to be called before calling this function.

Call PD_WaitForSwapPowerRole()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_WAIT

Subresult: Wait message has been sent as response

PD_SUBRESULT_RESPONSE_REJECT

Subresult: Reject message has been sent as response

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: PR_Swap message not received or PS_RDY message not received (PD Exerciser as Sink)

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Rev3.0 only

Subresult: Not_Supported message has been sent as response

Example

call PD_WaitForSwapPowerRole()

Pd_SetFRSwapNewSnkSetting

Rev3.0 only

Must be called before calling PD_FastRoleSwap to take effect.

Call Pd_SetFRSwapNewSnkSetting( Pd_FRSwapNewSnkSettings $fr_swap_settins )

Parameters

$fr_swap_settins

Type is Pd_FRSwapNewSnkSettings, shown below:

Field Name

Possible Values (defaults in bold)

Description

NoGoodCRCToPSRDY

PD_TRUE

PD_FALSE

Indicates whether or not to send a GoodCRC message to receiving PS_RDY message.

SkipSendingPSRDY

PD_TRUE

PD_FALSE

Indicates whether or not to skip sending PS_RDY message.

NoGoodCRCToFRSwap

PD_TRUE

PD_FALSE

Indicates whether or not to send a GoodCRC message to receiving FR_Swap message.

SkipSendingAccept

PD_TRUE

PD_FALSE

Indicates whether or not to skip sending Accept message.

Result: None

Example

$settings = Pd_FRSwapNewSnkSettings
{
	NoGoodCRCToFRSwap = PD_TRUE
}
call Pd_SetFRSwapNewSnkSetting( $settings )

Pd_SetFRSwapNewSrcSetting

Rev3.0 only

Must be called before calling PD_WaitForFRSwapSignal or PD_DelayAutoResponse to take effect.

Call Pd_SetFRSwapNewSrcSetting( Pd_FRSwapNewSrcSettings $fr_swap_settins )

Parameters

$fr_swap_settings

Type isPd_FRSwapNewSrcSettings, shown below:

Field Name

Possible Values (defaults in bold)

Description

NoGoodCRCToPSRDY

PD_TRUE

PD_FALSE

Indicates whether or not to send a GoodCRC message to receiving PS_RDY message.

SkipSendingPSRDY

PD_TRUE

PD_FALSE

Indicates whether or not to skip sending PS_RDY message.

VBusVoltageThreshold_mV

VBUS_VOLTAGE_V5_SAFE_MAX

If the VBUS drops below this value, the new Source (PD Exerciser) will turn on the VBUS.

NewVBusVoltage_mV

VBUS_VOLTAGE_V5_SAFE

PD Exerciser as new Source will increase the VBUS voltage up to this value.

FRSwapSignalWaitTimeout

1000000

Timeout to wait for receiving the FR_Swap Signal (microseconds).

FRSwapNewSrcRpCurrent

CC_RP_CUR_1_5

PD Exerciser as new Source will apply this RpCurrent value.

NoGoodCrcToAccept

PD_TRUE

PD_FALSE

Indicates whether or not to send a GoodCRC message to receiving Accept message.

Result: None

Example

$settings = Pd_FRSwapNewSrcSettings
{
	VBusVoltageThreshold_mV = VBUS_VOLTAGE_V5_SAFE
	NoGoodCrcToAccept = PD_TRUE
}
call Pd_SetFRSwapNewSrcSetting( $settings )

PD_FastRoleSwap

Rev3.0 only

Sends the FastRoleSwap Signal and handles Fast Role Swap AMS.

Note: Pd_SetFRSwapNewSnkSetting might need to be called before calling this function.

Call PD_FastRoleSwap()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded.

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

Example

Call PD_FastRoleSwap()

PD_WaitForFRSwapSignal

Rev3.0 only

Waits for a specified time to receive the FR_Swap Signal. Handles any received messages during this time.

Note: Received FastRoleSwap Signal is handled automatically by the FastRoleSwap Event Handler.

Note: Pd_SetFRSwapNewSrcSetting might need to be called before calling this function.

Call PD_WaitForFRSwapSignal()

Parameters: None

Result: None

Example

Call PD_WaitForFRSwapSignal()

Pd_GetPPSStatus

Rev3.0 only

Sends Get_PPS_Status message and starts the GetPPSStatus AMS.

Call Pd_GetPPSStatus()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: Response not received

PD_SUBRESULT_UNEXPECTED_MSG_RECEIVED

Subresult: Unexpected packet received

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Rev3.0 only

Subresult: Not_Supported has been received as response

Example

Call Pd_GetPPSStatus()

Pd_SetGetPPSStatusSetting

Rev3.0 only

Must be called before calling Pd_WaitForGetPPSStatus or PD_DelayAutoResponse to take effect.

Call PD_SetGetPPSStatusSetting( PD_GetPPSStatus_Settings $settings )

Parameters

$settings

Type is PD_GetPPSStatus_Settings, shown below:

Field Names

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) to receive Get_PPS_Status message.

ResponseType

PD_RESPONSE_NOT_SUPPORTED

PD_RESPONSE_UNSPECIFIED

Response upon receiving the Get_PPS_Status message.

Result: None

Example

$get_ppsstatus_setting = PD_GetPPSStatus_Settings
{
	ResponseType = PD_RESPONSE_NOT_SUPPORTED
}
Call PD_SetGetPPSStatusSetting( $get_ppsstatus_setting )

Pd_SetPPSStatusDataBlock

Rev3.0 only

Sets the PPS Status Data Block in PD Exerciser. Must be called before Pd_WaitForGetPPSStatus or PD_DelayAutoResponse to take effect.

Call PD_SetPPSStatusDataBlock( PD_PPSStatusDataBlock $pps_status_db )

Parameters

$pps_status_db

Type is PD_PPSStatusDataBlock. See PD_PPSStatusMsg for available fields.

Result: None

Example

$pps_status_db = PD_PPSStatusDataBlock
Call PD_SetPPSStatusDataBlock( $pps_status_db )

Pd_ResetPPSStatusDataBlock

Rev3.0 only

Clears the PPS Status Data Block in PD Exerciser. Call before calling Pd_SetPPSStatusDataBlock.

Call PD_ResetPPSStatusDataBlock()

Parameters: None

Result: None

Example

Call PD_ResetPPSStatusDataBlock()

Pd_WaitForGetPPSStatus

Rev3.0 only

Waits for a user-defined timeout to receive Get_PPS_Status message. Responds to incoming messages as part of the GetPPSStatus AMS.

Note: Pd_ResetPPSStatusDataBlock, Pd_SetPPSStatusDataBlock, and Pd_SetGetPPSStatusSetting might need to be called before calling this function.

Call PD_WaitForGetPPSStatus( )

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: Get_PPS_Status message not received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message sent as response.

Example

Call PD_WaitForGetPPSStatus()

Pd_SetPPSNegotiationSetting_Sink

Rev3.0 only

Applies power negotiation settings as a Sink communicating with a PPS Source. To change the default settings for Sink Power Negotiation, call this before Pd_StartPPSNegotiatePower_Sink and Pd_NextPPSNegotiatePower_Sink. Not supported by PD_DelayAutoResponse.

Call PD_SetPPSNegotiationSetting_Sink( PD_PPSNegotiation_Sink_Settings $settings )

Parameters

$settings

Type is PD_PPSNegotiation_Sink_Settings. Additional fields shown below:

Field Name

Default Values

Description

MinOutputVolt_20mVUnits

0x00

Min output voltage in 20mV units. Output Voltage will be increased from this value. See PD_ProgrammableRDO.

MaxOutputVolt_20mVUnits

0x00

Max output voltage in 20mV units. Output Voltage will be decreased from this value. See PD_ProgrammableRDO.

OperatingCur_50mAUnits

0x00

See PD_ProgrammableRDO.

UnchunkedExtMsgSupported

1

See PD_ProgrammableRDO.

NoUsbSuspend

0

See PD_ProgrammableRDO.

UsbCommunicationsCapable

0

See PD_ProgrammableRDO.

CapabilityMismatch

0

See PD_ProgrammableRDO.

ObjectPosition

0

See PD_ProgrammableRDO.

VoltageStep_20mVUnits

0x01

Voltage Step in 20mV units.

IncrementalStep

PD_TRUE (increasing)

Whether the Voltage is increasing or decreasing.

Result: None

Example

#Set pps negotiation sink settings
$pps_nego_settings = Pd_PPSNegotiation_Sink_Settings
{
 MinOutputVolt_20mVUnits = 500
 MaxOutputVolt_20mVUnits = 500
 OperatingCur_50mAUnits = 10
 ObjectPosition = 1
 VoltageStep_20mVUnits = 2
 IncrementalStep = PD_FALSE
}
call Pd_SetPPSNegotiationSetting_Sink($pps_nego_settings)

Pd_StartPPSNegotiatePower_Sink

Rev3.0 only

Starts PPS Power Negotiation as Sink. Should be called before Pd_NextPPSNegotiatePower_Sink.

Note: Pd_SetPPSNegotiationSetting_Sink might need to be called before calling this function.

Call PD_StartPPSNegotiatePower_Sink()

Parameters: None

Result: See PD_NegotiatePower_Sink.

Example

call Pd_StartPPSNegotiatePower_Sink()
PD_Loop(10)
{ 
 call Pd_NextPPSNegotiatePower_Sink()
 call PD_DelayAutoResponse(100000)
}

Pd_NextPPSNegotiatePower_Sink

Rev3.0 only

Next PPS Power Negotiation as Sink with incremented or decremented output voltage value. Should be called after Pd_StartPPSNegotiatePower_Sink.

Note: Pd_SetPPSNegotiationSetting_Sink might need to be called before calling this function.

Call PD_NextPPSNegotiatePower_Sink()

Parameters: None

Result: See PD_NegotiatePower_Sink.

Example

call Pd_StartPPSNegotiatePower_Sink()
PD_Loop(10)
{ 
 call Pd_NextPPSNegotiatePower_Sink()
 call PD_DelayAutoResponse(100000)
}

PD_SetDataResetSetting

Rev3.0 only

Must be called before calling PD_WaitForDataReset or PD_DelayAutoResponse to take effect.

Call Pd_SetDataResetSetting( Pd_DataReset_Settings $settings )

Parameters

$settings

Type is PD_DataReset_Settings, shown below:

Field Names

Possible Values (defaults in bold)

Description

DataResetWaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) to receive the Pd_DataResetMessage.

DataResetResponse

PD_RESPONSE_REJECT

PD_RESPONSE_ACCEPT

Response upon receiving the Pd_DataResetMessage.

SkipSendingPSRDY

PD_TRUE

PD_FALSE

Skips sending PSRdy packet.

RunningUSBExercisers

PD_USB2_EXERCISER

PD_USB3_EXERCISER

PD_USB4_EXERCISER

PD_TBT3_EXERCISER

Exercisers to be run in the Data Reset process.

SkipErrorRecovery

PD_TRUE

PD_FALSE

Skips Error Recovery.

SkipComplete

PD_TRUE,

PD_FALSE

Skips Completion.

Result: None

Example

$send_data_reset = PD_DataReset_Settings
{
 DataResetResponseType = PD_RESPONSE_REJECT
 RunningUSBExercisers = PD_USB2_EXERCISER | PD_USB3_EXERCISER
}
Call PD_SetDataResetSetting( $send_data_reset )

PD_SendDataReset

Rev3.0 only

Sends Pd_DataResetMessage and starts the DataReset AMS.

Call PD_SendDataReset()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: Response not received

PD_SUBRESULT_UNEXPECTED_MSG_RECEIVED

Subresult: Unexpected message received as response

Example

call PD_SendDataReset()

PD_WaitForDataReset

Waits for a user-defined timeout to receive the Pd_DataResetMessage and responds to incoming messages as part of the DataReset AMS.

Note: PD_SetDataResetSetting might need to be called before calling this function.

Call PD_WaitForDataReset()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: DataReset message not received

PD_SUBRESULT_RESPONSE_REJECT

Subresult: Reject message has been sent as response

Example

call PD_WaitForDataReset()

PD_SetSwapDataRoleSetting

Must be called before PD_SwapDataRole, PD_WaitForSwapDataRole, or PD_DelayAutoResponse to take effect.

Call PD_SetSwapDataRoleSetting( Pd_SwapDataRole_Settings $settings )

Parameters

$settings

Type is Pd_SwapDataRole_Settings, shown below:

Field Name

Possible Values (defaults in bold)

Description

SwapResponse

PD_MESSAGE_TYPE_ACCEPT

PD_MESSAGE_TYPE_REJECT

PD_MESSAGE_TYPE_WAIT

PD_RESPONSE_NOT_SUPPORTED (PD3.0 only)

Defines the response type.

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Time to wait to receive DR_SWAP message.

RetryCountOnWait

2

The retry count after receiving Wait Message in response to sent DR_Swap Message.

RetryDelayOnWait

100000

The retry delay upon receiving Wait Message in response to sent DR_Swap Message.

SwapResponseOnWait

PD_MESSAGE_TYPE_ACCEPT

PD_MESSAGE_TYPE_WAIT

PD_MESSAGE_TYPE_REJECT

PD_RESPONSE_NOT_SUPPORTED (PD3.0 only)

Defines the response type if the DUT initially responds to DR_Swap message with a Wait message and then issues a DR_Swap message towards the PD Exerciser.

Result: None

Example

#Set response to REJECT;
#Set response on receiving Wait message to ACCEPT;
$settings = Pd_SwapDataRole_Settings
{
	SwapResponse = PD_MESSAGE_TYPE_REJECT
	SwapResponseOnWait = PD_MESSAGE_TYPE_ACCEPT
}
call PD_SetSwapDataRoleSetting( $settings )

PD_SwapDataRole

Tries to swap the data role. Starts the Swap Data Role AMS.

Note: PD_SetSwapDataRoleSetting might need to be called before calling this function.

Call PD_SwapDataRole()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: Response not received

PD_SUBRESULT_RESPONSE_REJECT

Subresult: Reject message has been received

PD_SUBRESULT_RESPONSE_WAIT

Subresult: Wait message has been received

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Rev3.0 only

Subresult: Not_Supported message received as response

Example

call PD_SwapDataRole()

PD_WaitForSwapDataRole

Waits for a user-defined timeout to receive DR_Swap message and responds to incoming messages as part of the Swap Data Role AMS.

Note: PD_SetSwapDataRoleSetting might need to be called before calling this function.

Call PD_WaitForSwapDataRole()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_REJECT

Subresult: Reject message has been sent as response

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: DR_Swap message not received

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Rev3.0 only

Subresult: Not_Supported message has been sent as response

Example

call PD_WaitForSwapDataRole()

PD_SetSwapVConnSetting

Must be called before calling PD_SwapVConn, PD_WaitForSwapVConn, or PD_DelayAutoResponse to take effect.

Call PD_SetSwapVConnSetting( Pd_SwapVConn_Settings $settings )

Parameters

$settings

Type is Pd_SwapVConn_Settings, shown below:

Field Name

Possible Values (defaults in bold)

Description

SwapResponse

PD_MESSAGE_TYPE_ACCEPT

PD_MESSAGE_TYPE_REJECT

PD_MESSAGE_TYPE_WAIT

PD_RESPONSE_NOT_SUPPORTED (PD3.0 only)

Defines the response type.

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Time to wait to receive VCONN_SWAP message.

SkipSwap

PD_TRUE

PD_FALSE

If set to PD_TRUE, the command skips VCONN swap.

SkipSendingPSRDY

PD_TRUE

PD_FALSE

If set to PD_TRUE, PD_SwapVConn AMS will not send the PS_RDY message.

RetryCountOnWait

2

The retry count after receiving Wait Message in response to sent VConn_Swap Message.

RetryDelayOnWait

100000

The retry delay upon receiving Wait Message in response to sent VConn_Swap Message.

SwapResponseOnWait

PD_MESSAGE_TYPE_ACCEPT

PD_MESSAGE_TYPE_WAIT

PD_MESSAGE_TYPE_REJECT

PD_RESPONSE_NOT_SUPPORTED (PD3.0 only)

Defines the response type in a case that the DUT initially responded to VConn_Swap message with a Wait message and after a while issued a VConn_Swap message towards the PD Exerciser.

VConnVoltage_mV

PD_INVALID_VALUE

0 - 5.5 V

If set to PD_INVALID_VALUE, 5V is sourced for VCONN.

Result: None

Example

#Set the response to REJECT;
#skip swapping in the case that PD Exerciser is initiator;
$settings = Pd_SwapVConn_Settings
{
	SwapResponse = PD_MESSAGE_TYPE_REJECT
	SkipSwap = PD_TRUE
}
call PD_SetSwapVConnSetting( $settings )

PD_SwapVConn

Tries to swap VCONN. Starts the Swap VConn AMS.

Note: PD_SetSwapVConnSetting might need to be called before calling this function.

Call PD_SwapVConn()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: Response not received

PD_SUBRESULT_RESPONSE_REJECT

Subresult: Reject message has been received

PD_SUBRESULT_RESPONSE_WAIT

Subresult: Wait message has been received

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: PS_RDY message not received(PD Exerciser as VCONN Source)

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Rev3.0 only

Subresult: Not_Supported message message has been received

Example

call PD_SwapVConn()

PD_WaitForSwapVConn

Waits for a user-defined timeout to receive VCONN_Swap message and respods to incoming messages as part of the Swap VConn AMS.

Note: PD_SetSwapVConnSetting might need to be called before calling this function.

Call PD_WaitForSwapVConn()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: VCONN_Swap message not received

PD_SUBRESULT_RESPONSE_WAIT

Subresult: Wait message has been sent as response

PD_SUBRESULT_RESPONSE_REJECT

Subresult: Reject message has been sent as response

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Rev3.0 only

Subresult: Not_Supported message has been sent as response

Example

call PD_WaitForSwapVConn()

PD_SetGotoMinSetting

Must be called before calling PD_WaitForGotoMin or PD_DelayAutoResponse to take effect.

Call PD_SetGotoMinSetting( PD_GotoMin_Settings $settings )

Parameters

$settings

Type is PD_GotoMin_Settings, shown below:

Field Name

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) for receiving GotoMin message.

ResponseType

PD_RESPONSE_UNSPECIFIED

PD_RESPONSE_NOT_SUPPORTED

The response type upon receiving GotoMin message.

Result: None

Example

$gotomin_setting = PD_GotoMin_Settings
{
	ResponseType = PD_RESPONSE_NOT_SUPPORTED
}
Call PD_SetGotoMinSetting( $gotomin_setting )

PD_GotoMin

Starts the GotoMin AMS.

Call PD_GotoMin()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket are also valid (depends on the error type which has been occurred during sending data).

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Rev3.0 only

Subresult: Not_Supported message has been received

Example

call PD_GotoMin()

PD_WaitForGotoMin

Waits for a user-defined timeout to receive theGotoMin message and responds to incoming messages as part of the GotoMin AMS.

Note: PD_SetGotoMinSetting might need to be called before calling this function.

Call PD_WaitForGotoMin()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: GotoMin or PS_RDY message not received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Rev3.0 only

Subresult: Not_Supported message has been sent as response

Example

call PD_WaitForGotoMin()

PD_SetGetSourceCapSetting

Must be called before calling PD_WaitForGetSourceCapabilities or PD_DelayAutoResponse to take effect.

Call PD_SetGetSourceCapSetting( PD_GetSourceCapability_Settings $settings )

Parameters

$settings

Type is PD_GetSourceCapability_Settings, shown below:

Field Name

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) for receiving GetSourceCap message.

ResponseType

PD_RESPONSE_UNSPECIFIED

PD_RESPONSE_NOT_SUPPORTED

The response type upon receiving GetSourceCap message.

SkipNegotiationAsSink

PD_FALSE

PD_TRUE

Enables the sink to skips negotiation after receiving SourceCap message.

Result: None

Example

$getsrccap_setting = PD_GetSourceCapability_Settings
{
	ResponseType = PD_RESPONSE_NOT_SUPPORTED
}
Call PD_SetGetSourceCapSetting( $getsrccap_setting )

PD_GetSourceCapabilities

Starts GetSourceCapabilities AMS.

Call PD_GetSourceCapabilities()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No messages received as response

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Rev3.0 only

Subresult: Not_Supported message received as response

Example

Call PD_GetSourceCapabilities()

PD_WaitForGetSourceCapabilities

Waits for a user-defined timeout to receive Get_Source_Cap message. Responds to incoming messages as part of the Get_Source_Cap AMS.

Note: PD_SetGetSourceCapSetting might need to be called before calling this function.

Call PD_WaitForGetSourceCapabilities()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: Get_Source_Cap message not received

PD_SUBRESULT_REQUEST_MSG_INVALID_INDEX

Subresult: Invalid index in request message

PD_SUBRESULT_RESPONSE_WAIT

Subresult: Wait message has been sent as request message response

PD_SUBRESULT_RESPONSE_REJECT

Subresult: Reject message has been sent as request message response

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Rev3.0 only

Subresult: Not_Supported message has been sent as response

Example

Call PD_WaitForGetSourceCapabilities()

PD_SetGetSinkCapSetting

Must be called before calling PD_WaitForGetSinkCapabilities or PD_DelayAutoResponse to take effect.

Call PD_SetGetSinkCapSetting( PD_GetSinkCapability_Settings $settings )

Parameters

$settings

Type is PD_GetSinkCapability_Settings, shown below:

Field Name

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) for receiving GetSourceCap message.

ResponseType

PD_RESPONSE_UNSPECIFIED

PD_RESPONSE_NOT_SUPPORTED

The response type upon receiving GetSourceCap message.

NoGoodCRCToSnkCap

PD_FALSE

PD_TRUE

Prevents the source device from sending GoodCRC for the SinkCap messages.

Result: None

Example

$getsnkcap_setting = PD_GetSinkCapability_Settings
{
	ResponseType = PD_RESPONSE_NOT_SUPPORTED
}
Call PD_SetGetSinkCapSetting( $getsnkcap_setting )

PD_GetSinkCapabilities

Starts the GetSinkCapabilities AMS.

Call PD_GetSinkCapabilities()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_REJECT

Subresult: Reject message received as response

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No messages received as response

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Rev3.0 only

Subresult: Not_Supported message received as response

Example

Call PD_GetSinkCapabilities()

PD_WaitForGetSinkCapabilities

Waits for a user-defined timeout to receive Get_Sink_Cap message. Responds to incoming messages as part of the GetSinkCapabilities AMS.

Note: PD_SetGetSinkCapSetting might need to be called before calling this function.

Call PD_WaitForGetSinkCapabilities()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: Get_Sink_Cap message not received.

PD_SUBRESULT_RESPONSE_REJECT

Subresult: Reject message has been sent as response.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Rev3.0 only

Subresult: Not_Supported message has been sent as response

Example

Call PD_WaitForGetSinkCapabilities()

PD_SendBISTCarrierMode

Starts BISTCarrierMode AMS.

Call PD_SendBISTCarrierMode(OrderedSetType)

Parameters

OrderedSetType

The Ordered Set type. Possible values:

PD_ORDERED_SET_TYPE_SOP

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed

Example

Call PD_SendBISTCarrierMode(PD_ORDERED_SET_TYPE_SOP)

PD_SendBISTTestData

Starts the BISTTestData AMS.

Call PD_SendBISTTestData( OrderedSetType, PD_BISTTestData $test_data )

Parameters

OrderedSetType

The Ordered Set type. Possible values:

PD_ORDERED_SET_TYPE_SOP

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

$test_data

The Test Data to be sent to the UUT

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket are also valid (depends on the error type which has been occurred during sending data).

Example

$test_data = PD_BISTTestData
{
  TestData = { 00 00 00 00
              AA AA AA AA
              AA AA 00 00
              AA AA AA AA
              00 00 AA AA
              AA AA AA AA }
}

Call PD_SendBISTTestData( PD_ORDERED_SET_TYPE_SOP_PRIME, $test_data )

PD_GetSourceCapExtended

Rev3.0 only

Starts the GetSourceCapExtended AMS.

Call PD_GetSourceCapExtended()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message received.

Example

Call PD_GetSourceCapExtended()

PD_SetGetSrcCapExtSetting

Rev3.0 only

Must be called before calling PD_WaitForGetSrcCapExtended or PD_DelayAutoResponse.

Call PD_SetGetSrcCapExtSetting( PD_GetSourceCapExtented_Settings $settings )

Parameters

$settings

Type is PD_GetSourceCapExtented_Settings, shown below:

Field Names

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) to receive the Get_Source_Cap_Extended message.

ResponseType

PD_RESPONSE_NOT_SUPPORTED

PD_RESPONSE_UNSPECIFIED

Response upon receiving the Get_Source_Cap_Extended message.

SkipSrcCapExt

PD_TRUE

PD_FALSE

Whether or not to skip sending the Source_Capabilities_Extended message.

SendSrcCapExtDelay

0

The delay before sending the Source_Capabilities_Extended message.

Result: None

Example

$getsrccapext_setting = PD_GetSourceCapExtented_Settings
{
	ResponseType = PD_RESPONSE_NOT_SUPPORTED
}
Call PD_SetGetSrcCapExtSetting( $getsrccapext_setting )

PD_WaitForGetSrcCapExtended

Rev3.0 only

Waits for a user-defined timeout to receive Get_Source_Cap_Extended message. Responds to incoming messages as part of the GetSourceCapExtended AMS.

Note: PD_SetGetSrcCapExtSetting, PD_SetSrcCapExtDataBlock, and PD_ResetSrcCapExtDataBlock might need to be called before calling this function.

Call PD_WaitForGetSrcCapExtended()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: Get_Source_Cap_Extended message not received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message sent as response.

Example

Call PD_WaitForGetSrcCapExtended()

PD_SetSrcCapExtDataBlock

Rev3.0 only

Sets the Source Capabilities Extended Data Block in PD Exerciser. Must be called before calling PD_WaitForGetSrcCapExtended or PD_DelayAutoResponse to take effect.

Call PD_SetSrcCapExtDataBlock( PD_SourceCapExtDataBlock $src_cap_ext )

Parameters

$src_cap_ext

Type is PD_SourceCapExtDataBlock. See PD_SourceCapExtendedMsg for available data fields.

Result: None

Example

$src_cap_ext = PD_SourceCapExtDataBlock
Call PD_SetSrcCapExtDataBlock( $src_cap_ext )

PD_ResetSrcCapExtDataBlock

Rev3.0 only

Clears the Source Capabilities Extended Data Block in PD Exerciser. Should be called before calling PD_SetSrcCapExtDataBlock.

Call PD_ResetSrcCapExtDataBlock()

Parameters: None

Result: None

Example

Call PD_ResetSrcCapExtDataBlock()

PD_GetStatus

Rev3.0 only

Starts the GetStatus AMS.

Call PD_GetStatus()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message received.

Example

Call PD_GetStatus()

PD_SetGetStatusSetting

Rev3.0 only

Must be called before calling PD_WaitForGetStatus or PD_DelayAutoResponse to take effect.

Call PD_SetGetStatusSetting( PD_GetStatus_Settings $settings )

Parameters

$settings

Type is PD_GetStatus_Settings, shown below:

Field Names

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) to receive Get_Status message.

ResponseType

PD_RESPONSE_NOT_SUPPORTED

PD_RESPONSE_UNSPECIFIED

Response upon receiving the Get_Status message.

Result: None

Example

$getstatus_setting = PD_GetStatus_Settings
{
	ResponseType = PD_RESPONSE_NOT_SUPPORTED
}
Call PD_SetGetStatusSetting( $getstatus_setting )

PD_WaitForGetStatus

Rev3.0 only

Waits for a user-defined timeout to receive Get_Status message. Responds to incoming messages as part of the GetStatus AMS.

Note: PD_SetGetStatusSetting, PD_SetStatusDataBlock, and PD_ResetStatusDataBlock might need to be called before calling this function.

Call PD_WaitForGetStatus( )

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: Get_Status message not received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message sent as response.

Example

Call PD_WaitForGetStatus()

PD_SetStatusDataBlock

Rev3.0 only

Sets the Status Data Block in PD Exerciser. Must be called before calling PD_WaitForGetStatus or PD_DelayAutoResponse to take effect.

Call PD_SetStatusDataBlock( PD_StatusDataBlock $status_db )

Parameters

$status_db

Type is PD_StatusDataBlock. See PD_StatusMsg for available fields.

Result: None

Example

$status_db = PD_StatusDataBlock
Call PD_SetStatusDataBlock( $status_db )

PD_ResetStatusDataBlock

Rev3.0 only

Clears the Status Data Block in PD Exerciser. Should be called before calling PD_SetStatusDataBlock.

Call PD_ResetStatusDataBlock()

Parameters: None

Result: None

Example

Call PD_ResetStatusDataBlock()

PD_GetBatteryStatus

Rev3.0 only

Starts the GetBatteryStatus AMS.

Note: PD_SetGetBatteryStatusDataBlock might need to be called before calling this function.

Call PD_GetBatteryStatus()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message received.

Example

Call PD_GetBatteryStatus()

PD_SetGetBatteryStatusDataBlock

Rev3.0 only

Sets the GetBatteryStatus Data Block in PD Exerciser. Must be called before PD_GetBatteryStatus to take effect.

Call PD_SetGetBatteryStatusDataBlock( PD_GetBatteryStatusDataBlock $get_battery_stat_db )

Parameters


$get_battery_stat_db

Type is PD_GetBatteryStatusDataBlock. See PD_GetBatteryStatusMsg for available fields.

Result: None

Example

$get_battery_stat_db = PD_GetBatteryStatusDataBlock
Call PD_SetGetBatteryStatusDataBlock( $get_battery_stat_db )

PD_SetGetBatteryStatusSetting

Rev3.0 only

Must be called before calling PD_WaitForGetBatteryStatus or PD_DelayAutoResponse to take effect.

Call PD_SetGetBatteryStatusSetting( PD_GetBatteryStatus_Settings $settings )

Parameters

$settings

Type is PD_GetBatteryStatus_Settings, shown below:

Field Names

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) to receive Get_Battery_Status message.

ResponseType

PD_RESPONSE_NOT_SUPPORTED

PD_RESPONSE_UNSPECIFIED

Response upon receiving the Get_Battery_Status message.

Result: None

Example

$getbattstatus_setting = PD_GetBatteryStatus_Settings
{
	ResponseType = PD_RESPONSE_NOT_SUPPORTED
}
Call PD_SetGetBatteryStatusSetting( $getbattstatus_setting )

PD_WaitForGetBatteryStatus

Rev3.0 only

Waits for a user-defined timeout to receive the Get_Battery_Status message. Responds to incoming messages as part of the GetBatteryStatus AMS.

Note: PD_SetGetBatteryStatusSetting, PD_SetBatteryStatusDO, and PD_ResetBatteryStatusDO might need to be called before calling this function.

Call PD_WaitForGetBatteryStatus()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: Get_Battery_Status message not received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message sent as response.

Example

Call PD_WaitForGetBatteryStatus()

PD_SetBatteryStatusDO

Rev3.0 only

Sets the BatteryStatus Data Object in PD Exerciser. Must be called before calling PD_WaitForGetBatteryStatus or PD_DelayAutoResponse to take effect.

Call PD_SetBatteryStatusDO( PD_BatteryStatusDataObject $battery_status )

Parameters

$battery_status

Type is PD_BatteryStatusDataObject. See PD_BatteryStatusMsg for available fields.

Result: None

Example

$battery_status = PD_BatteryStatusDataObject
Call PD_SetBatteryStatusDO( $battery_status )

PD_ResetBatteryStatusDO

Rev3.0 only

Clears the BatteryStatus Data Object in PD Exerciser. Should be called before calling PD_SetBatteryStatusDO.

Call PD_ResetBatteryStatusDO()

Parameters: None

Result: None

Example

Call PD_ResetBatteryStatusDO()

PD_Alert

Rev3.0 only

Starts the Alert AMS.

Note: PD_SetAlertDO might need to be called before calling this function.

Call PD_Alert()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket are also valid (depends on the error type which has been occurred during sending data).

Example

Call PD_Alert()

PD_SetAlertDO

Rev3.0 only

Sets the Alert Data Object in PD Exerciser. Must be called before calling PD_Alert to take effect.

Call PD_SetAlertDO( PD_AlertDataObject $alert_do )

Parameters

$alert_do

Type is PD_AlertDataObject. See PD_AlertMsg for available fields.

Result: None

Example

$alert_do = PD_AlertDataObject
Call PD_SetAlertDO( $alert_do )

PD_SetAlertSetting

Rev3.0 only

Must be called before calling PD_WaitForAlert or PD_DelayAutoResponse to take effect.

Call PD_SetAlertSetting( PD_Alert_Settings $settings )

Parameters

$settings

Type is PD_Alert_Settings, shown below:

Field Names

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) to receive teAlert message.

ResponseType

PD_RESPONSE_NO_RESPONSE

PD_RESPONSE_NOT_SUPPORTED

PD_RESPONSE_UNSPECIFIED

If iset to PD_RESPONSE_UNSPECIFIED, the response will be either a GetStatus or GetBatteryStatus based on the ADO in the received Alert message.

DelayBeforeResponse

0

The delay (microseconds) to send the Response message.

Result: None

Example

$alert_setting = PD_Alert_Settings
{
	ResponseType = PD_RESPONSE_NOT_SUPPORTED
}
Call PD_SetAlertSetting( $alert_setting )

PD_WaitForAlert

Rev3.0 only

Waits for a user-defined timeout to receive the Alert message. Responds to incoming messages as part of the Alert AMS.

Note: PD_SetAlertSetting might need to be called before calling this function.

Call PD_WaitForAlert()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: Alert message not received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message sent as response.

Example

Call PD_WaitForAlert()

PD_GetBatteryCap

Rev3.0 only

Starts the GetBatteryCap AMS.

Note: PD_SetGetBatteryCapDataBlock might need to be called before calling this function.

Call PD_GetBatteryCap()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message received.

Example

Call PD_GetBatteryCap()

PD_SetGetBatteryCapDataBlock

Rev3.0 only

Sets the GetBatteryCap Data Block in PD Exerciser. Must be called before calling PD_GetBatteryCap to take effect.

Call PD_SetGetBatteryCapDataBlock( PD_GetBatteryCapDataBlock $get_battery_cap_db )

Parameters

$get_battery_cap_db

Type is PD_GetBatteryCapDataBlock. See PD_GetBatteryCapMsg for available fields.

Result: None

Example

$get_battery_cap_db = PD_GetBatteryCapDataBlock
Call PD_SetGetBatteryCapDataBlock( $get_battery_cap_db )

PD_SetGetBatteryCapSetting

Rev3.0 only

Must be called before calling PD_WaitForGetBatteryCap or PD_DelayAutoResponse to take effect.

Call PD_SetGetBatteryCapSetting( PD_GetBatteryCap_Settings $settings )

Parameters

$settings

Type is PD_GetBatteryCap_Settings, shown below:

Field Names

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) to receive Get_Battery_Cap message.

ResponseType

PD_RESPONSE_NOT_SUPPORTED

PD_RESPONSE_UNSPECIFIED

Response upon receiving the Get_Battery_Cap message.

Result: None

Example

$getbattcap_setting = PD_GetBatteryCap_Settings
{
	ResponseType = PD_RESPONSE_NOT_SUPPORTED
}
Call PD_SetGetBatteryCapSetting( $getbattcap_setting )

PD_WaitForGetBatteryCap

Rev3.0 only

Waits for a user-defined timeout to receive Get_Battery_Cap message. Responds to incoming messages as part of the GetBatteryCap AMS.

Note: PD_SetGetBatteryCapSetting, PD_SetBatteryCapDataBlock, and PD_ResetBatteryCapDataBlock might need to be called before calling this function.

Call PD_WaitForGetBatteryCap()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: Get_Battery_Cap not received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message sent as response.

Example

Call PD_WaitForGetBatteryCap()

PD_SetBatteryCapDataBlock

Rev3.0 only

Sets the BatteryCap Data Block in PD Exerciser. Must be called before calling PD_WaitForGetBatteryCap or PD_DelayAutoResponse to take effect.

Call PD_SetBatteryCapDataBlock( PD_BatteryCapDataBlock $battery_cap_db )

Parameters

$battery_cap_db

Type is PD_BatteryCapDataBlock. See PD_BatteryCapabilitiesMsg for available fields.

Result: None

Example

$battery_cap_db = PD_BatteryCapDataBlock
Call PD_SetBatteryCapDataBlock( $battery_cap_db )

PD_ResetBatteryCapDataBlock

Rev3.0 only

Clears the BatteryCap Data Block in PD Exerciser. Should be called before calling PD_SetBatteryCapDataBlock.

Call PD_ResetBatteryCapDataBlock()

Parameters: None

Result: None

Example

Call PD_ResetBatteryCapDataBlock()

PD_GetManufacturerInfo

Rev3.0 only

Starts GetManufacturerInfo AMS.

Note: PD_SetGetManufacturerInfoDataBlock might need to be called before calling this function.

Call PD_GetManufacturerInfo( OrderedSetType )

Parameters


OrderedSetType

Possible values:

PD_ORDERED_SET_TYPE_SOP

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message received.

Example

Call PD_GetManufacturerInfo( PD_ORDERED_SET_TYPE_SOP )

PD_SetGetManufacturerInfoDataBlock

Rev3.0 only

Sets the GetManufacturerInfo Data Block in PD Exerciser. Must be called before calling PD_GetManufacturerInfo to take effect.

Call PD_SetGetManufacturerInfoDataBlock( PD_GetManufacturerInfoDataBlock $get_manuf_info_db )

Parameters


$get_manuf_info_db

Type is PD_GetManufacturerInfoDataBlock. See PD_GetManufacturerInfoMsg for available fields.

Result: None

Example

$get_manuf_info_db = PD_GetManufacturerInfoDataBlock
Call PD_SetGetManufacturerInfoDataBlock( $get_manuf_info_db )

PD_SetGetManufacturerInfoSetting

Rev3.0 only

Must be called before calling PD_WaitForGetManufacturerInfo or PD_DelayAutoResponse to take effect.

Call PD_SetGetManufacturerInfoSetting( PD_GetManufacturerInfo_Settings $settings )

Parameters

$settings

Type is PD_GetManufacturerInfo_Settings, shown below:

Field Names

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait to receive Get_Manufacturer_Info message.

ResponseType

PD_RESPONSE_NOT_SUPPORTED,

PD_RESPONSE_UNSPECIFIED

Response upon receiving the Get_Manufacturer_Info message.

Result: None

Example

$getmaninfo_setting = PD_GetManufacturerInfo_Settings
{
	WaitTimeout = 50000
}
Call PD_SetGetManufacturerInfoSetting( $getmaninfo_setting )

PD_WaitForGetManufacturerInfo

Rev3.0 only

Waits for a user-defined timeout to receive Manufacturer_Info message. Responds to incoming messages as part of the GetManufacturerInfo AMS.

Note: PD_SetGetManufacturerInfoSetting and PD_SetManufacturerInfoDataBlock might need to be called before calling this function.

Call PD_WaitForGetManufacturerInfo()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: Get_Manufacturer_Info message not received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message sent as response.

Example

Call PD_WaitForGetManufacturerInfo()

PD_SetManufacturerInfoDataBlock

Rev3.0 only

Sets ManufacturerInfo Data Block in PD Exerciser. Must be called before calling PD_WaitForGetManufacturerInfo or PD_DelayAutoResponse to take effect.

Call PD_SetManufacturerInfoDataBlock( PD_ManufacturerInfoDataBlock $manufacturer_info_db )

Parameters


$manufacturer_info_db

Type is PD_ManufacturerInfoDataBlock. See PD_ManufacturerInfoMsg for available fields.

Result: None

Example

$manufacturer_info_db = PD_ManufacturerInfoDataBlock
Call PD_SetManufacturerInfoDataBlock( $manufacturer_info_db )

PD_SetSecurityRequestSetting

Rev3.0 only

Must be called before calling PD_WaitForSecurityRequest or PD_DelayAutoResponse to take effect.

Call PD_SetSecurityRequestSetting( PD_SecurityRequest_Settings $settings )

Parameters

$settings

Type is PD_SecurityRequest_Settings, shown below:

Field Names

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait to receive Security_Request message.

ResponseType

PD_RESPONSE_NOT_SUPPORTED

PD_RESPONSE_UNSPECIFIED

Response upon receiving the Security_Request message.

Result: None

Example

$secreq_settings = PD_SecurityRequest_Settings
{
	WaitTimeout = 50000
}
Call PD_SetSecurityRequestSetting( $secreq_settings )

PD_SecurityRequest

Rev3.0 only

Starts the SecurityRequest AMS.

Note: PD_SetSecurityRequestDataBlock might need to be called before calling this function.

Call PD_SecurityRequest( OrderedSetType )

Parameters


OrderedSetType

Possible values:

PD_ORDERED_SET_TYPE_SOP

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message received.

Example

Call PD_SecurityRequest( PD_ORDERED_SET_TYPE_SOP )

PD_SetSecurityRequestDataBlock

Rev3.0 only

Sets the SecurityRequest Data Block in PD Exerciser. Must be called before calling PD_SecurityRequest to take effect.

Call PD_SetSecurityRequestDataBlock( PD_SecurityRequestDB $security_req_db )

Parameters

$security_req_db

Type is PD_SecurityRequestDB. See PD_SecurityRequestMsg for available fields.

Result: None

Example

$security_req_db = PD_SRQDB_GetDigests
Call PD_SetSecurityRequestDataBlock( $security_req_db )

PD_WaitForSecurityRequest

Rev3.0 only

Waits for a user-defined timeout to receive Security_Request message. Responds to incoming messages as part of the SecurityRequest AMS.

Note: PD_SetSecurityRequestSetting and PD_SetSecurityResponseDataBlock might need to be called before calling this function.

Call PD_WaitForSecurityRequest()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: Security_Request message not received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message sent as response.

Example

Call PD_WaitForSecurityRequest()

PD_SetSecurityResponseDataBlock

Sets the SecurityResponse Data Block in PD Exerciser. Must be called before PD_WaitForSecurityRequest or PD_DelayAutoResponse to take effect.

Call PD_SetSecurityResponseDataBlock( PD_SecurityResponseDB $security_resp_db )

Parameters


$security_resp_db

Type is PD_SecurityResponseDB. See PD_SecurityResponseMsg for available fields.

Result: None

Example

$security_resp_db = PD_SRPDB_Certificate
Call PD_SetSecurityResponseDataBlock( $security_resp_db )

Pd_SetGetCountryInfoSetting

Rev3.0 only

Must be called before calling Pd_WaitForGetCountryInfo or PD_DelayAutoResponse to take effect.

Call Pd_SetGetCountryInfoSetting( Pd_GetCountryInfo_Settings $settings )

Parameters

$settings

Type is Pd_GetCountryInfo_Settings, shown below:

Field Names

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) to receive Get_Country_Info message.

ResponseType

PD_RESPONSE_NOT_SUPPORTED

PD_RESPONSE_UNSPECIFIED

Response upon receiving the Get_Country_Info message.

Result: None

Example

$getcountryinfo_setting = Pd_GetCountryInfo_Settings
{
	ResponseType = PD_RESPONSE_NOT_SUPPORTED
}
Call Pd_SetGetCountryInfoSetting( $getcountryinfo_setting )

Pd_SetCountryInfoDataBlock

Rev3.0 only

Sets the CountryInfo Data Block in PD Exerciser. Must be called before calling Pd_WaitForGetCountryInfo or PD_DelayAutoResponse to take effect.

Call Pd_SetCountryInfoDataBlock( Pd_CountryInfoDataBlock $country_info_db )

Parameters

$country_info_db

Type is Pd_CountryInfoDataBlock. See PD_CountryInfoMsg for available fields.

Result: None

Example

$country_info_db = Pd_CountryInfoDataBlock
Call Pd_SetCountryInfoDataBlock( $country_info_db )

Pd_ResetCountryInfoDataBlock

Rev3.0 only

Clears the CountryInfo Data Block in PD Exerciser. Should be called before calling Pd_SetCountryInfoDataBlock.

Call Pd_ResetCountryInfoDataBlock()

Parameters: None

Result: None

Example

Call Pd_ResetCountryInfoDataBlock()

Pd_SetGetCountryInfoDO

Rev3.0 only

Sets the GetCountryInfo Data Object in PD Exerciser. Must be called before calling Pd_GetCountryInfo to take effect.

Call Pd_SetGetCountryInfoDO( Pd_GetCountryInfoDO $get_country_info_do )



$get_country_info_do

Type is Pd_GetCountryInfoDO. See PD_GetCountryInfoMsg for available fields.

Result: None

Example

$get_country_info_do = Pd_GetCountryInfoDO
Call Pd_SetGetCountryInfoDO( $get_country_info_do )

Pd_GetCountryInfo

Rev3.0 only

Starts the GetCountryInfo AMS.

Note: Pd_SetGetCountryInfoDO might need to be called before calling this function.

Call Pd_GetCountryInfo( OrderedSetType )

Parameters


OrderedSetType

Possible values:

PD_ORDERED_SET_TYPE_SOP

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message received.

Example

Call Pd_GetCountryInfo(PD_ORDERED_SET_TYPE_SOP)

Pd_WaitForGetCountryInfo

Rev3.0 only

Waits for a user-defined timeout to receive the Get_Country_Info message. Responds to incoming messages as part of the GetCountryInfo AMS.

Note: Pd_SetGetCountryInfoSetting, Pd_SetCountryInfoDataBlock, and Pd_ResetCountryInfoDataBlock might need to be called before calling this function.

Call Pd_WaitForGetCountryInfo()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: Get_Country_info not received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message sent as response.

Example

Call Pd_WaitForGetCountryInfo()

Pd_SetGetCountryCodesSetting

Rev3.0 only

Must be called before calling Pd_WaitForGetCountryCodes or PD_DelayAutoResponse to take effect.

Call Pd_SetGetCountryCodesSetting( Pd_GetCountryCodes_Settings $settings )

Parameters

$settings

Type is Pd_GetCountryCodes_Settings, shown below:

Field Names

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) to receive the Get_Country_Codes message.

ResponseType

PD_RESPONSE_NOT_SUPPORTED

PD_RESPONSE_UNSPECIFIED

Response upon receiving the Get_Country_Codes message.

Result: None

Example

$getcountrycodes_setting = Pd_GetCountryCodes_Settings
{
	ResponseType = PD_RESPONSE_NOT_SUPPORTED
}
Call Pd_SetGetCountryCodesSetting( $getcountrycodes_setting )

Pd_SetCountryCodesDataBlock

Rev3.0 only

Sets the CountryCodes Data Block in PD Exerciser. Must be called before calling Pd_WaitForGetCountryCodes or PD_DelayAutoResponse to take effect.

Call Pd_SetCountryCodesDataBlock( Pd_CountryCodesDataBlock $country_codes_db )

Parameters

$country_codes_db

Type is Pd_CountryCodesDataBlock. See PD_CountryCodesMsg for available fields.

Result: None

Example

$country_codes_db = Pd_CountryCodesDataBlock
Call Pd_SetCountryCodesDataBlock( $country_codes_db )

Pd_ResetCountryCodesDataBlock

Rev3.0 only

Clears the CountryCodes Data Block in PD Exerciser. Should be called before calling Pd_SetCountryCodesDataBlock.

Call Pd_ResetCountryCodesDataBlock()

Parameters: None

Result: None

Example

Call Pd_ResetCountryCodesDataBlock()

Pd_GetCountryCodes

Rev3.0 only

Starts the GetCountryCodes AMS.

Call Pd_GetCountryCodes( OrderedSetType )

Parameters


OrderedSetType

Possible values:

PD_ORDERED_SET_TYPE_SOP

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message received.

Example

Call Pd_GetCountryCodes(PD_ORDERED_SET_TYPE_SOP)

Pd_WaitForGetCountryCodes

Rev3.0 only

Waits for a user-defined timeout to receive the Get_Country_Codes message. Responds to incoming messages as part of the GetCountryCodes AMS.

Note: Pd_SetGetCountryCodesSetting, Pd_SetCountryCodesDataBlock, and Pd_ResetCountryCodesDataBlock might need to be called before calling this function.

Call Pd_WaitForGetCountryCodes()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: Get_Country_Codes not received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message sent as response.

Example

Call Pd_WaitForGetCountryCodes()

PD_EnterUSB

Rev3.0 only

Starts the EnterUSB AMS.

Call Pd_EnterUSB( OrderedSetType )

Parameters


OrderedSetType

Possible values:

PD_ORDERED_SET_TYPE_SOP

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_REJECT

Subresult: Reject message has been sent as Request message response

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

Example

Call Pd_EnterUSB(PD_ORDERED_SET_TYPE_SOP)

PD_WaitForEnterUSB

Rev3.0 only

Waits for a user-defined timeout to receive the EnterUSB message. Responds to incoming messages as part of the EnterUSB AMS.

Note: PD_SetEnterUSBSetting might need to be called before calling this function.

Call Pd_WaitForEnterUSB()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_REJECT

Subresult: Reject message has been sent as response

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

Example

Call Pd_WaitForEnterUSB()

PD_SetEnterUSBSetting

Rev3.0 only

Must be called before calling PD_WaitForEnterUSB or PD_DelayAutoResponse to take effect.

Call Pd_SetEnterUSBSetting( Pd_EnterUSB_Settings $settings )

Parameters

$settings

Type is Pd_EnterUSB_Settings, shown below:

Field Names

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait timeout (microsecond) to receive EnterUSB message.

ResponseType

PD_RESPONSE_REJECT

PD_RESPONSE_WAIT

PD_RESPONSE_ACCEPT

Response upon receiving the EnterUSB message.

AcceptedUSBMode

PD_INVALID_VALUE

PD_USBMODE_USB2

PD_USBMODE_USB3

PD_USBMODE_USB4

When the value is not PD_INVALID_VALUE, Exerciser sends a Reject response if it doesn’t match the USBMode field in the received Enter_USB message.

AcceptedCableSpeed

PD_INVALID_VALUE

PD_CABLESPEED_USB2_NO_SSP

PD_CABLESPEED_USB32_GEN1

PD_CABLESPEED_USB32_USB4_GEN2

PD_CABLESPEED_USB4_GEN3

PD_CABLESPEED_USB4_GEN4

When the value is not PD_INVALID_VALUE, Exerciser sends a Reject response if it doesn’t match the CableSpeed field in the received Enter_USB message.

AcceptedCableSpeedHigherEqual

PD_INVALID_VALUE

PD_CABLESPEED_USB2_NO_SSP

PD_CABLESPEED_USB32_GEN1

PD_CABLESPEED_USB32_USB4_GEN2

PD_CABLESPEED_USB4_GEN3

PD_CABLESPEED_USB4_GEN4

When the value is not PD_INVALID_VALUE, the Exerciser sends a Reject response if it is lower than the CableSpeed field in the received Enter_USB message.

AcceptedCableSpeedLowerEqual

PD_INVALID_VALUE

PD_CABLESPEED_USB2_NO_SSP

PD_CABLESPEED_USB32_GEN1

PD_CABLESPEED_USB32_USB4_GEN2

PD_CABLESPEED_USB4_GEN3

PD_CABLESPEED_USB4_GEN4

When the value is not PD_INVALID_VALUE, the Exerciser sends a Reject response if it is higher than the CableSpeed field in the received Enter_USB message.

AcceptedCableType

PD_INVALID_VALUE

PD_CABLETYPE_PASSIVE

PD_CABLETYPE_ACTIVE_RETIMER

PD_CABLETYPE_ACTIVE_REDRIVER

PD_CABLETYPE_OPTICALLY_ISOLATED

When the value is not PD_INVALID_VALUE, Exerciser sends a Reject response if it doesn’t match the CableType field in the received Enter_USB message.

AcceptedCableCurrent

PD_INVALID_VALUE

PD_CABLECURRENT_VBUS_NOT_SUPP

PD_CABLECURRENT_3A

PD_CABLECURRENT_5A

When the value is not PD_INVALID_VALUE, Exerciser sends a Reject response if it doesn’t match the CableCurrent field in the received Enter_USB message.

RejectNonZeroReserved

PD_TRUE

PD_FALSE

If the value is PD_TRUE, Exerciser sends a Reject response in case of non-zero reserved fields in the received Enter_USB message.

RetryCountOnWait

2

The retry count if Wait message received as response.

RetryDelayOnWait

100000

The retry delay time (microseconds) if Wait message received as response.

Result: None

Example

$enterusb_setting = Pd_EnterUSB_Settings
{
	ResponseType = PD_RESPONSE_REJECT
}	
Call Pd_SetEnterUSBSetting( $enterusb_setting )

PD_SetEnterUSBDO

Rev3.0 only

Sets the PD_EnterUSBDataObject in PD Exerciser. Must be called before calling PD_EnterUSB to take effect.

Call Pd_SetEnterUSBDO( Pd_EnterUSBDataObject $enter_usb_do )

Parameters


$enter_usb_do

Type is Pd_EnterUSBDataObject. See PD_EnterUSB_Message for available data fields.

Result: None

Example

$enter_usb_do = Pd_EnterUSBDataObject
Call Pd_EnterUSBDO( $enter_usb_do )

PD_ResetEnterUSBDO

Rev3.0 only

Clears the Pd_EnterUSBDataObject in PD Exerciser. Should be called before calling PD_SetEnterUSBDO.

Call Pd_ResetEnterUSBDO()

Parameters: None

Result: None

Example

Call Pd_ResetEnterUSBDO()

PD_DiscoverAndEnterUSB4

Starts the process of USB4 discovery and entry. Use PD_SetDiscoverAndEnterUSB4Settings to configure the command.

Call PD_DiscoverAndEnterUSB4( $enter_usb_do )

Parameters

$enter_usb_do

Type is Pd_EnterUSBDataObject. See PD_EnterUSBDataObject for available fields.

Result: Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed.

Example

Call PD_DiscoverAndEnterUSB4() # It can also be called without any parameter

PD_SetDiscoverAndEnterUSB4Settings

Configures the PD_DiscoverAndEnterUSB4 command.

Call Pd_SetDiscoverAndEnterUSB4Settings( Pd_DiscoverAndEnterUSB4_Settings $settings )

Parameters

$settings

Type is Pd_DiscoverAndEnterUSB4_Settings, shown below:

Field Names

Possible Values (defaults in bold)

Description

SkipSOP

PD_TRUE

PD_FALSE

Indicates whether or not to skip discovery and entry of SOP.

SkipCable

PD_TRUE

PD_FALSE

Indicates whether or not to skip discovery and entry of SOP’ and SOP”.

AttemptCable

PD_TRUE

PD_FALSE

Indicates whether or not to attempt discovery and entry of SOP’ and SOP” even if it is not an Active cable.

USBMode

PD_USBMODE_USB2

PD_USBMODE_USB3

PD_USBMODE_USB4

Ignored when Enter_USB Data Object is passed to PD_DiscoverAndEnterUSB4() command.

ExrHighestSpeed

PD_USB_HIGHEST_SPEED_USB20_ONLY

PD_USB_HIGHEST_SPEED_USB32_GEN1

PD_USB_HIGHEST_SPEED_USB32_USB4_GEN2

PD_USB_HIGHEST_SPEED_USB4_GEN3

PD_USB_HIGHEST_SPEED_USB4_GEN4


SkipSpeedCheck

PD_TRUE

PD_FALSE

Indicates whether or not to skip speed test check.

Results in sending an Enter_USB message regardless of the speed.

SkipTBT3ActiveCableCheck

PD_TRUE

PD_FALSE

Indicates whether or not to skip the tbt3 active cable check when the highest speed is USB3_USB4_Gen2.

Result: None

Example

$discovery_setting = Pd_DiscoverAndEnterUSB4_Settings
{
	USBMode = PD_USBMODE_USB3
}	
Call PD_SetDiscoverAndEnterUSB4Settings( $discovery_setting )

Pd_SetGetSnkCapExtSetting

Rev3.0 only

Must be called before Pd_GetSinkCapExtended, Pd_WaitForGetSnkCapExtended, or PD_DelayAutoResponse to take effect.

Call Pd_SetGetSnkCapExtSetting( Pd_GetSinkCapExtented_Settings $settings )

Parameters

$settings

Type is Pd_GetSinkCapExtented_Settings, shown below:

Field Names

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) to receive the Get_Sink_Cap_Extended message.

ResponseType

PD_RESPONSE_NOT_SUPPORTED

PD_RESPONSE_UNSPECIFIED

Response upon receiving the Get_Sink_Cap_Extended message.

SkipSnkCapExt

PD_TRUE

PD_FALSE

Indicates whether or not to skip sending the Sink_Capabilities_Extended message.

SendSnkCapExtDelay

0

Defines the delay before sending the Sink_Capabilities_Extended message.

Result: None

Example

$getsnkcapext_setting = Pd_GetSinkCapExtented_Settings
{
	ResponseType = PD_RESPONSE_NOT_SUPPORTED
}
Call Pd_SetGetSnkCapExtSetting( $getsnkcapext_setting )

Pd_SetSnkCapExtDataBlock

Rev3.0 only

Sets the Sink Capabilities Extended Data Block in PD Exerciser. Must be called before Pd_WaitForGetSnkCapExtended or PD_DelayAutoResponse to take effect.

Call Pd_SetSnkCapExtDataBlock( Pd_SinkCapExtDataBlock $snk_cap_ext )

Parameters

$snk_cap_ext

Type is Pd_SinkCapExtDataBlock. See PD_SinkCapExtendedMsg for available fields.

Result: None

Example

$snk_cap_ext = Pd_SinkCapExtDataBlock
Call Pd_SetSnkCapExtDataBlock( $snk_cap_ext )

Pd_ResetSnkCapExtDataBlock

Rev3.0 only

Clears the Sink Capabilities Extended Data Block in PD Exerciser. Should be called before calling Pd_SetSnkCapExtDataBlock.

Call Pd_ResetSnkCapExtDataBlock()

Parameters: None

Result: None

Example

Call Pd_ResetSnkCapExtDataBlock()

Pd_GetSinkCapExtended

Rev3.0 only

Starts the GetSinkCapExtended AMS.

Note: Pd_SetGetSnkCapExtSetting might need to be called before calling this function.

Call Pd_GetSinkCapExtended()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message received.

Example

Call Pd_GetSinkCapExtended()

Pd_WaitForGetSnkCapExtended

Rev3.0 only

Waits for a user-defined timeout to receive the Get_Sink_Cap_Extended message. Responds to incoming messages as part of GetSinkCapExtended AMS.

Note: Pd_SetGetSnkCapExtSetting, Pd_SetSnkCapExtDataBlock, and Pd_ResetSnkCapExtDataBlock might need to be called before calling this function.

Call Pd_WaitForGetSnkCapExtended()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: Get_Sink_Cap_Extended not received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message sent as response.

Example

Call Pd_WaitForGetSnkCapExtended()

PD_SetDiscoverIdentitySetting

Must be called before calling PD_DiscoverIdentity, PD_WaitForDiscoverIdentity, PD_PerformDiscoveryProcess, or PD_DelayAutoResponse to take effect.

Call PD_SetDiscoverIdentitySetting( PD_DiscoverIdentity_Settings $settings )

Parameters

$settings

Type is PD_DiscoverIdentity_Settings, shown below:

Field Name

Possible Values (defaults in bold)

Description

DiscoverIdentityRetryCount

20

The DiscoverIdentity retry count.

DiscoverIdentityResponse

PD_DISCOVERIDENTITY_ACK

PD_DISCOVERIDENTITY_BUSY

PD_DISCOVERIDENTITY_NAK

PD_RESPONSE_NOT_SUPPORTED

The response type.

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Timeout (microseconds) to wait for receiving Discover Identity Command.

RetryCountOnWait

4

The retry count if Wait message received as response.

RetryDelayOnWait

50000

The retry delay time (microseconds) if Wait message received as response.

AutoSpecRevCable

PD_TRUE

Only applicable for Rev.3.0 or higher. Indicates whether or not to detect Specification Revision of messages towards the cable automatically.

SendResponseDelay

0

Sends response after specified delay.

Result: None

Example

#apply settings
$settings = PD_DiscoverIdentity_Settings
{
	DiscoverIdentityRetryCount = 5
}
call PD_SetDiscoverIdentitySetting( $settings )

PD_AddDiscoverIdentityVDO

Adds the DiscoverIdentity VDO in PD Exerciser. Must be called before calling PD_WaitForDiscoverIdentity or PD_DelayAutoResponse to take effect.

Call PD_AddDiscoverIdentityVDO( PD_DiscoverIdentity_VDO $vdo )

Parameters

$vdo

Type is PD_DiscoverIdentity_VDO. See PD_VDM_Discover_Identity_Response for available DiscoverID VDOs.

Result: None

Example

#In this example, PD working revision is PD_SPEC_REVISION_2
#Add a ID Header VDO
$vdo = PD_VDM_Discover_Identity_ID_Header_VDO
{
	IDHeaderVDO_USBVendorID = 0xFF01
	IDHeaderVDO_ModalOperationSupported = 1
	IDHeaderVDO_ProductType = PD_VDM_ID_HEADER_VDO_PRODUCT_TYPE_PERIPHERAL
	IDHeaderVDO_DataCapableAsUSBDevice = 1
}
call PD_AddDiscoverIdentityVDO( $vdo )

PD_ResetDiscoverIdentityVDO

Clears DiscoverIdentity VDOs in PD Exerciser. Should be called before calling PD_AddDiscoverIdentityVDO.

Call PD_ResetDiscoverIdentityVDO()

Parameters: None

Result: None

Example

call PD_ResetDiscoverIdentityVDO()

PD_DiscoverIdentity

Starts DiscoverIdentity AMS.

Call PD_DiscoverIdentity( OrderedSetType )

Parameters


OrderedSetType

Possible values:

PD_ORDERED_SET_TYPE_SOP

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received

PD_SUBRESULT_RESPONSE_NAK

Subresult: NAK received as response

PD_SUBRESULT_RESPONSE_BUSY

Subresult: BUSY received as response

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message received as response

Example

call PD_DiscoverIdentity(PD_ORDERED_SET_TYPE_SOP)

PD_WaitForDiscoverIdentity

Waits for a user-defined timeout to receive DISCOVERIDENTITY command. Responds to incoming messages as part of the DiscoverIdentity AMS.

Note: PD_SetDiscoverIdentitySetting, PD_AddDiscoverIdentityVDO, and PD_ResetDiscoverIdentityVDO might need to be called before calling this function.

Call PD_WaitForDiscoverIdentity()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: DISCOVERIDENTITY command not received

PD_SUBRESULT_RESPONSE_NAK

Subresult: NAK has been sent as response

PD_SUBRESULT_RESPONSE_BUSY

Subresult: BUSY has been sent as response

Example

call PD_WaitForDiscoverIdentity()

PD_SetDiscoverSVIDSetting

Must be called before calling PD_DiscoverSvids, PD_WaitForDiscoverSvids, PD_PerformDiscoveryProcess, or PD_DelayAutoResponse to take effect.

Call PD_SetDiscoverSVIDSetting( PD_DiscoverSvids_Settings $settings )

Parameters

$settings

Type is PD_DiscoverSvids_Settings, shown below:

Field Name

Possible Values (defaults in bold)

Description

DiscoverSvidsResponse

PD_DISCOVERSVIDS_ACK

PD_DISCOVERSVIDS_BUSY

PD_DISCOVERSVIDS_NAK

PD_RESPONSE_NOT_SUPPORTED

The response type.


WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Timeout (microseconds) to wait for receiving Discover SVID Command.

RetryCountOnWait

4

The retry count if Wait message received as response.

RetryDelayOnWait

50000

The retry delay time (microseconds) if Wait message received as response.

Result: None

Example

#Using default settings
$settings = PD_DiscoverSvids_Settings
call PD_SetDiscoverSVIDSetting( $settings )

PD_AddSvid

Adds SVIDs to PD Exerciser. Must be called before calling PD_DiscoverSvids, PD_WaitForDiscoverSvids, PD_PerformDiscoveryProcess, or PD_DelayAutoResponse to take effect.

Note: Up to 11 SVIDs can be added using this command.

Call PD_AddSvid(value)

Parameters


value

SVID value to add

Result: None

Example

call PD_AddSvid(0xFF01)

PD_ResetSvids

Clears SVIDs that are added to PD Exerciser. Should be called before calling PD_AddSvid.

Call PD_ResetSvids()

Parameters: None

Result: None

Example

call PD_ResetSvids()

PD_DiscoverSvids

Starts the DiscoverSVID AMS.

Note: PD Exerciser supports only one (first) DiscoverSVIDs Ack message.

Call PD_DiscoverSvids(OrderedSetType)

Parameters

OrderedSetType

Possible values:

PD_ORDERED_SET_TYPE_SOP

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received

PD_SUBRESULT_RESPONSE_NAK

Subresult: NAK received as response

PD_SUBRESULT_RESPONSE_BUSY

Subresult: BUSY received as response

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message received as response

Example

call PD_DiscoverSvids(PD_ORDERED_SET_TYPE_SOP)

PD_WaitForDiscoverSvids

Waits for a user-defined timeout to receive DISCOVERSVID command. Responds to incoming messages as part of the DiscoverSVIDs AMS.

Note: PD_SetDiscoverSVIDSetting, PD_AddSvid, and PD_ResetSvids might need to be called before calling this function.

Call PD_WaitForDiscoverSvids()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: DISCOVERSVIDS message not received

PD_SUBRESULT_RESPONSE_NAK

Subresult: NAK has been sent as response

PD_SUBRESULT_RESPONSE_BUSY

Subresult: BUSY has been sent as response

Example

call PD_WaitForDiscoverSvids()

PD_SetDiscoverModeSetting

Must be called before calling PD_DiscoverModes, PD_WaitForDiscoverModes, PD_PerformDiscoveryProcess, or PD_DelayAutoResponse to take effect.

Call PD_SetDiscoverModeSetting( PD_DiscoverModes_Settings $settings )

Parameters

$settings

Type is PD_DiscoverModes_Settings, shown below:

Field Name

Possible Values (defaults in bold)

Description

DiscoverModesResponse

PD_DISCOVERMODES_ACK

PD_DISCOVERMODES_BUSY

PD_DISCOVERMODES_NAK

PD_RESPONSE_NOT_SUPPORTED

Response type

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Timeout (microseconds) to wait for receiving Discover Modes command.

RetryCountOnWait

4

The retry count if Wait message received as response.

RetryDelayOnWait

50000

The retry delay time (microseconds) if Wait message received as response.

Result: None

Example

#apply settings
$settings = PD_DiscoverModes_Settings
{
	DiscoverModesResponse = PD_DISCOVERMODES_BUSY
}
call PD_SetDiscoverModeSetting( $settings )

PD_AddMode

Adds Modes to the PD Exerciser. Must be called before calling PD_DiscoverModes, PD_WaitForDiscoverModes, PD_PerformDiscoveryProcess, or PD_DelayAutoResponse to take effect.

Call PD_AddMode(Mode)

Parameters

Mode

Mode to add

Result: None

Example

call PD_AddMode(0x00000001)

PD_AddModeVDO

Adds Mode with VDO to the PD Exerciser. Must be called before calling PD_DiscoverModes, PD_WaitForDiscoverModes, PD_PerformDiscoveryProcess, or PD_DelayAutoResponse to take effect.

Call PD_AddModeVDO(PD_Generic_VDO $ModeVdo)

Parameters

$ModeVdo

Type is PD_Generic_VDO. See PD_VDM_Discover_Modes_Response.

Result: None

Example

local $vdo_1 = PD_VDO
{
	Data = 0x01
}
call PD_AddModeVDO($vdo_1)

PD_ResetModes

Clears Modes that are added to PD Exerciser. Should be called before calling PD_AddMode or PD_AddModeVDO.

Call PD_ResetModes()

Parameters: None

Result: None

Example

call PD_ResetModes()

PD_DiscoverModes

Starts DicoverModes AMS.

Call PD_DiscoverModes(OrderedSetType, selectedSvid)

Parameters

OrderedSetType

Possible values:

PD_ORDERED_SET_TYPE_SOP

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

selectedSvid

The SVID value

Result:

Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received

PD_SUBRESULT_RESPONSE_NAK

Subresult: NAK received as response

PD_SUBRESULT_RESPONSE_BUSY

Subresult: BUSY received as response

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message received as response

Example

call PD_DiscoverModes(PD_ORDERED_SET_TYPE_SOP,0xFF00)

PD_WaitForDiscoverModes

Waits for a user-defined timeout to receive the DISCOVERMODE command. Responds to incoming messages as part of the DiscoverModes AMS.

Note: PD_SetDiscoverModeSetting, PD_AddMode, PD_AddModeVDO, and PD_ResetModes might need to be called before calling this function.

Call PD_WaitForDiscoverModes()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: DISCOVERMODES message not received

PD_SUBRESULT_RESPONSE_NAK

Subresult: NAK has been sent as response

PD_SUBRESULT_RESPONSE_BUSY

Subresult: BUSY has been sent as response

Example

call PD_WaitForDiscoverModes()

PD_SetEnterModeSetting

Must be called before calling PD_WaitForEnterMode or PD_DelayAutoResponse to take effect.

Call PD_SetEnterModeSetting( PD_EnterMode_Settings $settings )

Parameters

$settings

Type is PD_EnterMode_Settings, shown below:

Field Name

Possible Values (defaults in bold)

Description

EnterModeResponse

PD_ENTERMODE_ACK

PD_ENTERMODE_NAK

PD_RESPONSE_NOT_SUPPORTED

Response type.

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Timeout (microseconds) to wait for receiving Enter Mode command.

SkipSendingResponse

PD_FALSE

PD_TRUE

If set to PD_TRUE, will skip sending the EnterMode response.

Result: None

Example

#Using default setting
$settings = PD_EnterMode_Settings
call PD_SetEnterModeSetting( $settings )

PD_EnterMode

Starts the EnterMode AMS.

Call PD_EnterMode(OrderedSetType, selectedSvid, modeIndex)

Parameters

OrderedSetType

Possible values:

PD_ORDERED_SET_TYPE_SOP

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

selectedSvid

The SVID

modeIndex

The mode index for the specified SVID

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received

PD_SUBRESULT_RESPONSE_NAK

Subresult: NAK received as response

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message received as response

Example

call PD_EnterMode(PD_ORDERED_SET_TYPE_SOP,0xFF00, 1)

PD_EnterModeVdo

Starts the EnterMode AMS. It sends the specified VDO using the EnterMode command.

Call PD_EnterModeVdo( OrderedSetType, selectedSvid, modeId, PD_Generic_VDO $Vdo )

Parameters

OrderedSetType

Possible values:

PD_ORDERED_SET_TYPE_SOP

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

selectedSvid

The SVID

modeIndex

The mode index for the specified SVID

$Vdo

Vendor defined data object. Type is PD_VDO, inherited from PD_Generic_VDO.

Data

VDO data

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received

PD_SUBRESULT_RESPONSE_NAK

Subresult: NAK received as response

Example

$vdo = PD_VDO
{
	Data = 0x00
}
call PD_EnterModeVdo(PD_ORDERED_SET_TYPE_SOP, 0xFF01, 1, $vdo)

PD_WaitForEnterMode

Waits for a user-defined timeout to receive ENTERMODE command. Responds to incoming messages as part of the EnterMode AMS.

Note: PD_SetEnterModeSetting might need to be called before calling this function.

Call PD_WaitForEnterMode()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: ENERMODE message not received

PD_SUBRESULT_RESPONSE_NAK

Subresult: NAK has been sent as response

Example

call PD_WaitForEnterMode()

PD_SetExitModeSetting

Must be called before calling PD_WaitForExitMode or PD_DelayAutoResponse to take effect.

Call PD_SetExitModeSetting( PD_ExitMode_Settings $settings )

Parameters

$settings

Type is PD_ExitMode_Settings, shown below:

Field Name

Possible Values (defaults in bold)

Description

ExitModeResponse

PD_EXITMODE_ACK

PD_EXITMODE_NAK

PD_RESPONSE_NOT_SUPPORTED

The response type.

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Timeout (microseconds) to wait for receiving the Exit Mode command.

Result: None

Example

#Using default settings
$settings = PD_ExitMode_Settings
call PD_SetExitModeSetting( $settings )

PD_ExitMode

Starts the ExitMode AMS.

Call PD_ExitMode(OrderedSetType, selectedSvid, modeIndex)

Parameters

OrderedSetType

Possible values:

PD_ORDERED_SET_TYPE_SOP

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

selectedSvid

The SVID

modeIndex

The mode index for the specified SVID

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received

PD_SUBRESULT_RESPONSE_NAK

Subresult: NAK received as response

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message received as response

Example

call PD_ExitMode(PD_ORDERED_SET_TYPE_SOP, 0xFF00, 1)

PD_WaitForExitMode

Waits for a user-defined timeout to receive the EXITMODE command. Responds to incoming messages as part of the ExitMode AMS.

Note: PD_SetExitModeSetting might need to be called before calling this function.

Call PD_WaitForExitMode()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: EXITMODE message not received

PD_SUBRESULT_RESPONSE_NAK

Subresult: NAK has been sent as response

Example

call PD_WaitForExitMode()

PD_Attention

Starts the Attention AMS.

Call PD_Attention( OrderedSetType, selectedSvid, modeIndex )

Parameters

OrderedSetType

Possible values:

PD_ORDERED_SET_TYPE_SOP

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

selectedSvid

The SVID

modeIndex

The mode index for the specified SVID

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket are also valid (depends on the error type which has been occurred during sending data).

Example

call PD_Attention(PD_ORDERED_SET_TYPE_SOP, 0xFF01, 1 )

PD_AttentionVdo

Starts te Attention AMS. Sends the specified VDO using the Attention command.

Call PD_AttentionVdo( OrderedSetType, selectedSvid, modeIndex, PD_Generic_VDO $Vdo )

Parameters

OrderedSetType

Possible values:

PD_ORDERED_SET_TYPE_SOP

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

selectedSvid

The SVID

modeIndex

The mode index for the specified SVID

$Vdo

Vendor defined data object. Type is PD_VDO, inherited from PD_Generic_VDO.

Data

VDO data

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket are also valid (depends on the error type which has been occurred during sending data).

Example

$vdo = PD_VDO
{
	Data = 0x00
}
call PD_AttentionVdo(PD_ORDERED_SET_TYPE_SOP, 0xFF01, 1, $vdo)

PD_SetDiscoveryProcessSetting

Must be called before calling PD_PerformDiscoveryProcess to take effect.

Call PD_SetDiscoveryProcessSetting(PD_DiscoveryProcess_Settings $settings)

Parameters

$settings

Type is PD_DiscoveryProcess_Settings, shown below:

Field Name

Possible Values (defaults in bold)

Description

Discover_SOP_PP_During_SOP_P

PD_TRUE

PD_FALSE

Indicates whether or not to perform SOP Double Prime discovery during SOP Prime discovery process.

SkipEnterMode

PD_FALSE

Indicates whether or not to skip the EnterMode phase.

Result: None

Example

#Using default settings
$settings = PD_DiscoveryProcess_Settings
call PD_SetDiscoveryProcessSetting( $settings )

PD_PerformDiscoveryProcess

Performs full discovery process.

Note: PD Exerciser supports only one (first) DiscoverSVIDs Ack message (up to 12 SVIDs).

Note: PD_SetDiscoveryProcessSetting might need to be called before calling this function.

Call PD_PerformDiscoveryProcess( OrderedSetType )

Parameters

OrderedSetType

Possible values:

PD_ORDERED_SET_TYPE_SOP

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: None

Example

call PD_PerformDiscoveryProcess(PD_ORDERED_SET_TYPE_SOP)

PD_SetDisplayPortSetting

Must be called before calling PD_SetDisplayPortSetting_Cable. Equivalent to PD_SetDisplayPortSetting for an emulated cable.

Call PD_SetDisplayPortSetting_Cable( PD_DisplayPort_Settings_SOPPrime $settings )
Call PD_SetDisplayPortSetting_Cable( PD_DisplayPort_Settings_SOPDPrime $settings )

PD_DisplayPort_UpdateStatus or PD_DisplayPort_Configure or PD_WaitForDisplayPortStatus or Pd_WaitForDisplayPortStatus_Cable

The equivalent of PD_WaitForDisplayPortStatus for an emulated cable.

Call PD_WaitForDisplayPortStatus_Cable( OrderedSetType )

Parameters

OrderedSetType

Possible values:

PD_ORDERED_SET_TYPE_SOP

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

PD_WaitForDisplayPortConfigure or PD_DelayAutoResponse to take effect.

Call PD_SetDisplayPortSetting( PD_DisplayPort_Settings $settings )

Parameters

$settings

Type is PD_DisplayPort_Settings, shown below:

Field Name

Possible Values (defaults in bold)

Description

ConfigureResponse

PD_DISPLAYPORT_ACK

PD_DISPLAYPORT_NAK

PD_RESPONSE_NOT_SUPPORTED

The response for incoming Display Port Configure command.

DisplayPortModeIndex

0x01

Mode index related to the Display Port SVID.

StatusVdo

0x00

The Display Port Status Vendor Defined Data Object that can be used in Display Port Update Status initiator or responder messages.

ConfigureVdo

0x00

The Display Port Configure Vendor Defined Data Object that can be used in Display Port Configure initiator message.

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Timeout (microseconds) to wait for receiving the Display Port Update Status or Configure command.

Result: None

Example

#Using default settings
#################################
$settings = PD_DisplayPort_Settings
call PD_SetDisplayPortSetting($settings)

#Set the StatusVdo
#################################
$update_status = PD_VDM_DisplayPort_Status_VDO
{
 DFPD_UFPD_Connected  = PD_DISPLAYPORT_DFPD_CONNECTED
 PowerLow    = 0x00
 AdaptorEnabled   = 0x01
 MultiFunctionPreferred = 0x01
 UsbConfigurationRequest = 0x00
 ExitDisplayModeRequest = 0x00
 HPD_State    = 0x00
 IRQ_HPD     = 0x00
 Reserved_DPS_1   = 0x00
}
$settings
{
 StatusVdo = $update_status
}
Call PD_SetDisplayPortSetting($settings)

#Set the ConfigureVdo to default
#################################
$config = PD_VDM_DisplayPort_Configure_VDO
$settings
{
 ConfigureVdo = $config
}
Call PD_SetDisplayPortSetting($settings)

PD_SetDisplayPortSetting_Cable

Equivalent to PD_SetDisplayPortSetting for an emulated cable.

Call PD_SetDisplayPortSetting_Cable( PD_DisplayPort_Settings_SOPPrime $settings )
Call PD_SetDisplayPortSetting_Cable( PD_DisplayPort_Settings_SOPDPrime $settings )

PD_DisplayPort_UpdateStatus

Starts DisplayPortUpdateStatus (Structured VDM) AMS.

Note: PD_SetDisplayPortSetting might need to be called before calling this function.

Call PD_DisplayPort_UpdateStatus( OrderedSetType )

Parameters


OrderedSetType

The OrderedSet type. Possible values:

PD_ORDERED_SET_TYPE_SOP

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message received as response

Examples

call PD_DisplayPort_UpdateStatus( PD_ORDERED_SET_TYPE_SOP_PRIME )
call PD_DisplayPort_UpdateStatus() # for SOP

PD_DisplayPort_Configure

Starts the DisplayPortConfigure (Structured VDM) AMS.

Note: PD_SetDisplayPortSetting might need to be called before calling this function.

Call PD_DisplayPort_Configure( OrderedSetType )

Parameters


OrderedSetType

The OrderedSet type. Possible values:

PD_ORDERED_SET_TYPE_SOP

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received

PD_SUBRESULT_RESPONSE_NAK

Subresult: NAK received as response

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message received as response

Examples

call PD_DisplayPort_Configure( PD_ORDERED_SET_TYPE_SOP_PRIME )
call PD_DisplayPort_Configure() # for SOP

PD_WaitForDisplayPortStatus

Waits for a user-defined timeout to receive DisplayPort STATUS command. Responds to incoming messages as part of the DisplayPortStatus (Structured VDM) AMS.

Note: PD_SetDisplayPortSetting might need to be called before calling this function.

Call PD_WaitForDisplayPortStatus()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: UPDATE_STATUS message not received

Example

call PD_WaitForDisplayPortStatus()

Pd_WaitForDisplayPortStatus_Cable

Equivalent to PD_WaitForDisplayPortStatus for an emulated cable.

Call PD_WaitForDisplayPortStatus_Cable( OrderedSetType )

Parameters


OrderedSetType

The OrderedSet type. Possible values:

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

PD_WaitForDisplayPortConfigure

Waits for a user-defined timeout to receive DisplayPort CONFIGURE command. Responds to incoming messages as part of the DisplayPortConfigure (Structured VDM) AMS.

Note: PD_SetDisplayPortSetting might need to be called before calling this function.

Call PD_WaitForDisplayPortConfigure()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: Configure message not received

PD_SUBRESULT_RESPONSE_NAK

Subresult: NAK has been sent as response

Example

call PD_WaitForDisplayPortConfigure()

Pd_WaitForDisplayPortConfigure_Cable

Equivalent to PD_WaitForDisplayPortConfigure for an emulated cable.

Call PD_WaitForDisplayPortConfigure_Cable( OrderedSetType )

Parameters

OrderedSetType

Possible values:

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

PD_SetDiscoverIdentitySetting_Cable

Must be called before calling PD_WaitForDiscoverIdentity_Cable or PD_DelayAutoResponse to take effect.

Note: PD Exerciser must also function as a Cable Plug to perform this operation.

Call PD_SetDiscoverIdentitySetting_Cable( PD_DiscoverIdentity_Settings_SOPPrime $settings )
Call PD_SetDiscoverIdentitySetting_Cable( PD_DiscoverIdentity_Settings_SOPDPrime $settings )

Parameters

$settings

For SOP Prime, use PD_DiscoverIdentity_Settings_SOPPrime. For SOP Double Prime, use PD_DiscoverIdentity_Settings_SOPDPrime. See PD_SetDiscoverIdentitySetting for more details. Only DiscoverIdentityResponse and WaitTimeout settings are applied.

Result: None

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
PD_Set $PdGlobalSettings.EnableCableDPrimeEmulator = PD_TRUE
.
.
#Using default settings
$settings = PD_DiscoverIdentity_Settings_SOPPrime
call PD_SetDiscoverIdentitySetting_Cable( $settings )
$settings_dprime = PD_DiscoverIdentity_Settings_SOPDPrime
call PD_SetDiscoverIdentitySetting_Cable( $settings_dprime )

PD_WaitForDiscoverIdentity_Cable

Waits for a user-defined timeout to receive the DISCOVERIDENTITY command. Responds to incoming messages as part of the DiscoverIdentity AMS. Equivalent to PD_WaitForDiscoverIdentity for an emulated cable.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Call PD_WaitForDisplayPortConfigure_Cable( OrderedSetType )

Parameters

OrderedSetType

The OrderedSet type. Possible values:

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIM

Note: PD_SetDiscoverIdentitySetting_Cable, PD_AddDiscoverIdentityVDO_Cable, and PD_ResetDiscoverIdentityVDO_Cable might need to be called before calling this function.

Call PD_WaitForDiscoverIdentity_Cable( ordered_set )

Parameters

ordered_set

Possible values:

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIM

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: DISCOVER_IDENTITY message not received

PD_SUBRESULT_RESPONSE_NAK

Subresult: NAK has been sent as response

PD_SUBRESULT_RESPONSE_BUSY

Subresult: BUSY has been sent as response

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
.
.
Call PD_WaitForDiscoverIdentity_Cable( PD_ORDERED_SET_TYPE_SOP_PRIME )

PD_AddDiscoverIdentityVDO_Cable

Adds DiscoverIdentity VDO (for cable) to the PD Exerciser. Must be called before calling PD_WaitForDiscoverIdentity_Cable or PD_DelayAutoResponse to take effect.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Call PD_AddDiscoverIdentityVDO_Cable( PD_DiscoverIdentity_VDO $vdo, ordered_set )

Parameters

$vdo

Type is PD_DiscoverIdentity_VDO. See PD_VDM_Discover_Identity_Response for details.

ordered_set

Possible values:

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: None

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
.
.
#Add a Cable VDO
$vdo = PD_VDM_Discover_Identity_Cable_VDO
call PD_AddDiscoverIdentityVDO_Cable( $vdo, PD_ORDERED_SET_TYPE_SOP_PRIME )

PD_ResetDiscoverIdentityVDO_Cable

Clears DiscoverIdentity VDOs (for cable) in PD Exerciser. Should be called before calling PD_AddDiscoverIdentityVDO_Cable.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

call PD_ResetDiscoverIdentityVDO_Cable( ordered_set )

Parameters

ordered_set

Possible values:

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: None

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
.
.
call PD_ResetDiscoverIdentityVDO_Cable( PD_ORDERED_SET_TYPE_SOP_PRIME )

PD_SetDiscoverSVIDSetting_Cable

Must be called before calling PD_WaitForDiscoverSvids_Cable or PD_DelayAutoResponse to take effect.

Note: PD Exerciser should also act as a Cable Plug to be able to process this command.

Call PD_SetDiscoverSVIDSetting_Cable( PD_DiscoverSvids_Settings_SOPPrime $settings )
Call PD_SetDiscoverSVIDSetting_Cable( PD_DiscoverSvids_Settings_SOPDPrime $settings )

Parameters

$settings

For SOP Prime, use PD_DiscoverSvids_Settings_SOPPrime. For SOP Double Prime, use PD_DiscoverSvids_Settings_SOPDPrime. See PD_SetDiscoverSVIDSetting for more details. Only DiscoverSvidsResponse and WaitTimeout settings are applied.

Result: None

Examples

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
PD_Set $PdGlobalSettings.EnableCableDPrimeEmulator = PD_TRUE
.
.
#Using default settings
$settings = PD_DiscoverSvids_Settings_SOPPrime
call PD_SetDiscoverSVIDSetting_Cable( $settings )

$settings_dprime = PD_DiscoverSvids_Settings_SOPDPrime
call PD_SetDiscoverSVIDSetting_Cable( $settings_dprime )

PD_WaitForDiscoverSvids_Cable

Waits for a user-defined timeout to receive DISCOVERSVID command. Responds to incoming messages as part of the DiscoverSVIDs AMS.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Note: PD_SetDiscoverSVIDSetting_Cable, PD_AddSvid_Cable, and PD_ResetSvids_Cable might need to be called before calling this function.

Call PD_WaitForDiscoverSvids_Cable( ordered_set )

Parameters

ordered_set

Possible values:

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: DISCOVER_SVIDS message not received

PD_SUBRESULT_RESPONSE_NAK

Subresult: NAK has been sent as response

PD_SUBRESULT_RESPONSE_BUSY

Subresult: BUSY has been sent as response

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
.
.
Call PD_WaitForDiscoverSvids_Cable( PD_ORDERED_SET_TYPE_SOP_PRIME )

PD_AddSvid_Cable

Adds SVIDs (Cable Plug) to the PD Exerciser. Must be called before calling PD_WaitForDiscoverSvids_Cable or PD_DelayAutoResponse to take effect.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Call PD_AddSvid_Cable(value, ordered_set)

Parameters

value

SVID value to add

ordered_set

Possible values:

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: None

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
.
.
call PD_AddSvid_Cable(0xFF81, PD_ORDERED_SET_TYPE_SOP_PRIME)

PD_ResetSvids_Cable

Clears SVIDs (for cable) that are added to PD Exerciser. Should be called before calling PD_AddSvid_Cable function.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Call PD_ResetSvids_Cable( ordered_set )

Parameters

ordered_set

Possible values:

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: None

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
.
.
call PD_ResetSvids_Cable( PD_ORDERED_SET_TYPE_SOP_PRIME )

PD_SetDiscoverModeSetting_Cable

Must be called before calling PD_WaitForDiscoverModes_Cable or PD_DelayAutoResponse to take effect.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Call PD_SetDiscoverModeSetting_Cable( PD_DiscoverModes_Settings_SOPPrime $settings )
Call PD_SetDiscoverModeSetting_Cable( PD_DiscoverModes_Settings_SOPDPrime $settings )

Parameters

$settings

For SOP Prime, use PD_DiscoverModes_Settings_SOPPrime. For SOP Double Prime, use PD_DiscoverModes_Settings_SOPDPrime. See PD_SetDiscoverModeSetting for more details. Only DiscoverModesResponse and WaitTimeout settings are applied.

Result: None

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
PD_Set $PdGlobalSettings.EnableCableDPrimeEmulator = PD_TRUE
.
.
#Using default settings
$settings = PD_DiscoverModes_Settings_SOPPrime
call PD_SetDiscoverModeSetting_Cable( $settings )

$settings_dprime = PD_DiscoverModes_Settings_SOPDPrime 
call PD_SetDiscoverModeSetting_Cable( $settings_dprime )

PD_WaitForDiscoverModes_Cable

Waits for a user-defined timeout to receive DISCOVERMODE command. Responds to incoming messages as part of DiscoverModes AMS.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Note: PD_SetDiscoverModeSetting_Cable, PD_AddModeVDO_Cable, PD_AddMode_Cable, and PD_ResetModes_Cable might need to be called before calling this function.

Call PD_WaitForDiscoverModes_Cable( ordered_set )

Parameters

ordered_set

Possible values:

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: DISCOVER_MODES message not received

PD_SUBRESULT_RESPONSE_NAK

Subresult: NAK has been sent as response

PD_SUBRESULT_RESPONSE_BUSY

Subresult: BUSY has been sent as response

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
.
.
Call PD_WaitForDiscoverModes_Cable( PD_ORDERED_SET_TYPE_SOP_PRIME )

PD_AddModeVDO_Cable

Adds Mode (for cable) with VDO to the PD Exerciser. Must be called before calling PD_WaitForDiscoverModes_Cable or PD_DelayAutoResponse to take effect.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Call PD_AddModeVDO_Cable(PD_Vdo $ModeVdo, ordered_set)

Parameters

$ModeVdo

Type is PD_VDO

ordered_set

Possible values:

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Data

VDO

Result: None

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
.
.
local $vdo_1 = PD_VDO
{
	Data = 0x01
}
call PD_AddModeVDO_Cable($vdo_1, PD_ORDERED_SET_TYPE_SOP_PRIME)

PD_AddMode_Cable

Adds Mode (Cable Plug) to the PD Exerciser. Must be called before calling PD_WaitForDiscoverModes_Cable or PD_DelayAutoResponse to take effect.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Call PD_AddMode_Cable(Mode, ordered_set)

Parameters

Mode

Mode to add

ordered_set

Possible values:

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: None

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
.
.
call PD_AddMode_Cable(0x00000001, PD_ORDERED_SET_TYPE_SOP_PRIME)

PD_ResetModes_Cable

Clears Modes (for cable) that are added to PD Exerciser. Should be called before calling PD_AddModeVDO_Cable and PD_AddMode_Cable.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Call PD_ResetModes_Cable( ordered_set )

Parameters

ordered_set

Possible values:

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: None

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
.
.
Call PD_ResetModes_Cable( PD_ORDERED_SET_TYPE_SOP_PRIME )

PD_SetEnterModeSetting_Cable

Must be called before calling PD_WaitForEnterMode_Cable or PD_DelayAutoResponse to take effect.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Call PD_SetEnterModeSetting_Cable( PD_EnterMode_Settings_SOPPrime $settings )
Call PD_SetEnterModeSetting_Cable( PD_EnterMode_Settings_SOPDPrime $settings )

Parameters


$settings

For SOP Prime, use PD_EnterMode_Settings_SOPPrime. For SOP Double Prime, use PD_EnterMode_Settings_SOPDPrime. See PD_SetEnterModeSetting for more details.

Result: None

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
PD_Set $PdGlobalSettings.EnableCableDPrimeEmulator = PD_TRUE
.
.
#Using default setting
$settings = PD_EnterMode_Settings_SOPPrime
call PD_SetEnterModeSetting_Cable( $settings )

$settings_dprime = PD_EnterMode_Settings_SOPDPrime
call PD_SetEnterModeSetting_Cable( $settings_dprime )

PD_WaitForEnterMode_Cable

Waits for a user-defined timeout to receive ENTERMODE command. Responds to incoming messages as part of EnterMode AMS.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Note: PD_SetEnterModeSetting_Cable might need to be called before calling this function.

Call PD_WaitForEnterMode_Cable( ordered_set )

Parameters

ordered_set

Possible values:

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: ENTER_MODE message not received

PD_SUBRESULT_RESPONSE_NAK

Subresult: NAK has been sent as response

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
.
.
Call PD_WaitForEnterMode_Cable( PD_ORDERED_SET_TYPE_SOP_PRIME )

PD_SetExitModeSetting_Cable

Must be called before calling PD_WaitForExitMode_Cable or PD_DelayAutoResponse to take effect.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

s command.

Call PD_SetExitModeSetting_Cable( PD_ExitMode_Settings_SOPPrime $settings )
Call PD_SetExitModeSetting_Cable( PD_ExitMode_Settings_SOPDPrime $settings )

Parameters

$settings

For SOP Prime, use PD_ExitMode_Settings_SOPPrime and for SOP Double Prime, use PD_ExitMode_Settings_SOPDPrime. See PD_SetExitModeSetting for more details.

Result: None

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
PD_Set $PdGlobalSettings.EnableCableDPrimeEmulator = PD_TRUE
.
.
#Using default settings
$settings = PD_ExitMode_Settings_SOPPrime
call PD_SetExitModeSetting_Cable( $settings )

$settings_dprime = PD_ExitMode_Settings_SOPDPrime 
call PD_SetExitModeSetting_Cable( $settings_dprime )

PD_WaitForExitMode_Cable

Waits for a user-defined timeout to receive EXITMODE command. Responds to incoming messages as part of the ExitMode AMS.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Note: PD_SetExitModeSetting_Cable might need to be called before calling this function.

Call PD_WaitForExitMode_Cable( ordered_set )

Parameters

ordered_set

Possible values:

PD_ORDERED_SET_TYPE_SOP_PRIME

PD_ORDERED_SET_TYPE_SOP_DOUBLE_PRIME

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command.

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: EXIT_MODE message not received

PD_SUBRESULT_RESPONSE_NAK

Subresult: NAK has been sent as response

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
.
.
Call PD_WaitForExitMode_Cable( PD_ORDERED_SET_TYPE_SOP_PRIME )

PD_SetManufacturerInfoDataBlock_Cable

Rev3.0 only

Sets ManufacurerInfo Data Block (for cable) to the PD Exerciser. Must be called before calling PD_WaitForGetManufacturerInfo_Cable or PD_DelayAutoResponse to take effect.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Call PD_SetManufacturerInfoDataBlock_Cable( PD_ManufacturerInfoDataBlock $manufacturer_info_db )

Parameters

$manufacturer_info_db

Type is PD_ManufacturerInfoDataBlock. See PD_ManufacturerInfoMsg for available fields.

Result: None

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
.
.
$manufacturer_info_db = PD_ManufacturerInfoDataBlock
Call PD_SetManufacturerInfoDataBlock_Cable( $manufacturer_info_db )

PD_SetGetManufacturerInfoSetting_Cable

Rev3.0 only

Must be called before calling PD_WaitForGetManufacturerInfo_Cable or PD_DelayAutoResponse to take effect.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Call PD_SetGetManufacturerInfoSetting_Cable( PD_GetManufacturerInfo_Settings $settings )

Parameters

$settings

See PD_SetGetManufacturerInfoSetting for more details.

Result: None

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
.
.
$getmaninfo_setting = PD_GetManufacturerInfo_Settings
{
	WaitTimeout = 50000
}
Call PD_SetGetManufacturerInfoSetting_Cable( $getmaninfo_setting )

PD_WaitForGetManufacturerInfo_Cable

Rev3.0 only

Waits for a user-defined timeout to receive Manufacturer_Info message. Responds to incoming messages as part of the GetManufacturerInfo AMS.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Note: PD_SetGetManufacturerInfoSetting_Cable and PD_SetManufacturerInfoDataBlock_Cable might need to be called before calling this function.

Call PD_WaitForGetManufacturerInfo_Cable()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: Get_Manufacturer_Info message not received.

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
.
.
Call PD_WaitForGetManufacturerInfo_Cable()

PD_SetSecurityResponseDataBlock_Cable

Rev3.0 only

Sets the SecurityResponse Data Block (for cable) to the PD Exerciser. Must be called before calling PD_WaitForSecurityRequest_Cable or PD_DelayAutoResponse to take effect.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Call PD_SetSecurityResponseDataBlock_Cable( PD_SecurityResponseDB $security_resp_db )

Parameters

$security_resp_db

Type is PD_SecurityResponseDB. See PD_SecurityResponseMsg for available types.

Result: None

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
.
.
$security_resp_db = PD_SRPDB_Certificate
Call PD_SetSecurityResponseDataBlock_Cable( $security_resp_db )

PD_SetSecurityRequestSetting_Cable

Rev3.0 only

Must be called before calling PD_WaitForSecurityRequest_Cable or PD_DelayAutoResponse to take effect.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Call PD_SetSecurityRequestSetting_Cable( PD_SecurityRequest_Settings $settings )

Parameters


$settings

See PD_SetSecurityRequestSetting for more details.

Result: None

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
.
.
$secreq_settings = PD_SecurityRequest_Settings
{
	WaitTimeout = 50000
}
Call PD_SetSecurityRequestSetting( $secreq_settings )

PD_WaitForSecurityRequest_Cable

Rev3.0 only

Waits for a user-defined timeout to receive Security_Request message. Responds to incoming messages as part of the SecurityRequest AMS.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Note: PD_SetSecurityResponseDataBlock_Cable and PD_SetSecurityRequestSetting_Cable might need to be called before calling this function.

Call PD_WaitForSecurityRequest_Cable()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: Security_Request message not received.

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
.
.
Call PD_WaitForSecurityRequest_Cable()

Pd_SetGetStatusSetting_Cable

Rev3.0 only

Must be called before calling Pd_WaitForGetStatus_Cable or PD_DelayAutoResponse to take effect.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Call Pd_SetGetStatusSetting_Cable( Pd_GetStatus_Settings $settings )

Parameters

$settings

Type is PD_GetStatus_Settings. See PD_SetGetStatusSetting for available settings.

Result: None

Example

$getstatus_setting = PD_GetStatus_Settings
{
	WaitTimeout = 250000
}
Call Pd_SetGetStatusSetting_Cable( $getstatus_setting )

PD_SetStatusDataBlock_Cable

Rev3.0 only

Sets the Cable Status Data Block in PD Exerciser. Must be called before calling Pd_WaitForGetStatus_Cable or PD_DelayAutoResponse to take effect.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Call PD_SetStatusDataBlock_Cable( Pd_StatusDataBlock_Cable $status_db )

Parameters

$status_db

Type is Pd_StatusDataBlock_Cable. See PD_StatusMsg_Cable for available fields.

Result: None

Example

$cable_status_db = Pd_StatusDataBlock_Cable
Call PD_SetStatusDataBlock_Cable( $cable_status_db )

Pd_ResetStatusDataBlock_Cable

Rev3.0 only

Clears the Cable Status Data Block in PD Exerciser. Should be called before calling PD_SetStatusDataBlock_Cable.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Call Pd_ResetStatusDataBlock_Cable()

Parameters: None

Result: None

Example

Call Pd_ResetStatusDataBlock_Cable()

Pd_WaitForGetStatus_Cable

Rev3.0 only

Waits for a user-defined timeout to receive Get_Status message. Responds to incoming messages as part of the GetStatus AMS.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Note: Pd_SetGetStatusSetting_Cable, PD_SetStatusDataBlock_Cable, and Pd_ResetStatusDataBlock_Cable might need to be called before calling this function.

Call Pd_WaitForGetStatus_Cable( )

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: Get_Status message not received.

Example

Call Pd_WaitForGetStatus_Cable()

PD_SetEnterUSBSetting_Cable

Rev3.0 only

Must be called before calling PD_WaitForEnterUSB_Cable or PD_DelayAutoResponse to take effect.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Call PD_SetEnterUSBSetting_Cable( PD_EnterUSB_Settings $settings )

Parameters

$settings

See PD_SetEnterUSBSetting for more details.

Result: None

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
.
.
$enter_usb_setting = PD_EnterUSB_Settings
{
	WaitTimeout = 50000
}
Call PD_SetEnterUSBSetting_Cable( $enter_usb_setting )

PD_WaitForEnterUSB_Cable

Rev3.0 only

Waits for a user-defined timeout to receive EnterUSB message. Responds to incoming messages as part of the EnterUSB AMS.

Note: The PD Exerciser should also act as a Cable Plug to process this command.

Note: PD_SetEnterUSBSetting_Cable might need to be called before calling this function.

Call PD_WaitForEnterUSB_Cable()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_REJECT

Subresult: Reject message has been sent as response

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult – EnterUSB message not received.

Example

PD_Set $PdGlobalSettings.EnableCableEmulator = PD_TRUE
.
.
Call PD_WaitForEnterUSB_Cable()

Pd_SetHardResetSetting

Must be called before calling PD_DelayAutoResponse or any other HighLevel Transaction Engine™ functions to take effect.

Call Pd_SetHardResetSetting( Pd_HardResetSettings $settings )

Parameters

$settings

Type is Pd_HardResetSettings, shown below:

Field Name

Possible Values (defaults in bold)

Description

WaitTimeOut

PD_DEFAULT_TIMEOUT_INFINIT

The timeout for waiting to receive the HardReset. Only applies to the Pd_WaitForHardReset function.

NoResponse

PD_FALSE

Whether or not the PD Exerciser should respond to received HardResets. Applies to all HighLevel Transaction Engine™ functions as well as PD_DelayAutoResponse function.

Result: None

Example

#Ignore all received HardResets
$settings = Pd_HardResetSettings
{
	NoResponse = PD_TRUE
}
call Pd_SetHardResetSetting( $settings )

Pd_WaitForHardReset

Waits for a user-defined timeout to receive HardaReset signal. It handles the HardReset signal.

Note: Pd_SetHardResetSetting might need to be called before calling this function.

Call Pd_WaitForHardReset()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_ReceivePacket are also valid (depending on the error type that occurred while receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: HardReset signal not received

Example

call Pd_WaitForHardReset()

PD_AddEPRSourceCap

Adds an EPR Source Capability to the PD Exerciser to be used by PD_NegotiatePower_Source or PD_NegotiatePower. Before adding a group of EPR source caps, make sure that there is no unwanted EPR source cap in the list by calling PD_ResetEPRSinkCaps.

Call PD_AddEPRSourceCap(PD_PowerDataObject $PowerDataObject)

Parameters

$PowerDataObject

See PD_EPRSourceCapabilitiesMessage for available data objects.

Result: None

Example

local $power_data_object = PD_PowerDataObjectFixedSupply_Source
{
	MaxCurrent_10mAUnits = 300
	Voltage_50mVUnits = 800
}
call PD_AddEPRSourceCap($power_data_object)

PD_ResetEPRSourceCaps

Clears all EPR Source Capabilities added to PD Exerciser.

Call PD_ResetEPRSourceCaps()

Parameters: None

Result: None

Example

call PD_ResetEPRSourceCaps()

PD_AddEPRSinkCap

It adds an EPR Sink Capabilities to PD Exerciser to be used by PD_NegotiatePower_Sink , PD_NegotiatePower or PD_WaitForNegotiatePower. Before adding a group of EPR sink caps make sure that there is no unwanted EPR sink cap in the list by calling PD_ResetEPRSinkCaps function.

Note: By default there is one predefined sink cap in the list.

Call PD_AddEPRSinkCap(PD_PowerDataObject $PowerDataObject)

Parameters

$PowerDataObject

See PD_EPRSinkCapabilitiesMessage for available data objects.

Result: None

Example

local $power_data_object = PD_PowerDataObjectFixedSupply_Sink
{
	OperationalCurrent_10mAUnits = 500
	Voltage_50mVUnits = 1000
}
call PD_AddEPRSinkCap($power_data_object)

PD_ResetEPRSinkCaps

Clears all EPR Sink Capabilities defined in the PD Exerciser.

Call PD_ResetEPRSinkCaps()

Parameters: None

Result: None

Example

call PD_ResetEPRSinkCaps()

PD_ SetGetEPRSourceCapSetting

Must be called before calling PD_WaitForGetEPRSourceCapabilities or PD_DelayAutoResponse to take effect.

Call PD_SetGetEPRSourceCapSetting( PD_GetEPRSourceCapability_Settings $settings )

Parameters

$settings

Type is PD_GetEPRSourceCapability_Settings, shown below:

Field Name

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) for receiving the GetEPRSourceCap message.

Result: None

Example

$geteprsrccap_setting = PD_GetEPRSourceCapability_Settings
{
	WaitTimeout = 50000
}
Call PD_SetGetEPRSourceCapSetting( $geteprsrccap_setting )

PD_GetEPRSourceCapabilities

Starts GetEPRSourceCapabilities AMS.

Call PD_GetEPRSourceCapabilities()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No message received as response

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message received as response

Example

Call PD_GetEPRSourceCapabilities()

PD_WaitForGetEPRSourceCapabilities

Waits for the DUT to start the EPRGetSourceCap AMS.

Note: Call PD_SetGetEPRSourceCapSetting before calling this function to set a timeout.

Call PD_WaitForGetEPRSourceCapabilities()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: Get_EPR_Source_Cap message not received

PD_SUBRESULT_REQUEST_MSG_INVALID_INDEX

Subresult: Invalid index in request message

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message has been sent as response

Example

Call PD_WaitForGetEPRSourceCapabilities()

PD_SetGetEPRSinkCapSetting

Must be called before calling PD_WaitForGetEPRSinkCapabilities or PD_DelayAutoResponse to take effect.

Call PD_SetGetEPRSinkCapSetting( PD_GetEPRSinkCapability_Settings $settings )

Parameters

$settings

Type is PD_GetEPRSinkCapability_Settings, shown below:

Field Name

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) for receiving GetEPRSinkCap message.

Result: None

Example

$geteprsnkcap_setting = PD_GetEPRSinkCapability_Settings
{
	WaitTimeout = 50000
}
Call PD_SetGetEPRSinkCapSetting( $geteprsnkcap_setting )

PD_GetEPRSinkCapabilities

Starts the GetEPRSinkCapabilities AMS.

Call PD_GetEPRSinkCapabilities()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No message received as response

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message received as response

Example

Call PD_GetEPRSinkCapabilities()

PD_WaitForGetEPRSinkCapabilities

Waits for the DUT to start the GetEPRSinkCapabilities AMS.

Note: PD_SetGetEPRSinkCapSetting can be called before this function to set a timeout.

Call PD_WaitForGetEPRSinkCapabilities()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_MSG_NOT_RECEIVED

Subresult: Get_Sink_Cap message not received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message has been sent as response

Example

Call PD_WaitForGetEPRSinkCapabilities()

PD_SetEnterEPRModeSetting

Must be called before calling PD_WaitForEnterEPRMode or PD_DelayAutoResponse to take effect.

Call PD_SetEnterEPRModeSetting( PD_EnterEPRMode_Settings $settings )

Parameters

$settings

Type is PD_EnterEPRMode_Settings, shown below

Field Names

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) to receive EPR_mode with Enter action message.

EnterPDP

0

EPR Sink Operational PDP


AckFailReason

PD_EPR_ENTER_FAIL_DATA_UDEFINED

If set, enter EPR mode fails with the specified reason on the acknowledge phase.

EnterFailReason

PD_EPR_ENTER_FAIL_DATA_UDEFINED

If set, enter EPR mode fails with the specified reason on the last phase.

SkipPowerNegotiation

PD_TRUE

PD_FALSE

Skips power negotiation after entering EPR mode.

SkipCableDiscovery

PD_TRUE

PD_FALSE

Skips cable discovery process during enterin EPR mode.

SkipEnterSucceeded

PD_TRUE

PD_FALSE

Skips sending Enter Succeeded for error injection.

Result: None

Example

$entereprmode_setting = PD_EnterEPRMode_Settings
{
	WaitTimeout = 50000
}	
Call PD_SetEnterEPRModeSetting( $entereprmode_setting )

PD_EnterEPRMode

Starts the EnterEPRMode AMS.

Call PD_EnterEPRMode()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

Example

Call PD_EnterEPRMode()

PD_WaitForEnterEPRMode

Waits for the DUT to start the EnterEPRMode AMS.

Note: PD_SetEnterEPRModeSetting can be called before this function to set a timeout.

Call PD_WaitForEnterEPRMode()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

Example

Call PD_WaitForEnterEPRMode()

PD_SetExitEPRModeSetting

Must be called before calling PD_WaitForExitEPRMode or PD_DelayAutoResponse to take effect.

Call PD_SetExitEPRModeSetting( PD_ExitEPRMode_Settings $settings )

Parameters

$settings

Type is PD_ExitEPRMode_Settings, shown below:

Field Names

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) to receive EPR_mode message with Exit action.

DelayBeforeExit

0

Defines the delay before exiting EPR mode

SkipNegotiationBeforeExit

PD_TRUE

PD_FALSE

Skips SPR power negotiation before exiting EPR mode

SkipNegotiationAfterExit

PD_TRUE,

PD_FALSE

Skips power negotiation after exiting EPR mode.

Result: None

Example

local $exiteprmode_setting = PD_ExitEPRMode_Settings
{
	WaitTimeout = 50000
}	
Call PD_SetExitEPRModeSetting( $exiteprmode_setting )

PD_ExitEPRMode

Starts the ExitEPRMode AMS.

Call PD_ExitEPRMode()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

Example

Call PD_ExitEPRMode()

PD_WaitForExitEPRMode

Waits for the DUT to start the ExitEPRMode AMS.

Note: PD_SetExitEPRModeSetting can be called before this function to set a timeout.

Call PD_WaitForExitEPRMode()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

Example

Call PD_WaitForExitEPRMode()

PD_SetEPRKeepAliveSetting

Must be called before calling PD_WaitForEPRKeepAlive or PD_DelayAutoResponse to take effect.

Call PD_SetEPRKeepAliveSetting( PD_EPRKeepAlive_Settings $settings )

Parameters

$settings

Type is PD_EPRKeepAlive_Settings, shown below:

Field Names

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) to receive EnterUSB message.

DisableAutoKeepAlive

PD_FALSE

PD_TRUE

Disable Sending EPRKeepAlive message automatically during DelayAutoResponse

Result: None

Example

local $epr_setting = PD_EPRKeepAlive_Settings
{
	WaitTimeout = 50000
}	
Call PD_SetEPRKeepAliveSetting( $EPRKeepAlive_setting )

PD_EPRKeepAlive

Starts the EPRKeepAlive AMS.

Call PD_EPRKeepAlive()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

Example

Call PD_EPRKeepAlive()

PD_WaitForEPRKeepAlive

Waits for the DUT to start the EPRKeepAlive AMS.

Note: PD_SetEPRKeepAliveSetting can be called before this function to set a timeout.

Call PD_WaitForEPRKeepAlive()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_REJECT

Subresult: Reject message has been sent as response

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

Example

Call PD_WaitForEPRKeepAlive()

PD_SetGetRevisionSetting

Must be called before calling PD_WaitForGetRevision or PD_DelayAutoResponse to take effect.

Call PD_SetGetRevisionSetting( PD_GetRevision_Settings $settings )

Parameters

$settings

Type is PD_GetRevision_Settings, shown below:

Field Names

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) to receive EnterUSB message.

Result: None

Example

$GetRevision_setting = PD_GetRevision_Settings
{
	WaitTimeout = 50000
}	
Call PD_SetGetRevisionSetting( $GetRevision_setting )

PD_GetRevision

Starts the GetRevision AMS.

Call PD_GetRevision()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

Example

Call PD_GetRevision()

PD_WaitForGetRevision

Waits for the DUT to start the GetRevision AMS.

Note: PD_SetGetRevisionSetting can be called before this function to set a timeout.

Call PD_WaitForGetRevision()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

Example

Call PD_WaitForGetRevision()

PD_SetGetSourceInfoSetting

Must be called before calling PD_WaitForGetSourceInfo or PD_DelayAutoResponse to take effect.

Call PD_SetGetSourceInfoSetting( PD_GetSourceInfo_Settings $settings )

Parameters

$settings

Type is PD_GetSourceInfo_Settings, shown below:

Field Names

Possible Values (defaults in bold)

Description

WaitTimeout

PD_DEFAULT_TIMEOUT_INFINIT

Wait Timeout (microseconds) to receive Source_Info message.

SIDO1

PD_SOURCE_INFO_SIDO_1_DEFAULT

The first Data Object in Source_Info message.

SIDO2

PD_SOURCE_INFO_SIDO_2_DEFAULT

The second Data Object in Source_Info message.

Result: None

Example

$GetSourceInfo_setting = PD_GetSourceInfo_Settings
{
	WaitTimeout = 50000
}	
Call PD_SetGetSourceInfoSetting( $GetSourceInfo_setting )

PD_GetSourceInfo

Starts the GetSourceInfo AMS.

Call PD_GetSourceInfo()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

PD_SUBRESULT_RESPONSE_NOT_SUPPORTED

Subresult: Not_Supported message received as response

PD_SUBRESULT_RESPONSE_REJECT

Subresult: Reject received as the response (in Revision 2.0)

Example

Call PD_GetSourceInfo()

PD_WaitForGetSourceInfo

Waits for the DUT to start the GetSourceInfo AMS.

Note: PD_SetGetSourceInfoSetting can be called before this function to set a timeout.

Call PD_WaitForGetSourceInfo()

Parameters: None

Result: Evaluate command results (including sub-results) using the IfMatched/ElseMatched command. Possible result values:

Result Value

Description

PD_RESULT_OK

Command succeeded

PD_RESULT_FAILED

Command failed. In this case, corresponding sub-results for PD_SendPacket and PD_ReceivePacket are also valid (depending on the error type that occurred while sending or receiving data).

PD_SUBRESULT_RESPONSE_REJECT

Subresult: Reject message has been sent as response

PD_SUBRESULT_RESPONSE_TIMEOUT

Subresult: No response received.

Example

Call PD_WaitForGetSourceInfo()

Auto Responses Capability

The following commands respond to all incoming Power Delivery messages automatically according to current operational settings. In addition to these commands, Auto-Response is activated at the start of each High-Level command.

PD_DelayAutoResponse

Waits for the maximum specified duration and responses to received packet automatically.

Call PD_DelayAutoResponse( duration_micro_Sec )

Parameters: duration_micro_Sec

Example

call PD_DelayAutoResponse( 1000 )

PD_PauseAutoResponse

Responsive PD Exerciser pause that waits until ResumePDGeneration() is called by the Automation Application. By calling this function, an Automation Application gets notified that the PD Exerciser Engine is paused. See the USB Analyzer Automation Manual for more information on WaitForPDGenerationPauseTag() and ResumePDGeneration() API calls.

Note: All the rules that apply to PD_DelayAutoResponse apply to this function, too.

Call PD_PauseAutoResponse( tag )

Parameters: tag. Makes each call unique.

Examples

# PD Exerciser Script example:
call PD_PauseAutoResponse( 1 )

' WSH example:
Set Analyzer = WScript.CreateObject("CATC.USBTracer")

Analyzer.WaitForPDGenerationPauseTag 15000, diff_time, pauseTag, isGenDone

If pauseTag <> 0 Then
	WScript.Quit
End If

Analyzer.ResumePDGeneration