#include <testAsynPortDriver.h>

| Public Member Functions | |
| testAsynPortDriver (const char *portName, int maxArraySize) | |
| Constructor for the testAsynPortDriver class. | |
| virtual asynStatus | writeInt32 (asynUser *pasynUser, epicsInt32 value) | 
| Called when asyn clients call pasynInt32->write(). | |
| virtual asynStatus | writeFloat64 (asynUser *pasynUser, epicsFloat64 value) | 
| Called when asyn clients call pasynFloat64->write(). | |
| virtual asynStatus | readFloat64Array (asynUser *pasynUser, epicsFloat64 *value, size_t nElements, size_t *nIn) | 
| Called when asyn clients call pasynFloat64Array->read(). | |
| void | simTask (void) | 
| Simulation task that runs as a separate thread. | |
| Protected Attributes | |
| int | P_Run | 
| Values used for pasynUser->reason, and indexes into the parameter library. | |
| int | P_MaxPoints | 
| int | P_TimePerDivision | 
| int | P_VoltsPerDivision | 
| int | P_VoltOffset | 
| int | P_TriggerDelay | 
| int | P_NoiseAmplitude | 
| int | P_UpdateTime | 
| int | P_Waveform | 
| int | P_TimeBase | 
| int | P_MinValue | 
| int | P_MaxValue | 
| int | P_MeanValue | 
This class does a simple simulation of a digital oscilloscope. It computes a waveform, computes statistics on the waveform, and does callbacks with the statistics and the waveform data itself. I have made the methods of this class public in order to generate doxygen documentation for them, but they should really all be private.
| testAsynPortDriver::testAsynPortDriver | ( | const char * | portName, | |
| int | maxPoints | |||
| ) | 
Constructor for the testAsynPortDriver class.
Calls constructor for the asynPortDriver base class.
| [in] | portName | The name of the asyn port driver to be created. | 
| [in] | maxPoints | The maximum number of points in the volt and time arrays | 
| asynStatus testAsynPortDriver::readFloat64Array | ( | asynUser * | pasynUser, | |
| epicsFloat64 * | value, | |||
| size_t | nElements, | |||
| size_t * | nIn | |||
| ) |  [virtual] | 
Called when asyn clients call pasynFloat64Array->read().
Returns the value of the P_Waveform or P_TimeBase arrays.
| [in] | pasynUser | pasynUser structure that encodes the reason and address. | 
| [in] | value | Pointer to the array to read. | 
| [in] | nElements | Number of elements to read. | 
| [out] | nIn | Number of elements actually read. | 
Reimplemented from asynPortDriver.
| void testAsynPortDriver::simTask | ( | void | ) | 
Simulation task that runs as a separate thread.
When the P_Run parameter is set to 1 to rub the simulation it computes a 1 kHz sine wave with 1V amplitude and user-controllable noise, and displays it on a simulated scope. It computes waveforms for the X (time) and Y (volt) axes, and computes statistics about the waveform.
| asynStatus testAsynPortDriver::writeFloat64 | ( | asynUser * | pasynUser, | |
| epicsFloat64 | value | |||
| ) |  [virtual] | 
Called when asyn clients call pasynFloat64->write().
This function sends a signal to the simTask thread if the value of P_UpdateTime has changed. For all parameters it sets the value in the parameter library and calls any registered callbacks.
| [in] | pasynUser | pasynUser structure that encodes the reason and address. | 
| [in] | value | Value to write. | 
Reimplemented from asynPortDriver.
| asynStatus testAsynPortDriver::writeInt32 | ( | asynUser * | pasynUser, | |
| epicsInt32 | value | |||
| ) |  [virtual] | 
Called when asyn clients call pasynInt32->write().
This function sends a signal to the simTask thread if the value of P_Run has changed. For all parameters it sets the value in the parameter library and calls any registered callbacks..
| [in] | pasynUser | pasynUser structure that encodes the reason and address. | 
| [in] | value | Value to write. | 
Reimplemented from asynPortDriver.
| int testAsynPortDriver::P_MaxPoints  [protected] | 
| int testAsynPortDriver::P_MaxValue  [protected] | 
| int testAsynPortDriver::P_MeanValue  [protected] | 
| int testAsynPortDriver::P_MinValue  [protected] | 
| int testAsynPortDriver::P_NoiseAmplitude  [protected] | 
| int testAsynPortDriver::P_Run  [protected] | 
Values used for pasynUser->reason, and indexes into the parameter library.
| int testAsynPortDriver::P_TimeBase  [protected] | 
| int testAsynPortDriver::P_TimePerDivision  [protected] | 
| int testAsynPortDriver::P_TriggerDelay  [protected] | 
| int testAsynPortDriver::P_UpdateTime  [protected] | 
| int testAsynPortDriver::P_VoltOffset  [protected] | 
| int testAsynPortDriver::P_VoltsPerDivision  [protected] | 
| int testAsynPortDriver::P_Waveform  [protected] | 
 1.5.7.1
 1.5.7.1