QTools 6.9.3
qview Namespace Reference

Classes

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

Functions

def reset_target (*args)
 Send the RESET packet to the Target. More...
 
def command (cmdId, param1=0, param2=0, param3=0)
 executes a given command in the Target More...
 
def tick (tick_rate=0)
 trigger system clock tick in the Target More...
 
def peek (offset, size, num)
 peeks data in the Target More...
 
def poke (offset, size, data)
 pokes data into the Target More...
 
def glb_filter (*args)
 Set/clear the Global-Filter in the Target. More...
 
def loc_filter (*args)
 Set/clear the Local-Filter in the Target. More...
 
def ao_filter (obj_id)
 Set/clear the Active-Object Local-Filter in the Target. More...
 
def current_obj (obj_kind, obj_id)
 Set the Current-Object in the Target. More...
 
def query_curr (obj_kind)
 query the current object in the Target More...
 
def publish (signal, params=None)
 publish a given event to subscribers in the Target More...
 
def post (signal, params=None)
 post a given event to the current AO object in the Target More...
 
def init (signal=0, params=None)
 take the top-most initial transition in the current SM object in the Target More...
 
def dispatch (signal, params=None)
 dispatch a given event in the current SM object in the Target More...
 
def qunpack (fmt, bstr)
 Unpack a QS trace record. More...
 
def 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_U0 = 0xF8
 
int GRP_U1 = 0xF9
 
int GRP_U2 = 0xFA
 
int GRP_U3 = 0xFB
 
int GRP_U4 = 0xFC
 
int GRP_UA = 0xFD
 
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
 

Function Documentation

◆ reset_target()

def qview.reset_target ( args)

Send the RESET packet to the Target.

Definition at line 1546 of file qview.py.

◆ command()

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

executes a given command in the Target

See also
qutest_dsl.command()

Definition at line 1554 of file qview.py.

◆ tick()

def qview.tick (   tick_rate = 0)

trigger system clock tick in the Target

See also
qutest_dsl.tick()

Definition at line 1565 of file qview.py.

◆ peek()

def qview.peek (   offset,
  size,
  num 
)

peeks data in the Target

See also
qutest_dsl.peek()

Definition at line 1570 of file qview.py.

◆ poke()

def qview.poke (   offset,
  size,
  data 
)

pokes data into the Target

See also
qutest_dsl.poke()

Definition at line 1575 of file qview.py.

◆ glb_filter()

def qview.glb_filter ( args)

Set/clear the Global-Filter in the Target.

See also
qutest_dsl.glb_filter()

Definition at line 1581 of file qview.py.

◆ loc_filter()

def qview.loc_filter ( args)

Set/clear the Local-Filter in the Target.

See also
qutest_dsl.loc_filter()

Definition at line 1648 of file qview.py.

◆ ao_filter()

def qview.ao_filter (   obj_id)

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

See also
qutest_dsl.ao_filter()

Definition at line 1684 of file qview.py.

◆ current_obj()

def qview.current_obj (   obj_kind,
  obj_id 
)

Set the Current-Object in the Target.

See also
qutest_dsl.current_obj()

Definition at line 1707 of file qview.py.

◆ query_curr()

def qview.query_curr (   obj_kind)

query the current object in the Target

See also
qutest_dsl.query_curr()

Definition at line 1724 of file qview.py.

◆ publish()

def qview.publish (   signal,
  params = None 
)

publish a given event to subscribers in the Target

See also
qutest_dsl.publish()

Definition at line 1729 of file qview.py.

◆ post()

def 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 1734 of file qview.py.

◆ init()

def 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 1740 of file qview.py.

◆ dispatch()

def 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 1745 of file qview.py.

◆ qunpack()

def 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)
def qunpack(fmt, bstr)
Unpack a QS trace record.
Definition: qview.py:1778

Definition at line 1778 of file qview.py.

◆ main()

def qview.main ( )

Definition at line 1832 of file qview.py.

Variable Documentation

◆ OBJ_SM

int OBJ_SM = 0

Definition at line 1511 of file qview.py.

◆ OBJ_AO

int OBJ_AO = 1

Definition at line 1512 of file qview.py.

◆ OBJ_MP

int OBJ_MP = 2

Definition at line 1513 of file qview.py.

◆ OBJ_EQ

int OBJ_EQ = 3

Definition at line 1514 of file qview.py.

◆ OBJ_TE

int OBJ_TE = 4

Definition at line 1515 of file qview.py.

◆ OBJ_AP

int OBJ_AP = 5

Definition at line 1516 of file qview.py.

◆ GRP_ALL

int GRP_ALL = 0xF0

Definition at line 1519 of file qview.py.

◆ GRP_SM

int GRP_SM = 0xF1

Definition at line 1520 of file qview.py.

◆ GRP_AO

int GRP_AO = 0xF2

Definition at line 1521 of file qview.py.

◆ GRP_MP

int GRP_MP = 0xF3

Definition at line 1522 of file qview.py.

◆ GRP_EQ

int GRP_EQ = 0xF4

Definition at line 1523 of file qview.py.

◆ GRP_TE

int GRP_TE = 0xF5

Definition at line 1524 of file qview.py.

◆ GRP_QF

int GRP_QF = 0xF6

Definition at line 1525 of file qview.py.

◆ GRP_SC

int GRP_SC = 0xF7

Definition at line 1526 of file qview.py.

◆ GRP_U0

int GRP_U0 = 0xF8

Definition at line 1527 of file qview.py.

◆ GRP_U1

int GRP_U1 = 0xF9

Definition at line 1528 of file qview.py.

◆ GRP_U2

int GRP_U2 = 0xFA

Definition at line 1529 of file qview.py.

◆ GRP_U3

int GRP_U3 = 0xFB

Definition at line 1530 of file qview.py.

◆ GRP_U4

int GRP_U4 = 0xFC

Definition at line 1531 of file qview.py.

◆ GRP_UA

int GRP_UA = 0xFD

Definition at line 1532 of file qview.py.

◆ GRP_ON

int GRP_ON = GRP_ALL

Definition at line 1533 of file qview.py.

◆ GRP_OFF

int GRP_OFF = -GRP_ALL

Definition at line 1534 of file qview.py.

◆ IDS_ALL

int IDS_ALL = 0xF0

Definition at line 1537 of file qview.py.

◆ IDS_AO

tuple IDS_AO = (0x80 + 0)

Definition at line 1538 of file qview.py.

◆ IDS_EP

tuple IDS_EP = (0x80 + 64)

Definition at line 1539 of file qview.py.

◆ IDS_EQ

tuple IDS_EQ = (0x80 + 80)

Definition at line 1540 of file qview.py.

◆ IDS_AP

tuple IDS_AP = (0x80 + 96)

Definition at line 1541 of file qview.py.

◆ HOME_DIR

HOME_DIR = None

Definition at line 1543 of file qview.py.