GRL-USB-PD-C2/C2-EPR API 1.1.9
GRL-USB-PD-C2/C2-EPR API Documentation
Loading...
Searching...
No Matches
GrlPdLib.SourceCapability Class Reference

SourceCapability class which contains all fields required for the PDSource Capability function. More...

Public Member Functions

 SourceCapability (bool isEprSrcCap=false)
 Source Capability Constructor.
 
List< uint > GetByteData ()
 To Get Byte Data.
 
bool ClearDataObjects ()
 Clears Object Values.
 
bool AddFixedSupply (uint Volt_50mV_Unit, uint MaxCurrent_10mA_Unit, bool enDualRolePower=false, bool supportUSBSuspend=false, bool externallyPowered=false, bool USBCommCapable=false, bool enDualRoleData=false, bool supUnChunkedExt=false, PeakCurrentCapability peakCurrent=PeakCurrentCapability.Default_Ioc, bool EprModeCapable=false)
 Allows to set Fixed Supply.
 
bool AddVariableSupply (uint MaxVolt_50mV_Unit, uint MinVolt_50mV_Unit, uint MaxCurrent_10mA_Unit)
 Allows to set Variable supply.
 
bool AddBatterySupply (uint MaxVolt_50mV_Unit, uint MinVolt_50mV_Unit, uint MaxPower_250mW_Unit)
 Allows to set Battery Supply.
 
bool AddPpsApdo (uint MaxVolt_100mV_Unit, uint MinVolt_100mV_Unit, uint MaxCurrent_50mA_Unit, bool PPS_Power_Limited)
 Allows to set ppsApdo.
 
bool AddEPRAVSApdo (uint MaxVolt_100mV_Unit, uint MinVolt_100mV_Unit, uint peakCurrent, uint PDP_1W_Unit, ProgrammablePowerSupplyType PPS=ProgrammablePowerSupplyType.EPR_Adjustable_Voltage_Supply)
 Allows to set EPR_AVS Apdo.
 
bool AddSPRAVSAPdo (uint maxCur_15V, uint maxCur_20V, uint peakCurrent, ProgrammablePowerSupplyType SPRAVS=ProgrammablePowerSupplyType.SPR_Adjustable_Voltage_Supply)
 Adding the SPR AVS PDO.
 
void AddPdoRawData (uint data)
 
void PDMessageHeaderNameValuePair (PDMessage pdoMessage)
 
void PDMessagePDONameValuePair (PDMessage pdoMessage)
 
void UpdateExtendedHeader (byte dataSize, byte requestChunk, byte chunkNumber, byte chunked)
 
void UpdateHeader (uint specificationRevision, uint noOfDataObjects, uint extended)
 
int GetPDOCount ()
 Get PDO count.
 

Public Attributes

List< uint > m_SrcPowerDataObject
 
List< KeyValuePair< string, string > > Header = new List<KeyValuePair<string, string>>()
 
List< Dictionary< string, string > > PDO = new List<Dictionary<string, string>>()
 
uint extendedHeader
 
uint msgHeader
 

Detailed Description

SourceCapability class which contains all fields required for the PDSource Capability function.

Constructor & Destructor Documentation

◆ SourceCapability()

GrlPdLib.SourceCapability.SourceCapability ( bool isEprSrcCap = false)

Source Capability Constructor.

Member Function Documentation

◆ AddBatterySupply()

bool GrlPdLib.SourceCapability.AddBatterySupply ( uint MaxVolt_50mV_Unit,
uint MinVolt_50mV_Unit,
uint MaxPower_250mW_Unit )

Allows to set Battery Supply.

Parameters
MaxVolt_50mV_UnitMaximum Voltage 50mV units.
MinVolt_50mV_UnitMinimum Voltage 50mV units.
MaxPower_250mW_UnitMaximum Power 250mW units.
Returns
Returns true.

◆ AddEPRAVSApdo()

bool GrlPdLib.SourceCapability.AddEPRAVSApdo ( uint MaxVolt_100mV_Unit,
uint MinVolt_100mV_Unit,
uint peakCurrent,
uint PDP_1W_Unit,
ProgrammablePowerSupplyType PPS = ProgrammablePowerSupplyType::EPR_Adjustable_Voltage_Supply )

Allows to set EPR_AVS Apdo.

Parameters
MaxVolt_100mV_Unit
MinVolt_100mV_Unit
PDP_1W_Unit
PPS
Returns

◆ AddFixedSupply()

bool GrlPdLib.SourceCapability.AddFixedSupply ( uint Volt_50mV_Unit,
uint MaxCurrent_10mA_Unit,
bool enDualRolePower = false,
bool supportUSBSuspend = false,
bool externallyPowered = false,
bool USBCommCapable = false,
bool enDualRoleData = false,
bool supUnChunkedExt = false,
PeakCurrentCapability peakCurrent = PeakCurrentCapability::Default_Ioc,
bool EprModeCapable = false )

Allows to set Fixed Supply.

Parameters
Volt_50mV_UnitVoltage in 50mV units.
MaxCurrent_10mA_UnitMaximum Current of 10mA units.
enDualRolePowerDual Role Power.
supportUSBSuspendUSB Susspended Support.
externallyPoweredUnconstraijned Power.
USBCommCapableUSB Communications Cable.
enDualRoleDataDual Role Data.
supUnChunkedExtUnchunked Extended Messages Supported.
peakCurrentPeak Current.
Returns
On Success Returns True.

◆ AddPpsApdo()

bool GrlPdLib.SourceCapability.AddPpsApdo ( uint MaxVolt_100mV_Unit,
uint MinVolt_100mV_Unit,
uint MaxCurrent_50mA_Unit,
bool PPS_Power_Limited )

Allows to set ppsApdo.

Parameters
MaxVolt_100mV_UnitMaximum Voltage 100mV units.
MinVolt_100mV_UnitMinimum Voltage 100mV units.
MaxCurrent_50mA_UnitMaximum Curresnt 50mA units.
Returns
Returns True.

◆ AddSPRAVSAPdo()

bool GrlPdLib.SourceCapability.AddSPRAVSAPdo ( uint maxCur_15V,
uint maxCur_20V,
uint peakCurrent,
ProgrammablePowerSupplyType SPRAVS = ProgrammablePowerSupplyType::SPR_Adjustable_Voltage_Supply )

Adding the SPR AVS PDO.

Parameters
maxCur_15V
maxCur_20V
peakCurrent
SPRAVS
Returns

◆ AddVariableSupply()

bool GrlPdLib.SourceCapability.AddVariableSupply ( uint MaxVolt_50mV_Unit,
uint MinVolt_50mV_Unit,
uint MaxCurrent_10mA_Unit )

Allows to set Variable supply.

Parameters
MaxVolt_50mV_UnitMaximum Voltage 50mV units.
MinVolt_50mV_UnitMinimum Voltage 50mV units.
MaxCurrent_10mA_UnitMaximum Current 10mA units.
Returns
Returns True if Success.

◆ ClearDataObjects()

bool GrlPdLib.SourceCapability.ClearDataObjects ( )

Clears Object Values.

Returns
Returns true when cleared.

◆ GetByteData()

List< uint > GrlPdLib.SourceCapability.GetByteData ( )

To Get Byte Data.

Returns
returns the PDO Payload along with buffer.

◆ GetPDOCount()

int GrlPdLib.SourceCapability.GetPDOCount ( )

Get PDO count.

Returns