simulavr
1.1.0
|
Provides input of aanalog signal into simulator. More...
#include <adcpin.h>
Public Member Functions | |
AdcPin (const char *fileName, Net &pinNet) throw () | |
![]() | |
virtual | ~SimulationMember () |
Private Member Functions | |
int | Step (bool &trueHwStep, SystemClockOffset *timeToNextStepIn_ns=0) |
Return nonzero if a breakpoint was hit. More... | |
Private Attributes | |
AdcAnalogPin | _analogPin |
Output to AVR. More... | |
std::ifstream | _anaFile |
The analog input file. More... | |
Provides input of aanalog signal into simulator.
The purpose of this class is to stimulate a pin with an analog pattern specified by a file. The file will contain an "analog sample value" on each line, along with a duration in nano-seconds that must elapse before the value is changed.
AdcPin::AdcPin | ( | const char * | fileName, |
Net & | pinNet | ||
) | |||
throw | ( | ||
) |
Definition at line 28 of file adcpin.cpp.
References Pin::ANALOG, and avr_error.
|
privatevirtual |
Return nonzero if a breakpoint was hit.
Implements SimulationMember.
Definition at line 53 of file adcpin.cpp.
References _anaFile, _analogPin, readNextLine(), and AdcAnalogPin::setAnalogValue().
|
private |
|
private |