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.
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.
The File menu provides an 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.
The View menu allows you to toggle (show/hide) the Canvas view.
The Filters menu opens dialog boxes through which you can set the QS Global Filter 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.
[-]
— no filters in the group are selected[+-]
— some filters in the group are selected[+]
— all filters in the group are selected.The Filters menu opens dialog boxes through which you can set the QS Local Filter for QS QS-IDs.
The Local Filter menu opens dialog boxes for each group of local filters. For example, the screen shot below shows the "AO-IDs" (Active Object Group). In this "AO-IDs" dialog box you can check/uncheck the individual QS-IDs (which are AO priorities in this case), or you can "Select ALL" or "Clear ALL" filters in the group.
[-]
— no filters in the group are selected[+-]
— some filters in the group are selected[+]
— all filters in the group are selected.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).
Table_inst
).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 briefly discussed below.
The "Tag Message..." menu allows you to display a tag message in the QSPY output.
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).
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).
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.)
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".
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>
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.)
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).
The Target responds with Trg-Ack QS_RX_POKE
:
Trg-Ack QS_RX_POKE
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.
As shown in the screen-shot above, you define the custom event by providing the sig (signal), which can be either its 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).
This top-level menu is provided for your customization. Its intent is to let you add your own commands in your script.
This menu allows you to access the online Q-SPY help in HTML, and also allows you to open the "About" dialog box.