USB System¶
- class brainstem.entity.USBSystem(module, index)[source]¶
USBSystem Class: The USBSystem class provides high level control of the lower level Port Class.
- getDataHSMaxDatarate()[source]¶
Gets the USB HighSpeed Max datarate Current maximum datarate for the USB HighSpeed signals.
- Returns:
Result object containing the requested value when the results error is set to NO_ERROR(0)
- Return type:
- getDataRoleBehavior()[source]¶
Gets the behavior of how upstream and downstream ports are determined. i.e. How do you manage requests for data role swaps and new upstream connections. Variable to be filled with an enumerated representation of behavior. Available behaviors are product specific. See the reference documentation.
- Returns:
Result object containing the requested value when the results error is set to NO_ERROR(0)
- Return type:
- getDataRoleBehaviorConfig(buffer_length=65536)[source]¶
Gets the current data role behavior configuration Certain data role behaviors use a list of ports to determine priority host priority. Length that was actually received and filled.
- Parameters:
buffer_length – Length of the buffer to be filed
- Returns:
Result object containing the requested value when the results error is set to NO_ERROR(0)
- Return type:
- getDataRoleList()[source]¶
Gets the data role of all ports with a single call Equivalent to calling PortClass::getDataRole() on each individual port. A bit packed representation of the data role for all ports.
- Returns:
Result object containing the requested value when the results error is set to NO_ERROR(0)
- Return type:
- getDataSSMaxDatarate()[source]¶
Gets the USB SuperSpeed Max datarate Current maximum datarate for the USB SuperSpeed signals.
- Returns:
Result object containing the requested value when the results error is set to NO_ERROR(0)
- Return type:
- getEnabledList()[source]¶
Gets the current enabled status of all ports with a single call. Equivalent to calling PortClass::setEnabled() on each port. Bit packed representation of the enabled status for all ports.
- Returns:
Result object containing the requested value when the results error is set to NO_ERROR(0)
- Return type:
- getEnumerationDelay()[source]¶
Gets the inter-port enumeration delay in milliseconds. Delay is applied upon hub enumeration. the current inter-port delay in milliseconds.
- Returns:
Result object containing the requested value when the results error is set to NO_ERROR(0)
- Return type:
- getModeList(buffer_length=65536)[source]¶
Gets the current mode of all ports with a single call. Equivalent to calling PortClass:getMode() on each port. Length that was actually received and filled.
- Parameters:
buffer_length – Length of the buffer to be filed
- Returns:
Result object containing the requested value when the results error is set to NO_ERROR(0)
- Return type:
- getOverride()[source]¶
Gets the current enabled overrides Bit mapped representation of the current override configuration.
- Returns:
Result object containing the requested value when the results error is set to NO_ERROR(0)
- Return type:
- getPowerBehavior()[source]¶
Gets the behavior of the power manager. The power manager is responsible for budgeting the power of the system. i.e. What happens when requested power greater than available power. Variable to be filled with an enumerated representation of behavior. Available behaviors are product specific. See the reference documentation.
- Returns:
Result object containing the requested value when the results error is set to NO_ERROR(0)
- Return type:
- getPowerBehaviorConfig(buffer_length=65536)[source]¶
Gets the current power behavior configuration Certain power behaviors use a list of ports to determine priority when budgeting power. Length that was actually received and filled.
- Parameters:
buffer_length – Length of the buffer to be filed
- Returns:
Result object containing the requested value when the results error is set to NO_ERROR(0)
- Return type:
- getSelectorMode()[source]¶
Gets the current mode of the selector input. This mode determines what happens and in what order when the external selector input is used. Variable to be filled with the selector mode
- Returns:
Result object containing the requested value when the results error is set to NO_ERROR(0)
- Return type:
- getStateList(buffer_length=65536)[source]¶
Gets the state for all ports with a single call. Equivalent to calling PortClass::getState() on each port. Length that was actually received and filled.
- Parameters:
buffer_length – Length of the buffer to be filed
- Returns:
Result object containing the requested value when the results error is set to NO_ERROR(0)
- Return type:
- getUpstream()[source]¶
Gets the upstream port. The current upstream port.
- Returns:
Result object containing the requested value when the results error is set to NO_ERROR(0)
- Return type:
- getUpstreamHS()[source]¶
Gets the USB HighSpeed upstream port. The current upstream port.
- Returns:
Result object containing the requested value when the results error is set to NO_ERROR(0)
- Return type:
- getUpstreamSS()[source]¶
Gets the USB SuperSpeed upstream port. The current upstream port.
- Returns:
Result object containing the requested value when the results error is set to NO_ERROR(0)
- Return type:
- resetEntityToFactoryDefaults()[source]¶
Resets the USBSystemClass Entity to it factory default configuration.
- Returns:
An error result from the list of defined error codes in brainstem.result
- Return type:
unsigned byte
- setDataHSMaxDatarate(datarate)[source]¶
Sets the USB HighSpeed Max datarate
- Parameters:
datarate (const unsigned int) – Maximum datarate for the USB HighSpeed signals.
- Returns:
An error result from the list of defined error codes in brainstem.result
- Return type:
unsigned byte
- setDataRoleBehavior(behavior)[source]¶
Sets the behavior of how upstream and downstream ports are determined. i.e. How do you manage requests for data role swaps and new upstream connections.
- Parameters:
behavior (const unsigned char) – An enumerated representation of behavior. Available behaviors are product specific. See the reference documentation.
- Returns:
An error result from the list of defined error codes in brainstem.result
- Return type:
unsigned byte
- setDataRoleBehaviorConfig(buffer)[source]¶
Sets the current data role behavior configuration Certain data role behaviors use a list of ports to determine host priority.
- Returns:
An error result from the list of defined error codes in brainstem.result
- Return type:
unsigned byte
- setDataSSMaxDatarate(datarate)[source]¶
Sets the USB SuperSpeed Max datarate
- Parameters:
datarate (const unsigned int) – Maximum datarate for the USB SuperSpeed signals.
- Returns:
An error result from the list of defined error codes in brainstem.result
- Return type:
unsigned byte
- setEnabledList(enabledList)[source]¶
Sets the enabled status of all ports with a single call. Equivalent to calling PortClass::setEnabled() on each port.
- Parameters:
enabledList (const unsigned int) – Bit packed representation of the enabled status for all ports to be applied.
- Returns:
An error result from the list of defined error codes in brainstem.result
- Return type:
unsigned byte
- setEnumerationDelay(msDelay)[source]¶
Sets the inter-port enumeration delay in milliseconds. Delay is applied upon hub enumeration.
- Parameters:
msDelay (const unsigned int) – The delay in milliseconds to be applied between port enables
- Returns:
An error result from the list of defined error codes in brainstem.result
- Return type:
unsigned byte
- setModeList(buffer)[source]¶
Sets the mode of all ports with a single call. Equivalent to calling PortClass::setMode() on each port
- Returns:
An error result from the list of defined error codes in brainstem.result
- Return type:
unsigned byte
- setOverride(overrides)[source]¶
Sets the current enabled overrides
- Parameters:
overrides (const unsigned int) – Overrides to be set in a bit mapped representation.
- Returns:
An error result from the list of defined error codes in brainstem.result
- Return type:
unsigned byte
- setPowerBehavior(behavior)[source]¶
Sets the behavior of how available power is managed. i.e. What happens when requested power is greater than available power.
- Parameters:
behavior (const unsigned char) – An enumerated representation of behavior. Available behaviors are product specific. See the reference documentation.
- Returns:
An error result from the list of defined error codes in brainstem.result
- Return type:
unsigned byte
- setPowerBehaviorConfig(buffer)[source]¶
Sets the current power behavior configuration Certain power behaviors use a list of ports to determine priority when budgeting power.
- Returns:
An error result from the list of defined error codes in brainstem.result
- Return type:
unsigned byte
- setSelectorMode(mode)[source]¶
Sets the current mode of the selector input. This mode determines what happens and in what order when the external selector input is used.
- Parameters:
mode (const unsigned char) – Mode to be set.
- Returns:
An error result from the list of defined error codes in brainstem.result
- Return type:
unsigned byte
- setUpstream(port)[source]¶
Sets the upstream port.
- Parameters:
port (const unsigned char) – The upstream port to set.
- Returns:
An error result from the list of defined error codes in brainstem.result
- Return type:
unsigned byte