PowerView

class lauterbach.trace32.pystart.PowerView(connection=None, target='', *, system_path='', force_executable='', pbi_index=0)

PowerView is a class to manage TRACE32 PowerView instances.

Parameters:
  • connection (Optional['Connection']) – Specifies how to communicate with the target. If set to None connection gets configured by connection_script or by user.

  • target (str) – Name of the executable without file extension e.g. ‘t32marm’

  • system_path (PathType) – Directory where the executable and system files of TRACE32 are located.

  • force_executable (PathType) – Overrides system_path and target settings when deriving the executable.

  • pbi_index (int) – In case of using a PBIConnection, the 0 based index in the pbi-chain else must be 0.

target: str

name of executable (t32m*) without file extension. This value is not required if force_executable is set.

system_path: str | Path

Directory where the executable and system files of TRACE32 are located.

temp_path: str | Path

Directory, where temporary files can be created. The source files are copied to the temporary directory while debugging.

id: str

Prefix for all files that are saved by the TRACE32 PowerView instance into the TMP directory. We recommend to set a unique id for every PowerView instance running simultaneously.

help_path: str | Path

Directory where the pdf-files for the TRACE32 online help are located.

license_file: str | Path

Directory where a license file can be located. A license file provides the software maintenance keys.

force_executable: str | Path | None

Overrides system_path and target settings when deriving the executable.

Use this option only if you know what you are doing.

force_32bit_executable: bool | None

If set, pystart will start the 32-bit executable located under bin/windows instead of the 64-bit executable located under bin/windows64 if the executable is derived from system_path. This could be e.g. needed if a 32-bit DLL has to be loaded in TRACE32 PowerView.

rlm_port: int

The Floating License Client (RLM Client) needs to know which (RLM) port number should be used to get the license.

rlm_server: str

The Floating License Client (RLM Client) needs to know which (RLM) Server to contact to get the license.

rlm_file: str | Path

Sets a license file (.lic) which includes the floating license parameters.

rlm_timeout: int | None

RLM timeout in minutes

rlm_pool_port: int | None

TCP/IP port for license pool. Refer to the chapter “Floating License Pools” in Floating Licenses, page 19 (floatinglicenses.pdf) for more information.

screen: bool | None

If False the main window of TRACE32 and all other dialogs and windows of TRACE32 remain hidden - even if an error occurs. If None the global default is used.

title: str

Sets the window title of the TRACE32 instance.

font_size: FontSize | None

Selects the used font size used by the TRACE32 instance (Normal, Small or Large).

clear_type: bool | None

Select if Cleartype display of fonts is switched ON or OFF.

True: ON if it is supported by the OS. The monospaced truetype font “Lucida Console” is used as basic font and should be installed.

False: OFF, TRACE32 fonts are used (t32font.fon).

None: Use global setting.

palette: Palette | None

Sets up display theme.

full_screen: bool | None

If set to true, the TRACE32 instance is started in full screen mode.

ionic: bool | None

Startup iconized (minimized)

Type:

If True

invisible: bool | None

The main window of TRACE32 remains hidden. However, dialogs and other windows of TRACE32 can still be opened.

Type:

If True

window_mode: WindowMode | None

Specify how child windows appear.

language: Language | None

Set up the language used by TRACE32.

startup_script: str | Path

A cmm script being executed on start of TRACE32.

startup_parameter: Iterable[str]

Parameter for startup_script. If you want to retrieve the parameters by PARAMETERS command, consider adding additional quotes at beginning and ending of each string.

connection_script: str | Path

A cmm script being executded immediately after PowerView started.

connection_parameter: Iterable[str]

Parameter for connection_script. Elements must not start with a hyphen and must not contain any commas.

safe_start: bool

Suppresses the automatic execution of any PRACTICE script after starting TRACE32. This allows you to test or debug the scripts that are normally executed automatically.

args: Iterable[str]

Additional command line options for starting TRACE32.

start(*, timeout=20.0, delay=None)

generates a config file, starts TRACE32 and blocks until TRACE32 has fully started

Parameters:
  • timeout (float) – timeout for complete start of TRACE32 in seconds. (default=20.0)

  • delay (float | None) – (deprecated) If not None value is used to overwrite timeout parameter, at the same time TimeoutError exception is disabled. Please set delay parameter to an appropriate value for TRACE32 installations with a build number below 166336.

Returns:

self

Raises:
  • FileNotFoundError – if the executable can not be found within the specified path

  • TimeoutError – after waiting for the time specified by timeout

  • RuntimeError – if process is already running

  • ChildProcessError – if process terminated prematurely

Return type:

PowerView

wait(timeout=None)

wait for process to terminate

Parameters:

timeout (float | None) – optional timeout in seconds.

Raises:

TimeoutError – on timeout

stop(timeout=None)

stops the process gently

This function blocks until the process is stoppped. When TRACE32 build number is below 165929, you are on Windows and screen is disabled, TRACE32 does not get stopped.

Parameters:

timeout (float | None) – optional timeout in seconds. If None wait for an infinite amount of time. Default is None.

Raises:

TimeoutError – on timeout

get_pid()

Returns the process id

Returns:

process id of the PowerView instance or None if process is not running

Return type:

int | None

property executable: Path

Getter for the executable being used to start a PowerView instance.

Returns:

The executable being used to start the PowerView instance.

Raises:

ValueError – If the executable could not be derived because of missing settings

add_interface(interface)

Add a interface for inter-process communication

Parameters:

interface (T32Interface) – interface to add

Returns:

added interface

Raises:

ValueError – raised if an interface which can be added only once is already added

Return type:

T32Interface

get_configuration_string()

Generates the content of the config file.

Returns:

generated config file content

Return type:

str