Trees | Indices | Help |
|
---|
|
object --+ | Interfaces.Common.Port.Port.IPort --+ | Interfaces.MAPort.MAPort.IMAPort --+ | MAPort
Return an ASAM AE HIL Model Access Port to a running SimWB test.
Instance Methods | |||
Capture |
|
||
SignalGenerator |
|
||
|
|||
|
|||
|
|||
DataType |
|
||
bool |
|
||
bool |
|
||
BaseValue |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
unicode[] |
|
||
|
|||
unicode[] |
|
||
|
|||
|
|||
Inherited from |
Properties | |
CaptureOK | |
DAQClock | |
Lock | |
TaskNames | |
VariableAttributes | |
VariableNames | |
VariableUnits | |
Inherited from |
Method Details |
Returns a new capture task identified by name 'task'. The resultant task name (see NOTE beolow) is available as attribute TaskName of the returned capture object. NOTES: * Non-alphanumeric characters in 'task' are replaced with underscores. * Task names must be unique.
|
Returns a signal generator for a variable on this port.
|
Create a generic watcher on this port. This is implemented as a capture task without capture variables and without returning any data. It has only a single watch condition (the passed "watcher") that is either a ConditionWatcher or DurationWatcher. It will be used as the start trigger, with the stop trigger being a DurationWatcher(0). This can be very useful in terms of logic branching based on model behavior (i.e. knowing that something has happened without capturing data). The return is technically an active capture object, but the only things of interest are state and whether or not the conditon was met or not. For example: map = MAPort(configDict) ... # watcher = a ConditionWatcher() or DurationWatcher() ... wat = map.CreateWatcher(watcher) ... while wat.State != EWatcherState.eFINISHED: time.sleep(0.1) ... if wat.StartByTimeout: print('watcher timed out!') The EWatcherState enum is identical to the ECaptureState enum, but renamed for clarity of use. |
Returns the ASAM enumerated data type (eINT, eFLOAT, etc) for 'variableName'.
|
Always True.
|
Always True.
|
Return the value of 'variableName'. WARNING: SimWB maintains both a current (cvt) and alternate (alt) value of a variable. This method will ALWAYS return the cvt value (which is the value seen by the model).
|
Set the SimWB logger variable list to the variables in "names" (either a single name or a list of names). These should be names returned via the VariableNames property. When "fresh" is True, any existing logging variables are removed prior to adding those in "names". When False, this call effectively appends the named variables to the logger list. |
Run the configured test on the target. This method waits until the target indicates the test is running. NOTES: * This is part of the ASAM XIL-MA 2.1.0 extensions. |
Stop the test. This method waits until the target indicates the test is stopped. Stopping a stopped test is okay. NOTES: * This is part of the ASAM XIL-MA 2.1.0 extensions. |
Set the value of 'variableName' to 'value'.
|
Module import and object creation: from ASAM.HILAPI.Concurrent.MAPort import MAPort m = MAPort(configDict) Where configDict = {'host':'<SimWB server>', 'username':'<SimWB username>', 'password':'<SimWB password>', 'project':'<SimWB project name>', 'test':'<SimWB running test>', 'session':'<SimWB running session name>', } Optional keys in the cofigDict are: 'cpu' the CPU the ASAM task is to run on 'debug' a 0 or 1, where a 1 produces debug output NOTES: * Variable name arguments should be one of those returned by getVariableNames(). * All SimWB variable are both readable and writable. * This class has a print method. * Capture data extraction in SimWB must be serialized between multiple MAPorts. This is done by the calling script creating a thread lock object and setting the Lock property to that object for ALL created MAPorts: import thread lock = thread.allocate_lock() map1 = MAPort(configDict) map1.Lock = lock map2 = MAPort(configDict2) map2.Lock = lock
|
repr(x)
|
When True, captures are possible on this MAPort. False responses are most likely because the session does not have logging enabled. |
Returns the data logging time interval in seconds. NOTES: * This is part of the ASAM XIL-MA 2.1.0 extensions. |
Returns a list of capture tasks.
|
Companion to getVariableNames. See getVariableNames for details. |
Returns a list of all variable names for the running test (RTDB items, signals and parameters). In addition, create two additional dictionaries with information about the variables. The keys are the variable names returned by this method. These are: Attributes a string like "r", "rw", "rwc", where "r" is readable, "w" is writable, and "c" is capturable. If a variable is "w" is is also "r". Variables that are "r" but not "w" can be considered "measurements". Variables that are "w" can be considered "parameters". (available via getVariableAttributes() or VariableAttribues property) Units a string with a units name (e.g. "km", "sec", "gallons/minute", etc.). Undefined units will be an empty string. (available via getVariableUnits() or VariableUnits property)
|
Companion to getVariableNames. See getVariableNames for details. |
Property Details |
CaptureOK
|
DAQClock
|
Lock |
TaskNames
|
VariableAttributes
|
VariableNames
|
VariableUnits
|
Trees | Indices | Help |
|
---|
(c) Concurrent Real-Time | http://www.concurrent-rt.com |