GRL-USB-PD-C2/C2-EPR API 1.1.9
GRL-USB-PD-C2/C2-EPR API Documentation
|
Public Member Functions | |||||||
int | Initialize (String ipAddress, int controllerIndex=0, bool isClearCommn=true) | ||||||
Method to Initialize IP address and controllerIndex. | |||||||
int | UseTypeCCable (ControllerPort port=ControllerPort.ONE) | ||||||
API to configure GRL-SPL cable. | |||||||
int | UseTesterCable (VendorDefinedMessage vdm=null, ControllerPort port=ControllerPort.ONE, EmulateCableOn ccline=EmulateCableOn.CC2) | ||||||
| |||||||
List< MeasurementChannel > | CreatePlotDisplayList (MeasurementChannel channel=MeasurementChannel.END) | ||||||
Creates default plots for the display channels. Using the add or clear list functions will enable adding display channels to the plot. You will need to create the display channel list before calling the Show Plot function. | |||||||
List< MeasurementChannel > | AddPlotDisplayList (MeasurementChannel channel) | ||||||
Adds display channels to the existing plot. This function needs to be called before calling the Show Plot function. | |||||||
int | ShortVBUSLine (bool EnableShort, ControllerPort port=ControllerPort.ONE) | ||||||
Use this API to short VBUS line to ground. | |||||||
void | DebugLogger (string discription, Exception ex) | ||||||
Saves all the Exception in text file in Location C:\GRL\Appdata. | |||||||
bool | EnableQcLegacyMode (bool enable) | ||||||
Sets the Controller to QC Legacy Mode. | |||||||
bool | FloatDpDn (bool enable) | ||||||
Float DPlus and Dminus. | |||||||
bool | FloatBothDpDn () | ||||||
Sets trhe Controller to QC Legacy Mode. | |||||||
bool | ShortVbustoGround (bool IsEnable, int shortingTime_milliSec, ControllerPort port=ControllerPort.ONE) | ||||||
TO short VBUS to ground. | |||||||
bool | ShortVconntoGround (bool IsEnable, int shortingTime_milliSec, VCONNLoading Vconnlodg=VCONNLoading.VCONN_TO_CC2, ControllerPort port=ControllerPort.ONE) | ||||||
TO short VCONN to ground. | |||||||
void | EmulateQCSource (bool enableQcSource) | ||||||
API to emulate Tester as QC source. | |||||||
void | WaitFor (int waitTimeMilli) | ||||||
Method to provide delay in milliseconds. | |||||||
int | ValidateRequest_By_index (int iPDOind, ControllerPort port=ControllerPort.ONE) | ||||||
API to validate request message by using request message PDO index. | |||||||
void | EnableLSADCDebugLog (bool enable) | ||||||
This API used for the enabling the LSADC Debug log write. | |||||||
void | EnableReadDebugLogger (bool enable) | ||||||
This API used for the enabling the LSADC Debug log Read. | |||||||
int | Short_Dplus_Dminus (bool isApplyShort) | ||||||
Using this API to SHORT D+ and D- line. | |||||||
void | CCLineStreamingTimerReset (int controllerIndex) | ||||||
Use this API to reset streamer time. | |||||||
void | AttachController (int controllerIndex, CommunicationPORT commPort) | ||||||
Use this API to Attach selective port. | |||||||
void | DetachController (int controllerIndex, CommunicationPORT commPort) | ||||||
Use this API to Detach selective port. | |||||||
void | QuickAttachPort (CommunicationPORT commPort, byte[] buffData) | ||||||
Use this API to Attach selective port in two controller. | |||||||
void | QuickDetachPort (CommunicationPORT commPort, byte[] buffData) | ||||||
Use this API to Detach selective port in two controller. | |||||||
bool | StartReadingStreamerData (int controllerIndex) | ||||||
Use this API to read streamer data from controller. | |||||||
void | Request_PortA_PortB (RequestMessage message) | ||||||
Use this API to send Request message for both ports (GrlPdLib.ControllerPort.ONE and GrlPdLib.ControllerPort.TWO) | |||||||
void | InitialConfig () | ||||||
Use this API to configure Tester mode as Sink, Cable type as GRL_SPL_Cable in both ports (GrlPdLib.ControllerPort.ONE and GrlPdLib.ControllerPort.TWO) | |||||||
bool | Bit_Manipulation_Response_Check (MsgType msgType, SpecRevision specRev, SOP_TYPE sopType, int iErrorType, bool extHeader=false, int txTimerInMilliSec=500) | ||||||
This API used for the manipulating the BIT (conversion) to required BIT. | |||||||
double | UpdateVoltageToPDMessage (ControllerPort port=ControllerPort.ONE) | ||||||
Use this API to Update the voltage to PDMessage. | |||||||
bool | Interruption_by_PD_Message () | ||||||
Use this API to send Interruption by PD Message. | |||||||
PDMessage | VerifyVDMGoodCRCresponse (List< PDMessage > msglst, VDM_CMD vdmCmd, VDM_CMD_Type vdm_cmdtype, SOP_TYPE soptype, int iOccurance, bool IsTestermsg=true) | ||||||
GrlC2Controller (bool isCreateNewInstance=true) | |||||||
int | Attach (ControllerPort port=ControllerPort.ONE) | ||||||
Enables the GRL-USB-PD-C2 controller to be programmatic controlled when plugged in with the DUT. | |||||||
int | Detach (ControllerPort port=ControllerPort.ONE) | ||||||
Enables the GRL-USB-PD-C2/F1 controller to be programmatically controlled when removing the attached DUT. This function removes all the Rp/Rd values from the CC line and changes the state of the controller to Source Detach or Sink Detach. It is recommended to call this Detach function before configuring the controller mode, setting the source sink and source capabilities and calling the Attach function. | |||||||
int | ADCRead (List< MeasurementChannel > channelList=null, string name="") | ||||||
void | UpdateController (PD_Controller m_PDctrl, PD_Controller_C2Gen2 m_PDctrlGen2) | ||||||
To update the Controllers. | |||||||
int | StartCapture (List< MeasurementChannel > listOfMeasurementChannel=null, int subSamplingRatio=1000, bool enCableDrop=false, bool bEnableLSADC=true, bool bEnableCCLine=true, int socBufferSize=1, ControllerPort port=ControllerPort.ONE) | ||||||
This API starts the data capture from the C2 Controller, which includes PD messages and configured list of signal channels from USB-C port of C2 Controller. | |||||||
int | StopCapture (int Timeout=5000) | ||||||
Stops the data capture, including any PD messages and voltage values. | |||||||
int | ConfigureControlMessageResponse (MsgType receivedMessageType, ResponderMessageType responseMessageType, ControllerPort port=ControllerPort.ONE) | ||||||
Configures response messages for the GRL-USB-PD-C2/F1 controller. | |||||||
bool | ConfigPS_Ready_Delay (PS_RDY_Type psRdyType, uint delayInmSec=0, bool setDefaultTimer=true) | ||||||
This API is used to configure delay for PS_RDY message. | |||||||
void | ConfigurePacketDelay (MsgType delayMsgType, Type_of_Msg MessageType, double dDelay_mS, bool bEnableDelay) | ||||||
This API used for Set the packet delay in milli seonds. | |||||||
bool | Config_HSADC (ControllerPort port=ControllerPort.ONE) | ||||||
This API used to configure the HSADC data. | |||||||
void | Config_CC1_Channel (ControllerPort port=ControllerPort.ONE) | ||||||
This API used for configuring the CC1 channel data. | |||||||
void | Config_CC2_Channel (ControllerPort port=ControllerPort.ONE) | ||||||
This API used for configuring the CC2 channel data. | |||||||
void | ConfigureADC (LSADC_Channel channels, bool LSADC0En, bool LSADC1En, bool LSADC2En) | ||||||
This API used for configuring the ADC channel data. | |||||||
void | ConfigCC1_HSADC (ControllerPort controllerPort=ControllerPort.ONE) | ||||||
This API used for configuring the CC1 amd HSADC channel data. | |||||||
void | ConfigCC2_HSADC (ControllerPort controllerPort=ControllerPort.ONE) | ||||||
This API used for configuring the CC2 amd HSADC channel data. | |||||||
bool | ConfigureAutoTestMode_MaxPower (CableType cable, PortDataRole datRle_Tester, Port_Power_Role powRle_Tester, ControllerPort por=ControllerPort.ONE) | ||||||
This API is used to configure controller mode, set cable type and tester will draw max power supported by DUT. | |||||||
bool | ConfigureAutoTestMode_UserDefined (CableType cable, PortDataRole datRle, Port_Power_Role powRle, PowerSupplyType supty, int iPDOInd, double dVoltage_mV, double dCurrent_mA, int iEloadHandle, int iEloadMode, int iEloadPercent, ControllerPort por=ControllerPort.ONE) | ||||||
This API is used to configure controller mode, set cable type, and load current details when controller is operating in auto test mode. | |||||||
bool | ConfigReplaceMessage (bool setDefault, MsgType actualMsg, MsgType replaceMsg, Type_of_Msg msgTypeAct, Type_of_Msg msgTypeReplace) | ||||||
This API used to configure replace message. | |||||||
bool | ConfigReplaceMessageCount (int iCount) | ||||||
To configure replace message count. | |||||||
bool | ConfigureSoftResetResponse (int respMsgVal, int txTimerInMilliSec) | ||||||
Use this API to send SoftReset Response. | |||||||
bool | Configure_GlitchAfterAttach_Msg (int iGlitch_Duration, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to generate the Glitch in CC Line. | |||||||
bool | ConfigureReplacePDMessageInGroup (bool setDefault, MsgType actualPdMsgType, MsgType replaceWithPdMsgType, Type_of_Msg msgTypeOfActualPdMsgType, Type_of_Msg msgTypeOfReplacePdMsgType, int txTimerInMilliSec) | ||||||
Use this API to replace one PD message with another PD message. Once configured messages please use this API to execute configured messages."GroupMessageConfigure". | |||||||
bool | ConfigureSoftResetResponseForVDMMsg (int respMsgVal, SOP_TYPE sOP_TYPE, int txTimerInMilliSec) | ||||||
Use this API to send SoftReset Response for Vendor Defined Message. | |||||||
bool | Configure_Message_To_AMS_Interupt (bool setdefault, MsgType ExpectedMessage, MsgType ConfiguredMessage, Type_of_Msg ExpectedMessageType, Type_of_Msg ConfiguredMessageType, SOP_TYPE sopType=SOP_TYPE.SOP, bool interruptTxMsg=false, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to interrupt the AMS for Interptible and Uninterptible message. | |||||||
int | ConfigureEload (double maxCurrentInAmps, EloadChannel eloadChannel, SwitchState state, VCONNLoading vCONNLoading=VCONNLoading.Disable_VCONN, ControllerPort pORT=ControllerPort.ONE) | ||||||
API to use configure the Eload. | |||||||
int | ConfigureEloadinGroup (double maxCurrentInAmps, EloadChannel eloadChannel, SwitchState state, VCONNLoading vCONNLoading=VCONNLoading.Disable_VCONN, ControllerPort pORT=ControllerPort.ONE, SOP_TYPE sopType=SOP_TYPE.SOP) | ||||||
API to use configure the Eload in group. | |||||||
int | SetEloadCurrent (double voltageInVolts, double maxCurrentInAmps, SwitchState state, EloadChannel channel, ControllerPort port=ControllerPort.ONE) | ||||||
Sets the E-load Current to be drawn in the constant current mode. Ensure that the GRL-USB-PD-C2/F1 controller mode is set as a Sink before calling this method and also turn ON the E-load switch using the SetEloadState function. | |||||||
int | SetEloadCurrentRange (double LoadStart_Amps, double LoadStop_Amps, int LoadStep_MilliAmps, int StepIntervalMilliSec, EloadMode LoadMode, double LoadStopCondition_VoltageDropMin_Volts, EloadChannel channel, ControllerPort port=ControllerPort.ONE) | ||||||
API to sweep the load current with configurable load step in Constant Current or Constant Resistance mode In CC Mode, Lowest load step is 8mA In CR Mode, Lowest load step is 25mA. | |||||||
int | SetEloadState (EloadChannel channel, SwitchState state, ControllerPort port=ControllerPort.ONE) | ||||||
Sets the E-load state as ON or OFF. Ensure that the GRL-USB-PD-C2 controller mode is set as a Sink before turning on the E-load. You may also need to ensure the VBUS switch is turned OFF before turning ON the E-load switch. Use this function with caution - in case the over current protection of the DUT is not turned on, drawing more power may cause damage to the DUT. | |||||||
string | GetEloadVersion () | ||||||
Get C2 Eload version. | |||||||
bool | SwitchToExternalEload (bool isEnable) | ||||||
External eload ON/OFF. | |||||||
int | SetEPRMode (bool enableEPRMode, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to enable or disable the EPR mode. | |||||||
int | Set_EPR_SourceCap_Configuration (SourceCapability sourceCapabilityObj, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to Send EPR Sourcecap. | |||||||
int | Set_EPR_Request_Configuration (RequestMessage requestMessageObj, byte PDONumber, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to Send EPR Request message. | |||||||
int | SetEPRActionConfiguration (EPRConfig eprConfig, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to Set EPR Configuration. | |||||||
int | Set_EPR_SinkCap_Configuration (SinkCapability sinkCapabilityObj, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to Send EPR Sinkcap. | |||||||
bool | Set_EPR_Unchunked_Request_Configuration (bool isUnchunked=true) | ||||||
This API is used to enable or disable EPR Unchunked request message. | |||||||
bool | Set_EPR_Mode_Exit_Configuration () | ||||||
This API is used to enable or disable EPR mode exit. | |||||||
bool | Set_SOP_Prime_DiscovID_Configuration (bool isSendSOPPrimeDiscId) | ||||||
This API is to enable or disable Prime DiscoverID configuration. | |||||||
bool | Set_EPR_PPS_Eload_Configuration (byte ppsEloadCfg) | ||||||
This API is to enable or disable EPR PPS Eload configuration. | |||||||
int | SendEPRRequestMessage (RequestMessage msg, ControllerPort port=ControllerPort.ONE) | ||||||
This function used to send EPRRequest message. | |||||||
int | SendEPRModemsg (EPR_Mode_Message msg, ControllerPort port=ControllerPort.ONE) | ||||||
This function is to send EPR Mode message. | |||||||
int | SetTesterUnChkExdMsgSupport (int iSupported, bool bClearConfig, bool IsAppCtrl) | ||||||
This API used to enable or disable the Unchunked Extended message. | |||||||
int | GetCommandExecutionStatus () | ||||||
Returns the execution status of last API. | |||||||
double | GetMeasurementValue (MeasurementChannel channel, double dTimeInSeconds) | ||||||
This API is used to Get the measurement value. | |||||||
double | GetPresentMeasurementValue (MeasurementChannel channel) | ||||||
This API is used to get the current measurement value. | |||||||
List< LSADC_DataRead > | GetPresentMeasurementValue (List< MeasurementChannel > channel) | ||||||
This API is used to get the voltage and current measurement value. | |||||||
dynamic | GetPresentMeasurementValue () | ||||||
This API is used to get the voltage and current measurement value. | |||||||
string | GetFirmwareVersion () | ||||||
This API is used to get C2 Firmware version. | |||||||
SourceCapability | GetSourceCapabilityFromPDMessageObject (PDMessage pdMsg, ControllerPort port=ControllerPort.ONE) | ||||||
Convert PD Message to SourceCapability message. | |||||||
int | GetCaptureStatus () | ||||||
This API is used to determine whether the streamer has started or not. | |||||||
int | GetConnectionStatus () | ||||||
This API is used to get the Connection Status of the PD controller. If the PD controller is connected this function returns connected. | |||||||
int | GetPdStatus (ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to get the PD contract negotiation status. | |||||||
ControllerMode | GetControllerMode (ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to get the GRL-USB-PD-C2/F1 controller mode during PD contract negotiations. | |||||||
SourceCapability | GetDutSourceCapability (ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to get Source Capabilities from the connected Source DUT. If the connected DUT is not a Source device, it will return null. | |||||||
SinkCapability | GetDutSinkCapability (ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to get Sink Capabilities from the Sink DUT. If the connected DUT is not Sink device, it will return null. | |||||||
SourceCapability | GetDutExtendedSourceCapability (ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to get Extended Source Capabilities from the connected Source DUT. If the connected DUT is not a Source device, it will return null. | |||||||
VendorDefinedMessage | GetCableCapability (ControllerPort port=ControllerPort.ONE) | ||||||
Returns the capabilities of e marker cable connected to GRL-USB-PD-C2 controller. | |||||||
int | GetCCLineActive () | ||||||
Used this API to get active communication line(CC) | |||||||
int | GetListOfPDOFromPDMessage (List< PDMessage > msgCollec) | ||||||
Use this API to get list of PDO's sent by DUT. | |||||||
List< PDMessage > | GetPDMessages (ControllerPort port=ControllerPort.ONE) | ||||||
Use this API to get CC line msg from the controller. | |||||||
dynamic | GetPDMessage (ControllerPort port=ControllerPort.ONE, MsgType msgType=MsgType.NONE, int iOccur=1) | ||||||
Use this API to get PD message from the controller. | |||||||
int | GetTotalPDMessageCount (ControllerPort port=ControllerPort.ONE) | ||||||
Use this API to get Total PDmsg count. | |||||||
double | GetTimeAtVoltageValue (int channel, double startTime=0.0, int timeIntervalInSec=0, double thresholdVal=0.0, bool isRisingEdge=false) | ||||||
Use this API to get time at voltage value. | |||||||
PDMessage | GetPDMessageFromIndex (int iMsgInd, ControllerPort port=ControllerPort.ONE) | ||||||
Use this API to get PD msg from index. | |||||||
List< PDMessage > | GetMessages (ControllerPort port=ControllerPort.ONE, bool includeAllBusEvents=true) | ||||||
Provides all the PD messages received or sent by the GRL-USB-PD-C2/F1 controller. To enable the PD message capture capability of the controller, the data streamer needs to be configured first. Refer to the StartDataStreamer function for more details on how to set up the streamer. | |||||||
dynamic | GetAssertionMessages (ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to get All Assertions messages. | |||||||
dynamic | GetAssertionMsg (ControllerPort port=ControllerPort.ONE, MsgTypeSec msgTypeSec=MsgTypeSec.NONE, int iOccur=1) | ||||||
This API is used to get one Assertion message. | |||||||
dynamic | GetAssertionPDMsg (ControllerPort port=ControllerPort.ONE, MsgTypeSec msgTypeSec=MsgTypeSec.NONE, int iOccur=1) | ||||||
This API is used to get one Assertion message. | |||||||
dynamic | GetPDMsg (ControllerPort port=ControllerPort.ONE, MsgType msgType=MsgType.NONE, int iOccur=1) | ||||||
This API is used to get one PD Message. | |||||||
string | GetSerialNumber () | ||||||
API to get the serial number of the C2 or C2-EPR tester. | |||||||
double | GetTimeDifferenceAtSignalChange (int channel, double stTime=0.0, int timeIntervalInSec=0, double thresholdVal=0.0, bool isRisingEdge=false, ControllerPort port=ControllerPort.ONE, MsgTypeSec msgTypeSec=MsgTypeSec.FR_Swap_Signal_Asserted) | ||||||
API to get time Difference at signal change. | |||||||
double | GetTimeForVoltageValue (int channel, double startTime=0.0, double timeIntervalInSec=0, double thresholdVal=0.0, bool isRisingEdge=false) | ||||||
API to Get time for voltage value. | |||||||
string | GetSourceCapPDO (ControllerPort port=ControllerPort.ONE) | ||||||
API to Get sourcecap PDO details. | |||||||
double | GetHSADCValue () | ||||||
API to get the HSADC data. | |||||||
double | GetDplusCurrent () | ||||||
This API used to get the current value based on the port. | |||||||
int | GroupCommand_Add (GroupCommandAPIEnum cmdType, object cmdInfo, int iTimeDelayInMilliSec, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to configure GRLSharedModule.GroupCommandAPIEnum. | |||||||
int | GroupCommand_Clear () | ||||||
This API used to clear group command configuration. | |||||||
int | GroupCommand_Run () | ||||||
This API is used to configure the GroupCommand message correctly. | |||||||
bool | GroupMessageConfigure (FwMsgCfgType cfgType) | ||||||
Use this API to configure the message execution type whether to initiate the messages at the runtime or pre-configure the messages with time delay. | |||||||
bool | GroupMessageClear () | ||||||
Use this API to clear the messages in the buffer. | |||||||
bool | GroupMessageAdd (MsgType pdMsgType, SpecRevision specRev, SOP_TYPE sopType, bool extHeader=false, int txTimerInMilliSec=500, List< byte > extHeaderPayload=null) | ||||||
Use this API to add the messages into buffer. | |||||||
bool | AddTracesToController (ControllerPort port=ControllerPort.ONE) | ||||||
Use this API to add the traces to GRL_USB_PD_C2 tester. | |||||||
void | SaveHTMLForPDPackets (string fileNameHTML, string testName, string testId, bool isVoltageUpdate=false) | ||||||
Used this API to Save PD protocol capture into .html file. | |||||||
void | SaveHTMLForTestSummary (string fileNameHTML, string testName, string testId) | ||||||
Used this API to Save TestSummary into .html file. | |||||||
void | SaveHTMLForPDPacketsForFourPort (List< PDMessage > pdMsgCollec, string fileNameHTML, string testName, string testId, bool isVoltageUpdate=false) | ||||||
Used this API to Save four port PD protocol capture into .html file. | |||||||
bool | SaveTestResultAndPDPacketInCSV (string fileName, ControllerPort port=ControllerPort.ONE) | ||||||
Use this API to save all PD messages into CSV file. | |||||||
bool | SaveTestResultInCSV (PDTestResult baseTestResult) | ||||||
Use this API to save validated PD Test Result into CSV file. | |||||||
bool | SaveTestPDPacketInCSV (List< PDMessage > msgColle, string filename, bool isVoltageUpdate=false) | ||||||
Use this API to save all PD messages into CSV file. | |||||||
bool | CreateReportFolder () | ||||||
Use this API to Create report folder. | |||||||
string | GetReportFolderPath () | ||||||
Use this API to get the report folder path. | |||||||
bool | SaveTraceFile (string fileName) | ||||||
Saves signal and protocol data into specified file. | |||||||
bool | ResetController () | ||||||
Use this API to reset the Controller. | |||||||
bool | Reset_TestResultObject () | ||||||
This API is used to Clear the test result. | |||||||
bool | PowerCycleTheTester () | ||||||
Used this API to Power cycle the GRL_USB_PD_C2 tester. | |||||||
void | ClearCaptureData () | ||||||
Use this API to clear captured data. | |||||||
int | RebootController () | ||||||
This API will reboot the GRL-USB-PD-C2 controller. Expected reboot time is 20-30 seconds. After calling this API, please re-initialize the ethernet connection by calling Initialize() API before calling any further API's. | |||||||
List< MeasurementChannel > | GetPlotDisplayList () | ||||||
This API is used to display the plot . | |||||||
bool | Reset_PDPort (ControllerPort port=ControllerPort.ONE) | ||||||
Resets Port1 and Port2 of USB-PD-C2 controller. | |||||||
int | ClearPDMessages (ControllerPort port=ControllerPort.ONE, int iMsgCntToClear=0) | ||||||
Clears all captured messages from the PD message capture memory on the GRL-USB-PD-C2/F1 controller. It is recommended to clear the memory before starting a new test to avoid any buffer overflow. | |||||||
void | ClearDutInfo (ControllerPort port=ControllerPort.ONE) | ||||||
This API is used for Clear the attributes of dut type. | |||||||
bool | DisposeGRLControllerLink (int controllerIndex) | ||||||
Use this API to Disable the GRLController ethernet connection. | |||||||
List< MeasurementChannel > | ClearPlotDisplayList () | ||||||
Clears existing plots of the display channels to make way for creating a new list of channels The new list of channels needs to be created before calling the Show Plot function which otherwise will display Port A VBus and Port A VBus Current channels by default. | |||||||
int | SendControlMessage (MsgType msg, ControllerPort port=ControllerPort.ONE) | ||||||
Sends the control messages from the GRL-USB-PD-C2/F1 controller. Some of the messages you can send are. | |||||||
void | SendDataMessage (MsgType msgType, bool isDefaultPayload=true, SOP_TYPE sopType=SOP_TYPE.SOP, SpecRevision revision=SpecRevision.PD_3_0, int noOfDataObjet=1, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to Send Data messages. Alert, Get_Country_Info. | |||||||
void | SendExtendedMessage (MsgType msgType, bool isDefaultPayload=true, SOP_TYPE sopType=SOP_TYPE.SOP, SpecRevision revision=SpecRevision.PD_3_0, int noOfDataObjet=1, ControllerPort port=ControllerPort.ONE) | ||||||
This API used to send Extended Message with Payload. Get_Manufacturer_Info, Get_Battery_Status, Get_Battery_Cap, Firmware_Update_Request, Security_Request. | |||||||
int | SendPdoRequestMessage (RequestMessage msg, ControllerPort port=ControllerPort.ONE) | ||||||
This API used to sends the PDO request messages during the PD contract negotiations. | |||||||
int | SendVendorDefinedMessage (VendorDefinedMessage initiateMessage, SOP_TYPE sopType=SOP_TYPE.SOP, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to send Vendor Defined message. | |||||||
int | SendSourceCapsMessage (SourceCapability msg, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to initiate sourcecap message. | |||||||
int | SendRequestmessage_By_Index (int iSourcePDOIndex, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to send request message by configuring source PDO index. | |||||||
void | SendFRSwapSignal () | ||||||
Send FR_Swap signal from Tester. | |||||||
bool | SendBISTCarrierMode (SOP_TYPE sopType) | ||||||
This API used to send the BIST carrier mode. | |||||||
bool | SendBISTTestData (SOP_TYPE sopType) | ||||||
This API is used to send BISTCarrierMode message. | |||||||
bool | SendHardReset (bool isFlip=false, ControllerPort port=ControllerPort.ONE) | ||||||
Use this API to send HardReset. | |||||||
int | SendSinkCapMessage (SinkCapability msg, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to send SinkCap message. | |||||||
bool | SendAssertionMessage (ControllerPort port=ControllerPort.ONE) | ||||||
Use this API to send assertion message. | |||||||
bool | SendSoftReset (ControllerPort port=ControllerPort.ONE) | ||||||
Send SoftReset message with different SOP_TYPE. | |||||||
void | SetCommPort (ControllerPort port) | ||||||
This API is used to set the Communication port. | |||||||
int | SetPdSpecificationRevision (SpecRevision specRevision, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to set the PD spec revision value. | |||||||
int | SetSourceCapability (SourceCapability objSourceCapability, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to set the Source cap value. | |||||||
void | SetTesterVBUSCapacitance (Tester_VBus_Capacitance capacitance) | ||||||
This API is used to set the VBUS Capacitance on the GRL-USB-PD-C2/F1 controller. When this function is called, appropriate capacitance is added across VBUS and ground.
| |||||||
int | SetSinkCapability (SinkCapability objSinkCapability, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to set the sink capability of the GRL-USB-PD-C2/F1 controller. This is applicable only when the controller mode is set as Sink or DRP. | |||||||
int | SetGroupSinkCapability (SinkCapability objSinkCapability, ControllerPort port=ControllerPort.ONE, SOP_TYPE sopType=SOP_TYPE.SOP) | ||||||
This API is used to set the group of sink cap's. | |||||||
int | SetSinkRequestMessage (RequestMessage objRequest, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to set the sink request message during the PD contract negotiations. Once the GRL-USB-PD-C2 controller receives the source capability. | |||||||
int | SetControllerMode (ControllerMode mode, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to set the GRL-USB-PD-C2 controller mode as Source, Sink or DRP along with all related functionalities such as SourceCapability, SinkCapability etc. to allow the controller to send the required capabilities when requested by another PD device. | |||||||
int | SetRpValue (RpValue rpVal, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to set Rp value of the C2 Controller when it is set to Source mode Note: Using cable set API (UseTesterCable(EmulateCableOn.CC1)) you can define Rp value on CC1 or CC2. | |||||||
int | SetVendorDefinedMessageResponse (VDM_CMD cmdType, VendorDefinedMessage responseMessage, SOP_TYPE sopType=SOP_TYPE.SOP, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to set Payload details of VDM message responded by USB-PD-C2 controller. | |||||||
int | SetTesterCableDropCompensation (bool compensateCableDrop) | ||||||
This API is used to Configure Tester to enable or disable the cable drop compensation in VBUS/VCONN voltage measurements This API is applicable only for GRL-SPL cable. | |||||||
int | SetBatteryStatusMessage (BatteryStatusMesaage batteryStatusMesaage, BatteryStatus batteryStatus, bool InvalidBatteryReference=false, bool BatteryisPresent=false, double BatteryPresentCapacity=0, ControllerPort port=ControllerPort.ONE) | ||||||
Sets the Battery Status Messages to be sent as Runtime messages. | |||||||
int | SetVbusVoltage (double voltageInVolt, double currentLimitInAmps, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to set the VBus voltage. Ensure that the GRL-USB-PD-C2/F1 controller mode is set as a Source before setting the voltage. After setting the voltage you may need to turn On the voltage switch using the SetVbusState function. | |||||||
int | SetNotToSendRequestMessageResponse (MsgType msgType, bool dontSendResponse, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to disables the GRL-USB-PD-C2/F1 controller from sending response messages to any particular message requests. | |||||||
int | SetControllerCurrentLimit_Type_C_Only_Mode (double cur_mA, ControllerPort port=ControllerPort.ONE) | ||||||
This API should be invoked after setting the controller mode to ControllerMode.Type_C_Only_SRC To set currnt limit. | |||||||
bool | SetBISTSharedTestEntryMode (BIST_TYPE bistType=BIST_TYPE.Reserved, SOP_TYPE sopType=SOP_TYPE.SOP) | ||||||
This API is used to send BIST Shared Test Entry Mode message. | |||||||
bool | SetBISTSharedTestExitMode (BIST_TYPE bistType=BIST_TYPE.Reserved, SOP_TYPE sopType=SOP_TYPE.SOP) | ||||||
This API is used to send BIST Shared Test Exit Mode. | |||||||
bool | SetMessagePayload (params byte[] payloadInByte) | ||||||
This API is used to set payload for Data/Extended messages. | |||||||
int | SetSnifferMode (bool enableSnifferMode, bool IsGRL_SPL_TestCable_UsedOnBothC2Ports=false) | ||||||
This API allows user to enable/disable the sniffer mode When sniffer was enabled, controller will capture VBUS/CC1/CC2 details exchanged between devices connected between Port1 and extension slot. When sniffer was enabled, controller will be set to default working mode This API allows user to enable/disable the sniffer mode When sniffer was enabled, controller will capture VBUS/CC1/CC2 details exchanged between devices connected between Port1 and extension slot. When sniffer was enabled, controller will be set to default working mode. | |||||||
bool | SetTriggerOutput (int TriggerPulseDurationInMicroSeconds=300) | ||||||
This API is used to set the output trigger with pulse signal. | |||||||
int | SetTesterAsQuickChargeSink (bool enableQCMode, bool enablePDSupportInQCMode) | ||||||
This API is used to set tester as quick charge sink device. | |||||||
int | SetQCVoltageChangeRequest (int Voltage) | ||||||
This API is used to request QC sink DUT to change the voltage level to 5V, 9V, 12V or 20V. | |||||||
int | SetQCVoltageIncrementRequest_200mV () | ||||||
API to increase VBUS voltage level by 200mV by sending pulses over D+ line. | |||||||
int | SetQCVoltageDecrementRequest_200mV () | ||||||
This API is used to decrease VBUS voltage level by 200mV by sending pulses over D- line. | |||||||
int | SetVconnLoadCurrent (double Vconn_Current, VCONNLoading vCONNLoading=VCONNLoading.VCONN_TO_CC2, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to set VCONN Current, Either CC1 or CC2. | |||||||
bool | SetDRswapConfiguration (DR_SWAP_ENUM dR_SWAP) | ||||||
This API is used to send the response message to DR_SWAP message Send = 1, Accept = 2, Send_Accept = 3, NONE. | |||||||
bool | SelectCableType (CableType cableType, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to configure the type of cable. | |||||||
bool | SetOverCurrentProtection (bool enableOCP, bool enableCurrentLimit, int setOCPValue) | ||||||
This API is used to set over current protection value of C2 controller. | |||||||
bool | SetControllerConfiguration (ControllerConfigEnum controllerConfigEnum, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used for configuring the C2 controller mode. | |||||||
bool | SetVconnVoltage (double voltage, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used for the configuring the VCONN voltage on CC1 or CC2 line. | |||||||
bool | Set_Dplus_Voltage (double voltage) | ||||||
This API is used to configure the minimum and maximum voltage in Programmable Power Supply (PPS). | |||||||
bool | Set_Dminus_Voltage (double voltage) | ||||||
This API is used to configure the minimum voltage in Programmable Power Supply (PPS). | |||||||
bool | SetAutoTestMode (bool bIsEnable, ControllerPort por=ControllerPort.ONE) | ||||||
This API is used to set auto test mode in GRl C2 controller. | |||||||
void | SetFRSwapDetection (bool isFRSwapEnable=true) | ||||||
This API used to Set FRSwap signal detect configuration. | |||||||
void | SetControllerIndex (int controllerIndex) | ||||||
This API isused to set controller index. | |||||||
bool | SetCableType (int cableType=0, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to set the cable type. | |||||||
void | SetPd_Controller (PD_Controller pdCtrler) | ||||||
This API is used for configuring the PD parameters to their default values. | |||||||
void | SetDataStreamService (DataStreamService dataStream) | ||||||
This API is used to configure the parameters of the Data Stream service . | |||||||
void | SetC2Sniffer (C2SnifferNew c2SniffObj) | ||||||
This API is used to configure the C2 browser app in SNIFFER mode. | |||||||
bool | SetVconnVoltage (double dVconnVolt, VCONNLoading vconnComm, ControllerPort port=ControllerPort.ONE) | ||||||
This API is used to set the tester Vconn voltage either CC2 or CC1. | |||||||
Properties | |
String | IpAddress [get, set] |
List< MeasurementChannel > GrlC2ApiLib.GrlC2Controller.AddPlotDisplayList | ( | MeasurementChannel | channel | ) |
Adds display channels to the existing plot. This function needs to be called before calling the Show Plot function.
channel | Channel to be added in plot |
bool GrlC2ApiLib.GrlC2Controller.AddTracesToController | ( | ControllerPort | port = ControllerPort::ONE | ) |
Use this API to add the traces to GRL_USB_PD_C2 tester.
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
int GrlC2ApiLib.GrlC2Controller.Attach | ( | ControllerPort | port = ControllerPort::ONE | ) |
Enables the GRL-USB-PD-C2 controller to be programmatic controlled when plugged in with the DUT.
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
void GrlC2ApiLib.GrlC2Controller.AttachController | ( | int | controllerIndex, |
CommunicationPORT | commPort ) |
Use this API to Attach selective port.
controllerIndex | Set controller index eg:"0" |
commPort | GrlUsbPdControllerLib.CommunicationPORT eg:CommunicationPORT.Port_B_Comm |
bool GrlC2ApiLib.GrlC2Controller.Bit_Manipulation_Response_Check | ( | MsgType | msgType, |
SpecRevision | specRev, | ||
SOP_TYPE | sopType, | ||
int | iErrorType, | ||
bool | extHeader = false, | ||
int | txTimerInMilliSec = 500 ) |
This API used for the manipulating the BIT (conversion) to required BIT.
msgType | Set the message type in this parameter of type "GrlPdLib.MsgType" |
specRev | Set the SpecRevision type in this parameter of type "SpecRevision" |
sopType | Set the SOP_TYPE type in this parameter of type "SOP_TYPE" |
iErrorType | Send the int value of error type |
extHeader | Send the extended header is present or not True for extended header ; False for not extended header |
txTimerInMilliSec | send the how much delay required after transmitting the previous command in ms |
void GrlC2ApiLib.GrlC2Controller.CCLineStreamingTimerReset | ( | int | controllerIndex | ) |
Use this API to reset streamer time.
controllerIndex | Set controller index eg:"0" |
void GrlC2ApiLib.GrlC2Controller.ClearCaptureData | ( | ) |
Use this API to clear captured data.
void GrlC2ApiLib.GrlC2Controller.ClearDutInfo | ( | ControllerPort | port = ControllerPort::ONE | ) |
This API is used for Clear the attributes of dut type.
port | GRL-USB-PD-C2/GRL-USB-PD-F1's Port 1 or Port 2. Default is Port 1 |
int GrlC2ApiLib.GrlC2Controller.ClearPDMessages | ( | ControllerPort | port = ControllerPort::ONE, |
int | iMsgCntToClear = 0 ) |
Clears all captured messages from the PD message capture memory on the GRL-USB-PD-C2/F1 controller. It is recommended to clear the memory before starting a new test to avoid any buffer overflow.
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
List< MeasurementChannel > GrlC2ApiLib.GrlC2Controller.ClearPlotDisplayList | ( | ) |
Clears existing plots of the display channels to make way for creating a new list of channels The new list of channels needs to be created before calling the Show Plot function which otherwise will display Port A VBus and Port A VBus Current channels by default.
void GrlC2ApiLib.GrlC2Controller.Config_CC1_Channel | ( | ControllerPort | port = ControllerPort::ONE | ) |
This API used for configuring the CC1 channel data.
port | Configure(ControllerPort) the enum value that represents the port number.one for port-1, two for port-2. GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
void GrlC2ApiLib.GrlC2Controller.Config_CC2_Channel | ( | ControllerPort | port = ControllerPort::ONE | ) |
This API used for configuring the CC2 channel data.
port | Configure(ControllerPort) the enum value that represents the port number.one for port-1, two for port-2. GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
bool GrlC2ApiLib.GrlC2Controller.Config_HSADC | ( | ControllerPort | port = ControllerPort::ONE | ) |
This API used to configure the HSADC data.
port |
void GrlC2ApiLib.GrlC2Controller.ConfigCC1_HSADC | ( | ControllerPort | controllerPort = ControllerPort::ONE | ) |
This API used for configuring the CC1 amd HSADC channel data.
controllerPort | Configure(ControllerPort) the enum value that represents the port number.one for port-1, two for port-2. GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
void GrlC2ApiLib.GrlC2Controller.ConfigCC2_HSADC | ( | ControllerPort | controllerPort = ControllerPort::ONE | ) |
This API used for configuring the CC2 amd HSADC channel data.
controllerPort | Configure(ControllerPort) the enum value that represents the port number.one for port-1, two for port-2. GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
bool GrlC2ApiLib.GrlC2Controller.ConfigPS_Ready_Delay | ( | PS_RDY_Type | psRdyType, |
uint | delayInmSec = 0, | ||
bool | setDefaultTimer = true ) |
This API is used to configure delay for PS_RDY message.
psRdyType | 0-GrlUsbPdControllerLib.PS_RDY_Type.PSR_PD_Contract, 1-GrlUsbPdControllerLib.PS_RDY_Type.PSR_PRS1, 2-GrlUsbPdControllerLib.PS_RDY_Type.PSR_PRS2, 3-GrlUsbPdControllerLib.PS_RDY_Type.PSR_VCONN, 4-GrlUsbPdControllerLib.PS_RDY_Type.FRS_PSR_OffTimer, 5-GrlUsbPdControllerLib.PS_RDY_Type.FRS_PSR_ONtimer, 6-GrlUsbPdControllerLib.PS_RDY_Type.FRSwap_Message_Delay |
delayInmSec | Delay in milli seconds eg: 100 millisec |
setDefaultTimer | True - Used default timer value, False - Used configured (delayInmSec) value |
bool GrlC2ApiLib.GrlC2Controller.ConfigReplaceMessage | ( | bool | setDefault, |
MsgType | actualMsg, | ||
MsgType | replaceMsg, | ||
Type_of_Msg | msgTypeAct, | ||
Type_of_Msg | msgTypeReplace ) |
This API used to configure replace message.
setDefault | Set the dafault value of message |
actualMsg | present message |
replaceMsg | replace massage type |
msgTypeAct | Send the type present message type which means control or data message |
msgTypeReplace | Send the type replace message type which means control or data message |
bool GrlC2ApiLib.GrlC2Controller.ConfigReplaceMessageCount | ( | int | iCount | ) |
To configure replace message count.
iCount | count value |
bool GrlC2ApiLib.GrlC2Controller.Configure_GlitchAfterAttach_Msg | ( | int | iGlitch_Duration, |
ControllerPort | port = ControllerPort::ONE ) |
This API is used to generate the Glitch in CC Line.
iGlitch_Duration | Configure Duration of Glitch in milisecond |
bool GrlC2ApiLib.GrlC2Controller.Configure_Message_To_AMS_Interupt | ( | bool | setdefault, |
MsgType | ExpectedMessage, | ||
MsgType | ConfiguredMessage, | ||
Type_of_Msg | ExpectedMessageType, | ||
Type_of_Msg | ConfiguredMessageType, | ||
SOP_TYPE | sopType = SOP_TYPE::SOP, | ||
bool | interruptTxMsg = false, | ||
ControllerPort | port = ControllerPort::ONE ) |
This API is used to interrupt the AMS for Interptible and Uninterptible message.
setdefault | true- set default Value, false - set configured Value |
ExpectedMessage | This is actual message send by Tester or DUT |
ConfiguredMessage | This is Configured Message to interrupt the AMS |
ExpectedMessageType | This is Type of actual message, for ex:Control,Data,Extended |
ConfiguredMessageType | This is Type of Configured message, for ex:Control,Data,Extended |
sopType | SOP type - default is SOP_TYPE.SOP |
interruptTxMsg | true-Tester sending interrupt message after Tester message false-Tester sending interrupt message after DUT message |
void GrlC2ApiLib.GrlC2Controller.ConfigureADC | ( | LSADC_Channel | channels, |
bool | LSADC0En, | ||
bool | LSADC1En, | ||
bool | LSADC2En ) |
This API used for configuring the ADC channel data.
channels | Set the channel to configure the ADC data |
LSADC0En | Send the "LSADC0En" value as true to read the channel zero'th channel, True for enable , false for disable |
LSADC1En | Send the "LSADC1En" value as true to read the channel first channel.True for enable , false for disable |
LSADC2En | Send the "LSADC2En" value as true to read the channel second channel. True for enable , false for disable |
bool GrlC2ApiLib.GrlC2Controller.ConfigureAutoTestMode_MaxPower | ( | CableType | cable, |
PortDataRole | datRle_Tester, | ||
Port_Power_Role | powRle_Tester, | ||
ControllerPort | por = ControllerPort::ONE ) |
This API is used to configure controller mode, set cable type and tester will draw max power supported by DUT.
cable | Cable type |
datRle_Tester | data role of the tester |
powRle_Tester | power role of the tester |
por | Controller port |
bool GrlC2ApiLib.GrlC2Controller.ConfigureAutoTestMode_UserDefined | ( | CableType | cable, |
PortDataRole | datRle, | ||
Port_Power_Role | powRle, | ||
PowerSupplyType | supty, | ||
int | iPDOInd, | ||
double | dVoltage_mV, | ||
double | dCurrent_mA, | ||
int | iEloadHandle, | ||
int | iEloadMode, | ||
int | iEloadPercent, | ||
ControllerPort | por = ControllerPort::ONE ) |
This API is used to configure controller mode, set cable type, and load current details when controller is operating in auto test mode.
cable | Cable type |
datRle | Data role |
powRle | Power role |
supty | Supply type |
iPDOInd | PDO index |
dVoltage_mV | Voltage |
dCurrent_mA | Current |
iEloadHandle | Eload handle |
iEloadMode | Eload mode |
iEloadPercent | Eload percent |
por | Controller port |
int GrlC2ApiLib.GrlC2Controller.ConfigureControlMessageResponse | ( | MsgType | receivedMessageType, |
ResponderMessageType | responseMessageType, | ||
ControllerPort | port = ControllerPort::ONE ) |
Configures response messages for the GRL-USB-PD-C2/F1 controller.
receivedMessageType | Message type received by the controller for which response configuration is required Supported message types for this function
|
responseMessageType | Configure message type to be responed for a message(msg) received by controller. Accept or Reject is set for the message type |
port | Decides the port one/two. |
int GrlC2ApiLib.GrlC2Controller.ConfigureEload | ( | double | maxCurrentInAmps, |
EloadChannel | eloadChannel, | ||
SwitchState | state, | ||
VCONNLoading | vCONNLoading = VCONNLoading::Disable_VCONN, | ||
ControllerPort | pORT = ControllerPort::ONE ) |
API to use configure the Eload.
maxCurrentInAmps | configure maximum current Amps |
eloadChannel | configure Eload channel |
state | Switch state ON/OFF ON-To turn ON the Eload OFF- To turn OFF the Eload |
vCONNLoading | configure Vconn in which channel it need's to be |
pORT | configure the Port 1 or 2 |
int GrlC2ApiLib.GrlC2Controller.ConfigureEloadinGroup | ( | double | maxCurrentInAmps, |
EloadChannel | eloadChannel, | ||
SwitchState | state, | ||
VCONNLoading | vCONNLoading = VCONNLoading::Disable_VCONN, | ||
ControllerPort | pORT = ControllerPort::ONE, | ||
SOP_TYPE | sopType = SOP_TYPE::SOP ) |
API to use configure the Eload in group.
maxCurrentInAmps | configure maximum current Amps |
eloadChannel | configure Eload channel |
state | Switch state ON/OFF ON-To turn ON the Eload OFF- To turn OFF the Eload |
vCONNLoading | configure Vconn in which channel it need's to be |
pORT | configure the Port 1 or 2 |
sopType | Configure SOP type |
void GrlC2ApiLib.GrlC2Controller.ConfigurePacketDelay | ( | MsgType | delayMsgType, |
Type_of_Msg | MessageType, | ||
double | dDelay_mS, | ||
bool | bEnableDelay ) |
This API used for Set the packet delay in milli seonds.
delayMsgType | Message Type at which the delay will be inserted |
MessageType | Message category, Control or Data message |
dDelay_mS | Delay in milli seconds |
bEnableDelay | Enable or disable the delay, True or False |
bool GrlC2ApiLib.GrlC2Controller.ConfigureReplacePDMessageInGroup | ( | bool | setDefault, |
MsgType | actualPdMsgType, | ||
MsgType | replaceWithPdMsgType, | ||
Type_of_Msg | msgTypeOfActualPdMsgType, | ||
Type_of_Msg | msgTypeOfReplacePdMsgType, | ||
int | txTimerInMilliSec ) |
Use this API to replace one PD message with another PD message. Once configured messages please use this API to execute configured messages."GroupMessageConfigure".
setDefault | True- Set default message, False - Replace configured message |
actualPdMsgType | GrlPdLib.MsgType |
replaceWithPdMsgType | GrlPdLib.MsgType |
msgTypeOfActualPdMsgType | GrlUsbPdControllerLib.Type_of_Msg |
msgTypeOfReplacePdMsgType | GrlUsbPdControllerLib.Type_of_Msg |
txTimerInMilliSec | Delay before initiate configured mesage Ex:10 (Configured message initiate after 10ms) |
bool GrlC2ApiLib.GrlC2Controller.ConfigureSoftResetResponse | ( | int | respMsgVal, |
int | txTimerInMilliSec ) |
Use this API to send SoftReset Response.
respMsgVal | 0x00 - No response from Tester, 0x01 - Tester responds with Reject message, 0x02 - Tester responds with Not_Supported message |
txTimerInMilliSec | Set the message delay in this parameter in milli seconds |
bool GrlC2ApiLib.GrlC2Controller.ConfigureSoftResetResponseForVDMMsg | ( | int | respMsgVal, |
SOP_TYPE | sOP_TYPE, | ||
int | txTimerInMilliSec ) |
Use this API to send SoftReset Response for Vendor Defined Message.
respMsgVal | 1-Send Soft Reset for Discover Identity 0- Do not send 2-Send Soft Reset for Discover SVID 0- Do not send 3-Send Soft Reset for Discover Mode 0- Do not send 4-Send Soft Reset for Enter Mode 0- Do not send 5-Send Soft Reset for Exit Mode 0- Do not send |
sOP_TYPE | Configure type of SOP |
txTimerInMilliSec | Set the message delay in this parameter in milli seconds |
List< MeasurementChannel > GrlC2ApiLib.GrlC2Controller.CreatePlotDisplayList | ( | MeasurementChannel | channel = MeasurementChannel::END | ) |
Creates default plots for the display channels. Using the add or clear list functions will enable adding display channels to the plot. You will need to create the display channel list before calling the Show Plot function.
channel | Channel to be added for plot |
bool GrlC2ApiLib.GrlC2Controller.CreateReportFolder | ( | ) |
Use this API to Create report folder.
void GrlC2ApiLib.GrlC2Controller.DebugLogger | ( | string | discription, |
Exception | ex ) |
Saves all the Exception in text file in Location C:\GRL\Appdata.
discription | Details of method |
ex | Exception |
int GrlC2ApiLib.GrlC2Controller.Detach | ( | ControllerPort | port = ControllerPort::ONE | ) |
Enables the GRL-USB-PD-C2/F1 controller to be programmatically controlled when removing the attached DUT.
This function removes all the Rp/Rd values from the CC line and changes the state of the controller to Source Detach or Sink Detach. It is recommended to call this Detach function before configuring the controller mode, setting the source sink and source capabilities and calling the Attach function.
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
void GrlC2ApiLib.GrlC2Controller.DetachController | ( | int | controllerIndex, |
CommunicationPORT | commPort ) |
Use this API to Detach selective port.
controllerIndex | Set controller index eg:"0" |
commPort | GrlUsbPdControllerLib.CommunicationPORT eg:CommunicationPORT.Port_B_Comm |
bool GrlC2ApiLib.GrlC2Controller.DisposeGRLControllerLink | ( | int | controllerIndex | ) |
Use this API to Disable the GRLController ethernet connection.
controllerIndex |
void GrlC2ApiLib.GrlC2Controller.EmulateQCSource | ( | bool | enableQcSource | ) |
API to emulate Tester as QC source.
enableQcSource | True Tester as QC Source false -Tester as QC source falls |
void GrlC2ApiLib.GrlC2Controller.EnableLSADCDebugLog | ( | bool | enable | ) |
This API used for the enabling the LSADC Debug log write.
enable | Set the read enable . True -enable ,False-disable |
bool GrlC2ApiLib.GrlC2Controller.EnableQcLegacyMode | ( | bool | enable | ) |
Sets the Controller to QC Legacy Mode.
enable | True - Enable ,False - Disable |
void GrlC2ApiLib.GrlC2Controller.EnableReadDebugLogger | ( | bool | enable | ) |
This API used for the enabling the LSADC Debug log Read.
enable | Set the read enable . True -enable ,False-disable |
bool GrlC2ApiLib.GrlC2Controller.FloatBothDpDn | ( | ) |
Sets trhe Controller to QC Legacy Mode.
bool GrlC2ApiLib.GrlC2Controller.FloatDpDn | ( | bool | enable | ) |
Float DPlus and Dminus.
enable | False - Float Dplus, True - Float Dminus |
dynamic GrlC2ApiLib.GrlC2Controller.GetAssertionMessages | ( | ControllerPort | port = ControllerPort::ONE | ) |
This API is used to get All Assertions messages.
port | GrlPdLib.ControllerPort |
dynamic GrlC2ApiLib.GrlC2Controller.GetAssertionMsg | ( | ControllerPort | port = ControllerPort::ONE, |
MsgTypeSec | msgTypeSec = MsgTypeSec::NONE, | ||
int | iOccur = 1 ) |
This API is used to get one Assertion message.
port | GrlPdLib.ControllerPort |
msgTypeSec | GrlPdLib.MsgTypeSec |
iOccur | Assertion message occurnace |
dynamic GrlC2ApiLib.GrlC2Controller.GetAssertionPDMsg | ( | ControllerPort | port = ControllerPort::ONE, |
MsgTypeSec | msgTypeSec = MsgTypeSec::NONE, | ||
int | iOccur = 1 ) |
This API is used to get one Assertion message.
port | GrlPdLib.ControllerPort |
msgTypeSec | GrlPdLib.MsgTypeSec |
iOccur | Assertion message occurnace |
VendorDefinedMessage GrlC2ApiLib.GrlC2Controller.GetCableCapability | ( | ControllerPort | port = ControllerPort::ONE | ) |
Returns the capabilities of e marker cable connected to GRL-USB-PD-C2 controller.
port | C2 Controller's port, Default parameter is PORT1 |
int GrlC2ApiLib.GrlC2Controller.GetCaptureStatus | ( | ) |
This API is used to determine whether the streamer has started or not.
int GrlC2ApiLib.GrlC2Controller.GetCCLineActive | ( | ) |
Used this API to get active communication line(CC)
int GrlC2ApiLib.GrlC2Controller.GetCommandExecutionStatus | ( | ) |
Returns the execution status of last API.
int GrlC2ApiLib.GrlC2Controller.GetConnectionStatus | ( | ) |
This API is used to get the Connection Status of the PD controller. If the PD controller is connected this function returns connected.
ControllerMode GrlC2ApiLib.GrlC2Controller.GetControllerMode | ( | ControllerPort | port = ControllerPort::ONE | ) |
This API is used to get the GRL-USB-PD-C2/F1 controller mode during PD contract negotiations.
double GrlC2ApiLib.GrlC2Controller.GetDplusCurrent | ( | ) |
This API used to get the current value based on the port.
SourceCapability GrlC2ApiLib.GrlC2Controller.GetDutExtendedSourceCapability | ( | ControllerPort | port = ControllerPort::ONE | ) |
This API is used to get Extended Source Capabilities from the connected Source DUT. If the connected DUT is not a Source device, it will return null.
port | C2 Controller's port, Default parameter is PORT1 |
SinkCapability GrlC2ApiLib.GrlC2Controller.GetDutSinkCapability | ( | ControllerPort | port = ControllerPort::ONE | ) |
This API is used to get Sink Capabilities from the Sink DUT. If the connected DUT is not Sink device, it will return null.
port | C2 Controller's port, default parameter is PORT1 |
SourceCapability GrlC2ApiLib.GrlC2Controller.GetDutSourceCapability | ( | ControllerPort | port = ControllerPort::ONE | ) |
This API is used to get Source Capabilities from the connected Source DUT. If the connected DUT is not a Source device, it will return null.
port | C2 Controller's port, Default parameter is PORT1 |
string GrlC2ApiLib.GrlC2Controller.GetEloadVersion | ( | ) |
Get C2 Eload version.
string GrlC2ApiLib.GrlC2Controller.GetFirmwareVersion | ( | ) |
This API is used to get C2 Firmware version.
double GrlC2ApiLib.GrlC2Controller.GetHSADCValue | ( | ) |
API to get the HSADC data.
int GrlC2ApiLib.GrlC2Controller.GetListOfPDOFromPDMessage | ( | List< PDMessage > | msgCollec | ) |
Use this API to get list of PDO's sent by DUT.
msgCollec | Collection of GrlPDLib.PDMessage |
double GrlC2ApiLib.GrlC2Controller.GetMeasurementValue | ( | MeasurementChannel | channel, |
double | dTimeInSeconds ) |
This API is used to Get the measurement value.
channel | GRLSharedModule.MeasurementChannel |
dTimeInSeconds | Time of PDMessage. |
List< PDMessage > GrlC2ApiLib.GrlC2Controller.GetMessages | ( | ControllerPort | port = ControllerPort::ONE, |
bool | includeAllBusEvents = true ) |
Provides all the PD messages received or sent by the GRL-USB-PD-C2/F1 controller. To enable the PD message capture capability of the controller, the data streamer needs to be configured first. Refer to the StartDataStreamer function for more details on how to set up the streamer.
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
includeAllBusEvents | True- Get PDmessages from totalPDMessage, false- Get from CCline message list |
dynamic GrlC2ApiLib.GrlC2Controller.GetPDMessage | ( | ControllerPort | port = ControllerPort::ONE, |
MsgType | msgType = MsgType::NONE, | ||
int | iOccur = 1 ) |
Use this API to get PD message from the controller.
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
msgType | PD msg from the controller |
iOccur | To check the occurence of PD msg |
PDMessage GrlC2ApiLib.GrlC2Controller.GetPDMessageFromIndex | ( | int | iMsgInd, |
ControllerPort | port = ControllerPort::ONE ) |
Use this API to get PD msg from index.
iMsgInd | Check the message index |
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
List< PDMessage > GrlC2ApiLib.GrlC2Controller.GetPDMessages | ( | ControllerPort | port = ControllerPort::ONE | ) |
Use this API to get CC line msg from the controller.
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
dynamic GrlC2ApiLib.GrlC2Controller.GetPDMsg | ( | ControllerPort | port = ControllerPort::ONE, |
MsgType | msgType = MsgType::NONE, | ||
int | iOccur = 1 ) |
This API is used to get one PD Message.
port | GrlPdLib.ControllerPort |
msgType | GrlPdLib.MsgType |
iOccur | PDMessage occurance |
int GrlC2ApiLib.GrlC2Controller.GetPdStatus | ( | ControllerPort | port = ControllerPort::ONE | ) |
This API is used to get the PD contract negotiation status.
List< MeasurementChannel > GrlC2ApiLib.GrlC2Controller.GetPlotDisplayList | ( | ) |
This API is used to display the plot .
dynamic GrlC2ApiLib.GrlC2Controller.GetPresentMeasurementValue | ( | ) |
This API is used to get the voltage and current measurement value.
List< LSADC_DataRead > GrlC2ApiLib.GrlC2Controller.GetPresentMeasurementValue | ( | List< MeasurementChannel > | channel | ) |
This API is used to get the voltage and current measurement value.
channel | GRLSharedModule.MeasurementChannel |
double GrlC2ApiLib.GrlC2Controller.GetPresentMeasurementValue | ( | MeasurementChannel | channel | ) |
This API is used to get the current measurement value.
channel | GRLSharedModule.MeasurementChannel |
string GrlC2ApiLib.GrlC2Controller.GetReportFolderPath | ( | ) |
Use this API to get the report folder path.
string GrlC2ApiLib.GrlC2Controller.GetSerialNumber | ( | ) |
API to get the serial number of the C2 or C2-EPR tester.
SourceCapability GrlC2ApiLib.GrlC2Controller.GetSourceCapabilityFromPDMessageObject | ( | PDMessage | pdMsg, |
ControllerPort | port = ControllerPort::ONE ) |
Convert PD Message to SourceCapability message.
pdMsg | GrlPdLib.PDMessage |
port | GrlPdLib.ControllerPort |
string GrlC2ApiLib.GrlC2Controller.GetSourceCapPDO | ( | ControllerPort | port = ControllerPort::ONE | ) |
API to Get sourcecap PDO details.
port | Port number as per the selection |
double GrlC2ApiLib.GrlC2Controller.GetTimeAtVoltageValue | ( | int | channel, |
double | startTime = 0::0, | ||
int | timeIntervalInSec = 0, | ||
double | thresholdVal = 0::0, | ||
bool | isRisingEdge = false ) |
Use this API to get time at voltage value.
channel | Set the channel number to get the time value for respective channel like "(int)LSADC_Channel.PORTA_VBUS_CURRENT" |
startTime | Set the start time of channel in between the stop and start time |
timeIntervalInSec | Set the time duration of the channel |
thresholdVal | Set the threshold value which means actual voltage+manufacturer error voltage value |
isRisingEdge | Set the true for rising edge ,false for not rising edge(falling edge) |
double GrlC2ApiLib.GrlC2Controller.GetTimeDifferenceAtSignalChange | ( | int | channel, |
double | stTime = 0::0, | ||
int | timeIntervalInSec = 0, | ||
double | thresholdVal = 0::0, | ||
bool | isRisingEdge = false, | ||
ControllerPort | port = ControllerPort::ONE, | ||
MsgTypeSec | msgTypeSec = MsgTypeSec::FR_Swap_Signal_Asserted ) |
API to get time Difference at signal change.
channel | Configure channel number |
stTime | configure start time |
timeIntervalInSec | configure time interval in seconds |
thresholdVal | threshold value |
isRisingEdge | configure rising edge or falling edge |
port | Cintroller port 1 or 2 |
msgTypeSec | secondary PDMessage type |
double GrlC2ApiLib.GrlC2Controller.GetTimeForVoltageValue | ( | int | channel, |
double | startTime = 0::0, | ||
double | timeIntervalInSec = 0, | ||
double | thresholdVal = 0::0, | ||
bool | isRisingEdge = false ) |
API to Get time for voltage value.
channel | channel number |
startTime | start time |
timeIntervalInSec | time interval in seconds |
thresholdVal | Threshold value |
isRisingEdge | rising edge or falling edge |
int GrlC2ApiLib.GrlC2Controller.GetTotalPDMessageCount | ( | ControllerPort | port = ControllerPort::ONE | ) |
Use this API to get Total PDmsg count.
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
int GrlC2ApiLib.GrlC2Controller.GroupCommand_Add | ( | GroupCommandAPIEnum | cmdType, |
object | cmdInfo, | ||
int | iTimeDelayInMilliSec, | ||
ControllerPort | port = ControllerPort::ONE ) |
This API is used to configure GRLSharedModule.GroupCommandAPIEnum.
cmdType | Configure GRLSharedModule.GroupCommandAPIEnum type ex:GroupCommandAPIEnum.Attach |
cmdInfo | Message type |
iTimeDelayInMilliSec | delay in milliseconds |
port | Controller port ControllerPort.ONE or ControllerPort.TWO |
int GrlC2ApiLib.GrlC2Controller.GroupCommand_Clear | ( | ) |
This API used to clear group command configuration.
int GrlC2ApiLib.GrlC2Controller.GroupCommand_Run | ( | ) |
This API is used to configure the GroupCommand message correctly.
bool GrlC2ApiLib.GrlC2Controller.GroupMessageAdd | ( | MsgType | pdMsgType, |
SpecRevision | specRev, | ||
SOP_TYPE | sopType, | ||
bool | extHeader = false, | ||
int | txTimerInMilliSec = 500, | ||
List< byte > | extHeaderPayload = null ) |
Use this API to add the messages into buffer.
pdMsgType | Set the message type in this parameter of type "GrlPdLib.MsgType" |
specRev | Set the message revision in this parameter of type "GrlPdLib.SpecRevision" |
sopType | Set the message SOP type in this parameter of type "GrlPdLib.SOP_TYPE" |
txTimerInMilliSec | Set the message delay in this parameter in milli seconds |
bool GrlC2ApiLib.GrlC2Controller.GroupMessageClear | ( | ) |
Use this API to clear the messages in the buffer.
bool GrlC2ApiLib.GrlC2Controller.GroupMessageConfigure | ( | FwMsgCfgType | cfgType | ) |
Use this API to configure the message execution type whether to initiate the messages at the runtime or pre-configure the messages with time delay.
cfgType | This parameter defines how the configured group of message gets executed IF set to "GrlUsbPdControllerLib.FwMsgCfgType.Runtime", then configured messages will get executed at the runtime, use this parameter to send messages after Attach() command IF set to "GrlUsbPdControllerLib.FwMsgCfgType.AfterPDC", then configured messages will get executed after the PD contract negotiation, use this parameter to pre-configure the group messages before Attach() command |
void GrlC2ApiLib.GrlC2Controller.InitialConfig | ( | ) |
Use this API to configure Tester mode as Sink, Cable type as GRL_SPL_Cable in both ports (GrlPdLib.ControllerPort.ONE and GrlPdLib.ControllerPort.TWO)
objController | GrlPdApiLib.GrlC2Controller |
int GrlC2ApiLib.GrlC2Controller.Initialize | ( | String | ipAddress, |
int | controllerIndex = 0, | ||
bool | isClearCommn = true ) |
Method to Initialize IP address and controllerIndex.
ipAddress | Configure the Tester IP address |
controllerIndex | Configure the Tester controller index |
isClearCommn | Reset the communication |
bool GrlC2ApiLib.GrlC2Controller.Interruption_by_PD_Message | ( | ) |
Use this API to send Interruption by PD Message.
bool GrlC2ApiLib.GrlC2Controller.PowerCycleTheTester | ( | ) |
Used this API to Power cycle the GRL_USB_PD_C2 tester.
void GrlC2ApiLib.GrlC2Controller.QuickAttachPort | ( | CommunicationPORT | commPort, |
byte[] | buffData ) |
Use this API to Attach selective port in two controller.
commPort | GrlUsbPdControllerLib.CommunicationPORT eg:CommunicationPORT.Port_A_Comm |
buffData | Set detach command bytes eg:0x18,0x01 |
void GrlC2ApiLib.GrlC2Controller.QuickDetachPort | ( | CommunicationPORT | commPort, |
byte[] | buffData ) |
Use this API to Detach selective port in two controller.
commPort | GrlUsbPdControllerLib.CommunicationPORT eg:CommunicationPORT.Port_A_Comm |
buffData | Set detach command bytes eg:0x18,0x00 |
int GrlC2ApiLib.GrlC2Controller.RebootController | ( | ) |
This API will reboot the GRL-USB-PD-C2 controller. Expected reboot time is 20-30 seconds. After calling this API, please re-initialize the ethernet connection by calling Initialize() API before calling any further API's.
void GrlC2ApiLib.GrlC2Controller.Request_PortA_PortB | ( | RequestMessage | message | ) |
Use this API to send Request message for both ports (GrlPdLib.ControllerPort.ONE and GrlPdLib.ControllerPort.TWO)
message | GrlPdLib.RequestMessage |
bool GrlC2ApiLib.GrlC2Controller.Reset_PDPort | ( | ControllerPort | port = ControllerPort::ONE | ) |
Resets Port1 and Port2 of USB-PD-C2 controller.
bool GrlC2ApiLib.GrlC2Controller.Reset_TestResultObject | ( | ) |
This API is used to Clear the test result.
bool GrlC2ApiLib.GrlC2Controller.ResetController | ( | ) |
Use this API to reset the Controller.
void GrlC2ApiLib.GrlC2Controller.SaveHTMLForPDPackets | ( | string | fileNameHTML, |
string | testName, | ||
string | testId, | ||
bool | isVoltageUpdate = false ) |
Used this API to Save PD protocol capture into .html file.
fileNameHTML | PD protocol capture file Report path |
testName | PD protocol capture file name |
testId | PD protocol capture file test ID |
void GrlC2ApiLib.GrlC2Controller.SaveHTMLForPDPacketsForFourPort | ( | List< PDMessage > | pdMsgCollec, |
string | fileNameHTML, | ||
string | testName, | ||
string | testId, | ||
bool | isVoltageUpdate = false ) |
Used this API to Save four port PD protocol capture into .html file.
pdMsgCollec | Message collection of GrlPdLib.PDMessage |
fileNameHTML | PD protocol capture file Report path |
testName | PD protocol capture file name |
testId | PD protocol capture file test ID |
void GrlC2ApiLib.GrlC2Controller.SaveHTMLForTestSummary | ( | string | fileNameHTML, |
string | testName, | ||
string | testId ) |
Used this API to Save TestSummary into .html file.
fileNameHTML | TestSummary file Report path |
testName | TestSummary file name |
testId | TestSummary file test ID |
bool GrlC2ApiLib.GrlC2Controller.SaveTestPDPacketInCSV | ( | List< PDMessage > | msgColle, |
string | filename, | ||
bool | isVoltageUpdate = false ) |
Use this API to save all PD messages into CSV file.
msgColle | Collection of GrlPDLib.PDMessage |
filename | |
isVoltageUpdate |
bool GrlC2ApiLib.GrlC2Controller.SaveTestResultAndPDPacketInCSV | ( | string | fileName, |
ControllerPort | port = ControllerPort::ONE ) |
Use this API to save all PD messages into CSV file.
port | GrlPdLib.ControllerPort |
fileName | fileName as per the test name |
bool GrlC2ApiLib.GrlC2Controller.SaveTestResultInCSV | ( | PDTestResult | baseTestResult | ) |
Use this API to save validated PD Test Result into CSV file.
baseTestResult | USB_PDModule.PDTestResult |
bool GrlC2ApiLib.GrlC2Controller.SaveTraceFile | ( | string | fileName | ) |
Saves signal and protocol data into specified file.
fileName | Trace file name |
bool GrlC2ApiLib.GrlC2Controller.SelectCableType | ( | CableType | cableType, |
ControllerPort | port = ControllerPort::ONE ) |
This API is used to configure the type of cable.
cableType | |
port |
bool GrlC2ApiLib.GrlC2Controller.SendAssertionMessage | ( | ControllerPort | port = ControllerPort::ONE | ) |
Use this API to send assertion message.
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
bool GrlC2ApiLib.GrlC2Controller.SendBISTCarrierMode | ( | SOP_TYPE | sopType | ) |
This API used to send the BIST carrier mode.
sopType |
bool GrlC2ApiLib.GrlC2Controller.SendBISTTestData | ( | SOP_TYPE | sopType | ) |
This API is used to send BISTCarrierMode message.
sopType | GrlPdLib.SOP_TYPE |
int GrlC2ApiLib.GrlC2Controller.SendControlMessage | ( | MsgType | msg, |
ControllerPort | port = ControllerPort::ONE ) |
Sends the control messages from the GRL-USB-PD-C2/F1 controller. Some of the messages you can send are.
This API used to send control PD messages
msg | GrlUsbPdControllerLib.MsgType |
port | GRL-USB-PD-C2/F1's Port 1 or Port 2. Default is Port 1 |
void GrlC2ApiLib.GrlC2Controller.SendDataMessage | ( | MsgType | msgType, |
bool | isDefaultPayload = true, | ||
SOP_TYPE | sopType = SOP_TYPE::SOP, | ||
SpecRevision | revision = SpecRevision::PD_3_0, | ||
int | noOfDataObjet = 1, | ||
ControllerPort | port = ControllerPort::ONE ) |
This API is used to Send Data messages. Alert, Get_Country_Info.
msgType | GrlPdLib.MsgType |
isDefaultPayload | True - Default Payload, False - Configure payload using SetMessagePayload() |
sopType | GrlPdLib.SOP_TYPE SOP - Default SOP_TYPE |
revision | GrlPdLib.SpecRevision PD3.0 - Default Revision |
noOfDataObjet | 1 - Default PDO |
port | GrlPdLib.ControllerPort ONE - Default port |
int GrlC2ApiLib.GrlC2Controller.SendEPRModemsg | ( | EPR_Mode_Message | msg, |
ControllerPort | port = ControllerPort::ONE ) |
This function is to send EPR Mode message.
msg | Configure EPRModemessage |
port | ONE or TWO, parameter to select the controller port for this API configuration |
int GrlC2ApiLib.GrlC2Controller.SendEPRRequestMessage | ( | RequestMessage | msg, |
ControllerPort | port = ControllerPort::ONE ) |
This function used to send EPRRequest message.
msg | Configure request message |
port | ONE or TWO, parameter to select the controller port for this API configuration |
void GrlC2ApiLib.GrlC2Controller.SendExtendedMessage | ( | MsgType | msgType, |
bool | isDefaultPayload = true, | ||
SOP_TYPE | sopType = SOP_TYPE::SOP, | ||
SpecRevision | revision = SpecRevision::PD_3_0, | ||
int | noOfDataObjet = 1, | ||
ControllerPort | port = ControllerPort::ONE ) |
This API used to send Extended Message with Payload. Get_Manufacturer_Info, Get_Battery_Status, Get_Battery_Cap, Firmware_Update_Request, Security_Request.
msgType | GrlPdLib.MsgType |
isDefaultPayload | True - Default Payload, False - Configure payload using SetMessagePayload() |
sopType | GrlPdLib.SOP_TYPE SOP - Default SOP_TYPE |
revision | GrlPdLib.SpecRevision PD3.0 - Default Revision |
noOfDataObjet | 1 - Default PDO |
port | GrlPdLib.ControllerPort ONE - Default port |
void GrlC2ApiLib.GrlC2Controller.SendFRSwapSignal | ( | ) |
Send FR_Swap signal from Tester.
bool GrlC2ApiLib.GrlC2Controller.SendHardReset | ( | bool | isFlip = false, |
ControllerPort | port = ControllerPort::ONE ) |
Use this API to send HardReset.
isFlip | true -Hardreset with bit flip false- HardReset no bit flip |
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
int GrlC2ApiLib.GrlC2Controller.SendPdoRequestMessage | ( | RequestMessage | msg, |
ControllerPort | port = ControllerPort::ONE ) |
This API used to sends the PDO request messages during the PD contract negotiations.
msg | Configure the request PDO. Eg: AVS , FIXED,VARIABLE PDO'S |
port | Configure(ControllerPort) the enum value that represents the port number.one for port-1, two for port-2. GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
int GrlC2ApiLib.GrlC2Controller.SendRequestmessage_By_Index | ( | int | iSourcePDOIndex, |
ControllerPort | port = ControllerPort::ONE ) |
This API is used to send request message by configuring source PDO index.
iSourcePDOIndex | sourcecap PDO index |
port | Tester Port 1 or Port2 |
int GrlC2ApiLib.GrlC2Controller.SendSinkCapMessage | ( | SinkCapability | msg, |
ControllerPort | port = ControllerPort::ONE ) |
This API is used to send SinkCap message.
msg | Configure SinkCapability message |
port | Controller Port |
bool GrlC2ApiLib.GrlC2Controller.SendSoftReset | ( | ControllerPort | port = ControllerPort::ONE | ) |
Send SoftReset message with different SOP_TYPE.
port | ControllerPort 1 - ONE, 2 - TWO |
int GrlC2ApiLib.GrlC2Controller.SendSourceCapsMessage | ( | SourceCapability | msg, |
ControllerPort | port = ControllerPort::ONE ) |
This API is used to initiate sourcecap message.
msg | create object for GrlPdLib.SourceCapability and configure source cap message with PDO types |
port | Configure(ControllerPort) the enum value that represents the port number.one for port-1, two for port-2. GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
int GrlC2ApiLib.GrlC2Controller.SendVendorDefinedMessage | ( | VendorDefinedMessage | initiateMessage, |
SOP_TYPE | sopType = SOP_TYPE::SOP, | ||
ControllerPort | port = ControllerPort::ONE ) |
This API is used to send Vendor Defined message.
initiateMessage | GrlPdLib.VendorDefinedMessage |
sopType | Select SOP type SOP | SOP1 | SOP2 | SOP_DEBUG1 | SOP_DEBUG2 |
port | GRL-USB-PD-C2/F1's Port 1 or Port 2. Default is Port 1 |
bool GrlC2ApiLib.GrlC2Controller.Set_Dminus_Voltage | ( | double | voltage | ) |
This API is used to configure the minimum voltage in Programmable Power Supply (PPS).
voltage | Configured the voltage in Volts (V) |
bool GrlC2ApiLib.GrlC2Controller.Set_Dplus_Voltage | ( | double | voltage | ) |
This API is used to configure the minimum and maximum voltage in Programmable Power Supply (PPS).
voltage | Configured the voltage in Volts (V) |
bool GrlC2ApiLib.GrlC2Controller.Set_EPR_Mode_Exit_Configuration | ( | ) |
This API is used to enable or disable EPR mode exit.
bool GrlC2ApiLib.GrlC2Controller.Set_EPR_PPS_Eload_Configuration | ( | byte | ppsEloadCfg | ) |
This API is to enable or disable EPR PPS Eload configuration.
ppsEloadCfg | PPS Eload configuration in bytes |
int GrlC2ApiLib.GrlC2Controller.Set_EPR_Request_Configuration | ( | RequestMessage | requestMessageObj, |
byte | PDONumber, | ||
ControllerPort | port = ControllerPort::ONE ) |
This API is used to Send EPR Request message.
requestMessageObj | Configure RequestMessage.cs to send the request message from the GRL-USB-PD-C2/F1 controller |
PDONumber | |
port | ONE or TWO, parameter to select the controller port for this API configuration |
int GrlC2ApiLib.GrlC2Controller.Set_EPR_SinkCap_Configuration | ( | SinkCapability | sinkCapabilityObj, |
ControllerPort | port = ControllerPort::ONE ) |
This API is used to Send EPR Sinkcap.
sinkCapabilityObj | sinkCapabilityObj set as a parameter for the SinkCapability.cs |
port | ONE or TWO, parameter to select the controller port for this API configuration |
int GrlC2ApiLib.GrlC2Controller.Set_EPR_SourceCap_Configuration | ( | SourceCapability | sourceCapabilityObj, |
ControllerPort | port = ControllerPort::ONE ) |
This API is used to Send EPR Sourcecap.
sourceCapabilityObj | Configure PDSource Capability function object |
port | ONE or TWO, parameter to select the controller port for this API configuration |
bool GrlC2ApiLib.GrlC2Controller.Set_EPR_Unchunked_Request_Configuration | ( | bool | isUnchunked = true | ) |
This API is used to enable or disable EPR Unchunked request message.
isUnchunked | true- EPR Unchunk req configured, False - Epr unchunk req is not configured |
bool GrlC2ApiLib.GrlC2Controller.Set_SOP_Prime_DiscovID_Configuration | ( | bool | isSendSOPPrimeDiscId | ) |
This API is to enable or disable Prime DiscoverID configuration.
isSendSOPPrimeDiscId | true - SOP Prime DiscoverID is configured, False -SOP Prime DiscoverID is not configured |
bool GrlC2ApiLib.GrlC2Controller.SetAutoTestMode | ( | bool | bIsEnable, |
ControllerPort | por = ControllerPort::ONE ) |
This API is used to set auto test mode in GRl C2 controller.
bIsEnable | To enable/disable auto test mode |
por | Controller port |
int GrlC2ApiLib.GrlC2Controller.SetBatteryStatusMessage | ( | BatteryStatusMesaage | batteryStatusMesaage, |
BatteryStatus | batteryStatus, | ||
bool | InvalidBatteryReference = false, | ||
bool | BatteryisPresent = false, | ||
double | BatteryPresentCapacity = 0, | ||
ControllerPort | port = ControllerPort::ONE ) |
Sets the Battery Status Messages to be sent as Runtime messages.
batteryStatusMesaage | GrlPdLib.BatteryStatusMessage |
batteryStatus | Status of the Battery Charging/Discharging/Idle |
InvalidBatteryReference | If Message contains reference to a battery. |
BatteryisPresent | To be set to "True" if Battery is present. |
BatteryPresentCapacity | Battery's State of Charging. if UNKNOW pass 65535. |
bool GrlC2ApiLib.GrlC2Controller.SetBISTSharedTestEntryMode | ( | BIST_TYPE | bistType = BIST_TYPE::Reserved, |
SOP_TYPE | sopType = SOP_TYPE::SOP ) |
This API is used to send BIST Shared Test Entry Mode message.
bistType | GrlPdLib.BIST_TYPE |
sopType | GrlPdLib.SOP_TYPE |
bool GrlC2ApiLib.GrlC2Controller.SetBISTSharedTestExitMode | ( | BIST_TYPE | bistType = BIST_TYPE::Reserved, |
SOP_TYPE | sopType = SOP_TYPE::SOP ) |
This API is used to send BIST Shared Test Exit Mode.
bistType | GrlPdLib.BIST_TYPE |
sopType | GrlPdLib.SOP_TYPE |
void GrlC2ApiLib.GrlC2Controller.SetC2Sniffer | ( | C2SnifferNew | c2SniffObj | ) |
This API is used to configure the C2 browser app in SNIFFER mode.
c2SniffObj |
bool GrlC2ApiLib.GrlC2Controller.SetCableType | ( | int | cableType = 0, |
ControllerPort | port = ControllerPort::ONE ) |
This API is used to set the cable type.
cableType | 0-GRL_SPL_Cable, 1-TypeC_Cable |
void GrlC2ApiLib.GrlC2Controller.SetCommPort | ( | ControllerPort | port | ) |
This API is used to set the Communication port.
port | Communication Port (One/TWO). |
bool GrlC2ApiLib.GrlC2Controller.SetControllerConfiguration | ( | ControllerConfigEnum | controllerConfigEnum, |
ControllerPort | port = ControllerPort::ONE ) |
This API is used for configuring the C2 controller mode.
controllerConfigEnum | configure the controller type sink, source,cable and etc.. |
port |
int GrlC2ApiLib.GrlC2Controller.SetControllerCurrentLimit_Type_C_Only_Mode | ( | double | cur_mA, |
ControllerPort | port = ControllerPort::ONE ) |
This API should be invoked after setting the controller mode to ControllerMode.Type_C_Only_SRC To set currnt limit.
cur_mA | Current to be set in mA |
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
void GrlC2ApiLib.GrlC2Controller.SetControllerIndex | ( | int | controllerIndex | ) |
This API isused to set controller index.
controllerIndex | Set controller index eg:"0" |
int GrlC2ApiLib.GrlC2Controller.SetControllerMode | ( | ControllerMode | mode, |
ControllerPort | port = ControllerPort::ONE ) |
This API is used to set the GRL-USB-PD-C2 controller mode as Source, Sink or DRP along with all related functionalities such as SourceCapability, SinkCapability etc. to allow the controller to send the required capabilities when requested by another PD device.
mode | GrlPdLib.ControllerMode Source = 0 Sink = 1 DRP = 2 Type_C_Only_SRC = 3 Type_C_Only_SNK = 4 UNKNOWN = 5 |
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
void GrlC2ApiLib.GrlC2Controller.SetDataStreamService | ( | DataStreamService | dataStream | ) |
This API is used to configure the parameters of the Data Stream service .
dataStream |
bool GrlC2ApiLib.GrlC2Controller.SetDRswapConfiguration | ( | DR_SWAP_ENUM | dR_SWAP | ) |
This API is used to send the response message to DR_SWAP message Send = 1, Accept = 2, Send_Accept = 3, NONE.
dR_SWAP | configure GrlUsbPdControllerLib.DR_SWAP_ENUM |
int GrlC2ApiLib.GrlC2Controller.SetEloadCurrent | ( | double | voltageInVolts, |
double | maxCurrentInAmps, | ||
SwitchState | state, | ||
EloadChannel | channel, | ||
ControllerPort | port = ControllerPort::ONE ) |
Sets the E-load Current to be drawn in the constant current mode. Ensure that the GRL-USB-PD-C2/F1 controller mode is set as a Sink before calling this method and also turn ON the E-load switch using the SetEloadState function.
voltageInVolts | Voltage sense range |
maxCurrentInAmps | Maximum Current to be drawn by Tester |
state | Tester load switch state |
channel | Channel selection in Tester's Type-C port |
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
int GrlC2ApiLib.GrlC2Controller.SetEloadCurrentRange | ( | double | LoadStart_Amps, |
double | LoadStop_Amps, | ||
int | LoadStep_MilliAmps, | ||
int | StepIntervalMilliSec, | ||
EloadMode | LoadMode, | ||
double | LoadStopCondition_VoltageDropMin_Volts, | ||
EloadChannel | channel, | ||
ControllerPort | port = ControllerPort::ONE ) |
API to sweep the load current with configurable load step in Constant Current or Constant Resistance mode In CC Mode, Lowest load step is 8mA In CR Mode, Lowest load step is 25mA.
LoadStart_Amps | load current start value in Amps |
LoadStop_Amps | load current stop value in Amps |
LoadStep_MilliAmps | load current step value in MilliAmps |
StepIntervalMilliSec | Time interval between consecutive load step in MilliSeconds |
LoadMode | Load Mode Supported Modes: CC or CR mode |
LoadStopCondition_VoltageDropMin_Volts | Set the stop condition for load sweep by vbus voltage drop value |
channel | set the channel VBUS or VCONN |
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
int GrlC2ApiLib.GrlC2Controller.SetEloadState | ( | EloadChannel | channel, |
SwitchState | state, | ||
ControllerPort | port = ControllerPort::ONE ) |
Sets the E-load state as ON or OFF. Ensure that the GRL-USB-PD-C2 controller mode is set as a Sink before turning on the E-load. You may also need to ensure the VBUS switch is turned OFF before turning ON the E-load switch. Use this function with caution - in case the over current protection of the DUT is not turned on, drawing more power may cause damage to the DUT.
state | GRLSharedModule.SwitchState |
channel | set the channel VBUS or VCONN |
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
int GrlC2ApiLib.GrlC2Controller.SetEPRActionConfiguration | ( | EPRConfig | eprConfig, |
ControllerPort | port = ControllerPort::ONE ) |
This API is used to Set EPR Configuration.
port | ONE or TWO, parameter to select the controller port for this API configuration |
eprConfig | EPREntry, EPREnterModeConfig, EPREnterSuccededConfig, EPRSrcCapConfig, EPRModeWaitConfig, EPRModeEnterFailedConfig |
int GrlC2ApiLib.GrlC2Controller.SetEPRMode | ( | bool | enableEPRMode, |
ControllerPort | port = ControllerPort::ONE ) |
This API is used to enable or disable the EPR mode.
enableEPRMode | true or false, parameter to enable or disable the EPR mode |
port | ONE or TWO, parameter to select the controller port for this API configuration |
void GrlC2ApiLib.GrlC2Controller.SetFRSwapDetection | ( | bool | isFRSwapEnable = true | ) |
This API used to Set FRSwap signal detect configuration.
isFRSwapEnable | True - Enable FR_Swap;False - Disable FR_Swap |
int GrlC2ApiLib.GrlC2Controller.SetGroupSinkCapability | ( | SinkCapability | objSinkCapability, |
ControllerPort | port = ControllerPort::ONE, | ||
SOP_TYPE | sopType = SOP_TYPE::SOP ) |
This API is used to set the group of sink cap's.
objSinkCapability | Configure th sinkcap |
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
sopType | Configure the message sop type |
bool GrlC2ApiLib.GrlC2Controller.SetMessagePayload | ( | params byte[] | payloadInByte | ) |
This API is used to set payload for Data/Extended messages.
payloadInByte | Configure Payload value in Byte |
int GrlC2ApiLib.GrlC2Controller.SetNotToSendRequestMessageResponse | ( | MsgType | msgType, |
bool | dontSendResponse, | ||
ControllerPort | port = ControllerPort::ONE ) |
This API is used to disables the GRL-USB-PD-C2/F1 controller from sending response messages to any particular message requests.
msgType | Message type to which you want to configure response |
dontSendResponse | If you want not to send response set true |
port |
bool GrlC2ApiLib.GrlC2Controller.SetOverCurrentProtection | ( | bool | enableOCP, |
bool | enableCurrentLimit, | ||
int | setOCPValue ) |
This API is used to set over current protection value of C2 controller.
enableOCP | Flag to enable/disable over current protection event |
enableCurrentLimit | Flag to enable/disable current limit of C2 while testing with PPS chargers |
setOCPValue | Value in percentage, This value added with requested current of sink |
void GrlC2ApiLib.GrlC2Controller.SetPd_Controller | ( | PD_Controller | pdCtrler | ) |
This API is used for configuring the PD parameters to their default values.
pdCtrler | Send the object of PD_Controller to set the values in PD_Controller variable |
int GrlC2ApiLib.GrlC2Controller.SetPdSpecificationRevision | ( | SpecRevision | specRevision, |
ControllerPort | port = ControllerPort::ONE ) |
This API is used to set the PD spec revision value.
specRevision | GrlPdLib.SpecRevision |
port | GRL-USB-PD-C2 / GRL-USB-PD-F1's Port 1 or Port 2. Default is Port 1 |
int GrlC2ApiLib.GrlC2Controller.SetQCVoltageChangeRequest | ( | int | Voltage | ) |
This API is used to request QC sink DUT to change the voltage level to 5V, 9V, 12V or 20V.
Voltage | Voltage value to be requested by Tester. Applicable voltage levels are 5V, 9V, 12V or 20V |
int GrlC2ApiLib.GrlC2Controller.SetQCVoltageDecrementRequest_200mV | ( | ) |
This API is used to decrease VBUS voltage level by 200mV by sending pulses over D- line.
int GrlC2ApiLib.GrlC2Controller.SetQCVoltageIncrementRequest_200mV | ( | ) |
API to increase VBUS voltage level by 200mV by sending pulses over D+ line.
int GrlC2ApiLib.GrlC2Controller.SetRpValue | ( | RpValue | rpVal, |
ControllerPort | port = ControllerPort::ONE ) |
This API is used to set Rp value of the C2 Controller when it is set to Source mode Note: Using cable set API (UseTesterCable(EmulateCableOn.CC1)) you can define Rp value on CC1 or CC2.
rpVal | Set the Rp value (900mA, 1.5A or 3A) |
port | Controller port |
int GrlC2ApiLib.GrlC2Controller.SetSinkCapability | ( | SinkCapability | objSinkCapability, |
ControllerPort | port = ControllerPort::ONE ) |
This API is used to set the sink capability of the GRL-USB-PD-C2/F1 controller. This is applicable only when the controller mode is set as Sink or DRP.
objSinkCapability | GrlPdLib.SourceCapability |
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
int GrlC2ApiLib.GrlC2Controller.SetSinkRequestMessage | ( | RequestMessage | objRequest, |
ControllerPort | port = ControllerPort::ONE ) |
This API is used to set the sink request message during the PD contract negotiations. Once the GRL-USB-PD-C2 controller receives the source capability.
objRequest | GrlPdLib.RequestMessage |
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
int GrlC2ApiLib.GrlC2Controller.SetSnifferMode | ( | bool | enableSnifferMode, |
bool | IsGRL_SPL_TestCable_UsedOnBothC2Ports = false ) |
This API allows user to enable/disable the sniffer mode When sniffer was enabled, controller will capture VBUS/CC1/CC2 details exchanged between devices connected between Port1 and extension slot. When sniffer was enabled, controller will be set to default working mode This API allows user to enable/disable the sniffer mode When sniffer was enabled, controller will capture VBUS/CC1/CC2 details exchanged between devices connected between Port1 and extension slot. When sniffer was enabled, controller will be set to default working mode.
enableSnifferMode | Set this parameter to True to enable sniffer mode Set this parameter to False to disable sniffer mode |
IsGRL_SPL_TestCable_UsedOnBothC2Ports | Set this parameter to True if GRL-SPL test cable was connected to both Port1 and Port2 of C2 Controller (Controller emulates cable by appling Ra on CC-line) Set this parameter to False if GRL-SPL test cable was not connected to both Port1 and Port2 of C2 Controller (Controller does not emulates cable) Note: Set this parameter to False, if any standard USB-C cable(including tethered/captive DUT) was connected to Port1 or Port2 of C2 Controller |
int GrlC2ApiLib.GrlC2Controller.SetSourceCapability | ( | SourceCapability | objSourceCapability, |
ControllerPort | port = ControllerPort::ONE ) |
This API is used to set the Source cap value.
objSourceCapability | GrlPdLib.SourceCapability |
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
int GrlC2ApiLib.GrlC2Controller.SetTesterAsQuickChargeSink | ( | bool | enableQCMode, |
bool | enablePDSupportInQCMode ) |
This API is used to set tester as quick charge sink device.
enableQCMode | True - Enable QC mode, False - Disable QC Mode |
enablePDSupportInQCMode | True- enable PD support in QC - False - disable PD support in QC |
int GrlC2ApiLib.GrlC2Controller.SetTesterCableDropCompensation | ( | bool | compensateCableDrop | ) |
This API is used to Configure Tester to enable or disable the cable drop compensation in VBUS/VCONN voltage measurements This API is applicable only for GRL-SPL cable.
compensateCableDrop | Set this parameter to True to enable the cable drop compensation Set this parameter to False to disable the cable drop compensation |
int GrlC2ApiLib.GrlC2Controller.SetTesterUnChkExdMsgSupport | ( | int | iSupported, |
bool | bClearConfig, | ||
bool | IsAppCtrl ) |
This API used to enable or disable the Unchunked Extended message.
iSupported | 1-Supported, 0-Not Supported |
bClearConfig | True - Reset the unchunked False- set the unchunked |
IsAppCtrl | If False - Overwrite DUT config, True-App config data |
void GrlC2ApiLib.GrlC2Controller.SetTesterVBUSCapacitance | ( | Tester_VBus_Capacitance | capacitance | ) |
This API is used to set the VBUS Capacitance on the GRL-USB-PD-C2/F1 controller. When this function is called, appropriate capacitance is added across VBUS and ground.
capacitance | GRLSharedModule.Tester_VBus_Capacitance. |
bool GrlC2ApiLib.GrlC2Controller.SetTriggerOutput | ( | int | TriggerPulseDurationInMicroSeconds = 300 | ) |
This API is used to set the output trigger with pulse signal.
TriggerPulseDurationInMicroSeconds | Pulse trigger time duration |
int GrlC2ApiLib.GrlC2Controller.SetVbusVoltage | ( | double | voltageInVolt, |
double | currentLimitInAmps, | ||
ControllerPort | port = ControllerPort::ONE ) |
This API is used to set the VBus voltage. Ensure that the GRL-USB-PD-C2/F1 controller mode is set as a Source before setting the voltage. After setting the voltage you may need to turn On the voltage switch using the SetVbusState function.
voltageInVolt | Voltage to be set |
currentLimitInAmps | Current limit |
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
int GrlC2ApiLib.GrlC2Controller.SetVconnLoadCurrent | ( | double | Vconn_Current, |
VCONNLoading | vCONNLoading = VCONNLoading::VCONN_TO_CC2, | ||
ControllerPort | port = ControllerPort::ONE ) |
This API is used to set VCONN Current, Either CC1 or CC2.
Vconn_Current | |
vCONNLoading | |
port |
bool GrlC2ApiLib.GrlC2Controller.SetVconnVoltage | ( | double | dVconnVolt, |
VCONNLoading | vconnComm, | ||
ControllerPort | port = ControllerPort::ONE ) |
This API is used to set the tester Vconn voltage either CC2 or CC1.
dVconnVolt | send double value of which voltage tester VCONN has to set |
vconnComm | Set on which communciation line VCONN has to set, either CC1 or CC2 |
bool GrlC2ApiLib.GrlC2Controller.SetVconnVoltage | ( | double | voltage, |
ControllerPort | port = ControllerPort::ONE ) |
This API is used for the configuring the VCONN voltage on CC1 or CC2 line.
voltage | Configure the VCONN voltage in millivolts (mV). |
port |
int GrlC2ApiLib.GrlC2Controller.SetVendorDefinedMessageResponse | ( | VDM_CMD | cmdType, |
VendorDefinedMessage | responseMessage, | ||
SOP_TYPE | sopType = SOP_TYPE::SOP, | ||
ControllerPort | port = ControllerPort::ONE ) |
This API is used to set Payload details of VDM message responded by USB-PD-C2 controller.
cmdType | Select the VDM message type for which payload details will be configured GrlPdLib.VDM_CMD.Discover_ID GrlPdLib.VDM_CMD.Discover_SVID GrlPdLib.VDM_CMD.Discover_Mode GrlPdLib.VDM_CMD.Enter_Mode GrlPdLib.VDM_CMD.Exit_Mode GrlPdLib.VDM_CMD.Attention GrlPdLib.VDM_CMD.DP_StatusUpdate GrlPdLib.VDM_CMD.DP_Configure |
responseMessage | Object to configure the payload details |
sopType | To select SOP type GrlPdLib.SOP_TYPE.SOP GrlPdLib.SOP_TYPE.SOP1 GrlPdLib.SOP_TYPE.SOP2 |
port | GRL-USB-PD-C2/F1's Port 1 or Port 2. Default is Port 1 |
int GrlC2ApiLib.GrlC2Controller.Short_Dplus_Dminus | ( | bool | isApplyShort | ) |
Using this API to SHORT D+ and D- line.
isApplyShort | True - To apply short False - To Remove short |
int GrlC2ApiLib.GrlC2Controller.ShortVBUSLine | ( | bool | EnableShort, |
ControllerPort | port = ControllerPort::ONE ) |
Use this API to short VBUS line to ground.
EnableShort | Set this param to true to short VBUS line to ground Set this param to false to remove the short connection from VBUS line to ground |
port | GRL-USB-PD-C2/GRL-USB-PD-F1's Port 1 or Port 2. Default is Port 1 |
bool GrlC2ApiLib.GrlC2Controller.ShortVbustoGround | ( | bool | IsEnable, |
int | shortingTime_milliSec, | ||
ControllerPort | port = ControllerPort::ONE ) |
TO short VBUS to ground.
IsEnable | true - Enable Shorting; false - Disable short |
shortingTime_milliSec | update shorting time in milli seconds |
port | Controller port info port one or two |
bool GrlC2ApiLib.GrlC2Controller.ShortVconntoGround | ( | bool | IsEnable, |
int | shortingTime_milliSec, | ||
VCONNLoading | Vconnlodg = VCONNLoading::VCONN_TO_CC2, | ||
ControllerPort | port = ControllerPort::ONE ) |
TO short VCONN to ground.
IsEnable | true - Enable Shorting; false - Disable short |
shortingTime_milliSec | update shorting time in milli seconds |
Vconnlodg | Vconn Line- VCONN_TO_CC2 or VCONN_TO_CC1 |
port | Controller port info port one or two |
int GrlC2ApiLib.GrlC2Controller.StartCapture | ( | List< MeasurementChannel > | listOfMeasurementChannel = null, |
int | subSamplingRatio = 1000, | ||
bool | enCableDrop = false, | ||
bool | bEnableLSADC = true, | ||
bool | bEnableCCLine = true, | ||
int | socBufferSize = 1, | ||
ControllerPort | port = ControllerPort::ONE ) |
This API starts the data capture from the C2 Controller, which includes PD messages and configured list of signal channels from USB-C port of C2 Controller.
listOfMeasurementChannel | Parameter to configure the list of signal channels to be capture from USB-C port of C2 Controller |
subSamplingRatio |
|
enCableDrop | This parameter enables the test cable drop compensation in the voltage measurements. Set this parametr to "true" when using test cable to connect the DUT to C2 controller Set this parametr to "false" when the DUT was connected directly to C2 controller(Captive or Tethered cable devices) Refer cable drop compensation section in USB-PD-C2 Software user guide for calculating the cable drop for the test cable |
bEnableLSADC | This parameter enables the USB-C port signal acquisition by C2 controller |
bEnableCCLine | This parameter enables the PD message acquisition by C2 controller |
socBufferSize | This parameter defines the Ethernet read buffer size in KiloBytes Supported values 1,8,16,32,62. Assigning any other values to this parameter will be considered as 1. |
bool GrlC2ApiLib.GrlC2Controller.StartReadingStreamerData | ( | int | controllerIndex | ) |
Use this API to read streamer data from controller.
controllerIndex | Set controller index eg:"1" |
int GrlC2ApiLib.GrlC2Controller.StopCapture | ( | int | Timeout = 5000 | ) |
Stops the data capture, including any PD messages and voltage values.
///
Timeout | Timeout for streamer to stop reading data from C2 Controller |
bool GrlC2ApiLib.GrlC2Controller.SwitchToExternalEload | ( | bool | isEnable | ) |
External eload ON/OFF.
isEnable | Enable or disable eload True - Enable False - Disable |
void GrlC2ApiLib.GrlC2Controller.UpdateController | ( | PD_Controller | m_PDctrl, |
PD_Controller_C2Gen2 | m_PDctrlGen2 ) |
To update the Controllers.
m_PDctrl | Assign the properties to PD_Controller.cs |
m_PDctrlGen2 | Assign the properties to PD_Controller_C2Gen2.cs |
double GrlC2ApiLib.GrlC2Controller.UpdateVoltageToPDMessage | ( | ControllerPort | port = ControllerPort::ONE | ) |
Use this API to Update the voltage to PDMessage.
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
int GrlC2ApiLib.GrlC2Controller.UseTesterCable | ( | VendorDefinedMessage | vdm = null, |
ControllerPort | port = ControllerPort::ONE, | ||
EmulateCableOn | ccline = EmulateCableOn::CC2 ) |
vdm | If the VDM is not set, default VDM with 20V 5A will be set |
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
ccline | Using EmulateCableOn you can set Rp value on CC line ccline = EmulateCableOn.CC1 then Rp value in CC2 line ccline = EmulateCableOn.CC2 then Rp value in CC1 line |
int GrlC2ApiLib.GrlC2Controller.UseTypeCCable | ( | ControllerPort | port = ControllerPort::ONE | ) |
API to configure GRL-SPL cable.
port | GRL-USB-PD-C2's Port 1 or Port 2. Default is Port 1 |
int GrlC2ApiLib.GrlC2Controller.ValidateRequest_By_index | ( | int | iPDOind, |
ControllerPort | port = ControllerPort::ONE ) |
API to validate request message by using request message PDO index.
iPDOind | Request PDO index |
port |
void GrlC2ApiLib.GrlC2Controller.WaitFor | ( | int | waitTimeMilli | ) |
Method to provide delay in milliseconds.
waitTimeMilli | Configure delay in milliseconds |