QTools  7.4.0
Collection of Host-Based Tools
Loading...
Searching...
No Matches
qview Namespace Reference

Classes

class  QSpy
 Helper class for UDP-communication with the QSpy front-end (non-blocking UDP-socket version for QView) More...
 
class  QView
 

Functions

 reset_target (*args)
 Send the RESET packet to the Target.
 
 command (cmdId, param1=0, param2=0, param3=0)
 executes a given command in the Target
 
 tick (tick_rate=0)
 trigger system clock tick in the Target
 
 peek (offset, size, num)
 peeks data in the Target
 
 poke (offset, size, data)
 pokes data into the Target
 
 glb_filter (*args)
 Set/clear the Global-Filter in the Target.
 
 loc_filter (*args)
 Set/clear the Local-Filter in the Target.
 
 ao_filter (obj_id)
 Set/clear the Active-Object Local-Filter in the Target.
 
 current_obj (obj_kind, obj_id)
 Set the Current-Object in the Target.
 
 query_curr (obj_kind)
 query the current object in the Target
 
 publish (signal, params=None)
 publish a given event to subscribers in the Target
 
 post (signal, params=None)
 post a given event to the current AO object in the Target
 
 init (signal=0, params=None)
 take the top-most initial transition in the current SM object in the Target
 
 dispatch (signal, params=None)
 dispatch a given event in the current SM object in the Target
 
 qunpack (fmt, bstr)
 Unpack a QS trace record.
 
 main ()
 

Variables

int OBJ_SM = 0
 
int OBJ_AO = 1
 
int OBJ_MP = 2
 
int OBJ_EQ = 3
 
int OBJ_TE = 4
 
int OBJ_AP = 5
 
int GRP_ALL = 0xF0
 
int GRP_SM = 0xF1
 
int GRP_AO = 0xF2
 
int GRP_MP = 0xF3
 
int GRP_EQ = 0xF4
 
int GRP_TE = 0xF5
 
int GRP_QF = 0xF6
 
int GRP_SC = 0xF7
 
int GRP_SEM = 0xF8
 
int GRP_MTX = 0xF9
 
int GRP_U0 = 0xFA
 
int GRP_U1 = 0xFB
 
int GRP_U2 = 0xFC
 
int GRP_U3 = 0xFD
 
int GRP_U4 = 0xFE
 
int GRP_UA = 0xFF
 
int GRP_ON = GRP_ALL
 
int GRP_OFF = -GRP_ALL
 
int IDS_ALL = 0xF0
 
tuple IDS_AO = (0x80 + 0)
 
tuple IDS_EP = (0x80 + 64)
 
tuple IDS_EQ = (0x80 + 80)
 
tuple IDS_AP = (0x80 + 96)
 
 HOME_DIR = None
 home directory of the customization script
 

Function Documentation

◆ reset_target()

qview.reset_target ( * args)

Send the RESET packet to the Target.

Definition at line 1637 of file qview.py.

◆ command()

qview.command ( cmdId,
param1 = 0,
param2 = 0,
param3 = 0 )

executes a given command in the Target

See also
qutest_dsl.command()

Definition at line 1645 of file qview.py.

◆ tick()

qview.tick ( tick_rate = 0)

trigger system clock tick in the Target

See also
qutest_dsl.tick()

Definition at line 1656 of file qview.py.

◆ peek()

qview.peek ( offset,
size,
num )

peeks data in the Target

See also
qutest_dsl.peek()

Definition at line 1661 of file qview.py.

◆ poke()

qview.poke ( offset,
size,
data )

pokes data into the Target

See also
qutest_dsl.poke()

Definition at line 1666 of file qview.py.

◆ glb_filter()

qview.glb_filter ( * args)

Set/clear the Global-Filter in the Target.

See also
qutest_dsl.glb_filter()

Definition at line 1672 of file qview.py.

◆ loc_filter()

qview.loc_filter ( * args)

Set/clear the Local-Filter in the Target.

See also
qutest_dsl.loc_filter()

Definition at line 1745 of file qview.py.

◆ ao_filter()

qview.ao_filter ( obj_id)

Set/clear the Active-Object Local-Filter in the Target.

See also
qutest_dsl.ao_filter()

Definition at line 1781 of file qview.py.

◆ current_obj()

qview.current_obj ( obj_kind,
obj_id )

Set the Current-Object in the Target.

See also
qutest_dsl.current_obj()

Definition at line 1804 of file qview.py.

◆ query_curr()

qview.query_curr ( obj_kind)

query the current object in the Target

See also
qutest_dsl.query_curr()

Definition at line 1821 of file qview.py.

◆ publish()

qview.publish ( signal,
params = None )

publish a given event to subscribers in the Target

See also
qutest_dsl.publish()

Definition at line 1826 of file qview.py.

◆ post()

qview.post ( signal,
params = None )

post a given event to the current AO object in the Target

See also
qutest_dsl.post()

Definition at line 1831 of file qview.py.

◆ init()

qview.init ( signal = 0,
params = None )

take the top-most initial transition in the current SM object in the Target

See also
qutest_dsl.init()

Definition at line 1837 of file qview.py.

◆ dispatch()

qview.dispatch ( signal,
params = None )

dispatch a given event in the current SM object in the Target

See also
qutest_dsl.dispatch()

Definition at line 1842 of file qview.py.

◆ qunpack()

qview.qunpack ( fmt,
bstr )

Unpack a QS trace record.

Description
The qunpack() facility is similar to Python struct.unpack(), specifically designed for unpacking binary QP/Spy packets. qunpack() handles all data formats supported by struct.unpack()`, plus data formats specific to QP/Spy. The main benefit of qunpack() is that it automatically applies the Target-supplied info about various the sizes of various elements, such as Target timestamp, Target object-pointer, Target event-signal, zero-terminated string, etc.

pokes data into the Target

See also
qutest_dsl.poke()
Parameters
[in]fmtformat string
[in]bstrbyte-string to unpack
Returns
The result is a tuple with elements corresponding to the format items.

The additional format characters have the following meaning:

  • T : QP/Spy timestamp -> integer, 2..4-bytes (Target dependent)
  • O : QP/Spy object pointer -> integer, 2..8-bytes (Target dependent)
  • F : QP/Spy function pointer -> integer, 2..8-bytes (Target dependent)
  • S : QP/Spy event signal -> integer, 1..4-bytes (Target dependent)
  • Z : QP/Spy zero-terminated string -> string of n-bytes (variable length)
Usage
data = qunpack("xxTxBxZ", packet)
# returns:
# data[0], corresponds to 'T' format (QP/Spy timestamp)
# data[1], corresponds to 'B' format (standard struct.unpack())
# data[2], corresponds to 'Z' format (QP/Spy zero-terminated string)

Definition at line 1875 of file qview.py.

◆ main()

qview.main ( )

Definition at line 1929 of file qview.py.

Variable Documentation

◆ OBJ_SM

int qview.OBJ_SM = 0

Definition at line 1600 of file qview.py.

◆ OBJ_AO

int qview.OBJ_AO = 1

Definition at line 1601 of file qview.py.

◆ OBJ_MP

int qview.OBJ_MP = 2

Definition at line 1602 of file qview.py.

◆ OBJ_EQ

int qview.OBJ_EQ = 3

Definition at line 1603 of file qview.py.

◆ OBJ_TE

int qview.OBJ_TE = 4

Definition at line 1604 of file qview.py.

◆ OBJ_AP

int qview.OBJ_AP = 5

Definition at line 1605 of file qview.py.

◆ GRP_ALL

int qview.GRP_ALL = 0xF0

Definition at line 1608 of file qview.py.

◆ GRP_SM

int qview.GRP_SM = 0xF1

Definition at line 1609 of file qview.py.

◆ GRP_AO

int qview.GRP_AO = 0xF2

Definition at line 1610 of file qview.py.

◆ GRP_MP

int qview.GRP_MP = 0xF3

Definition at line 1611 of file qview.py.

◆ GRP_EQ

int qview.GRP_EQ = 0xF4

Definition at line 1612 of file qview.py.

◆ GRP_TE

int qview.GRP_TE = 0xF5

Definition at line 1613 of file qview.py.

◆ GRP_QF

int qview.GRP_QF = 0xF6

Definition at line 1614 of file qview.py.

◆ GRP_SC

int qview.GRP_SC = 0xF7

Definition at line 1615 of file qview.py.

◆ GRP_SEM

int qview.GRP_SEM = 0xF8

Definition at line 1616 of file qview.py.

◆ GRP_MTX

int qview.GRP_MTX = 0xF9

Definition at line 1617 of file qview.py.

◆ GRP_U0

int qview.GRP_U0 = 0xFA

Definition at line 1618 of file qview.py.

◆ GRP_U1

int qview.GRP_U1 = 0xFB

Definition at line 1619 of file qview.py.

◆ GRP_U2

int qview.GRP_U2 = 0xFC

Definition at line 1620 of file qview.py.

◆ GRP_U3

int qview.GRP_U3 = 0xFD

Definition at line 1621 of file qview.py.

◆ GRP_U4

int qview.GRP_U4 = 0xFE

Definition at line 1622 of file qview.py.

◆ GRP_UA

int qview.GRP_UA = 0xFF

Definition at line 1623 of file qview.py.

◆ GRP_ON

int qview.GRP_ON = GRP_ALL

Definition at line 1624 of file qview.py.

◆ GRP_OFF

int qview.GRP_OFF = -GRP_ALL

Definition at line 1625 of file qview.py.

◆ IDS_ALL

int qview.IDS_ALL = 0xF0

Definition at line 1628 of file qview.py.

◆ IDS_AO

tuple qview.IDS_AO = (0x80 + 0)

Definition at line 1629 of file qview.py.

◆ IDS_EP

tuple qview.IDS_EP = (0x80 + 64)

Definition at line 1630 of file qview.py.

◆ IDS_EQ

tuple qview.IDS_EQ = (0x80 + 80)

Definition at line 1631 of file qview.py.

◆ IDS_AP

tuple qview.IDS_AP = (0x80 + 96)

Definition at line 1632 of file qview.py.

◆ HOME_DIR

qview.HOME_DIR = None

home directory of the customization script

Definition at line 1634 of file qview.py.