Module simwbClient :: Class RTDB

Class RTDB

object --+
         |
        RTDB


The RTDB class encapsulates all the available information on the items
in a running test's RTDB. This includes Simulink model parameters and
signals, and SimWB created items (i.e. items created by tasks, SimWB
stats, etc).

If no test is running then all lookup functions return no matches.

Example usage:
    import simwbPath
    import simwbClient as swb

    swb.connect('localhost')
    swb.login('admin/nimda')
    swb.projectSelect('Simulink')
    swb.sessionStart('rtdemo1')

    rtdb = swb.RTDB()
    possibles = rtdb.Regex('^reference$', blind=True)
    if len(possibles) > 1:
        sys.exit('Too many reference matches!')
    lf len(possibles) == 0:
        sys.exit('No reference matches!')

    reference = possibles[0]

    print 'cvttype of %r is %r' % (reference.Name,reference.CVTType)

    val = reference.Value
    print 'current value is %r' % val

    print 'set current value to 20'
    reference.Value = 20

Instance Methods
 
Glob(self, pattern=None)
Returns a list of RTDBItem objects for all names matching the shell wild-card pattern 'pattern'.
 
Regex(self, regex=None, blind=False)
Returns a list of RTDBItem objects for all names matching the regular expression 'regex'.
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__repr__(self)
repr(x)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties
  Init
Reinitialize state.
  Items
A list of dictionaries, keyed by name, of all RTDB items in the currently running test.
  Names
A sorted list of all RTDB item names in the currently running test.
  Project
The project name of the currently running test.
  RTDBName
The RTDB name of the currently running test.
  Running
True/False when a test is/is-not running on the target.

Inherited from object: __class__

Method Details

Glob(self, pattern=None)

 

Returns a list of RTDBItem objects for all names matching the shell wild-card pattern 'pattern'. No wild-card pattern returns the entire list.

Regex(self, regex=None, blind=False)

 

Returns a list of RTDBItem objects for all names matching the regular expression 'regex'. No regular expression returns the entire list.

Set 'blind' to True for a blind case comparison.

__init__(self)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)

Property Details

Init

Reinitialize state.

Get Method:
__init__(self) - x.__init__(...) initializes x; see help(type(x)) for signature

Items

A list of dictionaries, keyed by name, of all RTDB items in the currently running test.

Get Method:
__getItems(self)

Names

A sorted list of all RTDB item names in the currently running test.

Get Method:
__getNames(self)

Project

The project name of the currently running test.

Get Method:
__getProject(self)

RTDBName

The RTDB name of the currently running test.

Get Method:
__getRTDBName(self)

Running

True/False when a test is/is-not running on the target.

Get Method:
__getRunning(self)