MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <PulseGen.h>
Public Member Functions | |
double | getBaseLevel () const |
unsigned int | getCount () const |
double | getDelay (unsigned int index) const |
double | getFirstDelay () const |
double | getFirstLevel () const |
double | getFirstWidth () const |
double | getLevel (unsigned int index) const |
double | getOutput () const |
int | getPreviousInput () const |
double | getSecondDelay () const |
double | getSecondLevel () const |
double | getSecondWidth () const |
unsigned int | getTrigMode () const |
double | getTrigTime () const |
double | getWidth (unsigned int index) const |
void | input (double input) |
void | process (const Eref &e, ProcPtr p) |
PulseGen () | |
void | reinit (const Eref &e, ProcPtr p) |
void | setBaseLevel (double value) |
void | setCount (unsigned int count) |
void | setDelay (unsigned int pulseNo, double delay) |
void | setFirstDelay (double value) |
void | setFirstLevel (double value) |
void | setFirstWidth (double value) |
void | setLevel (unsigned int pulseNo, double level) |
void | setSecondDelay (double value) |
void | setSecondLevel (double value) |
void | setSecondWidth (double value) |
void | setTrigMode (unsigned int value) |
void | setWidth (unsigned int pulseNo, double width) |
~PulseGen () | |
Static Public Member Functions | |
static const Cinfo * | initCinfo () |
Protected Attributes | |
double | baseLevel_ |
vector< double > | delay_ |
int | input_ |
vector< double > | level_ |
double | output_ |
int | prevInput_ |
bool | secondPulse_ |
unsigned int | trigMode_ |
double | trigTime_ |
vector< double > | width_ |
Static Private Attributes | |
static const int | EXT_GATE = 2 |
static const int | EXT_TRIG = 1 |
static const int | FREE_RUN = 0 |
PulseGen acts as a pulse generator. It generates square pulses of specified duration and amplitude. Two consecutive pulses are separated by specified delay.
Definition at line 40 of file PulseGen.h.
PulseGen::PulseGen | ( | ) |
Definition at line 188 of file PulseGen.cpp.
References baseLevel_, delay_, level_, output_, prevInput_, trigMode_, trigTime_, and width_.
PulseGen::~PulseGen | ( | ) |
Definition at line 206 of file PulseGen.cpp.
double PulseGen::getBaseLevel | ( | ) | const |
Definition at line 289 of file PulseGen.cpp.
References baseLevel_.
Referenced by initCinfo().
unsigned int PulseGen::getCount | ( | ) | const |
Definition at line 327 of file PulseGen.cpp.
References level_.
Referenced by initCinfo().
double PulseGen::getDelay | ( | unsigned int | index | ) | const |
Definition at line 368 of file PulseGen.cpp.
References delay_.
Referenced by initCinfo().
double PulseGen::getFirstDelay | ( | ) | const |
Definition at line 235 of file PulseGen.cpp.
References delay_.
Referenced by initCinfo().
double PulseGen::getFirstLevel | ( | ) | const |
Definition at line 217 of file PulseGen.cpp.
References level_.
Referenced by initCinfo().
double PulseGen::getFirstWidth | ( | ) | const |
Definition at line 227 of file PulseGen.cpp.
References width_.
Referenced by initCinfo().
double PulseGen::getLevel | ( | unsigned int | index | ) | const |
Definition at line 332 of file PulseGen.cpp.
References level_.
Referenced by initCinfo().
double PulseGen::getOutput | ( | ) | const |
Definition at line 301 of file PulseGen.cpp.
References output_.
Referenced by initCinfo().
int PulseGen::getPreviousInput | ( | ) | const |
Definition at line 306 of file PulseGen.cpp.
References prevInput_.
double PulseGen::getSecondDelay | ( | ) | const |
Definition at line 277 of file PulseGen.cpp.
References delay_.
Referenced by initCinfo().
double PulseGen::getSecondLevel | ( | ) | const |
Definition at line 247 of file PulseGen.cpp.
References level_.
Referenced by initCinfo().
double PulseGen::getSecondWidth | ( | ) | const |
Definition at line 263 of file PulseGen.cpp.
References width_.
Referenced by initCinfo().
unsigned int PulseGen::getTrigMode | ( | ) | const |
Definition at line 297 of file PulseGen.cpp.
References trigMode_.
Referenced by initCinfo().
double PulseGen::getTrigTime | ( | ) | const |
double PulseGen::getWidth | ( | unsigned int | index | ) | const |
Definition at line 351 of file PulseGen.cpp.
References width_.
Referenced by initCinfo().
|
static |
Definition at line 42 of file PulseGen.cpp.
References getBaseLevel(), getCount(), getDelay(), getFirstDelay(), getFirstLevel(), getFirstWidth(), getLevel(), getOutput(), getSecondDelay(), getSecondLevel(), getSecondWidth(), getTrigMode(), getWidth(), Neutral::initCinfo(), input(), output(), outputOut(), process(), pulseGenCinfo, reinit(), setBaseLevel(), setCount(), setDelay(), setFirstDelay(), setFirstLevel(), setFirstWidth(), setLevel(), setSecondDelay(), setSecondLevel(), setSecondWidth(), setTrigMode(), and setWidth().
void PulseGen::input | ( | double | input | ) |
Definition at line 392 of file PulseGen.cpp.
Referenced by initCinfo().
Definition at line 398 of file PulseGen.cpp.
References baseLevel_, ProcInfo::currTime, delay_, EXT_GATE, EXT_TRIG, FREE_RUN, input_, level_, output_, outputOut(), prevInput_, trigMode_, trigTime_, and width_.
Referenced by initCinfo().
Definition at line 466 of file PulseGen.cpp.
References baseLevel_, input_, output_, outputOut(), prevInput_, and trigTime_.
Referenced by initCinfo().
void PulseGen::setBaseLevel | ( | double | value | ) |
Definition at line 285 of file PulseGen.cpp.
References baseLevel_.
Referenced by initCinfo().
void PulseGen::setCount | ( | unsigned int | count | ) |
Definition at line 311 of file PulseGen.cpp.
References delay_, level_, and width_.
Referenced by initCinfo().
void PulseGen::setDelay | ( | unsigned int | pulseNo, |
double | delay | ||
) |
Definition at line 378 of file PulseGen.cpp.
References delay_.
Referenced by initCinfo().
void PulseGen::setFirstDelay | ( | double | value | ) |
Definition at line 231 of file PulseGen.cpp.
References delay_.
Referenced by initCinfo().
void PulseGen::setFirstLevel | ( | double | value | ) |
Definition at line 212 of file PulseGen.cpp.
References level_.
Referenced by initCinfo().
void PulseGen::setFirstWidth | ( | double | value | ) |
Definition at line 222 of file PulseGen.cpp.
References width_.
Referenced by initCinfo().
void PulseGen::setLevel | ( | unsigned int | pulseNo, |
double | level | ||
) |
Definition at line 342 of file PulseGen.cpp.
References level_.
Referenced by initCinfo().
void PulseGen::setSecondDelay | ( | double | value | ) |
Definition at line 271 of file PulseGen.cpp.
References delay_.
Referenced by initCinfo().
void PulseGen::setSecondLevel | ( | double | value | ) |
Definition at line 240 of file PulseGen.cpp.
References level_.
Referenced by initCinfo().
void PulseGen::setSecondWidth | ( | double | value | ) |
Definition at line 256 of file PulseGen.cpp.
References width_.
Referenced by initCinfo().
void PulseGen::setTrigMode | ( | unsigned int | value | ) |
Definition at line 293 of file PulseGen.cpp.
References trigMode_.
Referenced by initCinfo().
void PulseGen::setWidth | ( | unsigned int | pulseNo, |
double | width | ||
) |
Definition at line 360 of file PulseGen.cpp.
References width_.
Referenced by initCinfo().
|
protected |
Definition at line 128 of file PulseGen.h.
Referenced by getBaseLevel(), process(), PulseGen(), reinit(), and setBaseLevel().
|
protected |
Definition at line 123 of file PulseGen.h.
Referenced by getDelay(), getFirstDelay(), getSecondDelay(), process(), PulseGen(), setCount(), setDelay(), setFirstDelay(), and setSecondDelay().
|
staticprivate |
With trigMode = EXT_GATE, the pulse occurs firstDelay later from the leading edge of the input.
Definition at line 68 of file PulseGen.h.
Referenced by process().
|
staticprivate |
With trigMode = EXT_TRIG the pulse generator may be triggered or may generate a single pulse and then stop. The logic depends on trigTime field. If trigTime is negative ( which it is by default and remains so unless there is a non zero input trigger to the PulseGen object ), the output remains at baselevel. For trigTime >= 0, if there is no input trigger, the PulseGen object will produce pair of pulses, the first one starting at firstDelay and staying at firstLevel for firstWidth time. And then the second one starting at secondDelay time after the start of the first pulse, staying at secondLevel for secondWidth time. If secondDelay is less than firstWidth, there will be no second pulse.
Definition at line 63 of file PulseGen.h.
Referenced by process().
|
staticprivate |
With trigMode = FREE_RUN the pulse generator will create a train of pulses determined by the firstDealy, firstWidth, firstLevel, secondDelay, secondWidth and secondLevel.
Definition at line 47 of file PulseGen.h.
Referenced by process().
|
protected |
Definition at line 134 of file PulseGen.h.
|
protected |
Definition at line 124 of file PulseGen.h.
Referenced by getCount(), getFirstLevel(), getLevel(), getSecondLevel(), process(), PulseGen(), setCount(), setFirstLevel(), setLevel(), and setSecondLevel().
|
protected |
Definition at line 127 of file PulseGen.h.
Referenced by getOutput(), process(), PulseGen(), and reinit().
|
protected |
Definition at line 133 of file PulseGen.h.
Referenced by getPreviousInput(), process(), PulseGen(), and reinit().
|
protected |
Definition at line 131 of file PulseGen.h.
|
protected |
Definition at line 130 of file PulseGen.h.
Referenced by getTrigMode(), process(), PulseGen(), and setTrigMode().
|
protected |
Definition at line 129 of file PulseGen.h.
Referenced by process(), PulseGen(), and reinit().
|
protected |
Definition at line 125 of file PulseGen.h.
Referenced by getFirstWidth(), getSecondWidth(), getWidth(), process(), PulseGen(), setCount(), setFirstWidth(), setSecondWidth(), and setWidth().