Package topo :: Package ep :: Module basic :: Class PulseGenerator
[hide private]
[frames] | no frames]

Class PulseGenerator

source code


A simple pulse generator node.

Produces pulses (scalars) of a fixed amplitude at a fixed frequency and phase. Period and phase are in units of simulation time.

Nested Classes [hide private]

Inherited from param.parameterized.Parameterized: __metaclass__

Instance Methods [hide private]
 
input_event(self, conn, data)
On input from self, generate output.
source code
 
start(self)
Called by the simulation when the EventProcessor is added to the simulation.
source code

Inherited from base.simulation.EventProcessor: __init__, process_current_time, script_repr, send_output

Inherited from param.parameterized.Parameterized: __getstate__, __repr__, __setstate__, __str__, debug, defaults, force_new_dynamic_value, get_param_values, get_value_generator, inspect_value, message, print_param_values, set_default, set_dynamic_time_fn, set_param, state_pop, state_push, verbose, warning

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

Class Methods [hide private]

Inherited from param.parameterized.Parameterized: params, print_param_defaults

Class Variables [hide private]
  dest_ports = None
list() -> new list list(sequence) -> new list initialized from sequence's items
  amplitude = param.Number(1.0, doc= "The size of the pulse to g...
The size of the pulse to generate.
  period = param.Number(1.0, bounds= (0.0, None), doc= "The peri...
The period with which to repeat the pulse.
  phase = param.Number(0.0, doc= "The time after starting the si...
The time after starting the simulation to wait before sending the first pulse.
  name = <param.parameterized.String object at 0xb287b6c>
String identifier for this object.

Inherited from base.simulation.EventProcessor: src_ports

Inherited from param.parameterized.Parameterized: print_level

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

input_event(self, conn, data)

source code 
On input from self, generate output. Ignore all other inputs.
Overrides: base.simulation.EventProcessor.input_event

start(self)

source code 

Called by the simulation when the EventProcessor is added to the simulation.

If an EventProcessor needs to have any code run when it is added to the simulation, the code can be put into this method in the subclass.

Overrides: base.simulation.EventProcessor.start
(inherited documentation)

Class Variable Details [hide private]

amplitude

The size of the pulse to generate.
Value:
param.Number(1.0, doc= "The size of the pulse to generate.")

period

The period with which to repeat the pulse. Must be greater than zero.
Value:
param.Number(1.0, bounds= (0.0, None), doc= "The period with which to repeat the p\
ulse. Must be greater than zero.")

phase

The time after starting the simulation to wait before sending the first pulse.
Value:
param.Number(0.0, doc= "The time after starting the simulation to wait before send\
ing the first pulse.")