PowerDelivery Endpoint¶
Power Delivery or PD is a power specification which allows more charging options and device behaviors within the USB interface.
This Entity will allow you to directly access the vast landscape of PD.
See the PowerDelivery Entity for generic information.
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/connectionstate¶
Gets the current state of the connection in the form of an enumeration.
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/numberofpowerdataobjects/(partner)/(powerRole)¶
Gets the number of Power Data Objects (PDOs) for a given partner and power role.
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
partner –
Indicates which side of the PD connection is in question.
Local = 0 = powerdeliveryPartnerLocal
Remote = 1 = powerdeliveryPartnerRemote
powerRole –
Indicates which power role of PD connection is in question.
Source = 1 = powerdeliveryPowerRoleSource
Sink = 2 = powerdeliveryPowerRoleSink
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/powerdataobject/(partner)/(powerRole)/(ruleIndex)¶
Gets the Power Data Object (PDO) for the requested partner, powerRole and index.
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
partner –
Indicates which side of the PD connection is in question.
Local = 0 = powerdeliveryPartnerLocal
Remote = 1 = powerdeliveryPartnerRemote
powerRole –
Indicates which power role of PD connection is in question.
Source = 1 = powerdeliveryPowerRoleSource
Sink = 2 = powerdeliveryPowerRoleSink
ruleIndex – The index of the PDO in question. Valid index are 1-7.
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- PUT /api/v1/brainstem/(serial_num)/powerdelivery/(index)/powerdataobject/(powerRole)/(ruleIndex)¶
Sets the Power Data Object (PDO) of the local partner for a given power role and index.
See JSON Schema for Request Object and Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
powerRole –
Indicates which power role of PD connection is in question.
Source = 1 = powerdeliveryPowerRoleSource
Sink = 2 = powerdeliveryPowerRoleSink
ruleIndex – The index of the PDO in question. Valid index are 1-7.
- Request JSON Object:
value (integer) –
32-bit Integer value to set.
May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- PUT /api/v1/brainstem/(serial_num)/powerdelivery/(index)/resetpowerdataobjecttodefault/(powerRole)/(ruleIndex)¶
Resets the Power Data Object (PDO) of the Local partner for a given power role and index.
See JSON Schema for Request Object and Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
powerRole –
Indicates which power role of PD connection is in question.
Source = 1 = powerdeliveryPowerRoleSource
Sink = 2 = powerdeliveryPowerRoleSink
ruleIndex – The index of the PDO in question. Valid index are 1-7.
- Request JSON Object:
value (integer) –
8-bit Integer value to set.
May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/powerdataobjectlist¶
Gets all Power Data Objects (PDOs).
Equivalent to calling PowerDeliveryClass::getPowerDataObject() on all partners, power roles, and index’s.
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Response JSON Object:
response.value (string) – Value formatted as a list of integers
response.rawValue (list(integer)) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/powerdataobjectenabled/(powerRole)/(ruleIndex)¶
Gets the enabled state of the Local Power Data Object (PDO) for a given power role and index.
Enabled refers to whether the PDO will be advertised when a PD connection is made.
This does not indicate the currently active rule index. This information can be found in Request Data Object (RDO).
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
powerRole –
Indicates which power role of PD connection is in question.
Source = 1 = powerdeliveryPowerRoleSource
Sink = 2 = powerdeliveryPowerRoleSink
ruleIndex – The index of the PDO in question. Valid index are 1-7.
- Response JSON Object:
response.value (boolean) – Value formatted as a boolean
response.rawValue (integer) – Unformatted value
- PUT /api/v1/brainstem/(serial_num)/powerdelivery/(index)/powerdataobjectenabled/(powerRole)/(ruleIndex)¶
Sets the enabled state of the Local Power Data Object (PDO) for a given powerRole and index.
Enabled refers to whether the PDO will be advertised when a PD connection is made.
This does not indicate the currently active rule index. This information can be found in Request Data Object (RDO).
See JSON Schema for Request Object and Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
powerRole –
Indicates which power role of PD connection is in question.
Source = 1 = powerdeliveryPowerRoleSource
Sink = 2 = powerdeliveryPowerRoleSink
ruleIndex – The index of the PDO in question. Valid index are 1-7.
- Request JSON Object:
value (boolean) –
Boolean value to set.
May be specified as a boolean, integer, or a string (formatted as “True”, “FALSE”, “1”, etc.)
- Response JSON Object:
response.value (boolean) – Value formatted as a boolean
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/powerdataobjectenabledlist/(powerRole)¶
Gets all Power Data Object enables for a given power role.
Equivalent of calling PowerDeliveryClass::getPowerDataObjectEnabled() for all indexes.
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
powerRole –
Indicates which power role of PD connection is in question.
Source = 1 = powerdeliveryPowerRoleSource
Sink = 2 = powerdeliveryPowerRoleSink
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/requestdataobject/(partner)¶
Gets the current Request Data Object (RDO) for a given partner.
RDOs are provided by the sinking device and exist only after a successful PD negotiation (Otherwise zero).
Only one RDO can exist at a time. i.e. Either the Local or Remote partner RDO
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
partner –
Indicates which side of the PD connection is in question.
Local = 0 = powerdeliveryPartnerLocal
Remote = 1 = powerdeliveryPartnerRemote
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- PUT /api/v1/brainstem/(serial_num)/powerdelivery/(index)/requestdataobject¶
Sets the current Request Data Object (RDO) for a given partner.
Only the local partner can be changed.
RDOs are provided by the sinking device and exist only after a successful PD negotiation (Otherwise zero).
Only one RDO can exist at a time. i.e. Either the Local or Remote partner RDO
See JSON Schema for Request Object and Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Request JSON Object:
value (integer) –
32-bit Integer value to set.
May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/linkstate¶
Gets the current state of the connection in the form of a bitmask.
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/attachtimeelapsed¶
Gets the length of time that the port has been in the attached state.
Returned as a list of two unsigned integers, first seconds, then microseconds.
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Response JSON Object:
response.value (string) – Value formatted as a list of integers
response.rawValue (list(integer)) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/powerrolecapabilities¶
Gets the power roles that may be advertised by the local partner. (CC Strapping).
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/powerrole¶
Gets the power role that is currently being advertised by the local partner. (CC Strapping).
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- PUT /api/v1/brainstem/(serial_num)/powerdelivery/(index)/powerrole¶
Set the current power role to be advertised by the Local partner. (CC Strapping).
See JSON Schema for Request Object and Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Request JSON Object:
value (integer) –
8-bit Integer value to set.
May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/powerrolepreferred¶
Gets the preferred power role currently being advertised by the Local partner. (CC Strapping).
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- PUT /api/v1/brainstem/(serial_num)/powerdelivery/(index)/powerrolepreferred¶
Set the preferred power role to be advertised by the Local partner (CC Strapping).
See JSON Schema for Request Object and Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Request JSON Object:
value (integer) –
8-bit Integer value to set.
May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/datarolecapabilities¶
Gets the data roles that may be advertised by the local partner.
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/cablevoltagemax¶
Gets the maximum voltage capability reported by the e-mark of the attached cable.
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/cablecurrentmax¶
Gets the maximum current capability report by the e-mark of the attached cable.
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/cablespeedmax¶
Gets the maximum data rate capability reported by the e-mark of the attached cable.
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/cabletype¶
Gets the cable type reported by the e-mark of the attached cable.
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/cableorientation¶
Gets the current orientation being used for PD communication
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- PUT /api/v1/brainstem/(serial_num)/powerdelivery/(index)/requestcommand¶
Requests an action of the Remote partner.
Actions are not guaranteed to occur.
See JSON Schema for Request Object and Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Request JSON Object:
value (integer) –
8-bit Integer value to set.
May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/requeststatus¶
Gets the status of the last request command sent.
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/override¶
Gets the current enabled overrides
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- PUT /api/v1/brainstem/(serial_num)/powerdelivery/(index)/override¶
Sets the current enabled overrides
See JSON Schema for Request Object and Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Request JSON Object:
value (integer) –
32-bit Integer value to set.
May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/flagmode/(flag)¶
Gets the current mode of the local partner flag/advertisement.
These flags are apart of the first Local Power Data Object and must be managed in order to accurately represent the system to other PD devices.
This API allows overriding of that feature. Overriding may lead to unexpected behaviors.
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
flag – Flag/Advertisement to be modified
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- PUT /api/v1/brainstem/(serial_num)/powerdelivery/(index)/flagmode/(flag)¶
Sets how the local partner flag/advertisement is managed.
These flags are apart of the first Local Power Data Object and must be managed in order to accurately represent the system to other PD devices.
This API allows overriding of that feature. Overriding may lead to unexpected behaviors.
See JSON Schema for Request Object and Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
flag – Flag/Advertisement to be modified
- Request JSON Object:
value (integer) –
8-bit Integer value to set.
May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/peakcurrentconfiguration¶
Gets the Peak Current Configuration for the Local Source.
The peak current configuration refers to the allowable tolerance/overload capabilities in regards to the devices max current.
This tolerance includes a maximum value and a time unit.
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- PUT /api/v1/brainstem/(serial_num)/powerdelivery/(index)/peakcurrentconfiguration¶
Sets the Peak Current Configuration for the Local Source.
The peak current configuration refers to the allowable tolerance/overload capabilities in regards to the devices max current.
This tolerance includes a maximum value and a time unit.
See JSON Schema for Request Object and Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Request JSON Object:
value (integer) –
8-bit Integer value to set.
May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- GET /api/v1/brainstem/(serial_num)/powerdelivery/(index)/fastroleswapcurrent¶
Gets the Fast Role Swap Current
The fast role swap current refers to the amount of current required by the Local Sink in order to successfully preform the swap.
See JSON Schema for Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value
- PUT /api/v1/brainstem/(serial_num)/powerdelivery/(index)/fastroleswapcurrent¶
Sets the Fast Role Swap Current
The fast role swap current refers to the amount of current required by the Local Sink in order to successfully preform the swap.
See JSON Schema for Request Object and Response Object
- Parameters:
serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.
index – Index of entity to access. Default is 0.
- Request JSON Object:
value (integer) –
8-bit Integer value to set.
May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)
- Response JSON Object:
response.value (integer) – Value formatted as an integer
response.rawValue (integer) – Unformatted value