| |
- Call
- Player
- Recorder
class Call |
|
Represents an operation call over a given component.
Used by the Player class. |
|
Methods defined here:
- __init__(self, meth_name, args, t)
- Constructor.
Parameters:
meth_name - Method name.
args - Tuple containing the operation arguments.
- getArgs(self)
- Gets the method's arguments.
- getMethodName(self)
- Gets the method's name.
- getReturnValue(self)
- Get the return value. Calling this method only makes sense after
calling invoke().
- getTime(self)
- invoke(self, component)
- Invoke the call represented by an instance of this class over a
component. Of course, the component should support the operation.
Parameters:
component - Component reference.
- setArgs(self, args)
- Sets the arguments for this call. This is useful for cases where it is needed
to replace arguments in order for an invokation to work. For example, if
the arguments are CORBA references or callbacks, which only are valid during
the recording session.
Parameters:
args - Arguments tuple.
|
class Player |
|
Plays a record file generated with the IDL Simulator. |
|
Methods defined here:
- __getitem__(self, i)
- Overrided indexing operation.
- __init__(self, file_name)
- Constructor.
Parameters:
file_name - File generated by the IDL simulator when the ACSSIM_REC_DIR
environment variable is set in the process running the simulated
components.
This file contains a description of the calls to a simulated component,
along with its arguments.
- __len__(self)
- fixCORBAEnums(self, obj)
- Utility function.
Fixes a problem with CORBA Enums. For some reason that I don't quite understand yet,
CORBA enumerations are not pickled/unpickled correctly. Using them as they are after
unpickling will throw a CORBA.BAD_PARAM exception. One way to fix this is simply to
recreate them, which is what this function does. It goes through each one of obj
members, find the CORBA enums and recreates them. It works recursively for each one of
obj members.
Parameters:
obj - An arbitrary CORBA object.
- getComponentName(self)
- getStartTime(self)
- replaceCall(self, i, call)
- Replaces a call object.
Parameters:
i - Call number
call - Call object
- restoreXMLEntities(self, s)
- Utilitiy function. Replaces XML entities for its respective characters.
& -> &
&apos -> '
< -> <
> -> >
" -> "
|
class Recorder |
|
This class is used by the ACS IDL Simulator to record a simulation session
into a file. This file can be used afterwards by the Player class to run
again the session over the "real" component. |
|
Methods defined here:
- __init__(self, comp_name)
- Constructor. Checks if the environment variable ACSSIM_REC_DIR has
been set. This should be the directory where the Recorder will output
invokation information. If this env. variable is not set the Recorder
class does nothing.
Parameters:
comp_name - Component name.
- begin(self)
- Begin the recording session.
- end(self)
- End the recording session.
- record(self, meth_name, args)
- Record a method invokation.
Parameters:
method_name - Method name.
args - Argument list.
- replaceXMLEntities(self, s)
- Replaces special characters of its corresponding XML entities.
& -> &
' -> '
< -> <
> -> >
" -> "
| |