AdcPin Class Reference

Provides input of aanalog signal into simulator. More...

#include <adcpin.h>

Inheritance diagram for AdcPin:
Inheritance graph
[legend]
Collaboration diagram for AdcPin:
Collaboration graph
[legend]

List of all members.

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.

Detailed Description

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.


Constructor & Destructor Documentation

AdcPin::AdcPin ( const char *  fileName,
Net pinNet 
) throw ()

Definition at line 28 of file adcpin.cpp.

References Pin::ANALOG, and avr_error.


Member Function Documentation

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().

Here is the call graph for this function:


Member Data Documentation

std::ifstream AdcPin::_anaFile [private]

The analog input file.

Definition at line 59 of file adcpin.h.

Referenced by Step().

Output to AVR.

Definition at line 56 of file adcpin.h.

Referenced by Step().


The documentation for this class was generated from the following files:
Generated on Sun Feb 12 16:45:04 2012 for Simulavr by  doxygen 1.6.3