pyedbglib.primitive

pyedbglib.primitive.gen4controller

Interface to GEN4 script engine, based on Asynchronous Transport Interface

class pyedbglib.primitive.gen4controller.Gen4Controller(transport)

Bases: AsynchronousTransportInterface

Wrapper for accessing GEN4 “scripts” in 5G FW.

execute(script)

Atomic execution of a script

Parameters:

script – array containing binary script byte-code to execute

Returns:

results of script execution

Raises:

Gen4Exception – if a script fails to execute

new_command(content=None)

Make a new command object for this controller class

Parameters:

content – content to pack into command

Returns:

command object instance

receive_script_execution_response()

Read response from script execution

Returns:

array of 32-bits integers returned from the script execution

start_script_execution(script)

Starts a script executing and returns immediately

Parameters:

script – array containing binary script byte-code to execute

class pyedbglib.primitive.gen4controller.Gen4ControllerCommand(content=None)

Bases: object

Gen4ControllerCommand wraps a communication exchange with the debugger.

Fields are populated by the client, and a bytestream is then generated and sent to the debugger for execution.

add_parameter(value_array)

Adds a parameter to the command

generate_bytestream()

Turn the envelope into a byte-stream

Returns:

byte-stream

set_data_dest(destination_id)

Sets the data dest buffer

Parameters:

destination_id – data dest buffer ID

set_data_source(source_id)

Sets the data source buffer

Parameters:

source_id – data source buffer ID

set_script_source(src_id)

Sets the script source

Parameters:

src_id – source buffer ID for script

exception pyedbglib.primitive.gen4controller.Gen4Exception(msg=None, code=0)

Bases: Exception

Custom Exception for GEN4 scripts

pyedbglib.primitive.primitivecontroller

Interface to primitive sequence executer, based on Asynchronous Transport interface

class pyedbglib.primitive.primitivecontroller.PrimitiveController(transport)

Bases: AsynchronousTransportInterface

Wrapper for accessing primitives and sequences thereof in 5G FW.

execute(primitive_blocks)

Atomic execution

Parameters:

primitive_blocks – blocks to execute

Returns:

results

execute_single_block(primitive_block)

Atomic execution

Parameters:

primitive_block – block to execute

Returns:

results

new_command(content=None)

Create a new controller command

receive_primitive_execution_response()

Read response from primitive execution

Returns:

array of 32-bits integer returned from the primitive execution blocks

start_primitive_execution(primitive_blocks)

Starts a primitive executing and returns immediately

class pyedbglib.primitive.primitivecontroller.PrimitiveControllerCommand(content=None)

Bases: object

PrimitiveControllerCommand wraps a communication exchange with the debugger.

Fields are populated by the client, and a bytestream is then generated and sent to the debugger for execution.

add_parameter(param_id, value, flags=0)

Adds a parameter to the command

generate_bytestream()

Turn the envelope into a byte-stream

Returns:

byte-stream

set_data_dest(destination_id)

Sets the data dest buffer

Parameters:

destination_id – data dest buffer ID

set_data_source(source_id)

Sets the data source buffer

Parameters:

source_id – data source buffer ID

set_primitive_source(src_id)

Sets the primitive source

pyedbglib.primitive.primitives

List of available primitives for communicating with PIC devices