Public Member Functions | Private Member Functions | Private Attributes
rtshell.gen_comp.GenComp Class Reference

Generated-on-demand component class. More...

Inheritance diagram for rtshell.gen_comp.GenComp:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def onExecute
def onInitialize

Private Member Functions

def _behv
def _set

Private Attributes

 _count
 _event
 _max
 _port_specs
 _ports

Detailed Description

Generated-on-demand component class.

Definition at line 112 of file gen_comp.py.


Constructor & Destructor Documentation

def rtshell.gen_comp.GenComp.__init__ (   self,
  mgr,
  port_specs,
  event = None,
  max = -1,
  args,
  kwargs 
)
Constructor.

@param mgr Reference to the manager that created this component.
@param port_spec The port layout of the component. This must be
         a list of port_types.PortSpec objects.
@param event An event object that can be .set() to indicate
     that the component has finished its assigned task
     and should be shut down.
@param max The maximum number of times this component should
   perform its onExecute function before setting the
   event to request a shutdown. Defaults to -1, for
   unlimited.

Reimplemented in rtshell.rtinject_comp.StdinWriter.

Definition at line 113 of file gen_comp.py.


Member Function Documentation

def rtshell.gen_comp.GenComp._behv (   self,
  ec_id 
) [private]
Behaviour function for derived components.

Deriving classes must implement this function. It will be called by
onExecute. It must return a tuple of (RTC result code, _behv result
value). The RTC result code is used to create the result of onExecute;
if no errors occur, it must be RTC.RTC_OK. The _behv result code is
used to tell the component if the behaviour was able to execute
(whether it succeeded or not), for the purposes of execution counting.
It should be the number of iterations executed.

Reimplemented in rtshell.rtlog_comps.Player, rtshell.rtlog_comps.Recorder, rtshell.rtinject_comp.StdinWriter, rtshell.rtinject_comp.Writer, and rtshell.rtprint_comp.Reader.

Definition at line 172 of file gen_comp.py.

def rtshell.gen_comp.GenComp._set (   self) [private]
Call set() on the event object to notify waiters.

Definition at line 186 of file gen_comp.py.

def rtshell.gen_comp.GenComp.onExecute (   self,
  ec_id 
)

Definition at line 161 of file gen_comp.py.

Definition at line 134 of file gen_comp.py.


Member Data Documentation

Definition at line 126 of file gen_comp.py.

Definition at line 126 of file gen_comp.py.

Definition at line 126 of file gen_comp.py.

Definition at line 126 of file gen_comp.py.

Definition at line 134 of file gen_comp.py.


The documentation for this class was generated from the following file:


rtshell
Author(s): Geoffrey Biggs
autogenerated on Fri Aug 28 2015 12:55:12