Provides input of aanalog signal into simulator. More...
#include <adcpin.h>
Public Member Functions | |
AdcPin (const char *fileName, Net &pinNet) throw () | |
Private Member Functions | |
int | Step (bool &trueHwStep, SystemClockOffset *timeToNextStepIn_ns=0) |
Return nonzero if a breakpoint was hit. | |
Private Attributes | |
AdcAnalogPin | _analogPin |
Output to AVR. | |
std::ifstream | _anaFile |
The analog input file. |
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.
Definition at line 53 of file adcpin.h.
AdcPin::AdcPin | ( | const char * | fileName, | |
Net & | pinNet | |||
) | throw () |
Definition at line 28 of file adcpin.cpp.
References Pin::ANALOG, and avr_error.
int AdcPin::Step | ( | bool & | trueHwStep, | |
SystemClockOffset * | timeToNextStepIn_ns = 0 | |||
) | [private, virtual] |
Return nonzero if a breakpoint was hit.
Implements SimulationMember.
Definition at line 53 of file adcpin.cpp.
References _anaFile, _analogPin, readNextLine(), and AdcAnalogPin::setAnalogValue().
std::ifstream AdcPin::_anaFile [private] |
AdcAnalogPin AdcPin::_analogPin [private] |