QTools 6.9.0
QView User Interface

The qview.py script provides a Graphical User Interface (GUI) consisting of the main menu, the text view, the status bar, and the customizable canvas view.

QView user interface

The main menu includes several useful commands, which are quickly reviewed and the following sections. The main menu might subsequently be augmented in your own customizations.

File Menu

The File menu provides interface to the QSPY saving files feature. This menu allows you to trigger QSPY to save dictionaries, as well as to open/close all other file formats supported by QSPY.

View Menu

The View menu allows you to toggle (show/hide) the Canvas view.

Text-view and Canvas-view menus
Canvas-view enabled
Note
The provided screen shot of the Canvas-view is specific to the DPP example application (see Customizing & Extending QView™).

Global Filters Menu

The Filters menu opens dialog boxes through which you can set the QSPY global filters for QS record types.

The Global Filter menu opens dialog boxes for each group of global filters. For example, the screen shot below shows the "SM Group" (State Machine Group). In this "SM Group" dialog box you can check/uncheck the individual filters, or you can "Select ALL" or "Clear ALL" filters in the group.

Global Filter SM-Group Dialog Box
Note
The Global-Filters menu reflects the status of the whole group by the following status-indicators:
  • [-]- no filters in the group selected
  • [+-] - some filters in the group selected
  • [+] - all filters in the group selected

Local Filters Menu

The Filters menu opens dialog boxes through which you can set the QSPY filters.

The Local Filter menu opens dialog boxes for each local filter object. For example, the screen shot below shows the "AO_OBJ" (Active Object filter). In this "Local Filter" dialog box you can specify the object either by its name (must match the QS dictionary), or as addresses of the objects in decimal and in hexadecimal (with the 0x prefix).

Local Filter AO_OBJ Dialog Box
Note
The Local-Filters menu reflects the selected local filters, which are listed to the right of the filter (e.g. Philo_inst[0].timeEvt).

Current-Obj Menu

The Curr-Obj menu opens dialog boxes through which you can set the QS Current Objects.

The Curr-Obj menu opens dialog boxes for each local current object. For example, the screen shot below shows the "AO_OBJ" (current Active Object). In this "Curr-Obj" dialog box you can specify the object either by its name (must match the QS dictionary), or as addresses of the objects in decimal and in hexadecimal (with the 0x prefix).

Current Object AO_OBJ Dialog Box
Note
The Curr-Obj menu reflects the selected current objects, which are listed to the right of the filter (e.g. Table_inst).

Commands Menu

The Commands menu allows you to execute simple commands (without parameters) in the Target, such as Reset the Target, Query the Target, and clock Tick at rate 0 and rate 1. Also, this menu allows you to execute commands with parameters, which are quickly discussed below

Commands Menu

Executing User Command

The "User Command..." menu allows you to invoke a command in the Target and pass up to three parameters to this command. (NOTE: a command is an application-specific callback function that the QS-RX component executes in the Target).

Command Dialog Box

The screen shot above shows how to execute User Command number 0 with the parameters: 12345, 0xDEADBEEF and 0 (default). Both the command number and the parameters can be specified in hexadecimal (with the 0x prefix).

Peek Command

The Peek Obj/Addr... command opens a dialog box, in which you can provide the Target object or address (RAM or ROM) (NOTE: You can provide either the object name, which must be known by its object-dictionary, or numerical address, which must be a valid RAM/ROM address, or the Target might crash.)

Attention
The "Peek..." menu requires the "Current-Obj AP_OBJ" to be set in the Current-Obj Menu, because this is the object within the Target which will be "peeked". The "Peek..." menu is inactive (grayed-out) when the "Current-Obj AP_OBJ" is not specified.
Note
The Peek Command can be used to view any readable address, such as ROM, RAM, and also peripheral registers in your Target.

As shown in the screen shot below, the PEEK command takes additionally the offset into the object [bytes] (offset of 0 is default if not specified), the size of the item [8-bit, 16-bit, 32-bit] and the number of units (n-units) [1..255] you wish to "peek".

Peek Command Dialog Box


The Target responds with a QS_PEEK_DATA trace record, which you can view in QSPY human-readable output (the packet is also sent to QView, where you can react to it in your customization.)

4294965703 Trg-Peek Offs=0,Size=4,Num=4,Data=<20000D2C,20000D2C,20000D74,000A0008>

Poke Command

The "Poke Obj/Addr..." command allows you to write data to the specified object or address in Target's RAM (NOTE: You can provide either the object name, which must be known by its object-dictionary, or numerical address, which must be a valid RAM address, or the Target might crash.)

Attention
The "Poke..." menu requires the "Current-Obj AP_OBJ" to be set in the Current-Obj Menu, because this is the object within the Target which will be "poked". The "Poke..." menu is inactive (grayed-out) when the "Current-Obj AP_OBJ" is not specified.
Note
The Poke Command can be used to change any writable address, such as RAM, but also peripheral registers in your Target.

As shown in the screen shot below, the POKE command takes additionally the offset into the object [bytes], the size of the item [8-bit, 16-bit, 32-bit], and the data to "poke", which can be either decimal or hexadecimal (0x prefix).

Poke Command Dialog Box


The Target responds with Trg-Ack QS_RX_POKE:

           Trg-Ack  QS_RX_POKE

Events Menu

The "Events" menu allows you to Publish, Post, or Dispatch an event to the Target. Additionally, you can also "Initialize" a state machine by triggering the top-most initial transition in it.

Attention
The "Post..." menu requires the "Current-Obj AO_OBJ" to be set in the Current-Obj Menu, because this is the Ative Object within the Target which will be "posted". The "Dispatch..." and "Init SM..." menus require the "Current-Obj SM_OBJ" to be set in the Current-Obj Menu, because this is the State Machine within the Target which will be "dispatched" or "initialized". These menus are inactive (grayed-out) when the expected "Current-Objects" are not specified.
Events Menu with Post-Event Dialog Box

As shown in the screen-shot above, you define the custom event by providing the sig (signal), which can be either symbolic name (must correspond to the Signal Dictionary) or a numerical value.

The signal is followed by up to 9 optional event parameters par1..par9. Each parameter is specified as a pair of the size of the parameter [8-bit, 16-bit, 32-bit], and the value of the parameter, which can be either decimal or hexadecimal (0x prefix).

Attention
The parameters are sent using the endianness reported by the Target. Also, all the specified parameters are packed in the exact order without any "alignment". If the event structure is represented in the Target memory with some padding, you need to provide such padding explicitly (as one of the parameters).

Custom Menu

This top-level menu is provided for your customization. It's intent is to let you add your own commands in your script.

Help Menu

This menu allows you to access the online Q-SPY help in HTML, and also allows you to open the "About" dialog box.


Next: Customizing & Extending QView™